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

Unified Diff: chrome/browser/chromeos/input_method/mock_input_method_delegate.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/mock_input_method_delegate.cc
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 0000000000000000000000000000000000000000..62111e66b74f52b7c1e39969734964127817da4b
--- /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

Powered by Google App Engine
This is Rietveld 408576698