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/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 #include "gpu/GLES2/gl2extchromium.h" | 28 #include "gpu/GLES2/gl2extchromium.h" |
29 #include "gpu/command_buffer/client/gles2_interface.h" | 29 #include "gpu/command_buffer/client/gles2_interface.h" |
30 #include "grit/content_resources.h" | 30 #include "grit/content_resources.h" |
31 #include "media/base/android/media_player_android.h" | 31 #include "media/base/android/media_player_android.h" |
32 #include "media/base/bind_to_current_loop.h" | 32 #include "media/base/bind_to_current_loop.h" |
33 #include "media/base/media_switches.h" | 33 #include "media/base/media_switches.h" |
34 #include "media/base/video_frame.h" | 34 #include "media/base/video_frame.h" |
35 #include "net/base/mime_util.h" | 35 #include "net/base/mime_util.h" |
36 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 36 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
37 #include "third_party/WebKit/public/platform/WebString.h" | 37 #include "third_party/WebKit/public/platform/WebString.h" |
38 #include "third_party/WebKit/public/platform/WebURL.h" | |
38 #include "third_party/WebKit/public/web/WebDocument.h" | 39 #include "third_party/WebKit/public/web/WebDocument.h" |
39 #include "third_party/WebKit/public/web/WebFrame.h" | 40 #include "third_party/WebKit/public/web/WebFrame.h" |
40 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 41 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
41 #include "third_party/WebKit/public/web/WebView.h" | 42 #include "third_party/WebKit/public/web/WebView.h" |
42 #include "third_party/skia/include/core/SkBitmap.h" | 43 #include "third_party/skia/include/core/SkBitmap.h" |
43 #include "third_party/skia/include/core/SkCanvas.h" | 44 #include "third_party/skia/include/core/SkCanvas.h" |
44 #include "third_party/skia/include/core/SkPaint.h" | 45 #include "third_party/skia/include/core/SkPaint.h" |
45 #include "ui/gfx/image/image.h" | 46 #include "ui/gfx/image/image.h" |
46 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 47 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
47 | 48 |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1054 kGLTextureExternalOES, | 1055 kGLTextureExternalOES, |
1055 &texture_id_, | 1056 &texture_id_, |
1056 &texture_mailbox_, | 1057 &texture_mailbox_, |
1057 &texture_mailbox_sync_point_); | 1058 &texture_mailbox_sync_point_); |
1058 } | 1059 } |
1059 | 1060 |
1060 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { | 1061 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { |
1061 needs_establish_peer_ = needs_establish_peer; | 1062 needs_establish_peer_ = needs_establish_peer; |
1062 } | 1063 } |
1063 | 1064 |
1065 void WebMediaPlayerAndroid::setPoster(const blink::WebURL& poster) { | |
1066 poster_url_ = poster; | |
acolwell GONE FROM CHROMIUM
2014/02/04 20:00:21
Why do you need poster_url_? It doesn't appear to
cimamoglu (inactive)
2014/02/07 14:47:26
Done.
| |
1067 manager_->SetPoster(player_id_, poster); | |
1068 } | |
1069 | |
1064 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { | 1070 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { |
1065 is_playing_ = is_playing; | 1071 is_playing_ = is_playing; |
1066 if (!delegate_) | 1072 if (!delegate_) |
1067 return; | 1073 return; |
1068 if (is_playing) | 1074 if (is_playing) |
1069 delegate_->DidPlay(this); | 1075 delegate_->DidPlay(this); |
1070 else | 1076 else |
1071 delegate_->DidPause(this); | 1077 delegate_->DidPause(this); |
1072 } | 1078 } |
1073 | 1079 |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1408 | 1414 |
1409 void WebMediaPlayerAndroid::exitFullscreen() { | 1415 void WebMediaPlayerAndroid::exitFullscreen() { |
1410 manager_->ExitFullscreen(player_id_); | 1416 manager_->ExitFullscreen(player_id_); |
1411 } | 1417 } |
1412 | 1418 |
1413 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1419 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
1414 return manager_->CanEnterFullscreen(frame_); | 1420 return manager_->CanEnterFullscreen(frame_); |
1415 } | 1421 } |
1416 | 1422 |
1417 } // namespace content | 1423 } // namespace content |
OLD | NEW |