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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.h

Issue 3332016: Add a confirmation prompt to app uninstallation on the ntp. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: fix layout on Windows, remove some old crap Created 10 years, 3 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/cocoa/extension_install_prompt.mm ('k') | chrome/browser/dom_ui/app_launcher_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/app_launcher_handler.h
diff --git a/chrome/browser/dom_ui/app_launcher_handler.h b/chrome/browser/dom_ui/app_launcher_handler.h
index 7e89bb713ae668cf3ad2ad976605a02c0c7ff6f5..6a2954a6803efca271a89f3142bbc48312b1f8ca 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.h
+++ b/chrome/browser/dom_ui/app_launcher_handler.h
@@ -6,7 +6,9 @@
#define CHROME_BROWSER_DOM_UI_APP_LAUNCHER_HANDLER_H_
#pragma once
+#include "base/scoped_ptr.h"
#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
@@ -20,6 +22,7 @@ namespace gfx {
// The handler for Javascript messages related to the "apps" view.
class AppLauncherHandler
: public DOMMessageHandler,
+ public ExtensionInstallUI::Delegate,
public NotificationObserver {
public:
explicit AppLauncherHandler(ExtensionsService* extension_service);
@@ -47,6 +50,15 @@ class AppLauncherHandler
void HandleUninstallApp(const ListValue* args);
private:
+ // ExtensionInstallUI::Delegate implementation, used for receiving
+ // notification about uninstall confirmation dialog selections.
+ virtual void InstallUIProceed(bool create_app_shortcut);
+ virtual void InstallUIAbort();
+
+ // Returns the ExtensionInstallUI object for this class, creating it if
+ // needed.
+ ExtensionInstallUI* GetExtensionInstallUI();
+
// Starts the animation of the app icon.
void AnimateAppIcon(Extension* extension, const gfx::Rect& rect);
@@ -57,6 +69,13 @@ class AppLauncherHandler
// when necessary.
NotificationRegistrar registrar_;
+ // Used to show confirmation UI for uninstalling/enabling extensions in
+ // incognito mode.
+ scoped_ptr<ExtensionInstallUI> install_ui_;
+
+ // The id of the extension we are prompting the user about.
+ std::string extension_id_prompting_;
+
DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
};
« no previous file with comments | « chrome/browser/cocoa/extension_install_prompt.mm ('k') | chrome/browser/dom_ui/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698