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

Unified Diff: components/mus/view_tree_host_impl.cc

Issue 1328953003: Mandoline: Support transforms and clipping of OOPIFs and events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO Created 5 years, 3 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
« no previous file with comments | « components/mus/view_tree_host_impl.h ('k') | components/mus/view_tree_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/view_tree_host_impl.cc
diff --git a/components/mus/view_tree_host_impl.cc b/components/mus/view_tree_host_impl.cc
index 7f04d19d4054242bb6f05d5396e1d8038dc86424..32fcfe2cebf0b099dbc4f50279712425abd62f6a 100644
--- a/components/mus/view_tree_host_impl.cc
+++ b/components/mus/view_tree_host_impl.cc
@@ -113,7 +113,6 @@ void ViewTreeHostImpl::DispatchInputEventToView(const ServerView* target,
connection_manager_->GetConnectionWithRoot(target->id());
if (!connection)
connection = connection_manager_->GetConnection(target->id().connection_id);
- DCHECK_EQ(this, connection->GetHost());
connection->client()->OnViewInputEvent(ViewIdToTransportId(target->id()),
event.Pass(),
base::Bind(&base::DoNothing));
@@ -150,7 +149,15 @@ ServerView* ViewTreeHostImpl::GetRootView() {
return root_.get();
}
-void ViewTreeHostImpl::OnEvent(mojo::EventPtr event) {
+void ViewTreeHostImpl::OnEvent(ViewId id, mojo::EventPtr event) {
+ ServerView* view = connection_manager_->GetView(id);
+ // TODO(fsamuel): This should be a DCHECK but currently we use stale
+ // information to decide where to route input events. This should be fixed
+ // once we implement a UI scheduler.
+ if (view) {
+ DispatchInputEventToView(view, event.Pass());
+ return;
+ }
event_dispatcher_.OnEvent(event.Pass());
}
« no previous file with comments | « components/mus/view_tree_host_impl.h ('k') | components/mus/view_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698