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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 1257603006: Refactoring for the InputMethod & InputMethodDelegate interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Sadrul's comment. Created 5 years, 4 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 | « ui/aura/window_tree_host.h ('k') | ui/base/ime/dummy_input_method.h » ('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 (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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 return input_method_; 187 return input_method_;
188 } 188 }
189 189
190 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) { 190 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) {
191 DCHECK(!input_method_); 191 DCHECK(!input_method_);
192 input_method_ = input_method; 192 input_method_ = input_method;
193 owned_input_method_ = false; 193 owned_input_method_ = false;
194 } 194 }
195 195
196 bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) { 196 ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME(
197 ui::KeyEvent copied_event(event); 197 ui::KeyEvent* event) {
198 ui::EventDispatchDetails details = SendEventToProcessor(&copied_event); 198 return SendEventToProcessor(event);
199 DCHECK(!details.dispatcher_destroyed);
200 return copied_event.stopped_propagation();
201 } 199 }
202 200
203 void WindowTreeHost::Show() { 201 void WindowTreeHost::Show() {
204 if (compositor()) 202 if (compositor())
205 compositor()->SetVisible(true); 203 compositor()->SetVisible(true);
206 ShowImpl(); 204 ShowImpl();
207 } 205 }
208 206
209 void WindowTreeHost::Hide() { 207 void WindowTreeHost::Hide() {
210 HideImpl(); 208 HideImpl();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 client::CursorClient* cursor_client = client::GetCursorClient(window()); 313 client::CursorClient* cursor_client = client::GetCursorClient(window());
316 if (cursor_client) { 314 if (cursor_client) {
317 const gfx::Display& display = 315 const gfx::Display& display =
318 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 316 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window());
319 cursor_client->SetDisplay(display); 317 cursor_client->SetDisplay(display);
320 } 318 }
321 dispatcher()->OnCursorMovedToRootLocation(root_location); 319 dispatcher()->OnCursorMovedToRootLocation(root_location);
322 } 320 }
323 321
324 } // namespace aura 322 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698