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

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

Issue 188223002: 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 b88e3a544b3d57250b0d0ec638907867e1c77c37..8c88d18b7b1083946fb06e7447d7d49b37cf3d3b 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 @@ void DesktopWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) {
// DesktopWindowTreeHostWin, ui::EventSource implementation:
ui::EventProcessor* DesktopWindowTreeHostWin::GetEventProcessor() {
- return delegate_->GetEventProcessor();
+ return dispatcher();
}
////////////////////////////////////////////////////////////////////////////////
@@ -736,11 +736,12 @@ void DesktopWindowTreeHostWin::HandleAppDeactivated() {
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.
- if (!delegate_)
+ // TODO(beng): Do we need this still now the host owns the dispatcher?
+ if (!dispatcher())
return;
if (active)
- delegate_->OnHostActivated();
+ OnHostActivated();
desktop_native_widget_aura_->HandleActivationChanged(active);
}
@@ -752,11 +753,11 @@ bool DesktopWindowTreeHostWin::HandleAppCommand(short command) {
}
void DesktopWindowTreeHostWin::HandleCancelMode() {
- delegate_->OnHostCancelMode();
+ dispatcher()->DispatchCancelModeEvent();
}
void DesktopWindowTreeHostWin::HandleCaptureLost() {
- delegate_->OnHostLostWindowCapture();
+ OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
@@ -826,7 +827,7 @@ void DesktopWindowTreeHostWin::HandleVisibilityChanged(bool visible) {
void DesktopWindowTreeHostWin::HandleClientSizeChanged(
const gfx::Size& new_size) {
- if (delegate_)
+ if (dispatcher())
OnHostResized(new_size);
}
« 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