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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine_interface.h

Issue 346513003: Adds the legacy KeyboardEvent.keyCode attribute for extension IMEs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make keyCode attribute optional, and fix tests. Created 6 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ui/base/ime/chromeos/ime_bridge.h" 11 #include "ui/base/ime/chromeos/ime_bridge.h"
12 #include "ui/events/keycodes/keyboard_codes.h"
Seigo Nonaka 2014/06/20 03:16:02 nit: Do you need this header in header file? If no
Shu Chen 2014/06/20 06:11:58 Done.
12 13
13 class GURL; 14 class GURL;
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
17 namespace input_method { 18 namespace input_method {
18 class InputMethodDescriptor; 19 class InputMethodDescriptor;
19 struct KeyEventHandle; 20 struct KeyEventHandle;
20 } // namespace input_method 21 } // namespace input_method
21 22
22 // InputMethodEngine is used to translate from the Chrome IME API to the native 23 // InputMethodEngine is used to translate from the Chrome IME API to the native
23 // API. 24 // API.
24 class InputMethodEngineInterface : public IMEEngineHandlerInterface { 25 class InputMethodEngineInterface : public IMEEngineHandlerInterface {
25 public: 26 public:
26 struct KeyboardEvent { 27 struct KeyboardEvent {
27 KeyboardEvent(); 28 KeyboardEvent();
28 virtual ~KeyboardEvent(); 29 virtual ~KeyboardEvent();
29 30
30 std::string type; 31 std::string type;
31 std::string key; 32 std::string key;
32 std::string code; 33 std::string code;
34 int key_code; // only used by on-screen keyboards.
33 std::string extension_id; 35 std::string extension_id;
34 bool alt_key; 36 bool alt_key;
35 bool ctrl_key; 37 bool ctrl_key;
36 bool shift_key; 38 bool shift_key;
37 bool caps_lock; 39 bool caps_lock;
38 }; 40 };
39 41
40 enum { 42 enum {
41 MENU_ITEM_MODIFIED_LABEL = 0x0001, 43 MENU_ITEM_MODIFIED_LABEL = 0x0001,
42 MENU_ITEM_MODIFIED_STYLE = 0x0002, 44 MENU_ITEM_MODIFIED_STYLE = 0x0002,
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 size_t number_of_chars, 248 size_t number_of_chars,
247 std::string* error) = 0; 249 std::string* error) = 0;
248 250
249 // Hides the input view window (from API call). 251 // Hides the input view window (from API call).
250 virtual void HideInputView() = 0; 252 virtual void HideInputView() = 0;
251 }; 253 };
252 254
253 } // namespace chromeos 255 } // namespace chromeos
254 256
255 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ 257 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698