| Index: mojo/examples/surfaces_app/child_impl.cc
|
| diff --git a/mojo/examples/surfaces_app/child_impl.cc b/mojo/examples/surfaces_app/child_impl.cc
|
| index 52118f028f5b8f3b4578e654f55c9e040255b57d..5f91b5a29b451525ede7821ee93b815a2313f90d 100644
|
| --- a/mojo/examples/surfaces_app/child_impl.cc
|
| +++ b/mojo/examples/surfaces_app/child_impl.cc
|
| @@ -27,30 +27,9 @@ using cc::SolidColorDrawQuad;
|
| using cc::DelegatedFrameData;
|
| using cc::CompositorFrame;
|
|
|
| -class SurfaceClientImpl : public surfaces::SurfaceClient {
|
| - public:
|
| - explicit SurfaceClientImpl(ChildImpl* impl) : impl_(impl) {}
|
| - virtual ~SurfaceClientImpl() {}
|
| -
|
| - // surfaces::SurfaceClient implementation
|
| - virtual void SetIdNamespace(uint32_t id_namespace) OVERRIDE {
|
| - impl_->SetIdNamespace(id_namespace);
|
| - }
|
| -
|
| - virtual void ReturnResources(
|
| - Array<surfaces::ReturnedResourcePtr> resources) OVERRIDE {
|
| - DCHECK(!resources.size());
|
| - }
|
| -
|
| - private:
|
| - ChildImpl* impl_;
|
| -};
|
| -
|
| -ChildImpl::ChildImpl(ApplicationConnection* connection, Context* context)
|
| - : surface_client_(new SurfaceClientImpl(this)) {
|
| - context->ShellConnection("mojo:mojo_surfaces_service")
|
| - ->ConnectToService(&surface_);
|
| - surface_.set_client(surface_client_.get());
|
| +ChildImpl::ChildImpl(ApplicationConnection* surfaces_service_connection) {
|
| + surfaces_service_connection->ConnectToService(&surface_);
|
| + surface_.set_client(this);
|
| }
|
|
|
| ChildImpl::~ChildImpl() {
|
| @@ -74,6 +53,11 @@ void ChildImpl::SetIdNamespace(uint32_t id_namespace) {
|
| Draw();
|
| }
|
|
|
| +void ChildImpl::ReturnResources(
|
| + Array<surfaces::ReturnedResourcePtr> resources) {
|
| + DCHECK(!resources.size());
|
| +}
|
| +
|
| void ChildImpl::Draw() {
|
| id_ = allocator_->GenerateId();
|
| surface_->CreateSurface(mojo::surfaces::SurfaceId::From(id_),
|
|
|