Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chromeos/dbus/dbus_thread_manager.cc

Issue 980973003: apmanager: Add dbus implementation to chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change struct into class Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/fake_ap_manager_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chromeos/dbus/dbus_thread_manager.h" 5 #include "chromeos/dbus/dbus_thread_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
11 #include "chromeos/dbus/ap_manager_client.h"
11 #include "chromeos/dbus/bluetooth_adapter_client.h" 12 #include "chromeos/dbus/bluetooth_adapter_client.h"
12 #include "chromeos/dbus/bluetooth_agent_manager_client.h" 13 #include "chromeos/dbus/bluetooth_agent_manager_client.h"
13 #include "chromeos/dbus/bluetooth_device_client.h" 14 #include "chromeos/dbus/bluetooth_device_client.h"
14 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" 15 #include "chromeos/dbus/bluetooth_gatt_characteristic_client.h"
15 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" 16 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h"
16 #include "chromeos/dbus/bluetooth_gatt_manager_client.h" 17 #include "chromeos/dbus/bluetooth_gatt_manager_client.h"
17 #include "chromeos/dbus/bluetooth_gatt_service_client.h" 18 #include "chromeos/dbus/bluetooth_gatt_service_client.h"
18 #include "chromeos/dbus/bluetooth_input_client.h" 19 #include "chromeos/dbus/bluetooth_input_client.h"
19 #include "chromeos/dbus/bluetooth_media_client.h" 20 #include "chromeos/dbus/bluetooth_media_client.h"
20 #include "chromeos/dbus/bluetooth_media_transport_client.h" 21 #include "chromeos/dbus/bluetooth_media_transport_client.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 VLOG(1) << "DBusThreadManager destroyed"; 106 VLOG(1) << "DBusThreadManager destroyed";
106 } else { 107 } else {
107 LOG(FATAL) << "~DBusThreadManager() called outside of Shutdown()"; 108 LOG(FATAL) << "~DBusThreadManager() called outside of Shutdown()";
108 } 109 }
109 } 110 }
110 111
111 dbus::Bus* DBusThreadManager::GetSystemBus() { 112 dbus::Bus* DBusThreadManager::GetSystemBus() {
112 return system_bus_.get(); 113 return system_bus_.get();
113 } 114 }
114 115
116 ApManagerClient* DBusThreadManager::GetApManagerClient() {
117 return client_bundle_->ap_manager_client();
118 }
119
115 BluetoothAdapterClient* DBusThreadManager::GetBluetoothAdapterClient() { 120 BluetoothAdapterClient* DBusThreadManager::GetBluetoothAdapterClient() {
116 return client_bundle_->bluetooth_adapter_client(); 121 return client_bundle_->bluetooth_adapter_client();
117 } 122 }
118 123
119 BluetoothAgentManagerClient* 124 BluetoothAgentManagerClient*
120 DBusThreadManager::GetBluetoothAgentManagerClient() { 125 DBusThreadManager::GetBluetoothAgentManagerClient() {
121 return client_bundle_->bluetooth_agent_manager_client(); 126 return client_bundle_->bluetooth_agent_manager_client();
122 } 127 }
123 128
124 BluetoothDeviceClient* DBusThreadManager::GetBluetoothDeviceClient() { 129 BluetoothDeviceClient* DBusThreadManager::GetBluetoothDeviceClient() {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 290
286 SystemClockClient* DBusThreadManager::GetSystemClockClient() { 291 SystemClockClient* DBusThreadManager::GetSystemClockClient() {
287 return client_bundle_->system_clock_client(); 292 return client_bundle_->system_clock_client();
288 } 293 }
289 294
290 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() { 295 UpdateEngineClient* DBusThreadManager::GetUpdateEngineClient() {
291 return client_bundle_->update_engine_client(); 296 return client_bundle_->update_engine_client();
292 } 297 }
293 298
294 void DBusThreadManager::InitializeClients() { 299 void DBusThreadManager::InitializeClients() {
300 GetApManagerClient()->Init(GetSystemBus());
295 GetBluetoothAdapterClient()->Init(GetSystemBus()); 301 GetBluetoothAdapterClient()->Init(GetSystemBus());
296 GetBluetoothAgentManagerClient()->Init(GetSystemBus()); 302 GetBluetoothAgentManagerClient()->Init(GetSystemBus());
297 GetBluetoothDeviceClient()->Init(GetSystemBus()); 303 GetBluetoothDeviceClient()->Init(GetSystemBus());
298 GetBluetoothGattCharacteristicClient()->Init(GetSystemBus()); 304 GetBluetoothGattCharacteristicClient()->Init(GetSystemBus());
299 GetBluetoothGattDescriptorClient()->Init(GetSystemBus()); 305 GetBluetoothGattDescriptorClient()->Init(GetSystemBus());
300 GetBluetoothGattManagerClient()->Init(GetSystemBus()); 306 GetBluetoothGattManagerClient()->Init(GetSystemBus());
301 GetBluetoothGattServiceClient()->Init(GetSystemBus()); 307 GetBluetoothGattServiceClient()->Init(GetSystemBus());
302 GetBluetoothInputClient()->Init(GetSystemBus()); 308 GetBluetoothInputClient()->Init(GetSystemBus());
303 GetBluetoothMediaClient()->Init(GetSystemBus()); 309 GetBluetoothMediaClient()->Init(GetSystemBus());
304 GetBluetoothMediaTransportClient()->Init(GetSystemBus()); 310 GetBluetoothMediaTransportClient()->Init(GetSystemBus());
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 client.Pass(); 675 client.Pass();
670 } 676 }
671 677
672 void DBusThreadManagerSetter::SetUpdateEngineClient( 678 void DBusThreadManagerSetter::SetUpdateEngineClient(
673 scoped_ptr<UpdateEngineClient> client) { 679 scoped_ptr<UpdateEngineClient> client) {
674 DBusThreadManager::Get()->client_bundle_->update_engine_client_ = 680 DBusThreadManager::Get()->client_bundle_->update_engine_client_ =
675 client.Pass(); 681 client.Pass();
676 } 682 }
677 683
678 } // namespace chromeos 684 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/fake_ap_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698