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

Unified Diff: components/view_manager/public/cpp/lib/view.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/public/cpp/BUILD.gn ('k') | components/view_manager/public/cpp/lib/view_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/public/cpp/lib/view.cc
diff --git a/components/view_manager/public/cpp/lib/view.cc b/components/view_manager/public/cpp/lib/view.cc
index ffed44162d471f04d190c48bd10d58bdd1507b2b..a0e1eea030747c1e90fd065857cd9f0f77717fae 100644
--- a/components/view_manager/public/cpp/lib/view.cc
+++ b/components/view_manager/public/cpp/lib/view.cc
@@ -10,6 +10,7 @@
#include "components/view_manager/public/cpp/lib/view_private.h"
#include "components/view_manager/public/cpp/lib/view_tree_client_impl.h"
#include "components/view_manager/public/cpp/view_observer.h"
+#include "components/view_manager/public/cpp/view_surface.h"
#include "components/view_manager/public/cpp/view_tracker.h"
#include "mojo/application/public/cpp/service_provider_impl.h"
@@ -223,6 +224,16 @@ void View::SetVisible(bool value) {
LocalSetVisible(value);
}
+scoped_ptr<mojo::ViewSurface> View::RequestSurface() {
+ mojo::SurfacePtr surface;
+ mojo::SurfaceClientPtr client;
+ mojo::InterfaceRequest<SurfaceClient> client_request = GetProxy(&client);
+ static_cast<ViewTreeClientImpl*>(connection_)->RequestSurface(
+ id_, GetProxy(&surface), client.Pass());
+ return make_scoped_ptr(new mojo::ViewSurface(surface.PassInterface(),
+ client_request.Pass()));
+}
+
void View::SetSharedProperty(const std::string& name,
const std::vector<uint8_t>* value) {
std::vector<uint8_t> old_value;
@@ -354,12 +365,6 @@ View* View::GetChildById(Id id) {
return NULL;
}
-void View::SetSurfaceId(SurfaceIdPtr id) {
- if (connection_) {
- static_cast<ViewTreeClientImpl*>(connection_)->SetSurfaceId(id_, id.Pass());
- }
-}
-
void View::SetTextInputState(TextInputStatePtr state) {
if (connection_) {
static_cast<ViewTreeClientImpl*>(connection_)
« no previous file with comments | « components/view_manager/public/cpp/BUILD.gn ('k') | components/view_manager/public/cpp/lib/view_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698