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 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 5 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" | 9 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" |
10 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" | 10 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual ~DBusThreadManagerImpl() { | 68 virtual ~DBusThreadManagerImpl() { |
69 // Shut down the bus. During the browser shutdown, it's ok to shut down | 69 // Shut down the bus. During the browser shutdown, it's ok to shut down |
70 // the bus synchronously. | 70 // the bus synchronously. |
71 system_bus_->ShutdownOnDBusThreadAndBlock(); | 71 system_bus_->ShutdownOnDBusThreadAndBlock(); |
72 | 72 |
73 // Stop the D-Bus thread. | 73 // Stop the D-Bus thread. |
74 dbus_thread_->Stop(); | 74 dbus_thread_->Stop(); |
75 } | 75 } |
76 | 76 |
77 // DBusThreadManager override. | 77 // DBusThreadManager override. |
78 virtual BluetoothAdapterClient* bluetooth_adapter_client() OVERRIDE { | 78 virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE { |
79 return bluetooth_adapter_client_.get(); | 79 return bluetooth_adapter_client_.get(); |
80 } | 80 } |
81 | 81 |
82 // DBusThreadManager override. | 82 // DBusThreadManager override. |
83 virtual BluetoothManagerClient* bluetooth_manager_client() OVERRIDE { | 83 virtual BluetoothManagerClient* GetBluetoothManagerClient() OVERRIDE { |
84 return bluetooth_manager_client_.get(); | 84 return bluetooth_manager_client_.get(); |
85 } | 85 } |
86 | 86 |
87 // DBusThreadManager override. | 87 // DBusThreadManager override. |
88 virtual PowerManagerClient* power_manager_client() OVERRIDE { | 88 virtual PowerManagerClient* GetPowerManagerClient() OVERRIDE { |
89 return power_manager_client_.get(); | 89 return power_manager_client_.get(); |
90 } | 90 } |
91 | 91 |
92 // DBusThreadManager override. | 92 // DBusThreadManager override. |
93 virtual SensorsClient* sensors_client() OVERRIDE { | 93 virtual SensorsClient* GetSensorsClient() OVERRIDE { |
94 return sensors_client_.get(); | 94 return sensors_client_.get(); |
95 } | 95 } |
96 | 96 |
97 // DBusThreadManager override. | 97 // DBusThreadManager override. |
98 virtual SessionManagerClient* session_manager_client() OVERRIDE { | 98 virtual SessionManagerClient* GetSessionManagerClient() OVERRIDE { |
99 return session_manager_client_.get(); | 99 return session_manager_client_.get(); |
100 } | 100 } |
101 | 101 |
102 // DBusThreadManager override. | 102 // DBusThreadManager override. |
103 virtual SpeechSynthesizerClient* speech_synthesizer_client() OVERRIDE { | 103 virtual SpeechSynthesizerClient* GetSpeechSynthesizerClient() OVERRIDE { |
104 return speech_synthesizer_client_.get(); | 104 return speech_synthesizer_client_.get(); |
105 } | 105 } |
106 | 106 |
107 scoped_ptr<base::Thread> dbus_thread_; | 107 scoped_ptr<base::Thread> dbus_thread_; |
108 scoped_refptr<dbus::Bus> system_bus_; | 108 scoped_refptr<dbus::Bus> system_bus_; |
109 scoped_ptr<CrosDBusService> cros_dbus_service_; | 109 scoped_ptr<CrosDBusService> cros_dbus_service_; |
110 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 110 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
111 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 111 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
112 scoped_ptr<PowerManagerClient> power_manager_client_; | 112 scoped_ptr<PowerManagerClient> power_manager_client_; |
113 scoped_ptr<SensorsClient> sensors_client_; | 113 scoped_ptr<SensorsClient> sensors_client_; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 | 156 |
157 // static | 157 // static |
158 DBusThreadManager* DBusThreadManager::Get() { | 158 DBusThreadManager* DBusThreadManager::Get() { |
159 CHECK(g_dbus_thread_manager) | 159 CHECK(g_dbus_thread_manager) |
160 << "DBusThreadManager::Get() called before Initialize()"; | 160 << "DBusThreadManager::Get() called before Initialize()"; |
161 return g_dbus_thread_manager; | 161 return g_dbus_thread_manager; |
162 } | 162 } |
163 | 163 |
164 } // namespace chromeos | 164 } // namespace chromeos |
OLD | NEW |