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

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, 12 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 // 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
46 static const InputComponents* GetInputComponents(const Extension* extension);
47 };
48
49 // Parses the "incognito" manifest key.
50 class InputComponentsHandler : public ManifestHandler {
51 public:
52 InputComponentsHandler();
53 virtual ~InputComponentsHandler();
54
55 virtual bool Parse(const base::Value* value,
56 Extension* extension,
57 string16* error) OVERRIDE;
58 };
59
60 } // namespace extensions
61
62 #endif // CHROME_COMMON_EXTENSIONS_API_INPUT_IME_INPUT_COMPONENTS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698