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

Unified Diff: trunk/src/mojo/examples/aura_demo/window_tree_host_mojo.cc

Issue 188843003: Revert 255368 "Clean up WindowEventDispatcher some more." (Closed) Base URL: svn://svn.chromium.org/chrome/
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: trunk/src/mojo/examples/aura_demo/window_tree_host_mojo.cc
===================================================================
--- trunk/src/mojo/examples/aura_demo/window_tree_host_mojo.cc (revision 255398)
+++ trunk/src/mojo/examples/aura_demo/window_tree_host_mojo.cc (working copy)
@@ -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 @@
// WindowTreeHostMojo, ui::EventSource implementation:
ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() {
- return dispatcher();
+ return delegate_->GetEventProcessor();
}
////////////////////////////////////////////////////////////////////////////////
@@ -162,7 +162,8 @@
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());
}

Powered by Google App Engine
This is Rietveld 408576698