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

Unified Diff: mojo/examples/surfaces_app/child_impl.h

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 months 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
« no previous file with comments | « mojo/examples/surfaces_app/child_app.cc ('k') | mojo/examples/surfaces_app/child_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/surfaces_app/child_impl.h
diff --git a/mojo/examples/surfaces_app/child_impl.h b/mojo/examples/surfaces_app/child_impl.h
index 8770f61b978888e76e99050d96bbbccd09300447..cdd5263d73a16c4df471b8dd5c2e0d27280a5d7c 100644
--- a/mojo/examples/surfaces_app/child_impl.h
+++ b/mojo/examples/surfaces_app/child_impl.h
@@ -29,20 +29,21 @@ class Surface;
namespace examples {
-class SurfaceClientImpl;
-
// Simple example of a child app using surfaces.
-class ChildImpl : public InterfaceImpl<Child> {
+class ChildImpl : public InterfaceImpl<Child>, public surfaces::SurfaceClient {
public:
class Context {
public:
virtual ApplicationConnection* ShellConnection(
const mojo::String& application_url) = 0;
};
- ChildImpl(ApplicationConnection* connection, Context* context);
+ explicit ChildImpl(ApplicationConnection* surfaces_service_connection);
virtual ~ChildImpl();
- void SetIdNamespace(uint32_t id_namespace);
+ // surfaces::SurfaceClient implementation
+ virtual void SetIdNamespace(uint32_t id_namespace) OVERRIDE;
+ virtual void ReturnResources(
+ Array<surfaces::ReturnedResourcePtr> resources) OVERRIDE;
private:
// Child implementation.
@@ -58,7 +59,6 @@ class ChildImpl : public InterfaceImpl<Child> {
scoped_ptr<cc::SurfaceIdAllocator> allocator_;
surfaces::SurfacePtr surface_;
cc::SurfaceId id_;
- scoped_ptr<SurfaceClientImpl> surface_client_;
mojo::Callback<void(surfaces::SurfaceIdPtr id)> produce_callback_;
DISALLOW_COPY_AND_ASSIGN(ChildImpl);
« no previous file with comments | « mojo/examples/surfaces_app/child_app.cc ('k') | mojo/examples/surfaces_app/child_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698