Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / chromecast / browser / media / cma_message_loop.h
blob5ce2cd40c836bc5b1b6eb94e8550a846bd5e2b32
1 // Copyright 2014 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.
5 #ifndef CHROMECAST_BROWSER_MEDIA_CMA_MESSAGE_LOOP_H_
6 #define CHROMECAST_BROWSER_MEDIA_CMA_MESSAGE_LOOP_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/singleton.h"
12 namespace base {
13 class MessageLoopProxy;
14 class SingleThreadTaskRunner;
15 class Thread;
18 namespace chromecast {
19 namespace media {
21 class CmaMessageLoop {
22 public:
23 // TODO(gunsch): clean up references to deprecated Message*Loop*Proxy.
24 static scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxy();
25 static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner();
27 private:
28 friend struct DefaultSingletonTraits<CmaMessageLoop>;
29 friend class Singleton<CmaMessageLoop>;
31 static CmaMessageLoop* GetInstance();
33 CmaMessageLoop();
34 ~CmaMessageLoop();
36 scoped_ptr<base::Thread> thread_;
38 DISALLOW_COPY_AND_ASSIGN(CmaMessageLoop);
41 } // namespace media
42 } // namespace chromecast
44 #endif // CHROMECAST_BROWSER_MEDIA_CMA_MESSAGE_LOOP_H_