summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/input_method/mock_input_method_delegate.cc
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 22:03:45 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-10 22:03:45 +0000
commit3316496bdbe6f1120d6803190b50e70a85b232e5 (patch)
tree166e2611e1a9c61cbcf0fa1d228a33957df76d82 /chrome/browser/chromeos/input_method/mock_input_method_delegate.cc
parent260e1538389826b4e6bbda34d056aa2ebb2c8f13 (diff)
downloadchromium_src-3316496bdbe6f1120d6803190b50e70a85b232e5.zip
chromium_src-3316496bdbe6f1120d6803190b50e70a85b232e5.tar.gz
chromium_src-3316496bdbe6f1120d6803190b50e70a85b232e5.tar.bz2
Extract a delegate interface from c/b/chromeos/input_method to permit decoupling from c/b.
BUG=164375 Review URL: https://chromiumcodereview.appspot.com/11415266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method/mock_input_method_delegate.cc')
-rw-r--r--chrome/browser/chromeos/input_method/mock_input_method_delegate.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_delegate.cc b/chrome/browser/chromeos/input_method/mock_input_method_delegate.cc
new file mode 100644
index 0000000..62111e66
--- /dev/null
+++ b/chrome/browser/chromeos/input_method/mock_input_method_delegate.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/input_method/mock_input_method_delegate.h"
+
+namespace chromeos {
+namespace input_method {
+
+MockInputMethodDelegate::MockInputMethodDelegate()
+ : active_locale_("en"),
+ update_system_input_method_count_(0),
+ update_user_input_method_count_(0) {
+}
+
+MockInputMethodDelegate::~MockInputMethodDelegate() {
+}
+
+void MockInputMethodDelegate::SetSystemInputMethod(
+ const std::string& input_method) {
+ ++update_system_input_method_count_;
+ system_input_method_ = input_method;
+}
+
+void MockInputMethodDelegate::SetUserInputMethod(
+ const std::string& input_method) {
+ ++update_user_input_method_count_;
+ user_input_method_ = input_method;
+}
+
+std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const {
+ return hardware_keyboard_layout_;
+}
+
+std::string MockInputMethodDelegate::GetActiveLocale() const {
+ return active_locale_;
+}
+
+} // namespace input_method
+} // namespace chromeos