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

Side by Side Diff: ash/common/dbus_thread_manager_ash.cc

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome 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 unified diff | Download patch
OLDNEW
(Empty)
1 #include "ash/common/dbus_thread_manager_ash.h"
2
3 #include "chromeos/dbus/dbus_thread_manager.h"
4
5 namespace ash {
6 namespace {
7
8 DBusThreadManagerAsh* g_instance = nullptr;
9
10 } // namespace
11
12 // static
13 DBusThreadManagerAsh* DBusThreadManagerAsh::Get() {
14 CHECK(g_instance);
15 return g_instance;
16 }
17
18 DBusThreadManagerAsh::DBusThreadManagerAsh() {
19 DCHECK(!g_instance);
20 g_instance = this;
21
22 // Ensure the services we need are initialized.
23 chromeos::DBusThreadManager* manager = chromeos::DBusThreadManager::Get();
24 DCHECK(manager->GetPowerManagerClient());
25 DCHECK(manager->GetSessionManagerClient());
26 DCHECK(manager->GetSystemClockClient());
27 }
28
29 DBusThreadManagerAsh::~DBusThreadManagerAsh() {
30 DCHECK_EQ(this, g_instance);
31 g_instance = nullptr;
32 }
33
34 //JAMES for now, just forward
35 chromeos::PowerManagerClient* DBusThreadManagerAsh::GetPowerManagerClient() {
36 return chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
37 }
38
39 chromeos::SessionManagerClient* DBusThreadManagerAsh::GetSessionManagerClient() {
40 return chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
41 }
42
43 chromeos::SystemClockClient* DBusThreadManagerAsh::GetSystemClockClient() {
44 return chromeos::DBusThreadManager::Get()->GetSystemClockClient();
45 }
46
47 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/dbus_thread_manager_ash.h ('k') | ash/common/system/chromeos/audio/tray_audio_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698