| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ | 5 #ifndef CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ |
| 6 #define CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ | 6 #define CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class SingleThreadTaskRunner; | 13 class SingleThreadTaskRunner; |
| 14 class Thread; | 14 class Thread; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace chromecast { | 17 namespace chromecast { |
| 18 namespace media { | 18 namespace media { |
| 19 | 19 |
| 20 // DEPRECATED: This is being deprecated. |
| 21 // Get the media task runner from CastContentBrowserClient::GetMediaTaskRunner. |
| 20 class MediaMessageLoop { | 22 class MediaMessageLoop { |
| 21 public: | 23 public: |
| 22 static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner(); | 24 static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner(); |
| 23 | 25 |
| 24 static MediaMessageLoop* GetInstance(); | 26 static MediaMessageLoop* GetInstance(); |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 friend struct base::DefaultSingletonTraits<MediaMessageLoop>; | 29 friend struct base::DefaultSingletonTraits<MediaMessageLoop>; |
| 28 | 30 |
| 29 MediaMessageLoop(); | 31 MediaMessageLoop(); |
| 30 ~MediaMessageLoop(); | 32 ~MediaMessageLoop(); |
| 31 | 33 |
| 32 scoped_ptr<base::Thread> thread_; | 34 scoped_ptr<base::Thread> thread_; |
| 33 | 35 |
| 34 DISALLOW_COPY_AND_ASSIGN(MediaMessageLoop); | 36 DISALLOW_COPY_AND_ASSIGN(MediaMessageLoop); |
| 35 }; | 37 }; |
| 36 | 38 |
| 37 } // namespace media | 39 } // namespace media |
| 38 } // namespace chromecast | 40 } // namespace chromecast |
| 39 | 41 |
| 40 #endif // CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ | 42 #endif // CHROMECAST_MEDIA_BASE_MEDIA_MESSAGE_LOOP_H_ |
| OLD | NEW |