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

Unified Diff: components/view_manager/view_tree_impl.cc

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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/view_manager/view_tree_impl.h ('k') | components/view_manager/view_tree_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/view_tree_impl.cc
diff --git a/components/view_manager/view_tree_impl.cc b/components/view_manager/view_tree_impl.cc
index 8f60351e344c6157e2c1838abaae828072a9ea79..12aadb7db2a95da940e7443ba5068ed649276d42 100644
--- a/components/view_manager/view_tree_impl.cc
+++ b/components/view_manager/view_tree_impl.cc
@@ -557,20 +557,6 @@ void ViewTreeImpl::GetViewTree(
callback.Run(ViewsToViewDatas(views));
}
-void ViewTreeImpl::SetViewSurfaceId(
- Id view_id,
- mojo::SurfaceIdPtr surface_id,
- const Callback<void(bool)>& callback) {
- // TODO(sky): add coverage of not being able to set for random node.
- ServerView* view = GetView(ViewIdFromTransportId(view_id));
- if (!view || !access_policy_->CanSetViewSurfaceId(view)) {
- callback.Run(false);
- return;
- }
- view->SetSurfaceId(surface_id.To<cc::SurfaceId>());
- callback.Run(true);
-}
-
void ViewTreeImpl::SetViewBounds(
Id view_id,
mojo::RectPtr bounds,
@@ -612,6 +598,17 @@ void ViewTreeImpl::SetViewProperty(
callback.Run(success);
}
+void ViewTreeImpl::RequestSurface(
+ mojo::Id view_id,
+ mojo::InterfaceRequest<mojo::Surface> surface,
+ mojo::SurfaceClientPtr client) {
+ ServerView* view = GetView(ViewIdFromTransportId(view_id));
+ const bool success = view && access_policy_->CanSetViewSurfaceId(view);
+ if (!success)
+ return;
+ view->Bind(surface.Pass(), client.Pass());
+}
+
void ViewTreeImpl::SetViewTextInputState(
uint32_t view_id,
mojo::TextInputStatePtr state) {
« no previous file with comments | « components/view_manager/view_tree_impl.h ('k') | components/view_manager/view_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698