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

Unified Diff: mojo/services/view_manager/view_manager_service_impl.cc

Issue 636363002: Splits window manager like methods into ViewManagerServiceDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 6 years, 2 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/services/view_manager/view_manager_service_impl.cc
diff --git a/mojo/services/view_manager/view_manager_service_impl.cc b/mojo/services/view_manager/view_manager_service_impl.cc
index 06638cf7c9d8b3fe6ce6efc328ae6dc009c359d7..f066b82506c4819d2bec520e6994a77f092a6de8 100644
--- a/mojo/services/view_manager/view_manager_service_impl.cc
+++ b/mojo/services/view_manager/view_manager_service_impl.cc
@@ -481,7 +481,7 @@ void ViewManagerServiceImpl::Embed(
spir.Bind(service_provider.PassMessagePipe());
if (ViewIdFromTransportId(transport_view_id) == InvalidViewId()) {
- connection_manager_->EmbedRoot(url, spir.Pass());
+ connection_manager_->Embed(url, spir.Pass());
callback.Run(true);
return;
}
@@ -503,33 +503,10 @@ void ViewManagerServiceImpl::Embed(
connection_manager_->OnConnectionMessagedClient(id_);
existing_owner->RemoveRoot(view_id);
}
- connection_manager_->Embed(id_, url, transport_view_id, spir.Pass());
+ connection_manager_->EmbedAtView(id_, url, transport_view_id, spir.Pass());
callback.Run(true);
}
-void ViewManagerServiceImpl::DispatchOnViewInputEvent(Id transport_view_id,
- EventPtr event) {
- // We only allow the WM to dispatch events. At some point this function will
- // move to a separate interface and the check can go away.
- if (id_ != kWindowManagerConnection)
- return;
-
- const ViewId view_id(ViewIdFromTransportId(transport_view_id));
-
- // If another app is embedded at this view, we forward the input event to the
- // embedded app, rather than the app that created the view.
- ViewManagerServiceImpl* connection =
- connection_manager_->GetConnectionWithRoot(view_id);
- if (!connection)
- connection = connection_manager_->GetConnection(view_id.connection_id);
- if (connection) {
- connection->client()->OnViewInputEvent(
- transport_view_id,
- event.Pass(),
- base::Bind(&base::DoNothing));
- }
-}
-
void ViewManagerServiceImpl::OnConnectionEstablished() {
connection_manager_->AddConnection(this);
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.h ('k') | mojo/services/view_manager/view_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698