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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 188853003: Revert of Clean up WindowEventDispatcher some more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index f723aeb865fd4bf51bbbc82de60395fb2395e46f..b88e3a544b3d57250b0d0ec638907867e1c77c37 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -586,7 +586,7 @@
// DesktopWindowTreeHostWin, ui::EventSource implementation:
ui::EventProcessor* DesktopWindowTreeHostWin::GetEventProcessor() {
- return dispatcher();
+ return delegate_->GetEventProcessor();
}
////////////////////////////////////////////////////////////////////////////////
@@ -736,12 +736,11 @@
void DesktopWindowTreeHostWin::HandleActivationChanged(bool active) {
// This can be invoked from HWNDMessageHandler::Init(), at which point we're
// not in a good state and need to ignore it.
- // TODO(beng): Do we need this still now the host owns the dispatcher?
- if (!dispatcher())
+ if (!delegate_)
return;
if (active)
- OnHostActivated();
+ delegate_->OnHostActivated();
desktop_native_widget_aura_->HandleActivationChanged(active);
}
@@ -753,11 +752,11 @@
}
void DesktopWindowTreeHostWin::HandleCancelMode() {
- dispatcher()->DispatchCancelModeEvent();
+ delegate_->OnHostCancelMode();
}
void DesktopWindowTreeHostWin::HandleCaptureLost() {
- OnHostLostWindowCapture();
+ delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
@@ -827,7 +826,8 @@
void DesktopWindowTreeHostWin::HandleClientSizeChanged(
const gfx::Size& new_size) {
- OnHostResized(new_size);
+ if (delegate_)
+ OnHostResized(new_size);
}
void DesktopWindowTreeHostWin::HandleFrameChanged() {
« no previous file with comments | « ui/aura/window_tree_host_x11_unittest.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698