| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "media/cast/cast_environment.h" | 5 #include "media/cast/cast_environment.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 default: | 54 default: |
| 55 NOTREACHED() << "Invalid Thread identifier"; | 55 NOTREACHED() << "Invalid Thread identifier"; |
| 56 return NULL; | 56 return NULL; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool CastEnvironment::CurrentlyOn(ThreadId identifier) { | 60 bool CastEnvironment::CurrentlyOn(ThreadId identifier) { |
| 61 switch (identifier) { | 61 switch (identifier) { |
| 62 case CastEnvironment::MAIN: | 62 case CastEnvironment::MAIN: |
| 63 return main_thread_proxy_.get() && | 63 return main_thread_proxy_.get() && |
| 64 main_thread_proxy_->RunsTasksOnCurrentThread(); | 64 main_thread_proxy_->RunsTasksInCurrentSequence(); |
| 65 case CastEnvironment::AUDIO: | 65 case CastEnvironment::AUDIO: |
| 66 return audio_thread_proxy_.get() && | 66 return audio_thread_proxy_.get() && |
| 67 audio_thread_proxy_->RunsTasksOnCurrentThread(); | 67 audio_thread_proxy_->RunsTasksInCurrentSequence(); |
| 68 case CastEnvironment::VIDEO: | 68 case CastEnvironment::VIDEO: |
| 69 return video_thread_proxy_.get() && | 69 return video_thread_proxy_.get() && |
| 70 video_thread_proxy_->RunsTasksOnCurrentThread(); | 70 video_thread_proxy_->RunsTasksInCurrentSequence(); |
| 71 default: | 71 default: |
| 72 NOTREACHED() << "Invalid thread identifier"; | 72 NOTREACHED() << "Invalid thread identifier"; |
| 73 return false; | 73 return false; |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace cast | 77 } // namespace cast |
| 78 } // namespace media | 78 } // namespace media |
| OLD | NEW |