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

Side by Side Diff: chrome/browser/chromeos/input_method/mock_xkeyboard.cc

Issue 10383301: Move modifier remapping code from X to Ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fix Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/input_method/mock_xkeyboard.h" 5 #include "chrome/browser/chromeos/input_method/mock_xkeyboard.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace input_method { 8 namespace input_method {
9 9
10 MockXKeyboard::MockXKeyboard() 10 MockXKeyboard::MockXKeyboard()
11 : set_current_keyboard_layout_by_name_count_(0), 11 : set_current_keyboard_layout_by_name_count_(0),
12 caps_lock_is_enabled_(false), 12 caps_lock_is_enabled_(false),
13 num_lock_is_enabled_(false) { 13 num_lock_is_enabled_(false) {
14 } 14 }
15 15
16 bool MockXKeyboard::SetCurrentKeyboardLayoutByName( 16 bool MockXKeyboard::SetCurrentKeyboardLayoutByName(
17 const std::string& layout_name) { 17 const std::string& layout_name) {
18 ++set_current_keyboard_layout_by_name_count_; 18 ++set_current_keyboard_layout_by_name_count_;
19 last_layout_ = layout_name; 19 last_layout_ = layout_name;
20 return true; 20 return true;
21 } 21 }
22 22
23 bool MockXKeyboard::RemapModifierKeys(const ModifierMap& modifier_map) {
24 return true;
25 }
26
27 bool MockXKeyboard::ReapplyCurrentKeyboardLayout() { 23 bool MockXKeyboard::ReapplyCurrentKeyboardLayout() {
28 return true; 24 return true;
29 } 25 }
30 26
31 void MockXKeyboard::ReapplyCurrentModifierLockStatus() { 27 void MockXKeyboard::ReapplyCurrentModifierLockStatus() {
32 } 28 }
33 29
34 void MockXKeyboard::SetLockedModifiers(ModifierLockStatus new_caps_lock_status, 30 void MockXKeyboard::SetLockedModifiers(ModifierLockStatus new_caps_lock_status,
35 ModifierLockStatus new_num_lock_status) { 31 ModifierLockStatus new_num_lock_status) {
36 if (new_caps_lock_status != kDontChange) { 32 if (new_caps_lock_status != kDontChange) {
(...skipping 14 matching lines...) Expand all
51 47
52 bool MockXKeyboard::NumLockIsEnabled() { 48 bool MockXKeyboard::NumLockIsEnabled() {
53 return num_lock_is_enabled_; 49 return num_lock_is_enabled_;
54 } 50 }
55 51
56 bool MockXKeyboard::CapsLockIsEnabled() { 52 bool MockXKeyboard::CapsLockIsEnabled() {
57 return caps_lock_is_enabled_; 53 return caps_lock_is_enabled_;
58 } 54 }
59 55
60 std::string MockXKeyboard::CreateFullXkbLayoutName( 56 std::string MockXKeyboard::CreateFullXkbLayoutName(
61 const std::string& layout_name, 57 const std::string& layout_name) {
62 const ModifierMap& modifire_map) {
63 return ""; 58 return "";
64 } 59 }
65 60
66 unsigned int MockXKeyboard::GetNumLockMask() { 61 unsigned int MockXKeyboard::GetNumLockMask() {
67 return 1; 62 return 1;
68 } 63 }
69 64
70 void MockXKeyboard::GetLockedModifiers(bool* out_caps_lock_enabled, 65 void MockXKeyboard::GetLockedModifiers(bool* out_caps_lock_enabled,
71 bool* out_num_lock_enabled) { 66 bool* out_num_lock_enabled) {
72 *out_caps_lock_enabled = caps_lock_is_enabled_; 67 *out_caps_lock_enabled = caps_lock_is_enabled_;
73 *out_num_lock_enabled = num_lock_is_enabled_; 68 *out_num_lock_enabled = num_lock_is_enabled_;
74 } 69 }
75 70
76 } // namespace input_method 71 } // namespace input_method
77 } // namespace chromeos 72 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698