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

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

Issue 1209913002: InputMethod should stop TextInputClient::InsertChar/InsertText calls when the event is stopped prop… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures. 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
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_window_tree_host.h" 5 #include "ash/host/ash_window_tree_host.h"
6 6
7 #include "ash/ash_export.h" 7 #include "ash/ash_export.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/host/ash_remote_window_tree_host_win.h" 9 #include "ash/host/ash_remote_window_tree_host_win.h"
10 #include "ash/host/ash_window_tree_host_init_params.h" 10 #include "ash/host/ash_window_tree_host_init_params.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void UpdateRootWindowSize(const gfx::Size& host_size) override { 101 void UpdateRootWindowSize(const gfx::Size& host_size) override {
102 transformer_helper_.UpdateWindowSize(host_size); 102 transformer_helper_.UpdateWindowSize(host_size);
103 } 103 }
104 104
105 // ui::internal::InputMethodDelegate: 105 // ui::internal::InputMethodDelegate:
106 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override { 106 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
107 ui::KeyEvent event_copy(event); 107 ui::KeyEvent event_copy(event);
108 input_method_handler()->SetPostIME(true); 108 input_method_handler()->SetPostIME(true);
109 ui::EventSource::DeliverEventToProcessor(&event_copy); 109 ui::EventSource::DeliverEventToProcessor(&event_copy);
110 input_method_handler()->SetPostIME(false); 110 input_method_handler()->SetPostIME(false);
111 return event_copy.handled(); 111 return event_copy.stopped_propagation();
112 } 112 }
113 113
114 // ui::EventSource: 114 // ui::EventSource:
115 ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override { 115 ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override {
116 return ui::EventSource::DeliverEventToProcessor(event); 116 return ui::EventSource::DeliverEventToProcessor(event);
117 } 117 }
118 118
119 bool fullscreen_; 119 bool fullscreen_;
120 RECT saved_window_rect_; 120 RECT saved_window_rect_;
121 DWORD saved_window_style_; 121 DWORD saved_window_style_;
(...skipping 10 matching lines...) Expand all
132 const AshWindowTreeHostInitParams& init_params) { 132 const AshWindowTreeHostInitParams& init_params) {
133 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && 133 if (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
134 !base::CommandLine::ForCurrentProcess()->HasSwitch( 134 !base::CommandLine::ForCurrentProcess()->HasSwitch(
135 ash::switches::kForceAshToDesktop)) 135 ash::switches::kForceAshToDesktop))
136 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd); 136 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd);
137 137
138 return new AshWindowTreeHostWin(init_params.initial_bounds); 138 return new AshWindowTreeHostWin(init_params.initial_bounds);
139 } 139 }
140 140
141 } // namespace ash 141 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698