Index: services/surfaces/surfaces_impl.cc |
diff --git a/services/surfaces/surfaces_impl.cc b/services/surfaces/surfaces_impl.cc |
index df91bf8ddb353804fd448250ae796e8d1f045aef..114875a571e7acd981e6d6167a0a0c92530fc9cb 100644 |
--- a/services/surfaces/surfaces_impl.cc |
+++ b/services/surfaces/surfaces_impl.cc |
@@ -26,13 +26,30 @@ void CallCallback(const mojo::Closure& callback) { |
SurfacesImpl::SurfacesImpl(cc::SurfaceManager* manager, |
sky
2014/12/16 03:34:04
nit: move to match position in header.
|
uint32_t id_namespace, |
- Client* client, |
- mojo::SurfacePtr* surface) |
+ Client* client) |
: manager_(manager), |
factory_(manager, this), |
id_namespace_(id_namespace), |
client_(client), |
- binding_(this, surface) { |
+ binding_(this) { |
+} |
+ |
+SurfacesImpl::SurfacesImpl(cc::SurfaceManager* manager, |
+ uint32_t id_namespace, |
+ Client* client, |
+ mojo::InterfaceRequest<mojo::Surface> request) |
+ : SurfacesImpl(manager, id_namespace, client) { |
+ binding_.Bind(request.Pass()); |
+ binding_.client()->SetIdNamespace(id_namespace); |
+} |
+ |
+SurfacesImpl::SurfacesImpl(cc::SurfaceManager* manager, |
+ uint32_t id_namespace, |
+ Client* client, |
+ mojo::SurfacePtr* surface) |
+ : SurfacesImpl(manager, id_namespace, client) { |
+ binding_.Bind(surface); |
+ binding_.client()->SetIdNamespace(id_namespace); |
} |
SurfacesImpl::~SurfacesImpl() { |
@@ -40,7 +57,7 @@ SurfacesImpl::~SurfacesImpl() { |
factory_.DestroyAll(); |
} |
-void SurfacesImpl::CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) { |
+void SurfacesImpl::CreateSurface(SurfaceIdPtr id) { |
cc::SurfaceId cc_id = id.To<cc::SurfaceId>(); |
if (cc::SurfaceIdAllocator::NamespaceForId(cc_id) != id_namespace_) { |
// Bad message, do something bad to the caller? |