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

Side by Side Diff: chromeos/ime/ime_keyboard.h

Issue 232333002: ozone: Rename XKeyboard to KeyboardController & use fake under ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to ImeKeyboard & rebase Created 6 years, 8 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
« no previous file with comments | « chromeos/ime/fake_xkeyboard.cc ('k') | chromeos/ime/ime_keyboard_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_IME_XKEYBOARD_H_ 5 #ifndef CHROMEOS_IME_IME_KEYBOARD_H_
6 #define CHROMEOS_IME_XKEYBOARD_H_ 6 #define CHROMEOS_IME_IME_KEYBOARD_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 namespace input_method { 15 namespace input_method {
16 16
(...skipping 10 matching lines...) Expand all
27 kVoidKey, 27 kVoidKey,
28 kCapsLockKey, 28 kCapsLockKey,
29 kEscapeKey, 29 kEscapeKey,
30 // IMPORTANT: You should update kCustomizableKeys[] in .cc file, if you 30 // IMPORTANT: You should update kCustomizableKeys[] in .cc file, if you
31 // add a customizable key. 31 // add a customizable key.
32 kNumModifierKeys, 32 kNumModifierKeys,
33 }; 33 };
34 34
35 class InputMethodUtil; 35 class InputMethodUtil;
36 36
37 class CHROMEOS_EXPORT XKeyboard { 37 class CHROMEOS_EXPORT ImeKeyboard {
38 public: 38 public:
39 class Observer { 39 class Observer {
40 public: 40 public:
41 // Called when the caps lock state has changed. 41 // Called when the caps lock state has changed.
42 virtual void OnCapsLockChanged(bool enabled) = 0; 42 virtual void OnCapsLockChanged(bool enabled) = 0;
43 }; 43 };
44 44
45 virtual ~XKeyboard() {} 45 virtual ~ImeKeyboard() {}
46 46
47 // Adds/removes observer. 47 // Adds/removes observer.
48 virtual void AddObserver(Observer* observer) = 0; 48 virtual void AddObserver(Observer* observer) = 0;
49 virtual void RemoveObserver(Observer* observer) = 0; 49 virtual void RemoveObserver(Observer* observer) = 0;
50 50
51 // Sets the current keyboard layout to |layout_name|. This function does not 51 // Sets the current keyboard layout to |layout_name|. This function does not
52 // change the current mapping of the modifier keys. Returns true on success. 52 // change the current mapping of the modifier keys. Returns true on success.
53 virtual bool SetCurrentKeyboardLayoutByName( 53 virtual bool SetCurrentKeyboardLayoutByName(
54 const std::string& layout_name) = 0; 54 const std::string& layout_name) = 0;
55 55
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // On success, set current auto repeat rate on |out_rate| and returns true. 102 // On success, set current auto repeat rate on |out_rate| and returns true.
103 // Returns false otherwise. This function is protected: for testability. 103 // Returns false otherwise. This function is protected: for testability.
104 static CHROMEOS_EXPORT bool GetAutoRepeatRateForTesting( 104 static CHROMEOS_EXPORT bool GetAutoRepeatRateForTesting(
105 AutoRepeatRate* out_rate); 105 AutoRepeatRate* out_rate);
106 106
107 // Returns false if |layout_name| contains a bad character. 107 // Returns false if |layout_name| contains a bad character.
108 static CHROMEOS_EXPORT bool CheckLayoutNameForTesting( 108 static CHROMEOS_EXPORT bool CheckLayoutNameForTesting(
109 const std::string& layout_name); 109 const std::string& layout_name);
110 110
111 // Note: At this moment, classes other than InputMethodManager should not 111 // Note: At this moment, classes other than InputMethodManager should not
112 // instantiate the XKeyboard class. 112 // instantiate the ImeKeyboard class.
113 static XKeyboard* Create(); 113 static ImeKeyboard* Create();
114 }; 114 };
115 115
116 } // namespace input_method 116 } // namespace input_method
117 } // namespace chromeos 117 } // namespace chromeos
118 118
119 #endif // CHROMEOS_IME_XKEYBOARD_H_ 119 #endif // CHROMEOS_IME_IME_KEYBOARD_H_
OLDNEW
« no previous file with comments | « chromeos/ime/fake_xkeyboard.cc ('k') | chromeos/ime/ime_keyboard_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698