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() { |