| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 392 |
| 393 bool WebMediaPlayerImpl::hasAudio() const { | 393 bool WebMediaPlayerImpl::hasAudio() const { |
| 394 DCHECK(MessageLoop::current() == main_loop_); | 394 DCHECK(MessageLoop::current() == main_loop_); |
| 395 | 395 |
| 396 return pipeline_->HasAudio(); | 396 return pipeline_->HasAudio(); |
| 397 } | 397 } |
| 398 | 398 |
| 399 WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { | 399 WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { |
| 400 DCHECK(MessageLoop::current() == main_loop_); | 400 DCHECK(MessageLoop::current() == main_loop_); |
| 401 | 401 |
| 402 size_t width, height; | 402 gfx::Size size; |
| 403 pipeline_->GetVideoSize(&width, &height); | 403 pipeline_->GetNaturalVideoSize(&size); |
| 404 return WebKit::WebSize(width, height); | 404 return WebKit::WebSize(size); |
| 405 } | 405 } |
| 406 | 406 |
| 407 bool WebMediaPlayerImpl::paused() const { | 407 bool WebMediaPlayerImpl::paused() const { |
| 408 DCHECK(MessageLoop::current() == main_loop_); | 408 DCHECK(MessageLoop::current() == main_loop_); |
| 409 | 409 |
| 410 return pipeline_->GetPlaybackRate() == 0.0f; | 410 return pipeline_->GetPlaybackRate() == 0.0f; |
| 411 } | 411 } |
| 412 | 412 |
| 413 bool WebMediaPlayerImpl::seeking() const { | 413 bool WebMediaPlayerImpl::seeking() const { |
| 414 DCHECK(MessageLoop::current() == main_loop_); | 414 DCHECK(MessageLoop::current() == main_loop_); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 } | 828 } |
| 829 } | 829 } |
| 830 | 830 |
| 831 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 831 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 832 DCHECK(MessageLoop::current() == main_loop_); | 832 DCHECK(MessageLoop::current() == main_loop_); |
| 833 DCHECK(client_); | 833 DCHECK(client_); |
| 834 return client_; | 834 return client_; |
| 835 } | 835 } |
| 836 | 836 |
| 837 } // namespace webkit_glue | 837 } // namespace webkit_glue |
| OLD | NEW |