OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "content/public/browser/web_ui_message_handler.h" | 10 #include "content/public/browser/web_ui_message_handler.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class CommandHandler : public content::WebUIMessageHandler, | 31 class CommandHandler : public content::WebUIMessageHandler, |
32 public ExtensionRegistryObserver { | 32 public ExtensionRegistryObserver { |
33 public: | 33 public: |
34 explicit CommandHandler(Profile* profile); | 34 explicit CommandHandler(Profile* profile); |
35 virtual ~CommandHandler(); | 35 virtual ~CommandHandler(); |
36 | 36 |
37 // Fetches the localized values for the page and deposits them into |source|. | 37 // Fetches the localized values for the page and deposits them into |source|. |
38 void GetLocalizedValues(content::WebUIDataSource* source); | 38 void GetLocalizedValues(content::WebUIDataSource* source); |
39 | 39 |
40 // WebUIMessageHandler implementation. | 40 // WebUIMessageHandler implementation. |
41 virtual void RegisterMessages() OVERRIDE; | 41 virtual void RegisterMessages() override; |
42 | 42 |
43 private: | 43 private: |
44 // ExtensionRegistryObserver implementation. | 44 // ExtensionRegistryObserver implementation. |
45 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 45 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
46 const Extension* extension) OVERRIDE; | 46 const Extension* extension) override; |
47 virtual void OnExtensionUnloaded( | 47 virtual void OnExtensionUnloaded( |
48 content::BrowserContext* browser_context, | 48 content::BrowserContext* browser_context, |
49 const Extension* extension, | 49 const Extension* extension, |
50 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 50 UnloadedExtensionInfo::Reason reason) override; |
51 | 51 |
52 // Update the list of extension commands in the config UI. | 52 // Update the list of extension commands in the config UI. |
53 void UpdateCommandDataOnPage(); | 53 void UpdateCommandDataOnPage(); |
54 | 54 |
55 // Handles requests from javascript to fetch the extensions data, including | 55 // Handles requests from javascript to fetch the extensions data, including |
56 // the commands it contains. | 56 // the commands it contains. |
57 // Replies back through: ExtensionCommandsOverlay.returnExtensionsData. | 57 // Replies back through: ExtensionCommandsOverlay.returnExtensionsData. |
58 void HandleRequestExtensionsData(const base::ListValue* args); | 58 void HandleRequestExtensionsData(const base::ListValue* args); |
59 | 59 |
60 // Handles requests from javascript to set a particular keyboard shortcut | 60 // Handles requests from javascript to set a particular keyboard shortcut |
(...skipping 16 matching lines...) Expand all Loading... |
77 | 77 |
78 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 78 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
79 extension_registry_observer_; | 79 extension_registry_observer_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(CommandHandler); | 81 DISALLOW_COPY_AND_ASSIGN(CommandHandler); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace extensions | 84 } // namespace extensions |
85 | 85 |
86 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ | 86 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ |
OLD | NEW |