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 CrosDBusService; | 24 class CrosDBusService; |
25 class PowerManagerClient; | 25 class PowerManagerClient; |
26 class SessionManagerClient; | 26 class SessionManagerClient; |
27 class SensorsSource; | 27 class SensorsClient; |
28 class SpeechSynthesizerClient; | 28 class SpeechSynthesizerClient; |
29 | 29 |
30 // DBusThreadManager manages the D-Bus thread, the thread dedicated to | 30 // DBusThreadManager manages the D-Bus thread, the thread dedicated to |
31 // handling asynchronous D-Bus operations. | 31 // handling asynchronous D-Bus operations. |
32 // | 32 // |
33 // This class also manages D-Bus connections and D-Bus clients, which | 33 // 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 | 34 // 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. | 35 // the D-Bus thread, the D-Bus connections, and the D-Bus clients. |
36 // | 36 // |
37 // CALLBACKS IN D-BUS CLIENTS: | 37 // CALLBACKS IN D-BUS CLIENTS: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 return speech_synthesizer_client_.get(); | 97 return speech_synthesizer_client_.get(); |
98 } | 98 } |
99 | 99 |
100 private: | 100 private: |
101 DBusThreadManager(); | 101 DBusThreadManager(); |
102 virtual ~DBusThreadManager(); | 102 virtual ~DBusThreadManager(); |
103 | 103 |
104 scoped_ptr<base::Thread> dbus_thread_; | 104 scoped_ptr<base::Thread> dbus_thread_; |
105 scoped_refptr<dbus::Bus> system_bus_; | 105 scoped_refptr<dbus::Bus> system_bus_; |
106 CrosDBusService* cros_dbus_service_; | 106 CrosDBusService* cros_dbus_service_; |
107 scoped_ptr<SensorsSource> sensors_source_; | 107 scoped_ptr<SensorsClient> sensors_client_; |
108 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 108 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
109 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 109 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
110 scoped_ptr<PowerManagerClient> power_manager_client_; | 110 scoped_ptr<PowerManagerClient> power_manager_client_; |
111 scoped_ptr<SessionManagerClient> session_manager_client_; | 111 scoped_ptr<SessionManagerClient> session_manager_client_; |
112 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; | 112 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); | 114 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace chromeos | 117 } // namespace chromeos |
118 | 118 |
119 #endif // CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 119 #endif // CHROME_BROWSER_CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
OLD | NEW |