OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class Thread; | 13 class Thread; |
14 }; | 14 }; |
15 | 15 |
16 namespace dbus { | 16 namespace dbus { |
17 class Bus; | 17 class Bus; |
18 }; | 18 }; |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 class BluetoothAdapterClient; | 22 class BluetoothAdapterClient; |
23 class BluetoothManagerClient; | 23 class BluetoothManagerClient; |
24 class CrosDisksClient; | 24 class CrosDisksClient; |
25 class PowerManagerClient; | 25 class PowerManagerClient; |
26 class SessionManagerClient; | 26 class SessionManagerClient; |
27 class SensorsClient; | 27 class SensorsClient; |
28 class SpeechSynthesizerClient; | 28 class SpeechSynthesizerClient; |
| 29 class UpdateEngineClient; |
29 | 30 |
30 // DBusThreadManager manages the D-Bus thread, the thread dedicated to | 31 // DBusThreadManager manages the D-Bus thread, the thread dedicated to |
31 // handling asynchronous D-Bus operations. | 32 // handling asynchronous D-Bus operations. |
32 // | 33 // |
33 // This class also manages D-Bus connections and D-Bus clients, which | 34 // This class also manages D-Bus connections and D-Bus clients, which |
34 // depend on the D-Bus thread to ensure the right order of shutdowns for | 35 // depend on the D-Bus thread to ensure the right order of shutdowns for |
35 // the D-Bus thread, the D-Bus connections, and the D-Bus clients. | 36 // the D-Bus thread, the D-Bus connections, and the D-Bus clients. |
36 // | 37 // |
37 // CALLBACKS IN D-BUS CLIENTS: | 38 // CALLBACKS IN D-BUS CLIENTS: |
38 // | 39 // |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Returns the speech synthesizer client, owned by DBusThreadManager. | 95 // Returns the speech synthesizer client, owned by DBusThreadManager. |
95 // Do not cache this pointer and use it after DBusThreadManager is shut | 96 // Do not cache this pointer and use it after DBusThreadManager is shut |
96 // down. | 97 // down. |
97 virtual SpeechSynthesizerClient* GetSpeechSynthesizerClient() = 0; | 98 virtual SpeechSynthesizerClient* GetSpeechSynthesizerClient() = 0; |
98 | 99 |
99 // Returns the cros-disks client, owned by DBusThreadManager. | 100 // Returns the cros-disks client, owned by DBusThreadManager. |
100 // Do not cache this pointer and use it after DBusThreadManager is shut | 101 // Do not cache this pointer and use it after DBusThreadManager is shut |
101 // down. | 102 // down. |
102 virtual CrosDisksClient* GetCrosDisksClient() = 0; | 103 virtual CrosDisksClient* GetCrosDisksClient() = 0; |
103 | 104 |
| 105 // Returns the update engine client, owned by DBusThreadManager. Do not |
| 106 // cache this pointer and use it after DBusThreadManager is shut down. |
| 107 virtual UpdateEngineClient* GetUpdateEngineClient() = 0; |
| 108 |
104 virtual ~DBusThreadManager(); | 109 virtual ~DBusThreadManager(); |
105 | 110 |
106 protected: | 111 protected: |
107 DBusThreadManager(); | 112 DBusThreadManager(); |
108 | 113 |
109 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); | 114 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
110 }; | 115 }; |
111 | 116 |
112 } // namespace chromeos | 117 } // namespace chromeos |
113 | 118 |
114 #endif // CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 119 #endif // CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
OLD | NEW |