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 "cros/chromeos_keyboard.h" | 8 #include "cros/chromeos_keyboard.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 | 11 |
12 std::string KeyboardLibraryImpl::GetCurrentKeyboardLayoutName() const { | 12 std::string KeyboardLibraryImpl::GetCurrentKeyboardLayoutName() const { |
13 if (CrosLibrary::Get()->EnsureLoaded()) { | 13 if (CrosLibrary::Get()->EnsureLoaded()) { |
14 return chromeos::GetCurrentKeyboardLayoutName(); | 14 return chromeos::GetCurrentKeyboardLayoutName(); |
15 } | 15 } |
16 return ""; | 16 return ""; |
17 } | 17 } |
18 | 18 |
19 bool KeyboardLibraryImpl::SetCurrentKeyboardLayoutByName( | 19 bool KeyboardLibraryImpl::SetCurrentKeyboardLayoutByName( |
20 const std::string& layout_name) { | 20 const std::string& layout_name) { |
21 if (CrosLibrary::Get()->EnsureLoaded()) { | 21 if (CrosLibrary::Get()->EnsureLoaded()) { |
22 return chromeos::SetCurrentKeyboardLayoutByName(layout_name); | 22 return chromeos::SetCurrentKeyboardLayoutByName(layout_name); |
23 } | 23 } |
24 return false; | 24 return false; |
25 } | 25 } |
26 | 26 |
| 27 bool KeyboardLibraryImpl::RemapModifierKeys(const ModifierMap& modifier_map) { |
| 28 if (CrosLibrary::Get()->EnsureLoaded()) { |
| 29 return chromeos::RemapModifierKeys(modifier_map); |
| 30 } |
| 31 return false; |
| 32 } |
| 33 |
27 bool KeyboardLibraryImpl::GetKeyboardLayoutPerWindow( | 34 bool KeyboardLibraryImpl::GetKeyboardLayoutPerWindow( |
28 bool* is_per_window) const { | 35 bool* is_per_window) const { |
29 if (CrosLibrary::Get()->EnsureLoaded()) { | 36 if (CrosLibrary::Get()->EnsureLoaded()) { |
30 return chromeos::GetKeyboardLayoutPerWindow(is_per_window); | 37 return chromeos::GetKeyboardLayoutPerWindow(is_per_window); |
31 } | 38 } |
32 return false; | 39 return false; |
33 } | 40 } |
34 | 41 |
35 bool KeyboardLibraryImpl::SetKeyboardLayoutPerWindow(bool is_per_window) { | 42 bool KeyboardLibraryImpl::SetKeyboardLayoutPerWindow(bool is_per_window) { |
36 if (CrosLibrary::Get()->EnsureLoaded()) { | 43 if (CrosLibrary::Get()->EnsureLoaded()) { |
37 return chromeos::SetKeyboardLayoutPerWindow(is_per_window); | 44 return chromeos::SetKeyboardLayoutPerWindow(is_per_window); |
38 } | 45 } |
39 return false; | 46 return false; |
40 } | 47 } |
41 | 48 |
42 } // namespace chromeos | 49 } // namespace chromeos |
OLD | NEW |