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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/public/browser/web_ui_message_handler.h" | 10 #include "content/public/browser/web_ui_message_handler.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // WebUIMessageHandler implementation. | 36 // WebUIMessageHandler implementation. |
37 virtual void RegisterMessages() OVERRIDE; | 37 virtual void RegisterMessages() OVERRIDE; |
38 | 38 |
39 private: | 39 private: |
40 // Handles requests from javascript to fetch the extensions data, including | 40 // Handles requests from javascript to fetch the extensions data, including |
41 // the commands it contains. | 41 // the commands it contains. |
42 // Replies back through: ExtensionCommandsOverlay.returnExtensionsData. | 42 // Replies back through: ExtensionCommandsOverlay.returnExtensionsData. |
43 void HandleRequestExtensionsData(const base::ListValue* args); | 43 void HandleRequestExtensionsData(const base::ListValue* args); |
44 | 44 |
| 45 // Handles requests from javascript to set a particular keyboard shortcut |
| 46 // for a given extension command. |
| 47 void HandleSetExtensionCommandShortcut(const base::ListValue* args); |
| 48 |
| 49 // Handles requests from javascript to temporarily disable general Chrome |
| 50 // shortcut handling while the web page is capturing which shortcut to use. |
| 51 void HandleSetShortcutHandlingSuspended(const base::ListValue* args); |
| 52 |
45 // Fetches all known commands, active and inactive and returns them through | 53 // Fetches all known commands, active and inactive and returns them through |
46 // |commands|. | 54 // |commands|. |
47 void GetAllCommands(base::DictionaryValue* commands); | 55 void GetAllCommands(base::DictionaryValue* commands); |
48 | 56 |
49 DISALLOW_COPY_AND_ASSIGN(CommandHandler); | 57 DISALLOW_COPY_AND_ASSIGN(CommandHandler); |
50 }; | 58 }; |
51 | 59 |
52 } // namespace extensions | 60 } // namespace extensions |
53 | 61 |
54 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ | 62 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_COMMAND_HANDLER_H_ |
OLD | NEW |