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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_win.cc
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc
index e1c1f9d6ec748c43bc5d8051872ebbdb1f9013d4..1c7054f5f47a76ca0c31e55004f4de6d657498dc 100644
--- a/ui/aura/root_window_host_win.cc
+++ b/ui/aura/root_window_host_win.cc
@@ -233,6 +233,10 @@ void WindowTreeHostWin::PrepareForShutdown() {
NOTIMPLEMENTED();
}
+ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() {
+ return delegate_->GetEventProcessor();
+}
+
void WindowTreeHostWin::OnClose() {
// TODO: this obviously shouldn't be here.
base::MessageLoopForUI::current()->Quit();
@@ -243,7 +247,8 @@ LRESULT WindowTreeHostWin::OnKeyEvent(UINT message,
LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param };
ui::KeyEvent keyev(msg, message == WM_CHAR);
- SetMsgHandled(delegate_->OnHostKeyEvent(&keyev));
+ ui::EventDispatchDetails details = SendEventToProcessor(&keyev);
+ SetMsgHandled(keyev.handled() || details.dispatcher_destroyed);
return 0;
}
@@ -254,8 +259,10 @@ LRESULT WindowTreeHostWin::OnMouseRange(UINT message,
{ CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } };
ui::MouseEvent event(msg);
bool handled = false;
- if (!(event.flags() & ui::EF_IS_NON_CLIENT))
- handled = delegate_->OnHostMouseEvent(&event);
+ if (!(event.flags() & ui::EF_IS_NON_CLIENT)) {
+ ui::EventDispatchDetails details = SendEventToProcessor(&event);
+ handled = event.handled() || details.dispatcher_destroyed;
+ }
SetMsgHandled(handled);
return 0;
}
« 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