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

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

Issue 142043006: Refactors ui::internal::InputMethodDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed an issue of unsigned/signed comparison. Created 6 years, 10 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_delegate.h ('k') | ui/base/ime/remote_input_method_win_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/remote_input_method_win.h" 5 #include "ui/base/ime/remote_input_method_win.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/win/metro.h" 9 #include "base/win/metro.h"
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 if (event.is_char()) { 198 if (event.is_char()) {
199 if (text_input_client_) { 199 if (text_input_client_) {
200 text_input_client_->InsertChar(event.key_code(), 200 text_input_client_->InsertChar(event.key_code(),
201 ui::GetModifiersFromKeyState()); 201 ui::GetModifiersFromKeyState());
202 } 202 }
203 return true; 203 return true;
204 } 204 }
205 if (!delegate_) 205 if (!delegate_)
206 return false; 206 return false;
207 return delegate_->DispatchFabricatedKeyEventPostIME(event.type(), 207 return delegate_->DispatchKeyEventPostIME(event);
208 event.key_code(),
209 event.flags());
210 } 208 }
211 209
212 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE { 210 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE {
213 if (!text_input_client_ || text_input_client_ != client) 211 if (!text_input_client_ || text_input_client_ != client)
214 return; 212 return;
215 std::vector<int32> prev_input_scopes; 213 std::vector<int32> prev_input_scopes;
216 std::swap(input_scopes_, prev_input_scopes); 214 std::swap(input_scopes_, prev_input_scopes);
217 input_scopes_ = GetInputScopesAsInt(client->GetTextInputType(), 215 input_scopes_ = GetInputScopesAsInt(client->GetTextInputType(),
218 client->GetTextInputMode()); 216 client->GetTextInputMode());
219 if (input_scopes_ != prev_input_scopes && remote_delegate_) { 217 if (input_scopes_ != prev_input_scopes && remote_delegate_) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); 381 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate));
384 } 382 }
385 383
386 // static 384 // static
387 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( 385 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get(
388 InputMethod* input_method) { 386 InputMethod* input_method) {
389 return GetPrivate(input_method); 387 return GetPrivate(input_method);
390 } 388 }
391 389
392 } // namespace ui 390 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_delegate.h ('k') | ui/base/ime/remote_input_method_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698