| Index: examples/surfaces_app/surfaces_app.cc
|
| diff --git a/examples/surfaces_app/surfaces_app.cc b/examples/surfaces_app/surfaces_app.cc
|
| index ae08a3712451a1956fdc83dc511b0c87961fb0a2..d8f40f3c1b2d9209dad7b2d4634b347c3fa3ce28 100644
|
| --- a/examples/surfaces_app/surfaces_app.cc
|
| +++ b/examples/surfaces_app/surfaces_app.cc
|
| @@ -27,7 +27,7 @@ namespace examples {
|
|
|
| static const uint32_t kLocalId = 1u;
|
|
|
| -class SurfacesApp : public ApplicationDelegate, public SurfaceClient {
|
| +class SurfacesApp : public ApplicationDelegate {
|
| public:
|
| SurfacesApp() : id_namespace_(0u), weak_factory_(this) {}
|
| ~SurfacesApp() override {}
|
| @@ -37,7 +37,8 @@ class SurfacesApp : public ApplicationDelegate, public SurfaceClient {
|
| connection->ConnectToService("mojo:native_viewport_service", &viewport_);
|
|
|
| connection->ConnectToService("mojo:surfaces_service", &surface_);
|
| - surface_.set_client(this);
|
| + surface_->GetIdNamespace(
|
| + base::Bind(&SurfacesApp::SetIdNamespace, base::Unretained(this)));
|
| embedder_.reset(new Embedder(kLocalId, surface_.get()));
|
|
|
| size_ = gfx::Size(800, 600);
|
| @@ -85,16 +86,12 @@ class SurfacesApp : public ApplicationDelegate, public SurfaceClient {
|
| }
|
|
|
| private:
|
| - // SurfaceClient implementation.
|
| - void SetIdNamespace(uint32_t id_namespace) override {
|
| + void SetIdNamespace(uint32_t id_namespace) {
|
| auto qualified_id = mojo::SurfaceId::New();
|
| qualified_id->id_namespace = id_namespace;
|
| qualified_id->local = kLocalId;
|
| viewport_->SubmittedFrame(qualified_id.Pass());
|
| }
|
| - void ReturnResources(Array<ReturnedResourcePtr> resources) override {
|
| - DCHECK(!resources.size());
|
| - }
|
| void OnCreatedNativeViewport(uint64_t native_viewport_id,
|
| mojo::ViewportMetricsPtr metrics) {}
|
|
|
|
|