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

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

Issue 665903003: Magnifier needs to follow the focus of the textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename IsInputFieldFocused to a better name. Created 6 years, 1 month 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return delegate_->DispatchKeyEventPostIME(event); 119 return delegate_->DispatchKeyEventPostIME(event);
120 } 120 }
121 121
122 void InputMethodBase::NotifyTextInputStateChanged( 122 void InputMethodBase::NotifyTextInputStateChanged(
123 const TextInputClient* client) { 123 const TextInputClient* client) {
124 FOR_EACH_OBSERVER(InputMethodObserver, 124 FOR_EACH_OBSERVER(InputMethodObserver,
125 observer_list_, 125 observer_list_,
126 OnTextInputStateChanged(client)); 126 OnTextInputStateChanged(client));
127 } 127 }
128 128
129 void InputMethodBase::NotifyTextInputCaretBoundsChanged(
130 const TextInputClient* client) {
131 FOR_EACH_OBSERVER(
132 InputMethodObserver, observer_list_, OnCaretBoundsChanged(client));
133 }
134
129 void InputMethodBase::SetFocusedTextInputClientInternal( 135 void InputMethodBase::SetFocusedTextInputClientInternal(
130 TextInputClient* client) { 136 TextInputClient* client) {
131 if (switches::IsTextInputFocusManagerEnabled()) 137 if (switches::IsTextInputFocusManagerEnabled())
132 return; 138 return;
133 139
134 TextInputClient* old = text_input_client_; 140 TextInputClient* old = text_input_client_;
135 if (old == client) 141 if (old == client)
136 return; 142 return;
137 OnWillChangeFocusedClient(old, client); 143 OnWillChangeFocusedClient(old, client);
138 text_input_client_ = client; // NULL allowed. 144 text_input_client_ = client; // NULL allowed.
(...skipping 29 matching lines...) Expand all
168 if (TextInputClient* text_input_client = GetTextInputClient()) 174 if (TextInputClient* text_input_client = GetTextInputClient())
169 text_input_client->OnCandidateWindowUpdated(); 175 text_input_client->OnCandidateWindowUpdated();
170 } 176 }
171 177
172 void InputMethodBase::CandidateWindowHiddenCallback() { 178 void InputMethodBase::CandidateWindowHiddenCallback() {
173 if (TextInputClient* text_input_client = GetTextInputClient()) 179 if (TextInputClient* text_input_client = GetTextInputClient())
174 text_input_client->OnCandidateWindowHidden(); 180 text_input_client->OnCandidateWindowHidden();
175 } 181 }
176 182
177 } // namespace ui 183 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698