Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "media/mojo/services/mojo_audio_output_provider.h" | |
| 6 | |
| 7 #include <utility> | |
| 8 | |
| 9 namespace media { | |
| 10 | |
| 11 MojoAudioOutputProvider::MojoAudioOutputProvider( | |
| 12 AudioOutputProviderRequest request, | |
| 13 CreateDelegateCallback create_delegate_callback, | |
| 14 DeleterCallback deleter_callback) | |
| 15 : binding_(this, request), | |
| 16 create_delegate_callback_(std::move(create_delegate_callback)), | |
| 17 deleter_callback_(std::move(deleter_callback)) { | |
| 18 DCHECK(create_delegate_callback_); | |
| 19 DCHECK(deleter_callback_); | |
| 20 } | |
| 21 | |
| 22 MojoAudioOutputProvider::~MojoAudioOutputProvider() {} | |
| 23 | |
| 24 void MojoAudioOutputProvider::Acquire(AudioOutputRequest request, | |
|
DaleCurtis
2017/03/06 17:56:12
Is it possible to setup the provider object to rep
Max Morin
2017/03/07 11:23:16
I don't think we want to skip the authorization ch
| |
| 25 const AudioParameters& params, | |
| 26 AcquireCallback acquire_callback) { | |
| 27 if (audio_output_) { | |
| 28 LOG(ERROR) << "Output acquired twice."; | |
|
o1ka
2017/03/07 00:49:24
Shouldn't |acquire_callback| run here? Or an error
Max Morin
2017/03/07 11:23:16
Right, I changed this to unbinding the binder and
o1ka
2017/03/07 23:31:06
I mean - have you seen examples in mojo services i
Max Morin
2017/03/08 07:38:29
From what I gather from the spec (though I am no e
| |
| 29 return; | |
| 30 } | |
| 31 audio_output_.emplace(std::move(request), | |
| 32 base::Bind(create_delegate_callback, params), | |
| 33 std::move(acquire_callback), | |
| 34 base::Bind(deleter_callback, base::Unretained(this))); | |
|
DaleCurtis
2017/03/06 17:56:12
hmm, is Unretained necessary here? You're binding
Max Morin
2017/03/07 11:23:16
It's actually not. I removed it.
| |
| 35 } | |
| 36 | |
| 37 } // namespace media | |
| OLD | NEW |