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

Unified Diff: views/ime/input_method_manager.cc

Issue 7217008: Use input method to control visibility of virtual keyboard (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: views/ime/input_method_manager.cc
diff --git a/views/ime/input_method_manager.cc b/views/ime/input_method_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cba2374d99d0c8b177f3820baee8ed48f555f1ff
--- /dev/null
+++ b/views/ime/input_method_manager.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 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 "views/ime/input_method_manager.h"
+
+#include "base/logging.h"
+
+namespace views {
+
+void InputMethodManager::AddTextInputTypeChangedListener(
+ TextInputTypeChangedListener* listener) {
+ text_input_type_changed_listeners_.AddObserver(listener);
+}
+
+void InputMethodManager::RemoveTextInputTypeChangedListener(
+ TextInputTypeChangedListener* listener) {
+ text_input_type_changed_listeners_.RemoveObserver(listener);
+}
+
+void InputMethodManager::OnTextInputTypeChanged(ui::TextInputType type,
+ Widget* widget) {
+ FOR_EACH_OBSERVER(TextInputTypeChangedListener,
+ text_input_type_changed_listeners_,
+ TextInputTypeChanged(type, widget));
+}
+
+InputMethodManager::InputMethodManager() {
+}
+
+InputMethodManager::~InputMethodManager() {
+}
+
+// static
+InputMethodManager*
+InputMethodManager::GetInstance() {
+ return Singleton<InputMethodManager>::get();
+}
+
+} // namespace views

Powered by Google App Engine
This is Rietveld 408576698