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

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

Issue 11644077: Put extension enable logic into a ExtensionEnableFlow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/ntp/app_launcher_handler.h
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
index 44d1c3246bd1458afb75ea0cec1c38279d9b507a..eedccfc9426113cbda24dc3f4aea7f81a382d736 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
+#include <set>
#include <string>
#include "base/memory/scoped_ptr.h"
@@ -12,6 +13,7 @@
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_uninstall_dialog.h"
#include "chrome/browser/favicon/favicon_service.h"
+#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
#include "chrome/common/cancelable_task_tracker.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -31,7 +33,7 @@ class AppNotification;
// The handler for Javascript messages related to the "apps" view.
class AppLauncherHandler : public content::WebUIMessageHandler,
public ExtensionUninstallDialog::Delegate,
- public ExtensionInstallPrompt::Delegate,
+ public ExtensionEnableFlowDelegate,
public content::NotificationObserver {
public:
explicit AppLauncherHandler(ExtensionService* extension_service);
@@ -141,18 +143,16 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
virtual void ExtensionUninstallAccepted() OVERRIDE;
virtual void ExtensionUninstallCanceled() OVERRIDE;
- // ExtensionInstallPrompt::Delegate:
- virtual void InstallUIProceed() OVERRIDE;
- virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
+ // ExtensionEnableFlowDelegate:
+ virtual ExtensionInstallPrompt* CreateExtensionInstallPrompt() OVERRIDE;
+ virtual void ExtensionEnableFlowFinished(ExtensionEnableFlow* flow) OVERRIDE;
+ virtual void ExtensionEnableFlowAborted(ExtensionEnableFlow* flow,
+ bool user_initiated) OVERRIDE;
// Returns the ExtensionUninstallDialog object for this class, creating it if
// needed.
ExtensionUninstallDialog* GetExtensionUninstallDialog();
- // Returns the ExtensionInstallPrompt object for this class, creating it if
- // needed.
- ExtensionInstallPrompt* GetExtensionInstallPrompt();
-
// Continuation for installing a bookmark app after favicon lookup.
void OnFaviconForApp(scoped_ptr<AppInstallInfo> install_info,
const history::FaviconImageResult& image_result);
@@ -176,8 +176,8 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// 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<ExtensionInstallPrompt> extension_install_ui_;
+ // Used to show confirmation UI for enabling extensions.
+ scoped_ptr<ExtensionEnableFlow> extension_enable_flow_;
// The ids of apps to show on the NTP.
std::set<std::string> visible_apps_;

Powered by Google App Engine
This is Rietveld 408576698