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

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

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_host_win.h ('k') | ui/aura/root_window_host_x11.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/root_window_host_win.h" 5 #include "ui/aura/root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 void WindowTreeHostWin::OnDeviceScaleFactorChanged( 227 void WindowTreeHostWin::OnDeviceScaleFactorChanged(
228 float device_scale_factor) { 228 float device_scale_factor) {
229 NOTIMPLEMENTED(); 229 NOTIMPLEMENTED();
230 } 230 }
231 231
232 void WindowTreeHostWin::PrepareForShutdown() { 232 void WindowTreeHostWin::PrepareForShutdown() {
233 NOTIMPLEMENTED(); 233 NOTIMPLEMENTED();
234 } 234 }
235 235
236 ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() {
237 return delegate_->GetEventProcessor();
238 }
239
236 void WindowTreeHostWin::OnClose() { 240 void WindowTreeHostWin::OnClose() {
237 // TODO: this obviously shouldn't be here. 241 // TODO: this obviously shouldn't be here.
238 base::MessageLoopForUI::current()->Quit(); 242 base::MessageLoopForUI::current()->Quit();
239 } 243 }
240 244
241 LRESULT WindowTreeHostWin::OnKeyEvent(UINT message, 245 LRESULT WindowTreeHostWin::OnKeyEvent(UINT message,
242 WPARAM w_param, 246 WPARAM w_param,
243 LPARAM l_param) { 247 LPARAM l_param) {
244 MSG msg = { hwnd(), message, w_param, l_param }; 248 MSG msg = { hwnd(), message, w_param, l_param };
245 ui::KeyEvent keyev(msg, message == WM_CHAR); 249 ui::KeyEvent keyev(msg, message == WM_CHAR);
246 SetMsgHandled(delegate_->OnHostKeyEvent(&keyev)); 250 ui::EventDispatchDetails details = SendEventToProcessor(&keyev);
251 SetMsgHandled(keyev.handled() || details.dispatcher_destroyed);
247 return 0; 252 return 0;
248 } 253 }
249 254
250 LRESULT WindowTreeHostWin::OnMouseRange(UINT message, 255 LRESULT WindowTreeHostWin::OnMouseRange(UINT message,
251 WPARAM w_param, 256 WPARAM w_param,
252 LPARAM l_param) { 257 LPARAM l_param) {
253 MSG msg = { hwnd(), message, w_param, l_param, 0, 258 MSG msg = { hwnd(), message, w_param, l_param, 0,
254 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; 259 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } };
255 ui::MouseEvent event(msg); 260 ui::MouseEvent event(msg);
256 bool handled = false; 261 bool handled = false;
257 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) 262 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) {
258 handled = delegate_->OnHostMouseEvent(&event); 263 ui::EventDispatchDetails details = SendEventToProcessor(&event);
264 handled = event.handled() || details.dispatcher_destroyed;
265 }
259 SetMsgHandled(handled); 266 SetMsgHandled(handled);
260 return 0; 267 return 0;
261 } 268 }
262 269
263 LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message, 270 LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message,
264 WPARAM w_param, 271 WPARAM w_param,
265 LPARAM l_param) { 272 LPARAM l_param) {
266 if (has_capture_) { 273 if (has_capture_) {
267 has_capture_ = false; 274 has_capture_ = false;
268 delegate_->OnHostLostWindowCapture(); 275 delegate_->OnHostLostWindowCapture();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 namespace test { 309 namespace test {
303 310
304 // static 311 // static
305 void SetUsePopupAsRootWindowForTest(bool use) { 312 void SetUsePopupAsRootWindowForTest(bool use) {
306 use_popup_as_root_window_for_test = use; 313 use_popup_as_root_window_for_test = use;
307 } 314 }
308 315
309 } // namespace test 316 } // namespace test
310 317
311 } // namespace aura 318 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_win.h ('k') | ui/aura/root_window_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698