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

Unified Diff: chrome/browser/extensions/extension_storage_monitor.cc

Issue 382133003: Refactored ExtensionUninstallDialog to take a NativeWindow instead of a Browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: chrome/browser/extensions/extension_storage_monitor.cc
diff --git a/chrome/browser/extensions/extension_storage_monitor.cc b/chrome/browser/extensions/extension_storage_monitor.cc
index b03ed58d4bf94f9cfafaff30d76b68b84f82cf8a..1dd3e7a05f68294bf0970f4c7b3662506396649f 100644
--- a/chrome/browser/extensions/extension_storage_monitor.cc
+++ b/chrome/browser/extensions/extension_storage_monitor.cc
@@ -14,6 +14,8 @@
#include "chrome/browser/extensions/extension_storage_monitor_factory.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/app_list/app_list_service.h"
+#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -547,8 +549,13 @@ void ExtensionStorageMonitor::ShowUninstallPrompt(
return;
if (!uninstall_dialog_.get()) {
- uninstall_dialog_.reset(ExtensionUninstallDialog::Create(
- Profile::FromBrowserContext(context_), NULL, this));
+ // TODO(sashab,tapted): A true |desktop_type| needs to be passed in at
+ // creation time to remove reliance on GetActiveDesktop(). See
+ // http://crbug.com/308360.
+ uninstall_dialog_.reset(ExtensionUninstallDialog::CreateForNonBrowserWindow(
+ Profile::FromBrowserContext(context_),
+ AppListService::Get(chrome::GetActiveDesktop())->GetAppListWindow(),
tapted 2014/07/11 04:39:15 I don't think this call site is intending to use t
sashab 2014/07/11 05:58:57 Done.
tmdiep 2014/07/11 06:13:29 Yep, this isn't related to the app launcher. The u
+ this));
}
uninstall_extension_id_ = extension->id();

Powered by Google App Engine
This is Rietveld 408576698