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

Unified Diff: chrome/browser/ui/webui/app_launcher_handler.h

Issue 6721013: extensions: Refactor ExtensionInstallUI class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indentation Created 9 years, 9 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/ui/webui/app_launcher_handler.h
diff --git a/chrome/browser/ui/webui/app_launcher_handler.h b/chrome/browser/ui/webui/app_launcher_handler.h
index e5622563373f5d0dcc99b8c942caddc6571b0f12..31cec74ed74ced83ce5a7fd83e07037e05025429 100644
--- a/chrome/browser/ui/webui/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/app_launcher_handler.h
@@ -8,6 +8,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/extensions/extension_install_ui.h"
+#include "chrome/browser/extensions/extension_uninstall_dialog.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -22,14 +23,14 @@ class PrefChangeRegistrar;
class Profile;
namespace gfx {
- class Rect;
+class Rect;
}
// The handler for Javascript messages related to the "apps" view.
-class AppLauncherHandler
- : public WebUIMessageHandler,
- public ExtensionInstallUI::Delegate,
- public NotificationObserver {
+class AppLauncherHandler : public WebUIMessageHandler,
+ public ExtensionUninstallDialog::Delegate,
+ public ExtensionInstallUI::Delegate,
+ public NotificationObserver {
public:
explicit AppLauncherHandler(ExtensionService* extension_service);
virtual ~AppLauncherHandler();
@@ -97,11 +98,18 @@ class AppLauncherHandler
// Prompts the user to re-enable the app for |extension_id|.
void PromptToEnableApp(std::string extension_id);
- // ExtensionInstallUI::Delegate implementation, used for receiving
- // notification about uninstall confirmation dialog selections.
+ // ExtensionUninstallDialog::Delegate:
+ virtual void ExtensionDialogAccepted();
+ virtual void ExtensionDialogCanceled();
+
+ // ExtensionInstallUI::Delegate:
virtual void InstallUIProceed();
virtual void InstallUIAbort();
+ // Returns the ExtensionUninstallDialog object for this class, creating it if
+ // needed.
+ ExtensionUninstallDialog* GetExtensionUninstallDialog();
+
// Returns the ExtensionInstallUI object for this class, creating it if
// needed.
ExtensionInstallUI* GetExtensionInstallUI();
@@ -119,16 +127,15 @@ class AppLauncherHandler
// Monitor extension preference changes so that the Web UI can be notified.
PrefChangeRegistrar pref_change_registrar_;
- // Used to show confirmation UI for uninstalling/enabling extensions in
- // incognito mode.
- scoped_ptr<ExtensionInstallUI> install_ui_;
+ // Used to show confirmation UI for uninstalling extensions in incognito mode.
+ scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
+
+ // Used to show confirmation UI for enabling extensions in incognito mode.
+ scoped_ptr<ExtensionInstallUI> extension_install_ui_;
// The id of the extension we are prompting the user about.
std::string extension_id_prompting_;
- // The type of prompt we are showing the user.
- ExtensionInstallUI::PromptType extension_prompt_type_;
-
// Whether the promo is currently being shown.
bool promo_active_;
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc ('k') | chrome/browser/ui/webui/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698