Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 18261007: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 AGAIN Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "cc/layers/video_layer.h" 13 #include "cc/layers/video_layer.h"
14 #include "content/renderer/media/android/proxy_media_keys.h" 14 #include "content/renderer/media/android/proxy_media_keys.h"
15 #include "content/renderer/media/android/webmediaplayer_manager_android.h" 15 #include "content/renderer/media/android/webmediaplayer_manager_android.h"
16 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" 16 #include "content/renderer/media/android/webmediaplayer_proxy_android.h"
17 #include "content/renderer/media/webmediaplayer_delegate.h"
18 #include "content/renderer/media/webmediaplayer_util.h"
17 #include "gpu/GLES2/gl2extchromium.h" 19 #include "gpu/GLES2/gl2extchromium.h"
18 #include "media/base/android/media_player_android.h" 20 #include "media/base/android/media_player_android.h"
19 #include "media/base/bind_to_loop.h" 21 #include "media/base/bind_to_loop.h"
20 #include "media/base/media_switches.h" 22 #include "media/base/media_switches.h"
21 #include "media/base/video_frame.h" 23 #include "media/base/video_frame.h"
22 #include "net/base/mime_util.h" 24 #include "net/base/mime_util.h"
23 #include "third_party/WebKit/public/platform/WebString.h" 25 #include "third_party/WebKit/public/platform/WebString.h"
24 #include "third_party/WebKit/public/web/WebDocument.h" 26 #include "third_party/WebKit/public/web/WebDocument.h"
25 #include "third_party/WebKit/public/web/WebFrame.h" 27 #include "third_party/WebKit/public/web/WebFrame.h"
26 #include "third_party/WebKit/public/web/WebMediaPlayerClient.h" 28 #include "third_party/WebKit/public/web/WebMediaPlayerClient.h"
27 #include "third_party/WebKit/public/web/WebMediaSource.h" 29 #include "third_party/WebKit/public/web/WebMediaSource.h"
28 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 30 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
29 #include "third_party/WebKit/public/web/WebView.h" 31 #include "third_party/WebKit/public/web/WebView.h"
30 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" 32 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
31 #include "webkit/renderer/media/crypto/key_systems.h" 33 #include "webkit/renderer/media/crypto/key_systems.h"
32 #include "webkit/renderer/media/webmediaplayer_delegate.h"
33 #include "webkit/renderer/media/webmediaplayer_util.h"
34 34
35 #if defined(GOOGLE_TV) 35 #if defined(GOOGLE_TV)
36 #include "webkit/renderer/media/media_stream_audio_renderer.h" 36 #include "content/public/renderer/media_stream_audio_renderer.h"
37 #include "webkit/renderer/media/media_stream_client.h" 37 #include "content/public/renderer/media_stream_client.h"
38 #endif 38 #endif
39 39
40 static const uint32 kGLTextureExternalOES = 0x8D65; 40 static const uint32 kGLTextureExternalOES = 0x8D65;
41 41
42 using WebKit::WebMediaPlayer; 42 using WebKit::WebMediaPlayer;
43 using WebKit::WebMediaSource; 43 using WebKit::WebMediaSource;
44 using WebKit::WebSize; 44 using WebKit::WebSize;
45 using WebKit::WebString; 45 using WebKit::WebString;
46 using WebKit::WebTimeRanges; 46 using WebKit::WebTimeRanges;
47 using WebKit::WebURL; 47 using WebKit::WebURL;
48 using media::MediaPlayerAndroid; 48 using media::MediaPlayerAndroid;
49 using media::VideoFrame; 49 using media::VideoFrame;
50 using webkit_media::ConvertSecondsToTimestamp;
51 using webkit_media::IsSupportedKeySystem; 50 using webkit_media::IsSupportedKeySystem;
52 using webkit_media::KeySystemNameForUMA; 51 using webkit_media::KeySystemNameForUMA;
53 using webkit_media::ProxyDecryptor; 52 using webkit_media::ProxyDecryptor;
54 using webkit_media::WebMediaPlayerDelegate;
55 53
56 namespace { 54 namespace {
57 // Prefix for histograms related to Encrypted Media Extensions. 55 // Prefix for histograms related to Encrypted Media Extensions.
58 const char* kMediaEme = "Media.EME."; 56 const char* kMediaEme = "Media.EME.";
59 } // namespace 57 } // namespace
60 58
61 namespace content { 59 namespace content {
62 60
63 #define BIND_TO_RENDER_LOOP(function) \ 61 #define BIND_TO_RENDER_LOOP(function) \
64 media::BindToLoop(main_loop_, base::Bind(function, AsWeakPtr())) 62 media::BindToLoop(main_loop_, base::Bind(function, AsWeakPtr()))
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 init_data_type_ = type; 1129 init_data_type_ = type;
1132 1130
1133 client_->keyNeeded(WebString(), 1131 client_->keyNeeded(WebString(),
1134 WebString::fromUTF8(session_id), 1132 WebString::fromUTF8(session_id),
1135 init_data.get(), 1133 init_data.get(),
1136 init_data_size); 1134 init_data_size);
1137 } 1135 }
1138 1136
1139 #if defined(GOOGLE_TV) 1137 #if defined(GOOGLE_TV)
1140 bool WebMediaPlayerAndroid::InjectMediaStream( 1138 bool WebMediaPlayerAndroid::InjectMediaStream(
1141 webkit_media::MediaStreamClient* media_stream_client, 1139 MediaStreamClient* media_stream_client,
1142 media::Demuxer* demuxer, 1140 media::Demuxer* demuxer,
1143 const base::Closure& destroy_demuxer_cb) { 1141 const base::Closure& destroy_demuxer_cb) {
1144 DCHECK(!demuxer); 1142 DCHECK(!demuxer);
1145 media_stream_client_ = media_stream_client; 1143 media_stream_client_ = media_stream_client;
1146 demuxer_ = demuxer; 1144 demuxer_ = demuxer;
1147 destroy_demuxer_cb_ = destroy_demuxer_cb; 1145 destroy_demuxer_cb_ = destroy_demuxer_cb;
1148 return true; 1146 return true;
1149 } 1147 }
1150 #endif 1148 #endif
1151 1149
(...skipping 13 matching lines...) Expand all
1165 1163
1166 void WebMediaPlayerAndroid::exitFullscreen() { 1164 void WebMediaPlayerAndroid::exitFullscreen() {
1167 proxy_->ExitFullscreen(player_id_); 1165 proxy_->ExitFullscreen(player_id_);
1168 } 1166 }
1169 1167
1170 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1168 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1171 return manager_->CanEnterFullscreen(frame_); 1169 return manager_->CanEnterFullscreen(frame_);
1172 } 1170 }
1173 1171
1174 } // namespace content 1172 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698