Index: chromeos/dbus/stub_dbus_thread_manager_helper.cc |
diff --git a/chromeos/dbus/stub_dbus_thread_manager_helper.cc b/chromeos/dbus/stub_dbus_thread_manager_helper.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..28a544ba609c00b0ddab771c7b024223569f50f5 |
--- /dev/null |
+++ b/chromeos/dbus/stub_dbus_thread_manager_helper.cc |
@@ -0,0 +1,101 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chromeos/dbus/stub_dbus_thread_manager_helper.h" |
+ |
+#include "chromeos/dbus/bluetooth_adapter_client.h" |
+#include "chromeos/dbus/bluetooth_agent_manager_client.h" |
+#include "chromeos/dbus/bluetooth_device_client.h" |
+#include "chromeos/dbus/bluetooth_input_client.h" |
+#include "chromeos/dbus/bluetooth_profile_manager_client.h" |
+#include "chromeos/dbus/cras_audio_client.h" |
+#include "chromeos/dbus/cros_disks_client.h" |
+#include "chromeos/dbus/cryptohome_client.h" |
+#include "chromeos/dbus/dbus_client.h" |
+#include "chromeos/dbus/debug_daemon_client.h" |
+#include "chromeos/dbus/fake_dbus_thread_manager.h" |
+#include "chromeos/dbus/gsm_sms_client.h" |
+#include "chromeos/dbus/ibus/ibus_client.h" |
+#include "chromeos/dbus/image_burner_client.h" |
+#include "chromeos/dbus/introspectable_client.h" |
+#include "chromeos/dbus/modem_messaging_client.h" |
+#include "chromeos/dbus/nfc_adapter_client.h" |
+#include "chromeos/dbus/nfc_manager_client.h" |
+#include "chromeos/dbus/permission_broker_client.h" |
+#include "chromeos/dbus/power_manager_client.h" |
+#include "chromeos/dbus/power_policy_controller.h" |
+#include "chromeos/dbus/session_manager_client.h" |
+#include "chromeos/dbus/shill_device_client.h" |
+#include "chromeos/dbus/shill_ipconfig_client.h" |
+#include "chromeos/dbus/shill_manager_client.h" |
+#include "chromeos/dbus/shill_profile_client.h" |
+#include "chromeos/dbus/shill_service_client.h" |
+#include "chromeos/dbus/sms_client.h" |
+#include "chromeos/dbus/system_clock_client.h" |
+#include "chromeos/dbus/update_engine_client.h" |
+ |
+namespace chromeos { |
+ |
+void SetStubClients(FakeDBusThreadManager* manager) { |
+ const DBusClientImplementationType client_type = |
+ STUB_DBUS_CLIENT_IMPLEMENTATION; |
satorux1
2013/11/05 03:55:16
I think we should rename this to FAKE_DBUS_CLIENT_
pneubeck (no reviews)
2013/11/05 10:03:04
I think we can even remove this enum in a follow u
|
+ manager->SetBluetoothAdapterClient(scoped_ptr<BluetoothAdapterClient>( |
+ BluetoothAdapterClient::Create(client_type))); |
+ manager->SetBluetoothAgentManagerClient( |
+ scoped_ptr<BluetoothAgentManagerClient>( |
+ BluetoothAgentManagerClient::Create(client_type))); |
+ manager->SetBluetoothDeviceClient(scoped_ptr<BluetoothDeviceClient>( |
+ BluetoothDeviceClient::Create(client_type))); |
+ manager->SetBluetoothInputClient(scoped_ptr<BluetoothInputClient>( |
+ BluetoothInputClient::Create(client_type))); |
+ manager->SetBluetoothProfileManagerClient( |
+ scoped_ptr<BluetoothProfileManagerClient>( |
+ BluetoothProfileManagerClient::Create(client_type))); |
+ manager->SetCrasAudioClient( |
+ scoped_ptr<CrasAudioClient>(CrasAudioClient::Create(client_type))); |
+ manager->SetCrosDisksClient( |
+ scoped_ptr<CrosDisksClient>(CrosDisksClient::Create(client_type))); |
+ manager->SetCryptohomeClient( |
+ scoped_ptr<CryptohomeClient>(CryptohomeClient::Create(client_type))); |
+ manager->SetDebugDaemonClient( |
+ scoped_ptr<DebugDaemonClient>(DebugDaemonClient::Create(client_type))); |
+ manager->SetShillManagerClient( |
+ scoped_ptr<ShillManagerClient>(ShillManagerClient::Create(client_type))); |
+ manager->SetShillDeviceClient( |
+ scoped_ptr<ShillDeviceClient>(ShillDeviceClient::Create(client_type))); |
+ manager->SetShillIPConfigClient(scoped_ptr<ShillIPConfigClient>( |
+ ShillIPConfigClient::Create(client_type))); |
+ manager->SetShillServiceClient( |
+ scoped_ptr<ShillServiceClient>(ShillServiceClient::Create(client_type))); |
+ manager->SetShillProfileClient( |
+ scoped_ptr<ShillProfileClient>(ShillProfileClient::Create(client_type))); |
+ manager->SetGsmSMSClient( |
+ scoped_ptr<GsmSMSClient>(GsmSMSClient::Create(client_type))); |
+ manager->SetImageBurnerClient( |
+ scoped_ptr<ImageBurnerClient>(ImageBurnerClient::Create(client_type))); |
+ manager->SetIntrospectableClient(scoped_ptr<IntrospectableClient>( |
+ IntrospectableClient::Create(client_type))); |
+ manager->SetModemMessagingClient(scoped_ptr<ModemMessagingClient>( |
+ ModemMessagingClient::Create(client_type))); |
+ NfcManagerClient* nfc_manager_client = NfcManagerClient::Create(client_type); |
+ manager->SetNfcManagerClient( |
+ scoped_ptr<NfcManagerClient>(nfc_manager_client)); |
+ manager->SetNfcAdapterClient(scoped_ptr<NfcAdapterClient>( |
+ NfcAdapterClient::Create(client_type, nfc_manager_client))); |
+ manager->SetPermissionBrokerClient(scoped_ptr<PermissionBrokerClient>( |
+ PermissionBrokerClient::Create(client_type))); |
+ manager->SetPowerManagerClient( |
+ scoped_ptr<PowerManagerClient>(PowerManagerClient::Create(client_type))); |
+ manager->SetSessionManagerClient(scoped_ptr<SessionManagerClient>( |
+ SessionManagerClient::Create(client_type))); |
+ manager->SetSMSClient(scoped_ptr<SMSClient>(SMSClient::Create(client_type))); |
+ manager->SetSystemClockClient( |
+ scoped_ptr<SystemClockClient>(SystemClockClient::Create(client_type))); |
+ manager->SetUpdateEngineClient( |
+ scoped_ptr<UpdateEngineClient>(UpdateEngineClient::Create(client_type))); |
+ |
+ manager->SetPowerPolicyController(make_scoped_ptr(new PowerPolicyController)); |
+} |
+ |
+} // namespace chromeos |