| Index: ui/aura/window_tree_host_win.cc
|
| diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc
|
| index cddc5b388f584527e966cb205b965889602f9431..eb3af31e3c6fb4862a22b9f178fc4145823f59db 100644
|
| --- a/ui/aura/window_tree_host_win.cc
|
| +++ b/ui/aura/window_tree_host_win.cc
|
| @@ -13,7 +13,6 @@
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/base/cursor/cursor_loader_win.h"
|
| #include "ui/base/view_prop.h"
|
| -#include "ui/compositor/compositor.h"
|
| #include "ui/events/event.h"
|
| #include "ui/gfx/display.h"
|
| #include "ui/gfx/insets.h"
|
| @@ -135,8 +134,9 @@
|
| // Explicity call OnHostResized when the scale has changed because
|
| // the window size may not have changed.
|
| float current_scale = compositor()->device_scale_factor();
|
| - float new_scale = gfx::Screen::GetScreenFor(window())->
|
| - GetDisplayNearestWindow(window()).device_scale_factor();
|
| + float new_scale = gfx::Screen::GetScreenFor(
|
| + delegate_->AsDispatcher()->window())->GetDisplayNearestWindow(
|
| + delegate_->AsDispatcher()->window()).device_scale_factor();
|
| if (current_scale != new_scale)
|
| OnHostResized(bounds.size());
|
| }
|
| @@ -230,7 +230,7 @@
|
| }
|
|
|
| ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() {
|
| - return dispatcher();
|
| + return delegate_->GetEventProcessor();
|
| }
|
|
|
| void WindowTreeHostWin::OnClose() {
|
| @@ -268,7 +268,7 @@
|
| LPARAM l_param) {
|
| if (has_capture_) {
|
| has_capture_ = false;
|
| - OnHostLostWindowCapture();
|
| + delegate_->OnHostLostWindowCapture();
|
| }
|
| return 0;
|
| }
|
| @@ -277,7 +277,7 @@
|
| WPARAM w_param,
|
| LPARAM l_param) {
|
| if (!!w_param)
|
| - OnHostActivated();
|
| + delegate_->OnHostActivated();
|
| return DefWindowProc(hwnd(), message, w_param, l_param);
|
| }
|
|
|
| @@ -297,7 +297,7 @@
|
| void WindowTreeHostWin::OnSize(UINT param, const gfx::Size& size) {
|
| // Minimizing resizes the window to 0x0 which causes our layout to go all
|
| // screwy, so we just ignore it.
|
| - if (param != SIZE_MINIMIZED)
|
| + if (delegate_ && param != SIZE_MINIMIZED)
|
| OnHostResized(size);
|
| }
|
|
|
|
|