summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.h
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 16:34:39 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 16:34:39 +0000
commit24bf202c6a8d5b4a481f75fb3eeaba3b218bca30 (patch)
tree6fb9108785edbf0493223dd6fd4a061202acebd0 /chrome/browser/browser.h
parent62b0919a6e9100dd79baa307840ffc8b0496735f (diff)
downloadchromium_src-24bf202c6a8d5b4a481f75fb3eeaba3b218bca30.zip
chromium_src-24bf202c6a8d5b4a481f75fb3eeaba3b218bca30.tar.gz
chromium_src-24bf202c6a8d5b4a481f75fb3eeaba3b218bca30.tar.bz2
Launch apps directly into NTP
Applications that are configured to be launched in a tab are now opened directly in the NTP, rather than opening a new tab and closing the NTP. BUG=57476 TEST=Try launching an application from the new tab page. If it's set to open as a tab, a pinned tab, or full-screen, the application should launch directly into the existing new tab page. The new tab page should close when opening an application with panel launch type. Review URL: http://codereview.chromium.org/3673006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r--chrome/browser/browser.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 85a3ea40..36fff9e 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -223,17 +223,21 @@ class Browser : public TabHandlerDelegate,
static void OpenURLOffTheRecord(Profile* profile, const GURL& url);
// Open an application specified by |app_id| in the appropriate launch
- // container. Returns NULL if the app_id is invalid or if ExtensionsService
- // isn't ready/available.
+ // container. |existing_tab| is reused if it is not NULL and the launch
+ // container is a tab. Returns NULL if the app_id is invalid or if
+ // ExtensionsService isn't ready/available.
static TabContents* OpenApplication(Profile* profile,
- const std::string& app_id);
+ const std::string& app_id,
+ TabContents* existing_tab);
- // Open |extension| in |container|. Returns the TabContents* that was created
- // or NULL.
+ // Open |extension| in |container|, using |existing_tab| if not NULL and if
+ // the correct container type. Returns the TabContents* that was created or
+ // NULL.
static TabContents* OpenApplication(
Profile* profile,
Extension* extension,
- extension_misc::LaunchContainer container);
+ extension_misc::LaunchContainer container,
+ TabContents* existing_tab);
// 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
@@ -249,10 +253,12 @@ class Browser : public TabHandlerDelegate,
// Open an application for |extension| in a new application window or panel.
static TabContents* OpenApplicationWindow(Profile* profile, GURL& url);
- // Open an application for |extension| in a new application tab. Returns
- // NULL if there are no appropriate existing browser windows for |profile|.
+ // Open an application for |extension| in a new application tab, or
+ // |existing_tab| if not NULL. Returns NULL if there are no appropriate
+ // existing browser windows for |profile|.
static TabContents* OpenApplicationTab(Profile* profile,
- Extension* extension);
+ Extension* extension,
+ TabContents* existing_tab);
// Opens a new window and opens the bookmark manager.
static void OpenBookmarkManagerWindow(Profile* profile);