From c28071ad39fdf60db886e6d6844da7c3331825a6 Mon Sep 17 00:00:00 2001 From: "erikkay@chromium.org" Date: Fri, 12 Mar 2010 17:28:56 +0000 Subject: 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 --- chrome/browser/browser.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'chrome/browser/browser.h') 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); -- cgit v1.1