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

Unified Diff: examples/surfaces_app/child_impl.h

Issue 807733002: Split surface id and simplify connecting to surfaces service (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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: examples/surfaces_app/child_impl.h
diff --git a/examples/surfaces_app/child_impl.h b/examples/surfaces_app/child_impl.h
index 0f309d0281c9546d1179f48030740123f634a9a5..408a0f31d6efd012ac395c822055f5ca8b5aa0ef 100644
--- a/examples/surfaces_app/child_impl.h
+++ b/examples/surfaces_app/child_impl.h
@@ -26,10 +26,6 @@ namespace mojo {
class ApplicationConnection;
-namespace surfaces {
-class Surface;
-}
-
namespace examples {
// Simple example of a child app using surfaces.
@@ -41,30 +37,22 @@ class ChildImpl : public InterfaceImpl<Child>, public SurfaceClient {
const mojo::String& application_url) = 0;
};
explicit ChildImpl(ApplicationConnection* surfaces_service_connection);
- virtual ~ChildImpl();
+ ~ChildImpl() override;
+ private:
// SurfaceClient implementation
- virtual void ReturnResources(
- Array<ReturnedResourcePtr> resources) override;
+ void SetIdNamespace(uint32_t id_namespace) override;
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override;
- private:
// Child implementation.
- virtual void ProduceFrame(
+ void ProduceFrame(
ColorPtr color,
SizePtr size,
const mojo::Callback<void(SurfaceIdPtr id)>& callback) override;
- void SurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
- void Draw();
-
- SkColor color_;
- gfx::Size size_;
scoped_ptr<cc::SurfaceIdAllocator> allocator_;
- SurfacesServicePtr surfaces_service_;
SurfacePtr surface_;
cc::SurfaceId id_;
- mojo::Callback<void(SurfaceIdPtr id)> produce_callback_;
- base::WeakPtrFactory<ChildImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ChildImpl);
};

Powered by Google App Engine
This is Rietveld 408576698