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

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

Issue 80263005: Use RemoteInputMethodWin in production (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « ui/base/ime/remote_input_method_win.h ('k') | no next file » | 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"
10 #include "base/win/scoped_handle.h"
9 #include "ui/base/ime/input_method.h" 11 #include "ui/base/ime/input_method.h"
10 #include "ui/base/ime/input_method_delegate.h" 12 #include "ui/base/ime/input_method_delegate.h"
11 #include "ui/base/ime/input_method_observer.h" 13 #include "ui/base/ime/input_method_observer.h"
12 #include "ui/base/ime/remote_input_method_delegate_win.h" 14 #include "ui/base/ime/remote_input_method_delegate_win.h"
13 #include "ui/base/ime/text_input_client.h" 15 #include "ui/base/ime/text_input_client.h"
14 #include "ui/base/ime/win/tsf_input_scope.h" 16 #include "ui/base/ime/win/tsf_input_scope.h"
15 #include "ui/events/event.h" 17 #include "ui/events/event.h"
16 #include "ui/events/event_utils.h" 18 #include "ui/events/event_utils.h"
17 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
18 20
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 std::vector<gfx::Rect> composition_character_bounds_; 368 std::vector<gfx::Rect> composition_character_bounds_;
367 bool is_candidate_popup_open_; 369 bool is_candidate_popup_open_;
368 bool is_ime_; 370 bool is_ime_;
369 LANGID langid_; 371 LANGID langid_;
370 372
371 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodWin); 373 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodWin);
372 }; 374 };
373 375
374 } // namespace 376 } // namespace
375 377
378 bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget) {
379 DWORD process_id = 0;
380 if (GetWindowThreadProcessId(widget, &process_id) == 0)
381 return false;
382 base::win::ScopedHandle process_handle(::OpenProcess(
383 PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id));
384 if (!process_handle.IsValid())
385 return false;
386 return base::win::IsProcessImmersive(process_handle.Get());
387 }
388
376 RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {} 389 RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {}
377 390
378 scoped_ptr<InputMethod> CreateRemoteInputMethodWin( 391 scoped_ptr<InputMethod> CreateRemoteInputMethodWin(
379 internal::InputMethodDelegate* delegate) { 392 internal::InputMethodDelegate* delegate) {
380 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); 393 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate));
381 } 394 }
382 395
383 // static 396 // static
384 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( 397 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get(
385 InputMethod* input_method) { 398 InputMethod* input_method) {
386 return GetPrivate(input_method); 399 return GetPrivate(input_method);
387 } 400 }
388 401
389 } // namespace ui 402 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/remote_input_method_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698