Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/audio/audio_manager_base.h" | 5 #include "media/audio/audio_manager_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 // dispatcher are the same as the request dispatcher. | 70 // dispatcher are the same as the request dispatcher. |
| 71 return (dispatcher_->input_params.Equals(dispatcher_in->input_params) && | 71 return (dispatcher_->input_params.Equals(dispatcher_in->input_params) && |
| 72 dispatcher_->output_params.Equals(dispatcher_in->output_params) && | 72 dispatcher_->output_params.Equals(dispatcher_in->output_params) && |
| 73 dispatcher_->output_device_id == dispatcher_in->output_device_id); | 73 dispatcher_->output_device_id == dispatcher_in->output_device_id); |
| 74 } | 74 } |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 const DispatcherParams* dispatcher_; | 77 const DispatcherParams* dispatcher_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 static bool IsDefaultDeviceId(const std::string& device_id) { | 80 // static |
| 81 bool AudioManagerBase::IsDefaultDeviceId(const std::string& device_id) { | |
|
Guido Urdaneta
2016/03/08 14:53:09
Change ARH to use this one instead of the identica
Henrik Grunell
2016/03/08 21:09:57
Move this so that the order of member functions is
o1ka
2016/04/05 15:13:38
Done.
o1ka
2016/04/05 15:13:38
Which order is broken?
| |
| 81 return device_id.empty() || device_id == AudioManagerBase::kDefaultDeviceId; | 82 return device_id.empty() || device_id == AudioManagerBase::kDefaultDeviceId; |
| 82 } | 83 } |
| 83 | 84 |
| 84 AudioManagerBase::AudioManagerBase(AudioLogFactory* audio_log_factory) | 85 AudioManagerBase::AudioManagerBase(AudioLogFactory* audio_log_factory) |
| 85 : max_num_output_streams_(kDefaultMaxOutputStreams), | 86 : max_num_output_streams_(kDefaultMaxOutputStreams), |
| 86 max_num_input_streams_(kDefaultMaxInputStreams), | 87 max_num_input_streams_(kDefaultMaxInputStreams), |
| 87 num_output_streams_(0), | 88 num_output_streams_(0), |
| 88 num_input_streams_(0), | 89 num_input_streams_(0), |
| 89 // TODO(dalecurtis): Switch this to an base::ObserverListThreadSafe, so we | 90 // TODO(dalecurtis): Switch this to an base::ObserverListThreadSafe, so we |
| 90 // don't | 91 // don't |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 | 411 |
| 411 return 0; | 412 return 0; |
| 412 } | 413 } |
| 413 | 414 |
| 414 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( | 415 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( |
| 415 AudioLogFactory::AudioComponent component) { | 416 AudioLogFactory::AudioComponent component) { |
| 416 return audio_log_factory_->CreateAudioLog(component); | 417 return audio_log_factory_->CreateAudioLog(component); |
| 417 } | 418 } |
| 418 | 419 |
| 419 } // namespace media | 420 } // namespace media |
| OLD | NEW |