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

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

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (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/js/pingpong_apptest.cc ('k') | services/media/factory_service/media_player_impl.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 <list> 5 #include <list>
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "mojo/services/media/audio/interfaces/audio_server.mojom.h" 9 #include "mojo/services/media/audio/interfaces/audio_server.mojom.h"
10 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h" 10 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h"
11 #include "services/media/factory_service/audio_track_controller.h" 11 #include "services/media/factory_service/audio_track_controller.h"
12 #include "services/media/framework_mojo/mojo_type_conversions.h" 12 #include "services/media/framework_mojo/mojo_type_conversions.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace media { 15 namespace media {
16 16
17 AudioTrackController::AudioTrackController(const String& url, 17 AudioTrackController::AudioTrackController(const String& url,
18 ApplicationImpl* app) { 18 ApplicationImpl* app) {
19 // TODO(dalesat): Handle connection errors. 19 // TODO(dalesat): Handle connection errors.
20 DCHECK(app); 20 DCHECK(app);
21 21
22 AudioServerPtr audio_server; 22 AudioServerPtr audio_server;
23 app->ConnectToService(url, &audio_server); 23 app->ConnectToServiceDeprecated(url, &audio_server);
24 audio_server->CreateTrack(GetProxy(&audio_track_)); 24 audio_server->CreateTrack(GetProxy(&audio_track_));
25 } 25 }
26 26
27 AudioTrackController::~AudioTrackController() {} 27 AudioTrackController::~AudioTrackController() {}
28 28
29 void AudioTrackController::GetSupportedMediaTypes( 29 void AudioTrackController::GetSupportedMediaTypes(
30 const GetSupportedMediaTypesCallback& callback) { 30 const GetSupportedMediaTypesCallback& callback) {
31 // Query the track's format capabilities. 31 // Query the track's format capabilities.
32 audio_track_->Describe([this, callback](AudioTrackDescriptorPtr descriptor) { 32 audio_track_->Describe([this, callback](AudioTrackDescriptorPtr descriptor) {
33 callback(Convert(descriptor->supported_media_types)); 33 callback(Convert(descriptor->supported_media_types));
(...skipping 10 matching lines...) Expand all
44 audio_track_->Configure(config.Pass(), GetProxy(&consumer)); 44 audio_track_->Configure(config.Pass(), GetProxy(&consumer));
45 45
46 RateControlPtr rate_control; 46 RateControlPtr rate_control;
47 audio_track_->GetRateControl(GetProxy(&rate_control)); 47 audio_track_->GetRateControl(GetProxy(&rate_control));
48 48
49 callback(consumer.Pass(), rate_control.Pass()); 49 callback(consumer.Pass(), rate_control.Pass());
50 } 50 }
51 51
52 } // namespace media 52 } // namespace media
53 } // namespace mojo 53 } // namespace mojo
OLDNEW
« no previous file with comments | « services/js/pingpong_apptest.cc ('k') | services/media/factory_service/media_player_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698