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

Side by Side Diff: ash/host/ash_remote_window_tree_host_win.cc

Issue 1236923003: Makes DesktopWindowTreeHostXxx to dispatch key event to InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO. Created 5 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 unified diff | Download patch
« no previous file with comments | « ash/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host_ozone.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/host/ash_remote_window_tree_host_win.h" 5 #include "ash/host/ash_remote_window_tree_host_win.h"
6 6
7 #include "ash/host/root_window_transformer.h" 7 #include "ash/host/root_window_transformer.h"
8 #include "ash/ime/input_method_event_handler.h" 8 #include "ash/ime/input_method_event_handler.h"
9 #include "ui/events/event_processor.h"
9 #include "ui/gfx/geometry/insets.h" 10 #include "ui/gfx/geometry/insets.h"
10 #include "ui/gfx/transform.h" 11 #include "ui/gfx/transform.h"
11 12
12 namespace ash { 13 namespace ash {
13 14
14 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd) 15 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd)
15 : aura::RemoteWindowTreeHostWin(), 16 : aura::RemoteWindowTreeHostWin(),
16 transformer_helper_(this) { 17 transformer_helper_(this) {
17 SetRemoteWindowHandle(remote_hwnd); 18 SetRemoteWindowHandle(remote_hwnd);
18 transformer_helper_.Init(); 19 transformer_helper_.Init();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 55
55 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( 56 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize(
56 const gfx::Size& host_size) { 57 const gfx::Size& host_size) {
57 transformer_helper_.UpdateWindowSize(host_size); 58 transformer_helper_.UpdateWindowSize(host_size);
58 } 59 }
59 60
60 bool AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME( 61 bool AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME(
61 const ui::KeyEvent& event) { 62 const ui::KeyEvent& event) {
62 ui::KeyEvent event_copy(event); 63 ui::KeyEvent event_copy(event);
63 input_method_handler()->SetPostIME(true); 64 input_method_handler()->SetPostIME(true);
64 ui::EventSource::DeliverEventToProcessor(&event_copy); 65 ui::EventDispatchDetails details =
66 event_processor()->OnEventFromSource(&event_copy);
67 if (details.dispatcher_destroyed)
68 return true;
65 input_method_handler()->SetPostIME(false); 69 input_method_handler()->SetPostIME(false);
66 return event_copy.stopped_propagation(); 70 return event_copy.stopped_propagation();
67 } 71 }
68 72
69 ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DeliverEventToProcessor(
70 ui::Event* event) {
71 return ui::EventSource::DeliverEventToProcessor(event);
72 }
73
74 } // namespace ash 73 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698