Chromium Code Reviews| Index: chrome/common/extensions/api/input_ime/input_components_handler.h |
| =================================================================== |
| --- chrome/common/extensions/api/input_ime/input_components_handler.h (revision 0) |
| +++ chrome/common/extensions/api/input_ime/input_components_handler.h (revision 0) |
| @@ -0,0 +1,62 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |
| +#define CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |
| + |
| +#include <set> |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "chrome/common/extensions/extension.h" |
| +#include "chrome/common/extensions/manifest_handler.h" |
| + |
| +namespace extensions { |
| + |
| +class Extension; |
| + |
| +enum InputComponentType { |
| + INPUT_COMPONENT_TYPE_NONE = -1, |
| + INPUT_COMPONENT_TYPE_IME, |
| + INPUT_COMPONENT_TYPE_COUNT |
| +}; |
| + |
| +struct InputComponentInfo { |
| + // Define out of line constructor/destructor to please Clang. |
| + InputComponentInfo(); |
| + ~InputComponentInfo(); |
| + |
| + std::string name; |
| + InputComponentType type; |
| + std::string id; |
| + std::string description; |
| + std::string language; |
| + std::set<std::string> layouts; |
| + std::string shortcut_keycode; |
| + bool shortcut_alt; |
| + bool shortcut_ctrl; |
| + bool shortcut_shift; |
| +}; |
| + |
| +struct InputComponents : public Extension::ManifestData { |
| + std::vector<InputComponentInfo> input_components; |
| + |
| + // Returns list of input components. |
|
Yoyo Zhou
2012/12/28 21:04:28
"and associated properties" to match the deleted c
SanjoyPal
2012/12/28 22:38:30
Done.
Yoyo Zhou
2013/01/03 01:21:59
What I meant was you should add "and associated pr
|
| + static const InputComponents* GetInputComponents(const Extension* extension); |
| +}; |
| + |
| +// Parses the "incognito" manifest key. |
| +class InputComponentsHandler : public ManifestHandler { |
| + public: |
| + InputComponentsHandler(); |
| + virtual ~InputComponentsHandler(); |
| + |
| + virtual bool Parse(const base::Value* value, |
| + Extension* extension, |
| + string16* error) OVERRIDE; |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_ |