OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_ |
| 7 |
| 8 #include "content/public/browser/notification_observer.h" |
| 9 #include "content/public/browser/notification_registrar.h" |
| 10 #include "content/public/browser/web_ui_message_handler.h" |
| 11 |
| 12 // UI Handler for chrome://user-actions/ |
| 13 // It listens to user action notifications and passes those notifications |
| 14 // into the Javascript to update the page. |
| 15 class UserActionsUIHandler : public content::NotificationObserver, |
| 16 public content::WebUIMessageHandler { |
| 17 public: |
| 18 UserActionsUIHandler(); |
| 19 virtual ~UserActionsUIHandler(); |
| 20 |
| 21 // NotificationObserver implementation: |
| 22 // Listens for user action notifications and passes the message to |
| 23 // observeUserAction in user_actions.js. |
| 24 virtual void Observe(int type, |
| 25 const content::NotificationSource& source, |
| 26 const content::NotificationDetails& details) OVERRIDE; |
| 27 |
| 28 // WebUIMessageHandler implementation: |
| 29 // Does nothing for now. |
| 30 virtual void RegisterMessages() OVERRIDE; |
| 31 |
| 32 private: |
| 33 content::NotificationRegistrar registrar_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(UserActionsUIHandler); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_ |
OLD | NEW |