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

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

Issue 11466010: Decompose BrowserStateMonitor into two parts, simplifying unit tests and APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix gypi ordering. 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_delegate.h" 5 #include "chrome/browser/chromeos/input_method/mock_input_method_delegate.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace input_method { 8 namespace input_method {
9 9
10 MockInputMethodDelegate::MockInputMethodDelegate() 10 MockInputMethodDelegate::MockInputMethodDelegate()
11 : active_locale_("en"), 11 : active_locale_("en") {
12 update_system_input_method_count_(0),
13 update_user_input_method_count_(0) {
14 } 12 }
15 13
16 MockInputMethodDelegate::~MockInputMethodDelegate() { 14 MockInputMethodDelegate::~MockInputMethodDelegate() {
17 } 15 }
18 16
19 void MockInputMethodDelegate::SetSystemInputMethod(
20 const std::string& input_method) {
21 ++update_system_input_method_count_;
22 system_input_method_ = input_method;
23 }
24
25 void MockInputMethodDelegate::SetUserInputMethod(
26 const std::string& input_method) {
27 ++update_user_input_method_count_;
28 user_input_method_ = input_method;
29 }
30
31 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const { 17 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const {
32 return hardware_keyboard_layout_; 18 return hardware_keyboard_layout_;
33 } 19 }
34 20
35 std::string MockInputMethodDelegate::GetActiveLocale() const { 21 std::string MockInputMethodDelegate::GetActiveLocale() const {
36 return active_locale_; 22 return active_locale_;
37 } 23 }
38 24
39 } // namespace input_method 25 } // namespace input_method
40 } // namespace chromeos 26 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698