| 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 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 5 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 6 | 6 |
| 7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
| 8 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" | 8 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" |
| 9 #include "chrome/browser/chromeos/dbus/bluetooth_device_client.h" | 9 #include "chrome/browser/chromeos/dbus/bluetooth_device_client.h" |
| 10 #include "chrome/browser/chromeos/dbus/bluetooth_input_client.h" | 10 #include "chrome/browser/chromeos/dbus/bluetooth_input_client.h" |
| 11 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" | 11 #include "chrome/browser/chromeos/dbus/bluetooth_manager_client.h" |
| 12 #include "chrome/browser/chromeos/dbus/bluetooth_node_client.h" | 12 #include "chrome/browser/chromeos/dbus/bluetooth_node_client.h" |
| 13 #include "chrome/browser/chromeos/dbus/cashew_client.h" | 13 #include "chrome/browser/chromeos/dbus/cashew_client.h" |
| 14 #include "chrome/browser/chromeos/dbus/cros_disks_client.h" | 14 #include "chrome/browser/chromeos/dbus/cros_disks_client.h" |
| 15 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" | 15 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" |
| 16 #include "chrome/browser/chromeos/dbus/flimflam_ipconfig_client.h" |
| 16 #include "chrome/browser/chromeos/dbus/image_burner_client.h" | 17 #include "chrome/browser/chromeos/dbus/image_burner_client.h" |
| 17 #include "chrome/browser/chromeos/dbus/introspectable_client.h" | 18 #include "chrome/browser/chromeos/dbus/introspectable_client.h" |
| 18 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 19 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 19 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 20 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| 20 #include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h" | 21 #include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h" |
| 21 #include "chrome/browser/chromeos/dbus/update_engine_client.h" | 22 #include "chrome/browser/chromeos/dbus/update_engine_client.h" |
| 22 #include "dbus/bus.h" | 23 #include "dbus/bus.h" |
| 23 | 24 |
| 24 namespace chromeos { | 25 namespace chromeos { |
| 25 | 26 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 55 bluetooth_node_client_.reset(BluetoothNodeClient::Create( | 56 bluetooth_node_client_.reset(BluetoothNodeClient::Create( |
| 56 system_bus_.get(), bluetooth_device_client_.get())); | 57 system_bus_.get(), bluetooth_device_client_.get())); |
| 57 // Create the Cashew client. | 58 // Create the Cashew client. |
| 58 cashew_client_.reset(CashewClient::Create(system_bus_.get())); | 59 cashew_client_.reset(CashewClient::Create(system_bus_.get())); |
| 59 // Create the cros-disks client. | 60 // Create the cros-disks client. |
| 60 cros_disks_client_.reset( | 61 cros_disks_client_.reset( |
| 61 CrosDisksClient::Create(system_bus_.get())); | 62 CrosDisksClient::Create(system_bus_.get())); |
| 62 // Create the Cryptohome client. | 63 // Create the Cryptohome client. |
| 63 cryptohome_client_.reset( | 64 cryptohome_client_.reset( |
| 64 CryptohomeClient::Create(system_bus_.get())); | 65 CryptohomeClient::Create(system_bus_.get())); |
| 66 // Create the Flimflam IPConfig client. |
| 67 flimflam_ipconfig_client_.reset( |
| 68 FlimflamIPConfigClient::Create(system_bus_.get())); |
| 65 // Create the image burner client. | 69 // Create the image burner client. |
| 66 image_burner_client_.reset(ImageBurnerClient::Create(system_bus_.get())); | 70 image_burner_client_.reset(ImageBurnerClient::Create(system_bus_.get())); |
| 67 // Create the introspectable object client. | 71 // Create the introspectable object client. |
| 68 introspectable_client_.reset( | 72 introspectable_client_.reset( |
| 69 IntrospectableClient::Create(system_bus_.get())); | 73 IntrospectableClient::Create(system_bus_.get())); |
| 70 // Create the power manager client. | 74 // Create the power manager client. |
| 71 power_manager_client_.reset(PowerManagerClient::Create(system_bus_.get())); | 75 power_manager_client_.reset(PowerManagerClient::Create(system_bus_.get())); |
| 72 // Create the session manager client. | 76 // Create the session manager client. |
| 73 session_manager_client_.reset( | 77 session_manager_client_.reset( |
| 74 SessionManagerClient::Create(system_bus_.get())); | 78 SessionManagerClient::Create(system_bus_.get())); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { | 132 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE { |
| 129 return cros_disks_client_.get(); | 133 return cros_disks_client_.get(); |
| 130 } | 134 } |
| 131 | 135 |
| 132 // DBusThreadManager override. | 136 // DBusThreadManager override. |
| 133 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { | 137 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE { |
| 134 return cryptohome_client_.get(); | 138 return cryptohome_client_.get(); |
| 135 } | 139 } |
| 136 | 140 |
| 137 // DBusThreadManager override. | 141 // DBusThreadManager override. |
| 142 virtual FlimflamIPConfigClient* GetFlimflamIPConfigClient() OVERRIDE { |
| 143 return flimflam_ipconfig_client_.get(); |
| 144 } |
| 145 |
| 146 // DBusThreadManager override. |
| 138 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE { | 147 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE { |
| 139 return image_burner_client_.get(); | 148 return image_burner_client_.get(); |
| 140 } | 149 } |
| 141 | 150 |
| 142 // DBusThreadManager override. | 151 // DBusThreadManager override. |
| 143 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE { | 152 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE { |
| 144 return introspectable_client_.get(); | 153 return introspectable_client_.get(); |
| 145 } | 154 } |
| 146 | 155 |
| 147 // DBusThreadManager override. | 156 // DBusThreadManager override. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 167 scoped_ptr<base::Thread> dbus_thread_; | 176 scoped_ptr<base::Thread> dbus_thread_; |
| 168 scoped_refptr<dbus::Bus> system_bus_; | 177 scoped_refptr<dbus::Bus> system_bus_; |
| 169 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 178 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
| 170 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 179 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
| 171 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 180 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
| 172 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 181 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
| 173 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; | 182 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; |
| 174 scoped_ptr<CashewClient> cashew_client_; | 183 scoped_ptr<CashewClient> cashew_client_; |
| 175 scoped_ptr<CrosDisksClient> cros_disks_client_; | 184 scoped_ptr<CrosDisksClient> cros_disks_client_; |
| 176 scoped_ptr<CryptohomeClient> cryptohome_client_; | 185 scoped_ptr<CryptohomeClient> cryptohome_client_; |
| 186 scoped_ptr<FlimflamIPConfigClient> flimflam_ipconfig_client_; |
| 177 scoped_ptr<ImageBurnerClient> image_burner_client_; | 187 scoped_ptr<ImageBurnerClient> image_burner_client_; |
| 178 scoped_ptr<IntrospectableClient> introspectable_client_; | 188 scoped_ptr<IntrospectableClient> introspectable_client_; |
| 179 scoped_ptr<PowerManagerClient> power_manager_client_; | 189 scoped_ptr<PowerManagerClient> power_manager_client_; |
| 180 scoped_ptr<SessionManagerClient> session_manager_client_; | 190 scoped_ptr<SessionManagerClient> session_manager_client_; |
| 181 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; | 191 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; |
| 182 scoped_ptr<UpdateEngineClient> update_engine_client_; | 192 scoped_ptr<UpdateEngineClient> update_engine_client_; |
| 183 }; | 193 }; |
| 184 | 194 |
| 185 // static | 195 // static |
| 186 void DBusThreadManager::Initialize() { | 196 void DBusThreadManager::Initialize() { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 } | 232 } |
| 223 | 233 |
| 224 // static | 234 // static |
| 225 DBusThreadManager* DBusThreadManager::Get() { | 235 DBusThreadManager* DBusThreadManager::Get() { |
| 226 CHECK(g_dbus_thread_manager) | 236 CHECK(g_dbus_thread_manager) |
| 227 << "DBusThreadManager::Get() called before Initialize()"; | 237 << "DBusThreadManager::Get() called before Initialize()"; |
| 228 return g_dbus_thread_manager; | 238 return g_dbus_thread_manager; |
| 229 } | 239 } |
| 230 | 240 |
| 231 } // namespace chromeos | 241 } // namespace chromeos |
| OLD | NEW |