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

Unified Diff: chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h

Issue 11415063: Adds about:user-actions page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup; ready for review. Created 8 years, 1 month 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/user_actions/user_actions_ui_handler.h
diff --git a/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h b/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c8d6d4f1b8c078dbea87173f7a97eb91e9b2e4c
--- /dev/null
+++ b/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h
@@ -0,0 +1,39 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_
+
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+// UI Handler for chrome://user-actions/
+// It listens to user action notifications and passes those notifications
+// into the Javascript to update the page.
+class UserActionsUIHandler : public content::NotificationObserver,
+ public content::WebUIMessageHandler {
+ public:
+ // Sets up this class as an observer for NOTIFICATION_USER_ACTION.
Evan Stade 2012/11/20 23:09:57 remove comment
Mark P 2012/11/20 23:45:41 Done.
+ explicit UserActionsUIHandler();
Evan Stade 2012/11/20 23:09:57 no explicit
Mark P 2012/11/20 23:45:41 Done.
+
Evan Stade 2012/11/20 23:09:57 remove newline
Mark P 2012/11/20 23:45:41 Done.
+ virtual ~UserActionsUIHandler();
+
+ // Listens for user action notifications and passes the message to
+ // observeUserAction in user_actions.js.
Evan Stade 2012/11/20 23:09:57 comment should be "NotificationObserver implementa
Mark P 2012/11/20 23:45:41 Removed entirely. Putting it in the implementatio
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
+
+ protected:
+ // Does nothing for now.
+ virtual void RegisterMessages();
Evan Stade 2012/11/20 23:09:57 OVERRIDE; comment should be "WebUIMessageHandler i
Mark P 2012/11/20 23:45:41 Done.
+
+ private:
+ content::NotificationRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(UserActionsUIHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698