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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 146 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
147 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 147 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
148 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 148 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
149 #include "third_party/WebKit/public/web/WebSettings.h" | 149 #include "third_party/WebKit/public/web/WebSettings.h" |
150 #include "third_party/WebKit/public/web/WebSurroundingText.h" | 150 #include "third_party/WebKit/public/web/WebSurroundingText.h" |
151 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 151 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
152 #include "third_party/WebKit/public/web/WebView.h" | 152 #include "third_party/WebKit/public/web/WebView.h" |
153 #include "third_party/mojo/src/mojo/edk/js/core.h" | 153 #include "third_party/mojo/src/mojo/edk/js/core.h" |
154 #include "third_party/mojo/src/mojo/edk/js/support.h" | 154 #include "third_party/mojo/src/mojo/edk/js/support.h" |
155 #include "url/url_util.h" | 155 #include "url/url_util.h" |
156 #include "v8/include/v8.h" | |
156 | 157 |
157 #if defined(ENABLE_PLUGINS) | 158 #if defined(ENABLE_PLUGINS) |
158 #include "content/renderer/npapi/webplugin_impl.h" | 159 #include "content/renderer/npapi/webplugin_impl.h" |
159 #include "content/renderer/pepper/pepper_browser_connection.h" | 160 #include "content/renderer/pepper/pepper_browser_connection.h" |
160 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 161 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
161 #include "content/renderer/pepper/pepper_webplugin_impl.h" | 162 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
162 #include "content/renderer/pepper/plugin_module.h" | 163 #include "content/renderer/pepper/plugin_module.h" |
163 #endif | 164 #endif |
164 | 165 |
165 #if defined(ENABLE_WEBRTC) | 166 #if defined(ENABLE_WEBRTC) |
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2135 #endif // defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) | 2136 #endif // defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) |
2136 | 2137 |
2137 scoped_refptr<media::MediaLog> media_log(new RenderMediaLog()); | 2138 scoped_refptr<media::MediaLog> media_log(new RenderMediaLog()); |
2138 media::WebMediaPlayerParams params( | 2139 media::WebMediaPlayerParams params( |
2139 base::Bind(&ContentRendererClient::DeferMediaLoad, | 2140 base::Bind(&ContentRendererClient::DeferMediaLoad, |
2140 base::Unretained(GetContentClient()->renderer()), | 2141 base::Unretained(GetContentClient()->renderer()), |
2141 static_cast<RenderFrame*>(this), has_played_media_), | 2142 static_cast<RenderFrame*>(this), has_played_media_), |
2142 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(), | 2143 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(), |
2143 render_thread->GetWorkerTaskRunner(), | 2144 render_thread->GetWorkerTaskRunner(), |
2144 render_thread->compositor_task_runner(), context_3d_cb, | 2145 render_thread->compositor_task_runner(), context_3d_cb, |
2146 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, | |
2147 base::Unretained(v8::Isolate::GetCurrent())), | |
ulan
2015/10/27 12:02:26
v8::Isolate::GetCurrent() is going to be deprecate
jochen (gone - plz use gerrit)
2015/10/27 12:03:54
just use blink::mainThreadIsolate() to get the mai
DaleCurtis
2015/10/27 23:14:20
Done.
| |
2145 GetMediaPermission(), initial_cdm); | 2148 GetMediaPermission(), initial_cdm); |
2146 | 2149 |
2147 // TODO(xhwang, watk): Find a better way to specify these ifdef conditions. | 2150 // TODO(xhwang, watk): Find a better way to specify these ifdef conditions. |
2148 #if defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) | 2151 #if defined(OS_ANDROID) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) |
2149 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); | 2152 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); |
2150 #else | 2153 #else |
2151 #if defined(ENABLE_MOJO_MEDIA) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) | 2154 #if defined(ENABLE_MOJO_MEDIA) && !defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID) |
2152 scoped_ptr<media::RendererFactory> media_renderer_factory( | 2155 scoped_ptr<media::RendererFactory> media_renderer_factory( |
2153 new media::MojoRendererFactory(GetMediaServiceFactory())); | 2156 new media::MojoRendererFactory(GetMediaServiceFactory())); |
2154 #else | 2157 #else |
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5251 mojo::ServiceProviderPtr service_provider; | 5254 mojo::ServiceProviderPtr service_provider; |
5252 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5255 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5253 request->url = mojo::String::From(url); | 5256 request->url = mojo::String::From(url); |
5254 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5257 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5255 nullptr, nullptr, | 5258 nullptr, nullptr, |
5256 base::Bind(&OnGotContentHandlerID)); | 5259 base::Bind(&OnGotContentHandlerID)); |
5257 return service_provider.Pass(); | 5260 return service_provider.Pass(); |
5258 } | 5261 } |
5259 | 5262 |
5260 } // namespace content | 5263 } // namespace content |
OLD | NEW |