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