Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/common/extensions/api/input_ime/input_components_handler.h

Issue 11611004: Move the InputComponents out of extensions entirely. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 std::vector<InputComponentInfo> input_components;
44
45 static const InputComponents* GetInputComponents(const Extension* extension);
46 };
47
48 // Parses the "incognito" manifest key.
49 class InputComponentsHandler : public ManifestHandler {
50 public:
51 InputComponentsHandler();
52 virtual ~InputComponentsHandler();
53
54 virtual bool Parse(const base::Value* value,
55 Extension* extension,
56 string16* error) OVERRIDE;
57 };
58
59 } // namespace extensions
60
61 #endif // CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698