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

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

Issue 1822333002: Motown: wholesale clang-format (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat Created 4 years, 9 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 <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( 17 AudioTrackController::AudioTrackController(const String& url,
18 const String& url, 18 ApplicationImpl* app) {
19 ApplicationImpl* app) {
20 // TODO(dalesat): Handle connection errors. 19 // TODO(dalesat): Handle connection errors.
21 DCHECK(app); 20 DCHECK(app);
22 21
23 AudioServerPtr audio_server; 22 AudioServerPtr audio_server;
24 app->ConnectToService(url, &audio_server); 23 app->ConnectToService(url, &audio_server);
25 audio_server->CreateTrack(GetProxy(&audio_track_)); 24 audio_server->CreateTrack(GetProxy(&audio_track_));
26 } 25 }
27 26
28 AudioTrackController::~AudioTrackController() {} 27 AudioTrackController::~AudioTrackController() {}
29 28
(...skipping 13 matching lines...) Expand all
43 42
44 MediaConsumerPtr consumer; 43 MediaConsumerPtr consumer;
45 audio_track_->Configure(config.Pass(), GetProxy(&consumer)); 44 audio_track_->Configure(config.Pass(), GetProxy(&consumer));
46 45
47 RateControlPtr rate_control; 46 RateControlPtr rate_control;
48 audio_track_->GetRateControl(GetProxy(&rate_control)); 47 audio_track_->GetRateControl(GetProxy(&rate_control));
49 48
50 callback(consumer.Pass(), rate_control.Pass()); 49 callback(consumer.Pass(), rate_control.Pass());
51 } 50 }
52 51
53 } // namespace media 52 } // namespace media
54 } // namespace mojo 53 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/audio_track_controller.h ('k') | services/media/factory_service/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698