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

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

Issue 11415266: Extract a delegate interface from c/b/input_method to permit decoupling from c/b. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Class comment. Created 8 years 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_input_method_manager.h" 5 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace input_method { 8 namespace input_method {
9 9
10 MockInputMethodManager::MockInputMethodManager() 10 MockInputMethodManager::MockInputMethodManager()
11 : add_observer_count_(0), 11 : add_observer_count_(0),
12 remove_observer_count_(0), 12 remove_observer_count_(0),
13 set_state_count_(0), 13 set_state_count_(0),
14 last_state_(STATE_TERMINATING), 14 last_state_(STATE_TERMINATING),
15 util_(whitelist_.GetSupportedInputMethods()) { 15 util_(&delegate_, whitelist_.GetSupportedInputMethods()) {
16 } 16 }
17 17
18 MockInputMethodManager::~MockInputMethodManager() { 18 MockInputMethodManager::~MockInputMethodManager() {
19 } 19 }
20 20
21 void MockInputMethodManager::AddObserver( 21 void MockInputMethodManager::AddObserver(
22 InputMethodManager::Observer* observer) { 22 InputMethodManager::Observer* observer) {
23 ++add_observer_count_; 23 ++add_observer_count_;
24 } 24 }
25 25
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 XKeyboard* MockInputMethodManager::GetXKeyboard() { 138 XKeyboard* MockInputMethodManager::GetXKeyboard() {
139 return &xkeyboard_; 139 return &xkeyboard_;
140 } 140 }
141 141
142 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { 142 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() {
143 return &util_; 143 return &util_;
144 } 144 }
145 145
146 void MockInputMethodManager::set_application_locale(const std::string& value) {
147 delegate_.set_active_locale(value);
148 }
149
150 void MockInputMethodManager::set_hardware_keyboard_layout(
151 const std::string& value) {
152 delegate_.set_hardware_keyboard_layout(value);
153 }
154
146 } // namespace input_method 155 } // namespace input_method
147 } // namespace chromeos 156 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698