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_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |
| 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "chrome/common/extensions/extension.h" |
| 13 #include "chrome/common/extensions/manifest_handler.h" |
| 14 |
| 15 namespace extensions { |
| 16 |
| 17 class Extension; |
| 18 |
| 19 enum InputComponentType { |
| 20 INPUT_COMPONENT_TYPE_NONE = -1, |
| 21 INPUT_COMPONENT_TYPE_IME, |
| 22 INPUT_COMPONENT_TYPE_COUNT |
| 23 }; |
| 24 |
| 25 struct InputComponentInfo { |
| 26 // Define out of line constructor/destructor to please Clang. |
| 27 InputComponentInfo(); |
| 28 ~InputComponentInfo(); |
| 29 |
| 30 std::string name; |
| 31 InputComponentType type; |
| 32 std::string id; |
| 33 std::string description; |
| 34 std::string language; |
| 35 std::set<std::string> layouts; |
| 36 std::string shortcut_keycode; |
| 37 bool shortcut_alt; |
| 38 bool shortcut_ctrl; |
| 39 bool shortcut_shift; |
| 40 }; |
| 41 |
| 42 struct InputComponents : public Extension::ManifestData { |
| 43 // Define out of line constructor/destructor to please Clang. |
| 44 InputComponents(); |
| 45 virtual ~InputComponents(); |
| 46 |
| 47 std::vector<InputComponentInfo> input_components; |
| 48 |
| 49 // Returns list of input components and associated properties. |
| 50 static const std::vector<InputComponentInfo>* GetInputComponents( |
| 51 const Extension* extension); |
| 52 }; |
| 53 |
| 54 // Parses the "incognito" manifest key. |
| 55 class InputComponentsHandler : public ManifestHandler { |
| 56 public: |
| 57 InputComponentsHandler(); |
| 58 virtual ~InputComponentsHandler(); |
| 59 |
| 60 virtual bool Parse(const base::Value* value, |
| 61 Extension* extension, |
| 62 string16* error) OVERRIDE; |
| 63 }; |
| 64 |
| 65 } // namespace extensions |
| 66 |
| 67 #endif // CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |
OLD | NEW |