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

Unified Diff: media/mojo/services/mojo_renderer_factory.cc

Issue 795193003: Introduce MojoRendererFactory::ServiceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed 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
« no previous file with comments | « media/mojo/services/mojo_renderer_factory.h ('k') | mojo/services/html_viewer/webmediaplayer_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_renderer_factory.cc
diff --git a/media/mojo/services/mojo_renderer_factory.cc b/media/mojo/services/mojo_renderer_factory.cc
index 029c378ad24e8c77437f040cd22ecbe16642c3a6..73ef9bf0cfc17e0a8098993e4e179dc42c121c08 100644
--- a/media/mojo/services/mojo_renderer_factory.cc
+++ b/media/mojo/services/mojo_renderer_factory.cc
@@ -7,13 +7,13 @@
#include "base/single_thread_task_runner.h"
#include "media/mojo/interfaces/media_renderer.mojom.h"
#include "media/mojo/services/mojo_renderer_impl.h"
-#include "mojo/public/cpp/application/connect.h"
namespace media {
MojoRendererFactory::MojoRendererFactory(
- mojo::ServiceProviderPtr renderer_service_provider)
- : renderer_service_provider_(renderer_service_provider.Pass()) {
+ scoped_ptr<ServiceProvider> service_provider)
+ : service_provider_(service_provider.Pass()) {
+ DCHECK(service_provider_.get());
}
MojoRendererFactory::~MojoRendererFactory() {
@@ -22,10 +22,8 @@ MojoRendererFactory::~MojoRendererFactory() {
scoped_ptr<Renderer> MojoRendererFactory::CreateRenderer(
const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
AudioRendererSink* /* audio_renderer_sink */) {
- DCHECK(renderer_service_provider_.get());
mojo::MediaRendererPtr mojo_media_renderer;
- mojo::ConnectToService(renderer_service_provider_.get(),
- &mojo_media_renderer);
+ service_provider_->ConnectToService(&mojo_media_renderer);
return scoped_ptr<Renderer>(
new MojoRendererImpl(media_task_runner, mojo_media_renderer.Pass()));
}
« no previous file with comments | « media/mojo/services/mojo_renderer_factory.h ('k') | mojo/services/html_viewer/webmediaplayer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698