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

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

Issue 188853003: Revert of Clean up WindowEventDispatcher some more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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: mojo/examples/aura_demo/window_tree_host_mojo.cc
diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.cc b/mojo/examples/aura_demo/window_tree_host_mojo.cc
index 815cce66fed668e5277c762b666b23b5bd408ff3..266d9231811914746f06ad00e14835573a67239c 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 @@
// 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());
}
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698