Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: chrome/browser/ui/browser.h

Issue 10409023: Remove extension application launch code from Browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 21996edfc413cda5e561ed6728ae73f0f7f3ee73..46ba61cd7af8162c330ab1cd451aa825a901b08f 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -112,8 +112,8 @@ class Browser : public TabStripModelDelegate,
};
// Distinguishes between browsers that host an app (opened from
- // Browser::OpenApplication), and child browsers created by an app from
- // Browser::CreateForApp (e.g. by windows.open or the extension API).
+ // ApplicationLauncher::OpenApplication), and child browsers created by an app
+ // from Browser::CreateForApp (e.g. by windows.open or the extension API).
// TODO(stevenjb): This is currently only needed by the ash Launcher for
// identifying child panels. Remove this once panels are no longer
// implemented as Browsers, crbug.com/112198.
@@ -149,6 +149,14 @@ class Browser : public TabStripModelDelegate,
DOWNLOAD_CLOSE_LAST_WINDOW_IN_INCOGNITO_PROFILE,
};
+ // Different types of action when web app info is available.
+ // OnDidGetApplicationInfo uses this to dispatch calls.
+ enum WebAppAction {
+ NONE, // No action at all.
+ CREATE_SHORTCUT, // Bring up create application shortcut dialog.
+ UPDATE_SHORTCUT // Update icon for app shortcut.
+ };
+
struct CreateParams {
CreateParams();
CreateParams(Type type, Profile* profile);
@@ -288,57 +296,6 @@ class Browser : public TabStripModelDelegate,
// |profile|, that session is re-used.
static void OpenURLOffTheRecord(Profile* profile, const GURL& url);
- // Open |extension| in |container|, using |disposition| if container type is
- // TAB. Returns the WebContents* that was created or NULL. If non-empty,
- // |override_url| is used in place of the app launch url.
- static content::WebContents* OpenApplication(
- Profile* profile,
- const extensions::Extension* extension,
- extension_misc::LaunchContainer container,
- const GURL& override_url,
- WindowOpenDisposition disposition);
-
-#if defined(USE_ASH)
- // Opens |url| in a new application panel window for the specified url.
- static content::WebContents* OpenApplicationPanel(
- Profile* profile,
- const extensions::Extension* extension,
- const GURL& url);
-#endif
-
- // 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 as either
- // Browser::Type::APP a.k.a. "thin frame" (if |extension| is NULL) or
- // Browser::Type::EXTENSION_APP (if |extension| is non-NULL).
- // If |app_browser| is not NULL, it is set to the browser that hosts the
- // returned tab.
- static content::WebContents* OpenApplicationWindow(
- Profile* profile,
- const extensions::Extension* extension,
- extension_misc::LaunchContainer container,
- const GURL& url,
- Browser** app_browser);
-
- // Open |url| in an app shortcut window. If |update_shortcut| is true,
- // update the name, description, and favicon of the shortcut.
- // There are two kinds of app shortcuts: Shortcuts to a URL,
- // and shortcuts that open an installed application. This function
- // is used to open the former. To open the latter, use
- // Browser::OpenApplicationWindow().
- static content::WebContents* OpenAppShortcutWindow(Profile* profile,
- const GURL& url,
- bool update_shortcut);
-
- // Open an application for |extension| using |disposition|. Returns NULL if
- // there are no appropriate existing browser windows for |profile|. If
- // non-empty, |override_url| is used in place of the app launch url.
- static content::WebContents* OpenApplicationTab(
- Profile* profile,
- const extensions::Extension* extension,
- const GURL& override_url,
- WindowOpenDisposition disposition);
-
// Opens a new window and opens the bookmark manager.
static void OpenBookmarkManagerWindow(Profile* profile);
@@ -853,6 +810,10 @@ class Browser : public TabStripModelDelegate,
// Show the first run search engine bubble on the location bar.
void ShowFirstRunBubble();
+ void set_pending_web_app_action(WebAppAction action) {
+ pending_web_app_action_ = action;
+ }
+
ExtensionWindowController* extension_window_controller() const {
return extension_window_controller_.get();
}
@@ -1411,14 +1372,6 @@ class Browser : public TabStripModelDelegate,
// Stores the disposition type of the last blocked command.
WindowOpenDisposition last_blocked_command_disposition_;
- // Different types of action when web app info is available.
- // OnDidGetApplicationInfo uses this to dispatch calls.
- enum WebAppAction {
- NONE, // No action at all.
- CREATE_SHORTCUT, // Bring up create application shortcut dialog.
- UPDATE_SHORTCUT // Update icon for app shortcut.
- };
-
// Which deferred action to perform when OnDidGetApplicationInfo is notified
// from a WebContents. Currently, only one pending action is allowed.
WebAppAction pending_web_app_action_;
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698