Index: chrome/browser/ui/webui/extensions/command_handler.h |
=================================================================== |
--- chrome/browser/ui/webui/extensions/command_handler.h (revision 153186) |
+++ chrome/browser/ui/webui/extensions/command_handler.h (working copy) |
@@ -6,6 +6,8 @@ |
#define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ |
#include "base/compiler_specific.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_ui_message_handler.h" |
namespace base { |
@@ -19,13 +21,15 @@ |
} |
class Extension; |
+class Profile; |
namespace extensions { |
// The handler page for the Extension Commands UI overlay. |
-class CommandHandler : public content::WebUIMessageHandler { |
+class CommandHandler : public content::WebUIMessageHandler, |
+ public content::NotificationObserver { |
public: |
- CommandHandler(); |
+ explicit CommandHandler(Profile* profile); |
virtual ~CommandHandler(); |
// Fetches the localized values for the page and deposits them into |
@@ -35,6 +39,11 @@ |
// WebUIMessageHandler implementation. |
virtual void RegisterMessages() OVERRIDE; |
+ // NotificationObserver implementation. |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
private: |
// Update the list of extension commands in the config UI. |
void UpdateCommandDataOnPage(); |
@@ -56,6 +65,10 @@ |
// |commands|. |
void GetAllCommands(base::DictionaryValue* commands); |
+ content::NotificationRegistrar registrar_; |
+ |
+ Profile* profile_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CommandHandler); |
}; |