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_) |