OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 engines_; | 57 engines_; |
58 std::map<std::string, std::map<std::string, chromeos::ImeObserver*> > | 58 std::map<std::string, std::map<std::string, chromeos::ImeObserver*> > |
59 observers_; | 59 observers_; |
60 | 60 |
61 unsigned int next_request_id_; | 61 unsigned int next_request_id_; |
62 RequestMap request_map_; | 62 RequestMap request_map_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(ExtensionInputImeEventRouter); | 64 DISALLOW_COPY_AND_ASSIGN(ExtensionInputImeEventRouter); |
65 }; | 65 }; |
66 | 66 |
67 class SetCompositionFunction : public AsyncExtensionFunction { | 67 class SetCompositionFunction : public SyncExtensionFunction { |
68 public: | 68 public: |
69 virtual bool RunImpl(); | 69 virtual bool RunImpl(); |
70 DECLARE_EXTENSION_FUNCTION_NAME( | 70 DECLARE_EXTENSION_FUNCTION_NAME( |
71 "experimental.input.ime.setComposition"); | 71 "experimental.input.ime.setComposition"); |
72 }; | 72 }; |
73 | 73 |
74 class ClearCompositionFunction : public AsyncExtensionFunction { | 74 class ClearCompositionFunction : public SyncExtensionFunction { |
75 public: | 75 public: |
76 virtual bool RunImpl(); | 76 virtual bool RunImpl(); |
77 DECLARE_EXTENSION_FUNCTION_NAME( | 77 DECLARE_EXTENSION_FUNCTION_NAME( |
78 "experimental.input.ime.clearComposition"); | 78 "experimental.input.ime.clearComposition"); |
79 }; | 79 }; |
80 | 80 |
81 class CommitTextFunction : public AsyncExtensionFunction { | 81 class CommitTextFunction : public SyncExtensionFunction { |
82 public: | 82 public: |
83 virtual bool RunImpl(); | 83 virtual bool RunImpl(); |
84 DECLARE_EXTENSION_FUNCTION_NAME( | 84 DECLARE_EXTENSION_FUNCTION_NAME( |
85 "experimental.input.ime.commitText"); | 85 "experimental.input.ime.commitText"); |
86 }; | 86 }; |
87 | 87 |
88 class SetCandidateWindowPropertiesFunction : public AsyncExtensionFunction { | 88 class SetCandidateWindowPropertiesFunction : public SyncExtensionFunction { |
89 public: | 89 public: |
90 virtual bool RunImpl(); | 90 virtual bool RunImpl(); |
91 DECLARE_EXTENSION_FUNCTION_NAME( | 91 DECLARE_EXTENSION_FUNCTION_NAME( |
92 "experimental.input.ime.setCandidateWindowProperties"); | 92 "experimental.input.ime.setCandidateWindowProperties"); |
93 }; | 93 }; |
94 | 94 |
95 class SetCandidatesFunction : public AsyncExtensionFunction { | 95 class SetCandidatesFunction : public SyncExtensionFunction { |
96 public: | 96 public: |
97 virtual bool RunImpl(); | 97 virtual bool RunImpl(); |
98 DECLARE_EXTENSION_FUNCTION_NAME( | 98 DECLARE_EXTENSION_FUNCTION_NAME( |
99 "experimental.input.ime.setCandidates"); | 99 "experimental.input.ime.setCandidates"); |
100 private: | 100 private: |
101 bool ReadCandidates( | 101 bool ReadCandidates( |
102 ListValue* candidates, | 102 ListValue* candidates, |
103 std::vector<chromeos::InputMethodEngine::Candidate>* output); | 103 std::vector<chromeos::InputMethodEngine::Candidate>* output); |
104 }; | 104 }; |
105 | 105 |
106 class SetCursorPositionFunction : public AsyncExtensionFunction { | 106 class SetCursorPositionFunction : public SyncExtensionFunction { |
107 public: | 107 public: |
108 virtual bool RunImpl(); | 108 virtual bool RunImpl(); |
109 DECLARE_EXTENSION_FUNCTION_NAME( | 109 DECLARE_EXTENSION_FUNCTION_NAME( |
110 "experimental.input.ime.setCursorPosition"); | 110 "experimental.input.ime.setCursorPosition"); |
111 }; | 111 }; |
112 | 112 |
113 class SetMenuItemsFunction : public SyncExtensionFunction { | 113 class SetMenuItemsFunction : public SyncExtensionFunction { |
114 public: | 114 public: |
115 virtual bool RunImpl(); | 115 virtual bool RunImpl(); |
116 DECLARE_EXTENSION_FUNCTION_NAME( | 116 DECLARE_EXTENSION_FUNCTION_NAME( |
117 "experimental.input.ime.setMenuItems"); | 117 "experimental.input.ime.setMenuItems"); |
118 }; | 118 }; |
119 | 119 |
120 class UpdateMenuItemsFunction : public SyncExtensionFunction { | 120 class UpdateMenuItemsFunction : public SyncExtensionFunction { |
121 public: | 121 public: |
122 virtual bool RunImpl(); | 122 virtual bool RunImpl(); |
123 DECLARE_EXTENSION_FUNCTION_NAME( | 123 DECLARE_EXTENSION_FUNCTION_NAME( |
124 "experimental.input.ime.updateMenuItems"); | 124 "experimental.input.ime.updateMenuItems"); |
125 }; | 125 }; |
126 | 126 |
127 class InputEventHandled : public AsyncExtensionFunction { | 127 class InputEventHandled : public AsyncExtensionFunction { |
128 public: | 128 public: |
129 virtual bool RunImpl(); | 129 virtual bool RunImpl(); |
130 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.ime.eventHandled"); | 130 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.ime.eventHandled"); |
131 }; | 131 }; |
132 | 132 |
133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ | 133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_ |
OLD | NEW |