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

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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/command_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/command_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698