OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_COMMANDS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_COMMANDS_HANDLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "content/public/browser/web_ui_message_handler.h" |
| 11 |
| 12 namespace base { |
| 13 class DictionaryValue; |
| 14 class ListValue; |
| 15 } |
| 16 |
| 17 // The handler page for the Extension Commands UI overlay. |
| 18 class ExtensionCommandsHandler : public content::WebUIMessageHandler { |
| 19 public: |
| 20 ExtensionCommandsHandler(); |
| 21 virtual ~ExtensionCommandsHandler(); |
| 22 |
| 23 // Fetches the localized values for the page and deposits them into |
| 24 // |localized_strings|. |
| 25 void GetLocalizedValues(base::DictionaryValue* localized_strings); |
| 26 |
| 27 // WebUIMessageHandler implementation. |
| 28 virtual void RegisterMessages() OVERRIDE; |
| 29 |
| 30 private: |
| 31 // Handles requests from javascript to fetch the extensions data, including |
| 32 // the commands it contains. |
| 33 // Replies back through: ExtensionCommandsOverlay.returnExtensionsData. |
| 34 void HandleRequestExtensionsData(const base::ListValue* args); |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ExtensionCommandsHandler); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_COMMANDS_HANDLER_H_ |
OLD | NEW |