| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chromeos/dbus/audio_dsp_client.h" | 5 #include "chromeos/dbus/audio_dsp_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void OnSignalConnected(const std::string& interface, | 153 void OnSignalConnected(const std::string& interface, |
| 154 const std::string& signal, | 154 const std::string& signal, |
| 155 bool succeeded); | 155 bool succeeded); |
| 156 | 156 |
| 157 dbus::ObjectProxy* proxy_; | 157 dbus::ObjectProxy* proxy_; |
| 158 | 158 |
| 159 // True when |proxy_| has been connected to the Error signal. | 159 // True when |proxy_| has been connected to the Error signal. |
| 160 bool signal_connected_; | 160 bool signal_connected_; |
| 161 | 161 |
| 162 // List of observers interested in event notifications from us. | 162 // List of observers interested in event notifications from us. |
| 163 ObserverList<Observer> observers_; | 163 base::ObserverList<Observer> observers_; |
| 164 | 164 |
| 165 // Note: This should remain the last member so it'll be destroyed and | 165 // Note: This should remain the last member so it'll be destroyed and |
| 166 // invalidate its weak pointers before any other members are destroyed. | 166 // invalidate its weak pointers before any other members are destroyed. |
| 167 base::WeakPtrFactory<AudioDspClientImpl> weak_ptr_factory_; | 167 base::WeakPtrFactory<AudioDspClientImpl> weak_ptr_factory_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(AudioDspClientImpl); | 169 DISALLOW_COPY_AND_ASSIGN(AudioDspClientImpl); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 void AudioDspClientImpl::Init(dbus::Bus* bus) { | 172 void AudioDspClientImpl::Init(dbus::Bus* bus) { |
| 173 proxy_ = | 173 proxy_ = |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 AudioDspClient::~AudioDspClient() { | 376 AudioDspClient::~AudioDspClient() { |
| 377 } | 377 } |
| 378 | 378 |
| 379 // static | 379 // static |
| 380 AudioDspClient* AudioDspClient::Create() { | 380 AudioDspClient* AudioDspClient::Create() { |
| 381 return new AudioDspClientImpl(); | 381 return new AudioDspClientImpl(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace chromeos | 384 } // namespace chromeos |
| OLD | NEW |