From 39b2b7e8d4d4121e431ec1e5cc30ced3f72f39f6 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 6 Mar 2014 18:11:04 +0000 Subject: Revert 255368 "Clean up WindowEventDispatcher some more." > 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 > > Review URL: https://codereview.chromium.org/188223002 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/188843003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255399 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/examples/aura_demo/window_tree_host_mojo.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mojo') diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.cc b/mojo/examples/aura_demo/window_tree_host_mojo.cc index 815cce66..266d923 100644 --- a/mojo/examples/aura_demo/window_tree_host_mojo.cc +++ b/mojo/examples/aura_demo/window_tree_host_mojo.cc @@ -10,7 +10,7 @@ #include "mojo/services/native_viewport/geometry_conversions.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host_delegate.h" #include "ui/compositor/compositor.h" #include "ui/events/event.h" #include "ui/events/event_constants.h" @@ -148,7 +148,7 @@ void WindowTreeHostMojo::OnCursorVisibilityChangedNative(bool show) { // WindowTreeHostMojo, ui::EventSource implementation: ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() { - return dispatcher(); + return delegate_->GetEventProcessor(); } //////////////////////////////////////////////////////////////////////////////// @@ -162,7 +162,8 @@ void WindowTreeHostMojo::OnCreated() { void WindowTreeHostMojo::OnBoundsChanged(const Rect& bounds) { bounds_ = gfx::Rect(bounds.position().x(), bounds.position().y(), bounds.size().width(), bounds.size().height()); - window()->SetBounds(gfx::Rect(bounds_.size())); + if (delegate_) + window()->SetBounds(gfx::Rect(bounds_.size())); OnHostResized(bounds_.size()); } -- cgit v1.1