Chromium Code Reviews| 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 private: | |
|
hashimoto
2014/08/13 06:14:49
nit: Methods below are overriding public method. N
zel
2014/08/13 17:57:44
Done.
| |
| 26 | |
| 27 // DBusThreadManager overrides. | |
| 28 virtual void AddObserver(DBusThreadManagerObserver* observer) OVERRIDE; | |
| 29 virtual void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE; | |
| 30 virtual dbus::Bus* GetSystemBus() OVERRIDE; | |
| 31 virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE; | |
| 32 virtual BluetoothAgentManagerClient* | |
| 33 GetBluetoothAgentManagerClient() OVERRIDE; | |
| 34 virtual BluetoothDeviceClient* GetBluetoothDeviceClient() OVERRIDE; | |
| 35 virtual BluetoothGattCharacteristicClient* | |
| 36 GetBluetoothGattCharacteristicClient() OVERRIDE; | |
| 37 virtual BluetoothGattDescriptorClient* | |
| 38 GetBluetoothGattDescriptorClient() OVERRIDE; | |
| 39 virtual BluetoothGattManagerClient* GetBluetoothGattManagerClient() OVERRIDE; | |
| 40 virtual BluetoothGattServiceClient* GetBluetoothGattServiceClient() OVERRIDE; | |
| 41 virtual BluetoothInputClient* GetBluetoothInputClient() OVERRIDE; | |
| 42 virtual BluetoothProfileManagerClient* | |
| 43 GetBluetoothProfileManagerClient() OVERRIDE; | |
| 44 virtual CrasAudioClient* GetCrasAudioClient() OVERRIDE; | |
| 45 virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE; | |
| 46 virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE; | |
| 47 virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE; | |
| 48 virtual EasyUnlockClient* GetEasyUnlockClient() OVERRIDE; | |
| 49 virtual LorgnetteManagerClient* GetLorgnetteManagerClient() OVERRIDE; | |
| 50 virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE; | |
| 51 virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE; | |
| 52 virtual ShillManagerClient* GetShillManagerClient() OVERRIDE; | |
| 53 virtual ShillProfileClient* GetShillProfileClient() OVERRIDE; | |
| 54 virtual ShillServiceClient* GetShillServiceClient() OVERRIDE; | |
| 55 virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE; | |
| 56 virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE; | |
| 57 virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE; | |
| 58 virtual ModemMessagingClient* GetModemMessagingClient() OVERRIDE; | |
| 59 virtual NfcAdapterClient* GetNfcAdapterClient() OVERRIDE; | |
| 60 virtual NfcDeviceClient* GetNfcDeviceClient() OVERRIDE; | |
| 61 virtual NfcManagerClient* GetNfcManagerClient() OVERRIDE; | |
| 62 virtual NfcRecordClient* GetNfcRecordClient() OVERRIDE; | |
| 63 virtual NfcTagClient* GetNfcTagClient() OVERRIDE; | |
| 64 virtual PermissionBrokerClient* GetPermissionBrokerClient() OVERRIDE; | |
| 65 virtual PowerManagerClient* GetPowerManagerClient() OVERRIDE; | |
| 66 virtual PowerPolicyController* GetPowerPolicyController() OVERRIDE; | |
| 67 virtual SessionManagerClient* GetSessionManagerClient() OVERRIDE; | |
| 68 virtual SMSClient* GetSMSClient() OVERRIDE; | |
| 69 virtual SystemClockClient* GetSystemClockClient() OVERRIDE; | |
| 70 virtual UpdateEngineClient* GetUpdateEngineClient() OVERRIDE; | |
| 71 | |
| 72 private: | |
| 73 // Returns either the real or fake DBusThreadManager implementation based on | |
| 74 // |client| and |unstub_mask_|. | |
| 75 DBusThreadManager* GetThreadManager(DBusClientBundle::DBusClientType client); | |
| 76 | |
| 77 scoped_ptr<DBusThreadManager> real_thread_manager_; | |
| 78 scoped_ptr<DBusThreadManager> fake_thread_manager_; | |
| 79 | |
| 80 DISALLOW_COPY_AND_ASSIGN(MixedDBusThreadManager); | |
| 81 }; | |
| 82 | |
| 83 } // namespace chromeos | |
| 84 | |
| 85 #endif // CHROMEOS_DBUS_MIXED_DBUS_THREAD_MANAGER_H_ | |
| OLD | NEW |