Index: chromeos/dbus/dbus_thread_manager.h |
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h |
index f225a5e14ca74b3c1ad78b3df97b688de0865bbd..c93cb3deae67e56db2b2de12e94816075e942b53 100644 |
--- a/chromeos/dbus/dbus_thread_manager.h |
+++ b/chromeos/dbus/dbus_thread_manager.h |
@@ -9,6 +9,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/chromeos_export.h" |
+#include "chromeos/dbus/dbus_client_bundle.h" |
namespace base { |
class Thread; |
@@ -116,6 +117,9 @@ class CHROMEOS_EXPORT DBusThreadManager { |
// Gets the global instance. Initialize() must be called first. |
static DBusThreadManager* Get(); |
+ // Returns true if |client| is stubbed. |
+ static bool IsUsingStub(DBusClientBundle::DBusClientType client); |
+ |
// Adds or removes an observer. |
virtual void AddObserver(DBusThreadManagerObserver* observer) = 0; |
virtual void RemoveObserver(DBusThreadManagerObserver* observer) = 0; |
@@ -169,6 +173,13 @@ class CHROMEOS_EXPORT DBusThreadManager { |
DBusThreadManager(); |
private: |
+ // Initialize global thread manager instance. |
+ static void InitializeRegular(); |
+ |
+ // Initialize with stub implementations for only certain clients that are |
+ // not included in comma-separated |unstub_clients| list. |
+ static void InitializeWithPartialStub(const std::string& unstub_clients); |
+ |
// InitializeClients is called after g_dbus_thread_manager is set. |
// NOTE: Clients that access other clients in their Init() must be |
// initialized in the correct order. |
@@ -177,6 +188,10 @@ class CHROMEOS_EXPORT DBusThreadManager { |
// Initializes |client| with the |system_bus_|. |
static void InitClient(DBusClient* client); |
+ // Bitmask that defines which dbus clients are not stubbed out. Bitmap flags |
+ // are defined within DBusClientBundle::DBusClientType enum. |
+ static DBusClientBundle::DBusClientTypeMask unstub_client_mask_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
}; |