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

Side by Side Diff: ui/base/ime/input_method_base.cc

Issue 29943002: Limit display of the virtual keyboard to state changes triggered from a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_base_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/base/ime/input_method_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "ui/base/ime/input_method_delegate.h" 10 #include "ui/base/ime/input_method_delegate.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 TextInputMode InputMethodBase::GetTextInputMode() const { 73 TextInputMode InputMethodBase::GetTextInputMode() const {
74 TextInputClient* client = GetTextInputClient(); 74 TextInputClient* client = GetTextInputClient();
75 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT; 75 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT;
76 } 76 }
77 77
78 bool InputMethodBase::CanComposeInline() const { 78 bool InputMethodBase::CanComposeInline() const {
79 TextInputClient* client = GetTextInputClient(); 79 TextInputClient* client = GetTextInputClient();
80 return client ? client->CanComposeInline() : true; 80 return client ? client->CanComposeInline() : true;
81 } 81 }
82 82
83 void InputMethodBase::ShowImeIfNeeded() {
84 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnShowImeIfNeeded());
85 }
86
83 void InputMethodBase::AddObserver(InputMethodObserver* observer) { 87 void InputMethodBase::AddObserver(InputMethodObserver* observer) {
84 observer_list_.AddObserver(observer); 88 observer_list_.AddObserver(observer);
85 } 89 }
86 90
87 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) { 91 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) {
88 observer_list_.RemoveObserver(observer); 92 observer_list_.RemoveObserver(observer);
89 } 93 }
90 94
91 bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) { 95 bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) {
92 return client && (client == GetTextInputClient()); 96 return client && (client == GetTextInputClient());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (text_input_client_) 164 if (text_input_client_)
161 text_input_client_->OnCandidateWindowUpdated(); 165 text_input_client_->OnCandidateWindowUpdated();
162 } 166 }
163 167
164 void InputMethodBase::CandidateWindowHiddenCallback() { 168 void InputMethodBase::CandidateWindowHiddenCallback() {
165 if (text_input_client_) 169 if (text_input_client_)
166 text_input_client_->OnCandidateWindowHidden(); 170 text_input_client_->OnCandidateWindowHidden();
167 } 171 }
168 172
169 } // namespace ui 173 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698