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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.h

Issue 1083573002: Revert https://codereview.chromium.org/1060993003 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/extensions/extension_settings_handler.h
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.h b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
index cfda7f67baed4892ee7f874ebf9b73002256d2db..bf680e92d16b027b49eb8979552a62f9caf72b33 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
@@ -84,24 +84,27 @@ class ExtensionSettingsHandler
// Helper method that reloads all unpacked extensions.
void ReloadUnpackedExtensions();
- // Callback for "extensionSettingsLaunch" message.
+ // Callback for "requestExtensionsData" message.
+ void HandleRequestExtensionsData(const base::ListValue* args);
+
+ // Callback for "toggleDeveloperMode" message.
+ void HandleToggleDeveloperMode(const base::ListValue* args);
+
+ // Callback for "launch" message.
void HandleLaunchMessage(const base::ListValue* args);
- // Callback for "extensionSettingsRepair" message.
+ // Callback for "repair" message.
void HandleRepairMessage(const base::ListValue* args);
- // Callback for "extensionSettingsOptions" message.
+ // Callback for "options" message.
void HandleOptionsMessage(const base::ListValue* args);
- // Callback for "extensionSettingsAutoupdate" message.
+ // Callback for "autoupdate" message.
void HandleAutoUpdateMessage(const base::ListValue* args);
- // Callback for the "extensionSettingsShowPath" message.
+ // Callback for the "showPath" message.
void HandleShowPath(const base::ListValue* args);
- // Callback for the "extensionSettingsRegister" message.
- void HandleRegisterMessage(const base::ListValue* args);
-
// Utility for callbacks that get an extension ID as the sole argument.
// Returns NULL if the extension isn't active.
const Extension* GetActiveExtension(const base::ListValue* args);
@@ -109,6 +112,9 @@ class ExtensionSettingsHandler
// Forces a UI update if appropriate after a notification is received.
void MaybeUpdateAfterNotification();
+ // Register for notifications that we need to reload the page.
+ void MaybeRegisterForNotifications();
+
// Called when the reinstallation is complete.
void OnReinstallComplete(bool success,
const std::string& error,
@@ -132,6 +138,12 @@ class ExtensionSettingsHandler
int deleting_rwh_id_;
int deleting_rph_id_;
+ // We want to register for notifications only after we've responded at least
+ // once to the page, otherwise we'd be calling JavaScript functions on objects
+ // that don't exist yet when notifications come in. This variable makes sure
+ // we do so only once.
+ bool registered_for_notifications_;
+
content::NotificationRegistrar registrar_;
ScopedObserver<WarningService, WarningService::Observer>

Powered by Google App Engine
This is Rietveld 408576698