Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media/android/webmediaplayer_impl_android.h" | 5 #include "webkit/media/android/webmediaplayer_impl_android.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "media/base/android/media_player_bridge.h" | 9 #include "media/base/android/media_player_bridge.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 void WebMediaPlayerImplAndroid::PauseInternal() { | 74 void WebMediaPlayerImplAndroid::PauseInternal() { |
| 75 if (proxy_) | 75 if (proxy_) |
| 76 proxy_->Pause(player_id()); | 76 proxy_->Pause(player_id()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void WebMediaPlayerImplAndroid::SeekInternal(base::TimeDelta time) { | 79 void WebMediaPlayerImplAndroid::SeekInternal(base::TimeDelta time) { |
| 80 if (proxy_) | 80 if (proxy_) |
| 81 proxy_->Seek(player_id(), time); | 81 proxy_->Seek(player_id(), time); |
| 82 } | 82 } |
| 83 | 83 |
| 84 float WebMediaPlayerImplAndroid::GetCurrentTimeInternal() const { | 84 double WebMediaPlayerImplAndroid::GetCurrentTimeInternal() const { |
| 85 return current_time_; | 85 return current_time_; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void WebMediaPlayerImplAndroid::ReleaseResourcesInternal() { | 88 void WebMediaPlayerImplAndroid::ReleaseResourcesInternal() { |
| 89 if (proxy_) | 89 if (proxy_) |
| 90 proxy_->ReleaseResources(player_id()); | 90 proxy_->ReleaseResources(player_id()); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WebMediaPlayerImplAndroid::OnTimeUpdate(base::TimeDelta current_time) { | 93 void WebMediaPlayerImplAndroid::OnTimeUpdate(base::TimeDelta current_time) { |
| 94 current_time_ = static_cast<float>(current_time.InSecondsF()); | 94 current_time_ = current_time.InSecondsF(); |
|
DaleCurtis
2013/04/16 01:19:48
Should just store the TimeDelta?
acolwell GONE FROM CHROMIUM
2013/04/16 16:58:15
I was trying to avoid unrelated changes such as th
| |
| 95 } | 95 } |
| 96 | 96 |
| 97 void WebMediaPlayerImplAndroid::OnDidEnterFullscreen() { | 97 void WebMediaPlayerImplAndroid::OnDidEnterFullscreen() { |
| 98 if (!manager()->IsInFullscreen(frame_)) { | 98 if (!manager()->IsInFullscreen(frame_)) { |
| 99 frame_->view()->willEnterFullScreen(); | 99 frame_->view()->willEnterFullScreen(); |
| 100 frame_->view()->didEnterFullScreen(); | 100 frame_->view()->didEnterFullScreen(); |
| 101 manager()->DidEnterFullscreen(frame_); | 101 manager()->DidEnterFullscreen(frame_); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 130 } | 130 } |
| 131 | 131 |
| 132 void WebMediaPlayerImplAndroid::RequestExternalSurface() { | 132 void WebMediaPlayerImplAndroid::RequestExternalSurface() { |
| 133 if (proxy_) | 133 if (proxy_) |
| 134 proxy_->RequestExternalSurface(player_id()); | 134 proxy_->RequestExternalSurface(player_id()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void WebMediaPlayerImplAndroid::SetVideoSurface(jobject j_surface) {} | 137 void WebMediaPlayerImplAndroid::SetVideoSurface(jobject j_surface) {} |
| 138 | 138 |
| 139 } // namespace webkit_media | 139 } // namespace webkit_media |
| OLD | NEW |