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

Unified Diff: chrome/browser/extensions/extension_install_prompt.h

Issue 660643002: [Refactor] Move creating a browser if necessary to ExtensionInstallDialogView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: chrome/browser/extensions/extension_install_prompt.h
diff --git a/chrome/browser/extensions/extension_install_prompt.h b/chrome/browser/extensions/extension_install_prompt.h
index c50216fd577dfa0f3048e115b93fb29f1dda0865..dca96db147899d21778338bf474598c78a85bccd 100644
--- a/chrome/browser/extensions/extension_install_prompt.h
+++ b/chrome/browser/extensions/extension_install_prompt.h
@@ -30,7 +30,6 @@ class MessageLoop;
} // namespace base
namespace content {
-class PageNavigator;
class WebContents;
}
@@ -282,18 +281,18 @@ class ExtensionInstallPrompt
// Parameters to show a prompt dialog. Two sets of the
// parameters are supported: either use a parent WebContents or use a
- // parent NativeWindow + a PageNavigator.
+ // parent NativeWindow + a Profile.
struct ShowParams {
explicit ShowParams(content::WebContents* contents);
- ShowParams(gfx::NativeWindow window, content::PageNavigator* navigator);
+ ShowParams(Profile* profile, gfx::NativeWindow window);
+
+ Profile* profile;
// Parent web contents of the install UI dialog. This can be NULL.
content::WebContents* parent_web_contents;
- // NativeWindow parent and navigator. If initialized using a parent web
- // contents, these are derived from it.
+ // NativeWindow parent.
gfx::NativeWindow parent_window;
- content::PageNavigator* navigator;
};
typedef base::Callback<void(const ExtensionInstallPrompt::ShowParams&,
@@ -318,10 +317,10 @@ class ExtensionInstallPrompt
// Creates a prompt with a parent web content.
explicit ExtensionInstallPrompt(content::WebContents* contents);
- // Creates a prompt with a profile, a native window and a page navigator.
- ExtensionInstallPrompt(Profile* profile,
- gfx::NativeWindow native_window,
- content::PageNavigator* navigator);
+ // Creates a prompt with a profile and a native window. The most recently
+ // active browser window (or a new browser window if there are no browser
+ // windows) is used if a new tab needs to be opened.
+ ExtensionInstallPrompt(Profile* profile, gfx::NativeWindow native_window);
virtual ~ExtensionInstallPrompt();
« no previous file with comments | « chrome/browser/apps/ephemeral_app_launcher.cc ('k') | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698