OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 render_frame, base::Bind(&IsGuestViewApiAvailableToScriptContext, | 665 render_frame, base::Bind(&IsGuestViewApiAvailableToScriptContext, |
666 &guest_view_api_available)); | 666 &guest_view_api_available)); |
667 if (guest_view_api_available) | 667 if (guest_view_api_available) |
668 return false; | 668 return false; |
669 } | 669 } |
670 #endif | 670 #endif |
671 | 671 |
672 GURL url(params.url); | 672 GURL url(params.url); |
673 #if defined(ENABLE_PLUGINS) | 673 #if defined(ENABLE_PLUGINS) |
674 ChromeViewHostMsg_GetPluginInfo_Output output; | 674 ChromeViewHostMsg_GetPluginInfo_Output output; |
| 675 WebString top_origin = frame->top()->securityOrigin().toString(); |
675 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( | 676 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( |
676 render_frame->GetRoutingID(), url, frame->top()->document().url(), | 677 render_frame->GetRoutingID(), url, GURL(top_origin), orig_mime_type, |
677 orig_mime_type, &output)); | 678 &output)); |
678 *plugin = CreatePlugin(render_frame, frame, params, output); | 679 *plugin = CreatePlugin(render_frame, frame, params, output); |
679 #else // !defined(ENABLE_PLUGINS) | 680 #else // !defined(ENABLE_PLUGINS) |
680 | 681 |
681 #if defined(OS_ANDROID) | 682 #if defined(OS_ANDROID) |
682 if (plugins::MobileYouTubePlugin::IsYouTubeURL(url, orig_mime_type)) { | 683 if (plugins::MobileYouTubePlugin::IsYouTubeURL(url, orig_mime_type)) { |
683 base::StringPiece template_html( | 684 base::StringPiece template_html( |
684 ResourceBundle::GetSharedInstance().GetRawDataResource( | 685 ResourceBundle::GetSharedInstance().GetRawDataResource( |
685 IDR_MOBILE_YOUTUBE_PLUGIN_HTML)); | 686 IDR_MOBILE_YOUTUBE_PLUGIN_HTML)); |
686 *plugin = (new plugins::MobileYouTubePlugin(render_frame, frame, params, | 687 *plugin = (new plugins::MobileYouTubePlugin(render_frame, frame, params, |
687 template_html))->plugin(); | 688 template_html))->plugin(); |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 | 1663 |
1663 void | 1664 void |
1664 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1665 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( |
1665 v8::Local<v8::Context> context, | 1666 v8::Local<v8::Context> context, |
1666 const GURL& url) { | 1667 const GURL& url) { |
1667 #if defined(ENABLE_EXTENSIONS) | 1668 #if defined(ENABLE_EXTENSIONS) |
1668 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1669 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( |
1669 context, url); | 1670 context, url); |
1670 #endif | 1671 #endif |
1671 } | 1672 } |
OLD | NEW |