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 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 5 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "chromeos/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class Thread; | 17 class Thread; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace dbus { | 20 namespace dbus { |
21 class Bus; | 21 class Bus; |
22 } // namespace dbus | 22 } // namespace dbus |
23 | 23 |
24 namespace chromeos { | 24 namespace chromeos { |
25 | 25 |
26 // Style Note: Clients are sorted by names. | 26 // Style Note: Clients are sorted by names. |
27 class ArcObbMounterClient; | 27 class ArcObbMounterClient; |
28 class AuthPolicyClient; | 28 class AuthPolicyClient; |
| 29 class BiodClient; |
29 class CrasAudioClient; | 30 class CrasAudioClient; |
30 class CrosDisksClient; | 31 class CrosDisksClient; |
31 class CryptohomeClient; | 32 class CryptohomeClient; |
32 class DBusClientsBrowser; | 33 class DBusClientsBrowser; |
33 class DBusClientsCommon; | 34 class DBusClientsCommon; |
34 class DBusThreadManagerSetter; | 35 class DBusThreadManagerSetter; |
35 class DebugDaemonClient; | 36 class DebugDaemonClient; |
36 class EasyUnlockClient; | 37 class EasyUnlockClient; |
37 class GsmSMSClient; | 38 class GsmSMSClient; |
38 class ImageBurnerClient; | 39 class ImageBurnerClient; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 114 |
114 // Returns various D-Bus bus instances, owned by DBusThreadManager. | 115 // Returns various D-Bus bus instances, owned by DBusThreadManager. |
115 dbus::Bus* GetSystemBus(); | 116 dbus::Bus* GetSystemBus(); |
116 | 117 |
117 // All returned objects are owned by DBusThreadManager. Do not use these | 118 // All returned objects are owned by DBusThreadManager. Do not use these |
118 // pointers after DBusThreadManager has been shut down. | 119 // pointers after DBusThreadManager has been shut down. |
119 // TODO(jamescook): Replace this with calls to FooClient::Get(). | 120 // TODO(jamescook): Replace this with calls to FooClient::Get(). |
120 // http://crbug.com/647367 | 121 // http://crbug.com/647367 |
121 ArcObbMounterClient* GetArcObbMounterClient(); | 122 ArcObbMounterClient* GetArcObbMounterClient(); |
122 AuthPolicyClient* GetAuthPolicyClient(); | 123 AuthPolicyClient* GetAuthPolicyClient(); |
| 124 BiodClient* GetBiodClient(); |
123 CrasAudioClient* GetCrasAudioClient(); | 125 CrasAudioClient* GetCrasAudioClient(); |
124 CrosDisksClient* GetCrosDisksClient(); | 126 CrosDisksClient* GetCrosDisksClient(); |
125 CryptohomeClient* GetCryptohomeClient(); | 127 CryptohomeClient* GetCryptohomeClient(); |
126 DebugDaemonClient* GetDebugDaemonClient(); | 128 DebugDaemonClient* GetDebugDaemonClient(); |
127 EasyUnlockClient* GetEasyUnlockClient(); | 129 EasyUnlockClient* GetEasyUnlockClient(); |
128 GsmSMSClient* GetGsmSMSClient(); | 130 GsmSMSClient* GetGsmSMSClient(); |
129 ImageBurnerClient* GetImageBurnerClient(); | 131 ImageBurnerClient* GetImageBurnerClient(); |
130 ImageLoaderClient* GetImageLoaderClient(); | 132 ImageLoaderClient* GetImageLoaderClient(); |
131 LorgnetteManagerClient* GetLorgnetteManagerClient(); | 133 LorgnetteManagerClient* GetLorgnetteManagerClient(); |
132 ModemMessagingClient* GetModemMessagingClient(); | 134 ModemMessagingClient* GetModemMessagingClient(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 std::unique_ptr<DBusClientsBrowser> clients_browser_; | 171 std::unique_ptr<DBusClientsBrowser> clients_browser_; |
170 | 172 |
171 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); | 173 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
172 }; | 174 }; |
173 | 175 |
174 // TODO(jamescook): Replace these with FooClient::InitializeForTesting(). | 176 // TODO(jamescook): Replace these with FooClient::InitializeForTesting(). |
175 class CHROMEOS_EXPORT DBusThreadManagerSetter { | 177 class CHROMEOS_EXPORT DBusThreadManagerSetter { |
176 public: | 178 public: |
177 ~DBusThreadManagerSetter(); | 179 ~DBusThreadManagerSetter(); |
178 | 180 |
| 181 void SetBiodClient(std::unique_ptr<BiodClient> client); |
179 void SetCrasAudioClient(std::unique_ptr<CrasAudioClient> client); | 182 void SetCrasAudioClient(std::unique_ptr<CrasAudioClient> client); |
180 void SetCrosDisksClient(std::unique_ptr<CrosDisksClient> client); | 183 void SetCrosDisksClient(std::unique_ptr<CrosDisksClient> client); |
181 void SetCryptohomeClient(std::unique_ptr<CryptohomeClient> client); | 184 void SetCryptohomeClient(std::unique_ptr<CryptohomeClient> client); |
182 void SetDebugDaemonClient(std::unique_ptr<DebugDaemonClient> client); | 185 void SetDebugDaemonClient(std::unique_ptr<DebugDaemonClient> client); |
183 void SetShillDeviceClient(std::unique_ptr<ShillDeviceClient> client); | 186 void SetShillDeviceClient(std::unique_ptr<ShillDeviceClient> client); |
184 void SetShillIPConfigClient(std::unique_ptr<ShillIPConfigClient> client); | 187 void SetShillIPConfigClient(std::unique_ptr<ShillIPConfigClient> client); |
185 void SetShillManagerClient(std::unique_ptr<ShillManagerClient> client); | 188 void SetShillManagerClient(std::unique_ptr<ShillManagerClient> client); |
186 void SetShillServiceClient(std::unique_ptr<ShillServiceClient> client); | 189 void SetShillServiceClient(std::unique_ptr<ShillServiceClient> client); |
187 void SetShillProfileClient(std::unique_ptr<ShillProfileClient> client); | 190 void SetShillProfileClient(std::unique_ptr<ShillProfileClient> client); |
188 void SetShillThirdPartyVpnDriverClient( | 191 void SetShillThirdPartyVpnDriverClient( |
(...skipping 10 matching lines...) Expand all Loading... |
199 friend class DBusThreadManager; | 202 friend class DBusThreadManager; |
200 | 203 |
201 DBusThreadManagerSetter(); | 204 DBusThreadManagerSetter(); |
202 | 205 |
203 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter); | 206 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter); |
204 }; | 207 }; |
205 | 208 |
206 } // namespace chromeos | 209 } // namespace chromeos |
207 | 210 |
208 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 211 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
OLD | NEW |