| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index 2b8bcf0f6e9019f91f36b77e5f9a36f3ce3f46a3..e77d076953ce37395f0308586b758dfeb8de20e9 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -147,6 +147,8 @@
|
| #include "content/renderer/media/android/renderer_media_player_manager.h"
|
| #include "content/renderer/media/android/stream_texture_factory_impl.h"
|
| #include "content/renderer/media/android/webmediaplayer_android.h"
|
| +#else
|
| +#include "webkit/common/gpu/context_provider_web_context.h"
|
| #endif
|
|
|
| #if defined(ENABLE_BROWSER_CDMS)
|
| @@ -240,7 +242,7 @@ void GetRedirectChain(WebDataSource* ds, std::vector<GURL>* result) {
|
| // Returns the original request url. If there is no redirect, the original
|
| // url is the same as ds->request()->url(). If the WebDataSource belongs to a
|
| // frame was loaded by loadData, the original url will be ds->unreachableURL()
|
| -static GURL GetOriginalRequestURL(WebDataSource* ds) {
|
| +GURL GetOriginalRequestURL(WebDataSource* ds) {
|
| // WebDataSource has unreachable URL means that the frame is loaded through
|
| // blink::WebFrame::loadData(), and the base URL will be in the redirect
|
| // chain. However, we never visited the baseURL. So in this case, we should
|
| @@ -256,7 +258,7 @@ static GURL GetOriginalRequestURL(WebDataSource* ds) {
|
| return ds->originalRequest().url();
|
| }
|
|
|
| -NOINLINE static void CrashIntentionally() {
|
| +NOINLINE void CrashIntentionally() {
|
| // NOTE(shess): Crash directly rather than using NOTREACHED() so
|
| // that the signature is easier to triage in crash reports.
|
| volatile int* zero = NULL;
|
| @@ -264,7 +266,7 @@ NOINLINE static void CrashIntentionally() {
|
| }
|
|
|
| #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
|
| -NOINLINE static void MaybeTriggerAsanError(const GURL& url) {
|
| +NOINLINE void MaybeTriggerAsanError(const GURL& url) {
|
| // NOTE(rogerm): We intentionally perform an invalid heap access here in
|
| // order to trigger an Address Sanitizer (ASAN) error report.
|
| const char kCrashDomain[] = "crash";
|
| @@ -299,7 +301,7 @@ NOINLINE static void MaybeTriggerAsanError(const GURL& url) {
|
| }
|
| #endif // ADDRESS_SANITIZER || SYZYASAN
|
|
|
| -static void MaybeHandleDebugURL(const GURL& url) {
|
| +void MaybeHandleDebugURL(const GURL& url) {
|
| if (!url.SchemeIs(kChromeUIScheme))
|
| return;
|
| if (url == GURL(kChromeUICrashURL)) {
|
| @@ -326,15 +328,15 @@ static void MaybeHandleDebugURL(const GURL& url) {
|
| }
|
|
|
| // Returns false unless this is a top-level navigation.
|
| -static bool IsTopLevelNavigation(WebFrame* frame) {
|
| +bool IsTopLevelNavigation(WebFrame* frame) {
|
| return frame->parent() == NULL;
|
| }
|
|
|
| // Returns false unless this is a top-level navigation that crosses origins.
|
| -static bool IsNonLocalTopLevelNavigation(const GURL& url,
|
| - WebFrame* frame,
|
| - WebNavigationType type,
|
| - bool is_form_post) {
|
| +bool IsNonLocalTopLevelNavigation(const GURL& url,
|
| + WebFrame* frame,
|
| + WebNavigationType type,
|
| + bool is_form_post) {
|
| if (!IsTopLevelNavigation(frame))
|
| return false;
|
|
|
| @@ -410,10 +412,19 @@ void UpdateFrameNavigationTiming(WebFrame* frame,
|
| }
|
| }
|
|
|
| +#if !defined(OS_ANDROID)
|
| +cc::ContextProvider* GetSharedMainThreadContextProvider() {
|
| + RenderThreadImpl* render_thread = RenderThreadImpl::current();
|
| + DCHECK(render_thread);
|
| + DCHECK(render_thread->message_loop() == base::MessageLoop::current());
|
| + return render_thread->SharedMainThreadContextProvider().get();
|
| +}
|
| +#endif
|
| +
|
| +RenderFrameImpl* (*g_create_render_frame_impl)(RenderViewImpl*, int32) = NULL;
|
| +
|
| } // namespace
|
|
|
| -static RenderFrameImpl* (*g_create_render_frame_impl)(RenderViewImpl*, int32) =
|
| - NULL;
|
|
|
| // static
|
| RenderFrameImpl* RenderFrameImpl::Create(RenderViewImpl* render_view,
|
| @@ -1632,6 +1643,7 @@ blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer(
|
| render_thread->GetMediaThreadTaskRunner(),
|
| render_thread->compositor_message_loop_proxy(),
|
| base::Bind(&EncryptedMediaPlayerSupportImpl::Create),
|
| + base::Bind(&GetSharedMainThreadContextProvider),
|
| initial_cdm);
|
| return new media::WebMediaPlayerImpl(frame,
|
| client,
|
|
|