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 { |
@@ -23,7 +25,8 @@ |
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(); |
virtual ~CommandHandler(); |
@@ -35,6 +38,10 @@ |
// WebUIMessageHandler implementation. |
virtual void RegisterMessages() OVERRIDE; |
+ // NotificationObserver implementation. |
+ virtual void Observe(int type, const content::NotificationSource& source, |
James Hawkins
2012/08/24 15:24:26
nit: Method declarations must have one parameter p
Yoyo Zhou
2012/08/24 16:00:40
Also, this can be private.
Finnur
2012/08/27 11:46:02
There was a discussion about this a few years back
|
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
private: |
// Update the list of extension commands in the config UI. |
void UpdateCommandDataOnPage(); |
@@ -56,6 +63,9 @@ |
// |commands|. |
void GetAllCommands(base::DictionaryValue* commands); |
+ // Used to observe notifications. |
Yoyo Zhou
2012/08/24 16:00:40
nit: IMHO, unnecessary comment.
Finnur
2012/08/27 11:46:02
Removed.
Also, added Profile since trying to dec
|
+ content::NotificationRegistrar registrar_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CommandHandler); |
}; |