OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_DBUS_MIXED_DBUS_THREAD_MANAGER_H_ |
| 6 #define CHROMEOS_DBUS_MIXED_DBUS_THREAD_MANAGER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chromeos/chromeos_export.h" |
| 10 #include "chromeos/dbus/dbus_thread_manager.h" |
| 11 |
| 12 namespace chromeos { |
| 13 |
| 14 // This class permits mixing DBusThreadManagerImpl and FakeDBusThreadManager |
| 15 // implementation and allow us to selectively activate some dbus clients while |
| 16 // others remain stubbed out. |
| 17 class CHROMEOS_EXPORT MixedDBusThreadManager : public DBusThreadManager { |
| 18 public: |
| 19 explicit MixedDBusThreadManager( |
| 20 DBusThreadManager* real_thread_manager, |
| 21 DBusThreadManager* fake_thread_manager); |
| 22 |
| 23 virtual ~MixedDBusThreadManager(); |
| 24 |
| 25 // DBusThreadManager overrides. |
| 26 virtual dbus::Bus* GetSystemBus() OVERRIDE; |
| 27 virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE; |
| 28 virtual BluetoothAgentManagerClient* |
| 29 GetBluetoothAgentManagerClient() OVERRIDE; |
| 30 virtual BluetoothDeviceClient* GetBluetoothDeviceClient() OVERRIDE; |
| 31 virtual BluetoothGattCharacteristicClient* |
| 32 GetBluetoothGattCharacteristicClient() OVERRIDE; |
| 33 virtual BluetoothGattDescriptorClient* |
| 34 GetBluetoothGattDescriptorClient() OVERRIDE; |
| 35 virtual BluetoothGattManagerClient* GetBluetoothGattManagerClient() OVERRIDE; |
| 36 virtual BluetoothGattServiceClient* GetBluetoothGattServiceClient() OVERRIDE; |
| 37 virtual BluetoothInputClient* GetBluetoothInputClient() OVERRIDE; |
| 38 virtual BluetoothProfileManagerClient* |
| 39 GetBluetoothProfileManagerClient() OVERRIDE; |
| 40 virtual CrasAudioClient* GetCrasAudioClient() OVERRIDE; |
| 41 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE; |
| 42 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE; |
| 43 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE; |
| 44 virtual EasyUnlockClient* GetEasyUnlockClient() OVERRIDE; |
| 45 virtual LorgnetteManagerClient* GetLorgnetteManagerClient() OVERRIDE; |
| 46 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE; |
| 47 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE; |
| 48 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE; |
| 49 virtual ShillProfileClient* GetShillProfileClient() OVERRIDE; |
| 50 virtual ShillServiceClient* GetShillServiceClient() OVERRIDE; |
| 51 virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE; |
| 52 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE; |
| 53 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE; |
| 54 virtual ModemMessagingClient* GetModemMessagingClient() OVERRIDE; |
| 55 virtual NfcAdapterClient* GetNfcAdapterClient() OVERRIDE; |
| 56 virtual NfcDeviceClient* GetNfcDeviceClient() OVERRIDE; |
| 57 virtual NfcManagerClient* GetNfcManagerClient() OVERRIDE; |
| 58 virtual NfcRecordClient* GetNfcRecordClient() OVERRIDE; |
| 59 virtual NfcTagClient* GetNfcTagClient() OVERRIDE; |
| 60 virtual PermissionBrokerClient* GetPermissionBrokerClient() OVERRIDE; |
| 61 virtual PowerManagerClient* GetPowerManagerClient() OVERRIDE; |
| 62 virtual PowerPolicyController* GetPowerPolicyController() OVERRIDE; |
| 63 virtual SessionManagerClient* GetSessionManagerClient() OVERRIDE; |
| 64 virtual SMSClient* GetSMSClient() OVERRIDE; |
| 65 virtual SystemClockClient* GetSystemClockClient() OVERRIDE; |
| 66 virtual UpdateEngineClient* GetUpdateEngineClient() OVERRIDE; |
| 67 |
| 68 private: |
| 69 // Returns either the real or fake DBusThreadManager implementation based on |
| 70 // |client| and |unstub_mask_|. |
| 71 DBusThreadManager* GetThreadManager(DBusClientBundle::DBusClientType client); |
| 72 |
| 73 scoped_ptr<DBusThreadManager> real_thread_manager_; |
| 74 scoped_ptr<DBusThreadManager> fake_thread_manager_; |
| 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(MixedDBusThreadManager); |
| 77 }; |
| 78 |
| 79 } // namespace chromeos |
| 80 |
| 81 #endif // CHROMEOS_DBUS_MIXED_DBUS_THREAD_MANAGER_H_ |
OLD | NEW |