summaryrefslogtreecommitdiffstats
path: root/ui/aura/window_tree_host_win.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 05:00:17 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 05:00:17 +0000
commitd04aca190d6797ee21d9ae3ff4204abf8a0eab56 (patch)
tree718c5663ae4fdab160665c51da6f7d5169c961c6 /ui/aura/window_tree_host_win.cc
parent4056b848b9bca75c866c530662a07c0e1c0f96c3 (diff)
downloadchromium_src-d04aca190d6797ee21d9ae3ff4204abf8a0eab56.zip
chromium_src-d04aca190d6797ee21d9ae3ff4204abf8a0eab56.tar.gz
chromium_src-d04aca190d6797ee21d9ae3ff4204abf8a0eab56.tar.bz2
Clean up WindowEventDispatcher some more.
. Eliminate the implementation of LayerAnimationObserver. It seems no one expects WED to be a LAO anymore. . Remove WindowTreeHostDelegate. This involves moving some of the functions to WTH, removing some completely, and moving the remainder to the WED public API. A little icky for now, but I plan to take a pass on cleaning up WED's public API once I get it pared down. . window_tree_host_x11_unittest provided an implementation of WTHD that was not WED. This is not a valid situation now since various functions in WTH now call directly through to WED. Replaced this with a simple EventHandler to test that events are being dispatched. R=sky@chromium.org http://crbug.com/308843 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255368 Review URL: https://codereview.chromium.org/188223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_win.cc')
-rw-r--r--ui/aura/window_tree_host_win.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc
index eb3af31..d20d2ce 100644
--- a/ui/aura/window_tree_host_win.cc
+++ b/ui/aura/window_tree_host_win.cc
@@ -13,6 +13,7 @@
#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"
@@ -134,9 +135,8 @@ void WindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
// 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(
- delegate_->AsDispatcher()->window())->GetDisplayNearestWindow(
- delegate_->AsDispatcher()->window()).device_scale_factor();
+ float new_scale = gfx::Screen::GetScreenFor(window())->
+ GetDisplayNearestWindow(window()).device_scale_factor();
if (current_scale != new_scale)
OnHostResized(bounds.size());
}
@@ -230,7 +230,7 @@ void WindowTreeHostWin::PrepareForShutdown() {
}
ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() {
- return delegate_->GetEventProcessor();
+ return dispatcher();
}
void WindowTreeHostWin::OnClose() {
@@ -268,7 +268,7 @@ LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message,
LPARAM l_param) {
if (has_capture_) {
has_capture_ = false;
- delegate_->OnHostLostWindowCapture();
+ OnHostLostWindowCapture();
}
return 0;
}
@@ -277,7 +277,7 @@ LRESULT WindowTreeHostWin::OnNCActivate(UINT message,
WPARAM w_param,
LPARAM l_param) {
if (!!w_param)
- delegate_->OnHostActivated();
+ OnHostActivated();
return DefWindowProc(hwnd(), message, w_param, l_param);
}
@@ -297,7 +297,7 @@ void WindowTreeHostWin::OnPaint(HDC dc) {
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 (delegate_ && param != SIZE_MINIMIZED)
+ if (dispatcher() && param != SIZE_MINIMIZED)
OnHostResized(size);
}