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

Side by Side Diff: content/renderer/media/media_interface_provider.cc

Issue 2016053003: Add audio_device_id in mojo media ServiceFactory CreateRenderer api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix clang format Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_interface_provider.h" 5 #include "content/renderer/media/media_interface_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/mojo/interfaces/content_decryption_module.mojom.h" 8 #include "media/mojo/interfaces/content_decryption_module.mojom.h"
9 #include "media/mojo/interfaces/renderer.mojom.h" 9 #include "media/mojo/interfaces/renderer.mojom.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
(...skipping 15 matching lines...) Expand all
26 mojo::ScopedMessagePipeHandle pipe) { 26 mojo::ScopedMessagePipeHandle pipe) {
27 DVLOG(1) << __FUNCTION__; 27 DVLOG(1) << __FUNCTION__;
28 DCHECK(thread_checker_.CalledOnValidThread()); 28 DCHECK(thread_checker_.CalledOnValidThread());
29 29
30 if (interface_name == media::mojom::ContentDecryptionModule::Name_) { 30 if (interface_name == media::mojom::ContentDecryptionModule::Name_) {
31 GetMediaServiceFactory()->CreateCdm( 31 GetMediaServiceFactory()->CreateCdm(
32 mojo::MakeRequest<media::mojom::ContentDecryptionModule>( 32 mojo::MakeRequest<media::mojom::ContentDecryptionModule>(
33 std::move(pipe))); 33 std::move(pipe)));
34 } else if (interface_name == media::mojom::Renderer::Name_) { 34 } else if (interface_name == media::mojom::Renderer::Name_) {
35 GetMediaServiceFactory()->CreateRenderer( 35 GetMediaServiceFactory()->CreateRenderer(
36 mojo::MakeRequest<media::mojom::Renderer>(std::move(pipe))); 36 mojo::MakeRequest<media::mojom::Renderer>(std::move(pipe)), "");
dcheng 2016/06/03 04:29:48 std::string() instead of "", here and elsewhere.
tianyuwang1 2016/06/03 18:31:50 Done.
37 } else if (interface_name == media::mojom::AudioDecoder::Name_) { 37 } else if (interface_name == media::mojom::AudioDecoder::Name_) {
38 GetMediaServiceFactory()->CreateAudioDecoder( 38 GetMediaServiceFactory()->CreateAudioDecoder(
39 mojo::MakeRequest<media::mojom::AudioDecoder>(std::move(pipe))); 39 mojo::MakeRequest<media::mojom::AudioDecoder>(std::move(pipe)));
40 } else if (interface_name == media::mojom::VideoDecoder::Name_) { 40 } else if (interface_name == media::mojom::VideoDecoder::Name_) {
41 GetMediaServiceFactory()->CreateVideoDecoder( 41 GetMediaServiceFactory()->CreateVideoDecoder(
42 mojo::MakeRequest<media::mojom::VideoDecoder>(std::move(pipe))); 42 mojo::MakeRequest<media::mojom::VideoDecoder>(std::move(pipe)));
43 } else { 43 } else {
44 NOTREACHED(); 44 NOTREACHED();
45 } 45 }
46 } 46 }
(...skipping 14 matching lines...) Expand all
61 } 61 }
62 62
63 void MediaInterfaceProvider::OnConnectionError() { 63 void MediaInterfaceProvider::OnConnectionError() {
64 DVLOG(1) << __FUNCTION__; 64 DVLOG(1) << __FUNCTION__;
65 DCHECK(thread_checker_.CalledOnValidThread()); 65 DCHECK(thread_checker_.CalledOnValidThread());
66 66
67 media_service_factory_.reset(); 67 media_service_factory_.reset();
68 } 68 }
69 69
70 } // namespace content 70 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698