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

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 + added uip::Surface 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
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 32e492c74ebd24a393a4bad4fc2cfb568ee3d517..c8ebba8cede7576458392f1f2fff3b6448f11b7e 100644
--- a/components/view_manager/public/cpp/lib/view.cc
+++ b/components/view_manager/public/cpp/lib/view.cc
@@ -9,6 +9,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/surface.h"
#include "components/view_manager/public/cpp/view_observer.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<uip::Surface> 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 uip::Surface(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_)

Powered by Google App Engine
This is Rietveld 408576698