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

Side by Side Diff: chromeos/dbus/dbus_thread_manager.h

Issue 515573003: app_shell: Do simple audio initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrap line Created 6 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
« no previous file with comments | « chromeos/dbus/cras_audio_client_stub_impl.cc ('k') | extensions/shell/app_shell.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ 5 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ 6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // WeakPtrFactory when creating callbacks that run on UI thread. See 81 // WeakPtrFactory when creating callbacks that run on UI thread. See
82 // session_manager_client.cc for examples. 82 // session_manager_client.cc for examples.
83 // 83 //
84 class CHROMEOS_EXPORT DBusThreadManager { 84 class CHROMEOS_EXPORT DBusThreadManager {
85 public: 85 public:
86 // Sets the global instance. Must be called before any calls to Get(). 86 // Sets the global instance. Must be called before any calls to Get().
87 // We explicitly initialize and shut down the global object, rather than 87 // We explicitly initialize and shut down the global object, rather than
88 // making it a Singleton, to ensure clean startup and shutdown. 88 // making it a Singleton, to ensure clean startup and shutdown.
89 static void Initialize(); 89 static void Initialize();
90 90
91 // Returns DBusThreadManagerSetter instance that allows tests to 91 // Returns a DBusThreadManagerSetter instance that allows tests to
92 // replace individual dbus clients with their own implementations. 92 // replace individual D-Bus clients with their own implementations.
93 // Also initializes the main DBusThreadManager for testing if necessary.
93 static scoped_ptr<DBusThreadManagerSetter> GetSetterForTesting(); 94 static scoped_ptr<DBusThreadManagerSetter> GetSetterForTesting();
94 95
95 // Returns true if DBusThreadManager has been initialized. Call this to 96 // Returns true if DBusThreadManager has been initialized. Call this to
96 // avoid initializing + shutting down DBusThreadManager more than once. 97 // avoid initializing + shutting down DBusThreadManager more than once.
97 static bool IsInitialized(); 98 static bool IsInitialized();
98 99
99 // Destroys the global instance. 100 // Destroys the global instance.
100 static void Shutdown(); 101 static void Shutdown();
101 102
102 // Gets the global instance. Initialize() must be called first. 103 // Gets the global instance. Initialize() must be called first.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 friend class DBusThreadManager; 239 friend class DBusThreadManager;
239 240
240 DBusThreadManagerSetter(); 241 DBusThreadManagerSetter();
241 242
242 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter); 243 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter);
243 }; 244 };
244 245
245 } // namespace chromeos 246 } // namespace chromeos
246 247
247 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ 248 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/cras_audio_client_stub_impl.cc ('k') | extensions/shell/app_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698