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

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

Issue 662073002: Fix crash when user closes window prior to the "Confirm Install" prompt showing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/install_prompt_navigator
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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dca96db147899d21778338bf474598c78a85bccd..f4a87e5e8b70b40853edddc693f7a43522b2d281 100644
--- a/chrome/browser/extensions/extension_install_prompt.h
+++ b/chrome/browser/extensions/extension_install_prompt.h
@@ -22,6 +22,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h"
+class ExtensionInstallPromptShowParams;
class Profile;
namespace base {
@@ -279,23 +280,7 @@ class ExtensionInstallPrompt
virtual ~Delegate() {}
};
- // Parameters to show a prompt dialog. Two sets of the
- // parameters are supported: either use a parent WebContents or use a
- // parent NativeWindow + a Profile.
- struct ShowParams {
- explicit ShowParams(content::WebContents* contents);
- 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.
- gfx::NativeWindow parent_window;
- };
-
- typedef base::Callback<void(const ExtensionInstallPrompt::ShowParams&,
+ typedef base::Callback<void(ExtensionInstallPromptShowParams*,
ExtensionInstallPrompt::Delegate*,
scoped_refptr<ExtensionInstallPrompt::Prompt>)>
ShowDialogCallback;
@@ -328,10 +313,6 @@ class ExtensionInstallPrompt
return install_ui_.get();
}
- content::WebContents* parent_web_contents() const {
- return show_params_.parent_web_contents;
- }
-
// This is called by the bundle installer to verify whether the bundle
// should be installed.
//
@@ -462,7 +443,7 @@ class ExtensionInstallPrompt
scoped_ptr<extensions::ExtensionInstallUI> install_ui_;
// Parameters to show the confirmation UI.
- ShowParams show_params_;
+ scoped_ptr<ExtensionInstallPromptShowParams> show_params_;
// The delegate we will call Proceed/Abort on after confirmation UI.
Delegate* delegate_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698