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

Unified Diff: chromeos/dbus/dbus_clients_browser.h

Issue 2343993003: chromeos: Refactor D-Bus client creation for ash and browser processes (Closed)
Patch Set: rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/dbus_client_bundle_unittest.cc ('k') | chromeos/dbus/dbus_clients_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/dbus_clients_browser.h
diff --git a/chromeos/dbus/dbus_clients_browser.h b/chromeos/dbus/dbus_clients_browser.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec4acbff0227559ec005adeb2fd7c8cee474ce0e
--- /dev/null
+++ b/chromeos/dbus/dbus_clients_browser.h
@@ -0,0 +1,55 @@
+// Copyright 2016 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.
+
+#ifndef CHROMEOS_DBUS_DBUS_CLIENTS_BROWSER_H_
+#define CHROMEOS_DBUS_DBUS_CLIENTS_BROWSER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/dbus_client_types.h"
+
+namespace dbus {
+class Bus;
+}
+
+namespace chromeos {
+
+class ArcObbMounterClient;
+class CrosDisksClient;
+class CryptohomeClient;
+class DebugDaemonClient;
+class EasyUnlockClient;
+class ImageBurnerClient;
+class LorgnetteManagerClient;
+
+// D-Bus clients used only in the browser process.
+// TODO(jamescook): Move this under //chrome/browser. http://crbug.com/647367
+class CHROMEOS_EXPORT DBusClientsBrowser {
+ public:
+ // Creates real implementations for |real_clients| and fakes for all others.
+ // Fakes are used when running on Linux desktop and in tests.
+ explicit DBusClientsBrowser(DBusClientTypeMask real_clients);
+ ~DBusClientsBrowser();
+
+ void Initialize(dbus::Bus* system_bus);
+
+ private:
+ friend class DBusThreadManager;
+ friend class DBusThreadManagerSetter;
+
+ std::unique_ptr<ArcObbMounterClient> arc_obb_mounter_client_;
+ std::unique_ptr<CrosDisksClient> cros_disks_client_;
+ std::unique_ptr<DebugDaemonClient> debug_daemon_client_;
+ std::unique_ptr<EasyUnlockClient> easy_unlock_client_;
+ std::unique_ptr<ImageBurnerClient> image_burner_client_;
+ std::unique_ptr<LorgnetteManagerClient> lorgnette_manager_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(DBusClientsBrowser);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_DBUS_CLIENTS_BROWSER_H_
« no previous file with comments | « chromeos/dbus/dbus_client_bundle_unittest.cc ('k') | chromeos/dbus/dbus_clients_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698