| 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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 #if defined(OS_ANDROID) | 169 #if defined(OS_ANDROID) |
| 170 #include <cpu-features.h> | 170 #include <cpu-features.h> |
| 171 | 171 |
| 172 #include "content/common/gpu/client/context_provider_command_buffer.h" | 172 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 173 #include "content/renderer/android/synchronous_compositor_factory.h" | 173 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 174 #include "content/renderer/java/gin_java_bridge_dispatcher.h" | 174 #include "content/renderer/java/gin_java_bridge_dispatcher.h" |
| 175 #include "content/renderer/media/android/renderer_media_player_manager.h" | 175 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| 176 #include "content/renderer/media/android/stream_texture_factory_impl.h" | 176 #include "content/renderer/media/android/stream_texture_factory_impl.h" |
| 177 #include "content/renderer/media/android/webmediaplayer_android.h" | 177 #include "content/renderer/media/android/webmediaplayer_android.h" |
| 178 #include "content/renderer/media/android/webmediasession_android.h" |
| 178 #else | 179 #else |
| 179 #include "cc/blink/context_provider_web_context.h" | 180 #include "cc/blink/context_provider_web_context.h" |
| 180 #include "content/renderer/usb/web_usb_client_impl.h" | 181 #include "content/renderer/usb/web_usb_client_impl.h" |
| 181 #include "device/devices_app/public/cpp/constants.h" | 182 #include "device/devices_app/public/cpp/constants.h" |
| 182 #endif | 183 #endif |
| 183 | 184 |
| 184 #if defined(ENABLE_PEPPER_CDMS) | 185 #if defined(ENABLE_PEPPER_CDMS) |
| 185 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" | 186 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" |
| 186 #elif defined(ENABLE_BROWSER_CDMS) | 187 #elif defined(ENABLE_BROWSER_CDMS) |
| 187 #include "content/renderer/media/crypto/renderer_cdm_manager.h" | 188 #include "content/renderer/media/crypto/renderer_cdm_manager.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 212 using blink::WebElement; | 213 using blink::WebElement; |
| 213 using blink::WebExternalPopupMenu; | 214 using blink::WebExternalPopupMenu; |
| 214 using blink::WebExternalPopupMenuClient; | 215 using blink::WebExternalPopupMenuClient; |
| 215 using blink::WebFrame; | 216 using blink::WebFrame; |
| 216 using blink::WebHistoryItem; | 217 using blink::WebHistoryItem; |
| 217 using blink::WebHTTPBody; | 218 using blink::WebHTTPBody; |
| 218 using blink::WebLocalFrame; | 219 using blink::WebLocalFrame; |
| 219 using blink::WebMediaPlayer; | 220 using blink::WebMediaPlayer; |
| 220 using blink::WebMediaPlayerClient; | 221 using blink::WebMediaPlayerClient; |
| 221 using blink::WebMediaPlayerEncryptedMediaClient; | 222 using blink::WebMediaPlayerEncryptedMediaClient; |
| 223 using blink::WebMediaSession; |
| 222 using blink::WebNavigationPolicy; | 224 using blink::WebNavigationPolicy; |
| 223 using blink::WebNavigationType; | 225 using blink::WebNavigationType; |
| 224 using blink::WebNode; | 226 using blink::WebNode; |
| 225 using blink::WebPageSerializer; | 227 using blink::WebPageSerializer; |
| 226 using blink::WebPageSerializerClient; | 228 using blink::WebPageSerializerClient; |
| 227 using blink::WebPluginParams; | 229 using blink::WebPluginParams; |
| 228 using blink::WebPopupMenuInfo; | 230 using blink::WebPopupMenuInfo; |
| 229 using blink::WebRange; | 231 using blink::WebRange; |
| 230 using blink::WebReferrerPolicy; | 232 using blink::WebReferrerPolicy; |
| 231 using blink::WebScriptSource; | 233 using blink::WebScriptSource; |
| (...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 *render_thread->GetAudioHardwareConfig())); | 2131 *render_thread->GetAudioHardwareConfig())); |
| 2130 } | 2132 } |
| 2131 #endif // defined(ENABLE_MOJO_MEDIA) | 2133 #endif // defined(ENABLE_MOJO_MEDIA) |
| 2132 | 2134 |
| 2133 return new media::WebMediaPlayerImpl( | 2135 return new media::WebMediaPlayerImpl( |
| 2134 frame, client, encrypted_client, weak_factory_.GetWeakPtr(), | 2136 frame, client, encrypted_client, weak_factory_.GetWeakPtr(), |
| 2135 media_renderer_factory.Pass(), GetCdmFactory(), params); | 2137 media_renderer_factory.Pass(), GetCdmFactory(), params); |
| 2136 #endif // defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) | 2138 #endif // defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) |
| 2137 } | 2139 } |
| 2138 | 2140 |
| 2141 blink::WebMediaSession* RenderFrameImpl::createMediaSession() { |
| 2142 #if defined(OS_ANDROID) |
| 2143 return new WebMediaSessionAndroid(); |
| 2144 #else |
| 2145 return nullptr; |
| 2146 #endif // defined(OS_ANDROID) |
| 2147 } |
| 2148 |
| 2139 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 2149 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
| 2140 blink::WebLocalFrame* frame, | 2150 blink::WebLocalFrame* frame, |
| 2141 blink::WebApplicationCacheHostClient* client) { | 2151 blink::WebApplicationCacheHostClient* client) { |
| 2142 if (!frame || !frame->view()) | 2152 if (!frame || !frame->view()) |
| 2143 return NULL; | 2153 return NULL; |
| 2144 DCHECK(!frame_ || frame_ == frame); | 2154 DCHECK(!frame_ || frame_ == frame); |
| 2145 return new RendererWebApplicationCacheHostImpl( | 2155 return new RendererWebApplicationCacheHostImpl( |
| 2146 RenderViewImpl::FromWebView(frame->view()), client, | 2156 RenderViewImpl::FromWebView(frame->view()), client, |
| 2147 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2157 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
| 2148 } | 2158 } |
| (...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5198 mojo::ServiceProviderPtr service_provider; | 5208 mojo::ServiceProviderPtr service_provider; |
| 5199 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5209 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 5200 request->url = mojo::String::From(url); | 5210 request->url = mojo::String::From(url); |
| 5201 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5211 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
| 5202 nullptr, nullptr, | 5212 nullptr, nullptr, |
| 5203 base::Bind(&OnGotContentHandlerID)); | 5213 base::Bind(&OnGotContentHandlerID)); |
| 5204 return service_provider.Pass(); | 5214 return service_provider.Pass(); |
| 5205 } | 5215 } |
| 5206 | 5216 |
| 5207 } // namespace content | 5217 } // namespace content |
| OLD | NEW |