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

Side by Side Diff: ui/aura/window_tree_host.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: per comments. 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 DCHECK(!input_method_); 195 DCHECK(!input_method_);
196 input_method_ = input_method; 196 input_method_ = input_method;
197 owned_input_method_ = false; 197 owned_input_method_ = false;
198 } 198 }
199 199
200 bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) { 200 bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) {
201 ui::KeyEvent copied_event(event); 201 ui::KeyEvent copied_event(event);
202 ui::EventDispatchDetails details = 202 ui::EventDispatchDetails details =
203 event_processor()->OnEventFromSource(&copied_event); 203 event_processor()->OnEventFromSource(&copied_event);
204 DCHECK(!details.dispatcher_destroyed); 204 DCHECK(!details.dispatcher_destroyed);
205 return copied_event.handled(); 205 return copied_event.stopped_propagation();
206 } 206 }
207 207
208 void WindowTreeHost::Show() { 208 void WindowTreeHost::Show() {
209 if (compositor()) 209 if (compositor())
210 compositor()->SetVisible(true); 210 compositor()->SetVisible(true);
211 ShowImpl(); 211 ShowImpl();
212 } 212 }
213 213
214 void WindowTreeHost::Hide() { 214 void WindowTreeHost::Hide() {
215 HideImpl(); 215 HideImpl();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 client::CursorClient* cursor_client = client::GetCursorClient(window()); 334 client::CursorClient* cursor_client = client::GetCursorClient(window());
335 if (cursor_client) { 335 if (cursor_client) {
336 const gfx::Display& display = 336 const gfx::Display& display =
337 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 337 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window());
338 cursor_client->SetDisplay(display); 338 cursor_client->SetDisplay(display);
339 } 339 }
340 dispatcher()->OnCursorMovedToRootLocation(root_location); 340 dispatcher()->OnCursorMovedToRootLocation(root_location);
341 } 341 }
342 342
343 } // namespace aura 343 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_chromeos.h » ('j') | ui/base/ime/input_method_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698