OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/chromeos/cros/keyboard_library.h" | 5 #include "chrome/browser/chromeos/cros/keyboard_library.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/cros/cros_library.h" | 7 #include "chrome/browser/chromeos/cros/cros_library.h" |
8 #include "third_party/cros/chromeos_keyboard.h" | 8 #include "third_party/cros/chromeos_keyboard.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
(...skipping 24 matching lines...) Expand all Loading... |
35 return false; | 35 return false; |
36 } | 36 } |
37 | 37 |
38 bool RemapModifierKeys(const ModifierMap& modifier_map) { | 38 bool RemapModifierKeys(const ModifierMap& modifier_map) { |
39 if (CrosLibrary::Get()->EnsureLoaded()) { | 39 if (CrosLibrary::Get()->EnsureLoaded()) { |
40 return chromeos::RemapModifierKeys(modifier_map); | 40 return chromeos::RemapModifierKeys(modifier_map); |
41 } | 41 } |
42 return false; | 42 return false; |
43 } | 43 } |
44 | 44 |
45 bool GetKeyboardLayoutPerWindow(bool* is_per_window) const { | |
46 if (CrosLibrary::Get()->EnsureLoaded()) { | |
47 return chromeos::GetKeyboardLayoutPerWindow(is_per_window); | |
48 } | |
49 return false; | |
50 } | |
51 | |
52 bool SetKeyboardLayoutPerWindow(bool is_per_window) { | |
53 if (CrosLibrary::Get()->EnsureLoaded()) { | |
54 return chromeos::SetKeyboardLayoutPerWindow(is_per_window); | |
55 } | |
56 return false; | |
57 } | |
58 | |
59 bool GetAutoRepeatEnabled(bool* enabled) const { | 45 bool GetAutoRepeatEnabled(bool* enabled) const { |
60 if (CrosLibrary::Get()->EnsureLoaded()) { | 46 if (CrosLibrary::Get()->EnsureLoaded()) { |
61 return chromeos::GetAutoRepeatEnabled(enabled); | 47 return chromeos::GetAutoRepeatEnabled(enabled); |
62 } | 48 } |
63 return false; | 49 return false; |
64 } | 50 } |
65 | 51 |
66 bool SetAutoRepeatEnabled(bool enabled) { | 52 bool SetAutoRepeatEnabled(bool enabled) { |
67 if (CrosLibrary::Get()->EnsureLoaded()) { | 53 if (CrosLibrary::Get()->EnsureLoaded()) { |
68 return chromeos::SetAutoRepeatEnabled(enabled); | 54 return chromeos::SetAutoRepeatEnabled(enabled); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 88 } |
103 | 89 |
104 bool SetCurrentKeyboardLayoutByName(const std::string& layout_name) { | 90 bool SetCurrentKeyboardLayoutByName(const std::string& layout_name) { |
105 return false; | 91 return false; |
106 } | 92 } |
107 | 93 |
108 bool RemapModifierKeys(const ModifierMap& modifier_map) { | 94 bool RemapModifierKeys(const ModifierMap& modifier_map) { |
109 return false; | 95 return false; |
110 } | 96 } |
111 | 97 |
112 bool GetKeyboardLayoutPerWindow(bool* is_per_window) const { | |
113 return false; | |
114 } | |
115 | |
116 bool SetKeyboardLayoutPerWindow(bool is_per_window) { | |
117 return false; | |
118 } | |
119 | |
120 bool GetAutoRepeatEnabled(bool* enabled) const { | 98 bool GetAutoRepeatEnabled(bool* enabled) const { |
121 return false; | 99 return false; |
122 } | 100 } |
123 | 101 |
124 bool SetAutoRepeatEnabled(bool enabled) { | 102 bool SetAutoRepeatEnabled(bool enabled) { |
125 return false; | 103 return false; |
126 } | 104 } |
127 | 105 |
128 bool GetAutoRepeatRate(AutoRepeatRate* out_rate) const { | 106 bool GetAutoRepeatRate(AutoRepeatRate* out_rate) const { |
129 return false; | 107 return false; |
130 } | 108 } |
131 | 109 |
132 bool SetAutoRepeatRate(const AutoRepeatRate& rate) { | 110 bool SetAutoRepeatRate(const AutoRepeatRate& rate) { |
133 return false; | 111 return false; |
134 } | 112 } |
135 | 113 |
136 private: | 114 private: |
137 DISALLOW_COPY_AND_ASSIGN(KeyboardLibraryStubImpl); | 115 DISALLOW_COPY_AND_ASSIGN(KeyboardLibraryStubImpl); |
138 }; | 116 }; |
139 | 117 |
140 // static | 118 // static |
141 KeyboardLibrary* KeyboardLibrary::GetImpl(bool stub) { | 119 KeyboardLibrary* KeyboardLibrary::GetImpl(bool stub) { |
142 if (stub) | 120 if (stub) |
143 return new KeyboardLibraryStubImpl(); | 121 return new KeyboardLibraryStubImpl(); |
144 else | 122 else |
145 return new KeyboardLibraryImpl(); | 123 return new KeyboardLibraryImpl(); |
146 } | 124 } |
147 | 125 |
148 } // namespace chromeos | 126 } // namespace chromeos |
OLD | NEW |