| 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 "content/renderer/media/webmediaplayer_ms.h" | 5 #include "content/renderer/media/webmediaplayer_ms.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 bool WebMediaPlayerMS::paused() const { | 241 bool WebMediaPlayerMS::paused() const { |
| 242 DCHECK(thread_checker_.CalledOnValidThread()); | 242 DCHECK(thread_checker_.CalledOnValidThread()); |
| 243 return paused_; | 243 return paused_; |
| 244 } | 244 } |
| 245 | 245 |
| 246 bool WebMediaPlayerMS::seeking() const { | 246 bool WebMediaPlayerMS::seeking() const { |
| 247 DCHECK(thread_checker_.CalledOnValidThread()); | 247 DCHECK(thread_checker_.CalledOnValidThread()); |
| 248 return false; | 248 return false; |
| 249 } | 249 } |
| 250 | 250 |
| 251 double WebMediaPlayerMS::earliestTime() const { |
| 252 return 0; |
| 253 } |
| 254 |
| 251 double WebMediaPlayerMS::duration() const { | 255 double WebMediaPlayerMS::duration() const { |
| 252 DCHECK(thread_checker_.CalledOnValidThread()); | 256 DCHECK(thread_checker_.CalledOnValidThread()); |
| 253 return std::numeric_limits<double>::infinity(); | 257 return std::numeric_limits<double>::infinity(); |
| 254 } | 258 } |
| 255 | 259 |
| 256 double WebMediaPlayerMS::currentTime() const { | 260 double WebMediaPlayerMS::currentTime() const { |
| 257 DCHECK(thread_checker_.CalledOnValidThread()); | 261 DCHECK(thread_checker_.CalledOnValidThread()); |
| 258 const base::TimeDelta current_time = compositor_->GetCurrentTime(); | 262 const base::TimeDelta current_time = compositor_->GetCurrentTime(); |
| 259 if (current_time.ToInternalValue() != 0) | 263 if (current_time.ToInternalValue() != 0) |
| 260 return current_time.InSecondsF(); | 264 return current_time.InSecondsF(); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 get_client()->networkStateChanged(); | 441 get_client()->networkStateChanged(); |
| 438 } | 442 } |
| 439 | 443 |
| 440 void WebMediaPlayerMS::SetReadyState(WebMediaPlayer::ReadyState state) { | 444 void WebMediaPlayerMS::SetReadyState(WebMediaPlayer::ReadyState state) { |
| 441 DCHECK(thread_checker_.CalledOnValidThread()); | 445 DCHECK(thread_checker_.CalledOnValidThread()); |
| 442 ready_state_ = state; | 446 ready_state_ = state; |
| 443 // Always notify to ensure client has the latest value. | 447 // Always notify to ensure client has the latest value. |
| 444 get_client()->readyStateChanged(); | 448 get_client()->readyStateChanged(); |
| 445 } | 449 } |
| 446 } // namespace content | 450 } // namespace content |
| OLD | NEW |