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

Unified Diff: chrome/browser/extensions/api/management/chrome_management_api_delegate.cc

Issue 1225693009: Show extension uninstall dialog in browser window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
index 661bf478158998bc14dd8b2ba7db123a17d98944..89151f223a16682632539c962cf266775a893f24 100644
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
@@ -77,12 +77,12 @@ class ManagementUninstallFunctionUninstallDialogDelegate
const extensions::Extension* target_extension,
bool show_programmatic_uninstall_ui)
: function_(function) {
- content::WebContents* web_contents = function->GetSenderWebContents();
+ Profile* profile = Profile::FromBrowserContext(function->browser_context());
+ Browser* browser = chrome::FindBrowserWithProfile(
+ profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
not at google - send to devlin 2015/07/08 20:40:40 Looks like you're not supposed to hard-code this e
wjywbs 2015/07/08 23:01:21 Done.
extension_uninstall_dialog_.reset(
extensions::ExtensionUninstallDialog::Create(
- Profile::FromBrowserContext(function->browser_context()),
- web_contents ? web_contents->GetTopLevelNativeWindow() : nullptr,
- this));
+ profile, browser->window()->GetNativeWindow(), this));
not at google - send to devlin 2015/07/08 20:40:41 I think it's better to at least try to show it in
wjywbs 2015/07/08 23:01:21 Done.
if (show_programmatic_uninstall_ui) {
extension_uninstall_dialog_->ConfirmUninstallByExtension(
target_extension, function->extension(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698