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

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

Issue 10870068: Make sure the Commands list correctly reflects the status of extensions right after install/uninsta… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698