summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.h
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 17:28:56 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 17:28:56 +0000
commitc28071ad39fdf60db886e6d6844da7c3331825a6 (patch)
tree89edfcbf7bd70f18191496fbefafe843316e6139 /chrome/browser/browser.h
parenta883f8fc702c2cb37130361b7ddc6fc86a8f2edf (diff)
downloadchromium_src-c28071ad39fdf60db886e6d6844da7c3331825a6.zip
chromium_src-c28071ad39fdf60db886e6d6844da7c3331825a6.tar.gz
chromium_src-c28071ad39fdf60db886e6d6844da7c3331825a6.tar.bz2
Support app tabs as a launch point for apps. Also, move the logic for launching into Browser for easier access by the launcher.
BUG=none TEST=none Review URL: http://codereview.chromium.org/668245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r--chrome/browser/browser.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 6ac5f01..b3aba9a 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -27,6 +27,7 @@
class BrowserWindow;
class DebuggerWindow;
+class Extension;
class ExtensionShelfModel;
class FindBarController;
class GoButton;
@@ -180,6 +181,11 @@ class Browser : public TabStripModelDelegate,
// |profile|, that session is re-used.
static void OpenURLOffTheRecord(Profile* profile, const GURL& url);
+ // Open an application specified by |app_id| in the appropriate launch
+ // container. Returns false if the app_id is invalid or if ExtensionsService
+ // isn't ready/available.
+ static bool OpenApplication(Profile* profile, const std::string& app_id);
+
// Opens a new application window for the specified url. If |as_panel|
// is true, the application will be opened as a Browser::Type::APP_PANEL in
// app panel window, otherwise it will be opened as a Browser::Type::APP,
@@ -187,6 +193,13 @@ class Browser : public TabStripModelDelegate,
static void OpenApplicationWindow(Profile* profile, const GURL& url,
bool as_panel);
+ // Open an application for |extension| in a new application window or panel.
+ static void OpenApplicationWindow(Profile* profile, Extension* extension);
+
+ // Open an application for |extension| in a new application tab. Returns
+ // false if there are no appropriate existing browser windows for |profile|.
+ static bool OpenApplicationTab(Profile* profile, Extension* extension);
+
// Opens a new window and opens the bookmark manager.
static void OpenBookmarkManagerWindow(Profile* profile);