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

Side by Side Diff: services/media/factory_service/factory_service.cc

Issue 1981513002: ApplicationConnection devolution, part 2.2. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « services/media/factory_service/factory_service.h ('k') | services/nacl/nonsfi/pnacl_compile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/media/factory_service/factory_service.h" 5 #include "services/media/factory_service/factory_service.h"
6 #include "services/media/factory_service/media_decoder_impl.h" 6 #include "services/media/factory_service/media_decoder_impl.h"
7 #include "services/media/factory_service/media_demux_impl.h" 7 #include "services/media/factory_service/media_demux_impl.h"
8 #include "services/media/factory_service/media_player_impl.h" 8 #include "services/media/factory_service/media_player_impl.h"
9 #include "services/media/factory_service/media_sink_impl.h" 9 #include "services/media/factory_service/media_sink_impl.h"
10 #include "services/media/factory_service/media_source_impl.h" 10 #include "services/media/factory_service/media_source_impl.h"
(...skipping 12 matching lines...) Expand all
23 MediaFactoryService::MediaFactoryService() {} 23 MediaFactoryService::MediaFactoryService() {}
24 24
25 MediaFactoryService::~MediaFactoryService() {} 25 MediaFactoryService::~MediaFactoryService() {}
26 26
27 void MediaFactoryService::Initialize(ApplicationImpl* app) { 27 void MediaFactoryService::Initialize(ApplicationImpl* app) {
28 app_ = app; 28 app_ = app;
29 } 29 }
30 30
31 bool MediaFactoryService::ConfigureIncomingConnection( 31 bool MediaFactoryService::ConfigureIncomingConnection(
32 ApplicationConnection* connection) { 32 ApplicationConnection* connection) {
33 connection->AddService<MediaFactory>(this); 33 connection->GetServiceProviderImpl().AddService<MediaFactory>(
34 [this](const ConnectionContext& connection_context,
35 InterfaceRequest<MediaFactory> media_factory_request) {
36 bindings_.AddBinding(this, media_factory_request.Pass());
37 });
34 return true; 38 return true;
35 } 39 }
36 40
37 void MediaFactoryService::Create(const ConnectionContext& connection_context,
38 InterfaceRequest<MediaFactory> request) {
39 bindings_.AddBinding(this, request.Pass());
40 }
41
42 void MediaFactoryService::CreatePlayer(InterfaceHandle<SeekingReader> reader, 41 void MediaFactoryService::CreatePlayer(InterfaceHandle<SeekingReader> reader,
43 InterfaceRequest<MediaPlayer> player) { 42 InterfaceRequest<MediaPlayer> player) {
44 products_.insert(std::static_pointer_cast<ProductBase>( 43 products_.insert(std::static_pointer_cast<ProductBase>(
45 MediaPlayerImpl::Create(reader.Pass(), player.Pass(), this))); 44 MediaPlayerImpl::Create(reader.Pass(), player.Pass(), this)));
46 } 45 }
47 46
48 void MediaFactoryService::CreateSource(InterfaceHandle<SeekingReader> reader, 47 void MediaFactoryService::CreateSource(InterfaceHandle<SeekingReader> reader,
49 Array<MediaTypeSetPtr> media_types, 48 Array<MediaTypeSetPtr> media_types,
50 InterfaceRequest<MediaSource> source) { 49 InterfaceRequest<MediaSource> source) {
51 products_.insert( 50 products_.insert(
(...skipping 23 matching lines...) Expand all
75 74
76 void MediaFactoryService::CreateNetworkReader( 75 void MediaFactoryService::CreateNetworkReader(
77 const String& url, 76 const String& url,
78 InterfaceRequest<SeekingReader> reader) { 77 InterfaceRequest<SeekingReader> reader) {
79 products_.insert(std::static_pointer_cast<ProductBase>( 78 products_.insert(std::static_pointer_cast<ProductBase>(
80 NetworkReaderImpl::Create(url, reader.Pass(), this))); 79 NetworkReaderImpl::Create(url, reader.Pass(), this)));
81 } 80 }
82 81
83 } // namespace media 82 } // namespace media
84 } // namespace mojo 83 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/factory_service.h ('k') | services/nacl/nonsfi/pnacl_compile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698