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

Unified Diff: media/mojo/services/mojo_media_client.h

Issue 1529063004: Pass MojoMediaClient instance to MojoMediaApplication constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 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: media/mojo/services/mojo_media_client.h
diff --git a/media/mojo/services/mojo_media_client.h b/media/mojo/services/mojo_media_client.h
index 323d748593e68e07670f4fa3b58d542670dd1208..338ee4e62615b917a838ca65c3c6128f41f07e79 100644
--- a/media/mojo/services/mojo_media_client.h
+++ b/media/mojo/services/mojo_media_client.h
@@ -43,9 +43,9 @@ class PlatformMojoMediaClient {
class MojoMediaClient {
public:
- // Returns an instance of the MojoMediaClient object. Only one instance will
- // exist per process.
- static MojoMediaClient* Get();
+ ~MojoMediaClient();
+
+ static scoped_ptr<MojoMediaClient> Create();
// Copy of the PlatformMojoMediaClient interface.
scoped_ptr<RendererFactory> CreateRendererFactory(
@@ -57,12 +57,9 @@ class MojoMediaClient {
mojo::ServiceProvider* service_provider);
private:
- friend struct base::DefaultLazyInstanceTraits<MojoMediaClient>;
-
- MojoMediaClient();
- ~MojoMediaClient();
+ MojoMediaClient(scoped_ptr<PlatformMojoMediaClient> platform_client);
- scoped_ptr<PlatformMojoMediaClient> mojo_media_client_;
+ scoped_ptr<PlatformMojoMediaClient> platform_client_;
DISALLOW_COPY_AND_ASSIGN(MojoMediaClient);
};

Powered by Google App Engine
This is Rietveld 408576698