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/amplifier_client.h" | 5 #include "chromeos/dbus/amplifier_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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void OnSignalConnected(const std::string& interface, | 79 void OnSignalConnected(const std::string& interface, |
80 const std::string& signal, | 80 const std::string& signal, |
81 bool succeeded); | 81 bool succeeded); |
82 | 82 |
83 dbus::ObjectProxy* proxy_; | 83 dbus::ObjectProxy* proxy_; |
84 | 84 |
85 // True when |proxy_| has been connected to the Error signal. | 85 // True when |proxy_| has been connected to the Error signal. |
86 bool signal_connected_; | 86 bool signal_connected_; |
87 | 87 |
88 // List of observers interested in event notifications from us. | 88 // List of observers interested in event notifications from us. |
89 ObserverList<Observer> observers_; | 89 base::ObserverList<Observer> observers_; |
90 | 90 |
91 // Note: This should remain the last member so it'll be destroyed and | 91 // Note: This should remain the last member so it'll be destroyed and |
92 // invalidate its weak pointers before any other members are destroyed. | 92 // invalidate its weak pointers before any other members are destroyed. |
93 base::WeakPtrFactory<AmplifierClientImpl> weak_ptr_factory_; | 93 base::WeakPtrFactory<AmplifierClientImpl> weak_ptr_factory_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(AmplifierClientImpl); | 95 DISALLOW_COPY_AND_ASSIGN(AmplifierClientImpl); |
96 }; | 96 }; |
97 | 97 |
98 void AmplifierClientImpl::Init(dbus::Bus* bus) { | 98 void AmplifierClientImpl::Init(dbus::Bus* bus) { |
99 proxy_ = | 99 proxy_ = |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 AmplifierClient::~AmplifierClient() { | 177 AmplifierClient::~AmplifierClient() { |
178 } | 178 } |
179 | 179 |
180 // static | 180 // static |
181 AmplifierClient* AmplifierClient::Create() { | 181 AmplifierClient* AmplifierClient::Create() { |
182 return new AmplifierClientImpl(); | 182 return new AmplifierClientImpl(); |
183 } | 183 } |
184 | 184 |
185 } // namespace chromeos | 185 } // namespace chromeos |
OLD | NEW |