cef/patch/patches/content_1129_2015.patch

593 lines
28 KiB
Diff

diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
index ecc7952..69ef4b4 100644
--- chrome/browser/download/download_target_determiner.cc
+++ chrome/browser/download/download_target_determiner.cc
@@ -476,8 +476,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
content::PluginService* plugin_service =
content::PluginService::GetInstance();
bool plugin_found = plugin_service->GetPluginInfo(
- -1, -1, resource_context, url, url::Origin(), mime_type, false, &is_stale,
- &plugin_info, &actual_mime_type);
+ -1, -1, resource_context, url, true, url::Origin(), mime_type, false,
+ &is_stale, &plugin_info, &actual_mime_type);
if (is_stale && stale_plugin_action == RETRY_IF_STALE_PLUGIN_LIST) {
// The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index 1783a10..b380ef8 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -179,6 +179,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin) {
base::AutoLock auto_lock(lock_);
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
index f8b651f..ec39f8d 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.h
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
@@ -71,6 +71,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin) override;
diff --git chrome/browser/plugins/plugin_info_message_filter.cc chrome/browser/plugins/plugin_info_message_filter.cc
index 8c31c98..beef4cb 100644
--- chrome/browser/plugins/plugin_info_message_filter.cc
+++ chrome/browser/plugins/plugin_info_message_filter.cc
@@ -451,8 +451,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
for (; i < matching_plugins.size(); ++i) {
if (!filter ||
filter->IsPluginAvailable(render_process_id_, render_frame_id,
- resource_context_, url, main_frame_origin,
- &matching_plugins[i])) {
+ resource_context_, url, true,
+ main_frame_origin, &matching_plugins[i])) {
break;
}
}
diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm
index fd8c993..7f70c96 100644
--- chrome/browser/ui/cocoa/drag_util.mm
+++ chrome/browser/ui/cocoa/drag_util.mm
@@ -54,7 +54,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) {
return PluginService::GetInstance()->GetPluginInfo(
-1, // process ID
MSG_ROUTING_NONE, // routing ID
- profile->GetResourceContext(), url, url::Origin(), mime_type,
+ profile->GetResourceContext(), url, true, url::Origin(), mime_type,
allow_wildcard, NULL, &plugin, NULL);
}
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index ea5764b..ae06854 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -585,6 +585,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
content::PluginService::GetInstance()->GetPluginInfo(
-1, // process ID
MSG_ROUTING_NONE, // routing ID
- model_->profile()->GetResourceContext(), url, url::Origin(),
+ model_->profile()->GetResourceContext(), url, true, url::Origin(),
mime_type, false, NULL, &plugin, NULL));
}
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index 7563fdf..d4e0a38 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -294,12 +294,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
- // TODO(mkwst): Change this to check against 'READY_TO_COMMIT' once
- // ReadyToCommitNavigation is available whether or not PlzNavigate is
- // enabled. https://crbug.com/621856
- CHECK_GE(state_, WILL_PROCESS_RESPONSE)
- << "This accessor should only be called after a response has been "
- "delivered for processing.";
return render_frame_host_;
}
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
index 2bdb04d..b28722e 100644
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -865,10 +865,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
#endif
-#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder,
OnNavigationHandledByEmbedder)
-#endif
IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken,
OnRequestOverlayRoutingToken)
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
@@ -1323,6 +1321,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
if (navigation_handle_) {
navigation_handle_->set_net_error_code(
static_cast<net::Error>(params.error_code));
+ navigation_handle_->set_render_frame_host(this);
}
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -2573,14 +2572,12 @@ void RenderFrameHostImpl::OnHidePopup() {
}
#endif
-#if defined(OS_ANDROID)
void RenderFrameHostImpl::OnNavigationHandledByEmbedder() {
if (navigation_handle_)
navigation_handle_->set_net_error_code(net::ERR_ABORTED);
OnDidStopLoading();
}
-#endif
void RenderFrameHostImpl::OnRequestOverlayRoutingToken() {
// Make sure that we have a token.
diff --git content/browser/frame_host/render_frame_host_impl.h content/browser/frame_host/render_frame_host_impl.h
index 1d1de6e..bd05959 100644
--- content/browser/frame_host/render_frame_host_impl.h
+++ content/browser/frame_host/render_frame_host_impl.h
@@ -801,8 +801,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params);
void OnHidePopup();
#endif
-#if defined(OS_ANDROID)
void OnNavigationHandledByEmbedder();
+#if defined(OS_ANDROID)
void ForwardGetInterfaceToRenderFrame(const std::string& interface_name,
mojo::ScopedMessagePipeHandle pipe);
#endif
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index bbbb37d..1fa30da 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -449,6 +449,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPlugins(
bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
IPC::Message* reply_msg) {
// Don't refresh if the specified threshold has not been passed. Note that
@@ -470,18 +471,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
PluginServiceImpl::GetInstance()->GetPlugins(
base::Bind(&RenderFrameMessageFilter::GetPluginsCallback, this, reply_msg,
- main_frame_origin));
+ is_main_frame, main_frame_origin));
}
void RenderFrameMessageFilter::GetPluginsCallback(
IPC::Message* reply_msg,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::vector<WebPluginInfo>& all_plugins) {
// Filter the plugin list.
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
std::vector<WebPluginInfo> plugins;
- int child_process_id = -1;
+ int child_process_id = render_process_id_;
int routing_id = MSG_ROUTING_NONE;
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -490,7 +492,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
resource_context_, main_frame_origin.GetURL(),
- main_frame_origin, &plugin)) {
+ is_main_frame, main_frame_origin, &plugin)) {
plugins.push_back(plugin);
}
}
@@ -502,6 +504,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -510,8 +513,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_, url,
- main_frame_origin, mime_type, allow_wildcard, nullptr, info,
- actual_mime_type);
+ is_main_frame, main_frame_origin, mime_type, allow_wildcard, nullptr,
+ info, actual_mime_type);
}
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
index 3f49cc4..c593146 100644
--- content/browser/frame_host/render_frame_message_filter.h
+++ content/browser/frame_host/render_frame_message_filter.h
@@ -124,13 +124,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
#if BUILDFLAG(ENABLE_PLUGINS)
void OnGetPlugins(bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
IPC::Message* reply_msg);
void GetPluginsCallback(IPC::Message* reply_msg,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::vector<WebPluginInfo>& plugins);
void OnGetPluginInfo(int render_frame_id,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
index 11adad4..283f116 100644
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
@@ -519,8 +519,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
WebPluginInfo plugin;
bool has_plugin = plugin_service_->GetPluginInfo(
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
- request()->url(), url::Origin(), response_->head.mime_type,
- allow_wildcard, &stale, &plugin, NULL);
+ request()->url(), info->IsMainFrame(), url::Origin(),
+ response_->head.mime_type, allow_wildcard, &stale, &plugin, NULL);
if (stale) {
// Refresh the plugins asynchronously.
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index 4bdfa1d..cf9b916 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -242,6 +242,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
int render_frame_id,
ResourceContext* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
@@ -258,7 +259,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
for (size_t i = 0; i < plugins.size(); ++i) {
if (!filter_ ||
filter_->IsPluginAvailable(render_process_id, render_frame_id, context,
- url, main_frame_origin, &plugins[i])) {
+ url, is_main_frame, main_frame_origin,
+ &plugins[i])) {
*info = plugins[i];
if (actual_mime_type)
*actual_mime_type = mime_types[i];
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
index 85b64da..e77f1bb 100644
--- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h
@@ -64,6 +64,7 @@ class CONTENT_EXPORT PluginServiceImpl
int render_frame_id,
ResourceContext* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 7077b9a..5fa68b1 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1298,8 +1298,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// Used to get the list of plugins. |main_frame_origin| is used to handle
// exceptions for plugin content settings.
-IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
+IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_GetPlugins,
bool /* refresh*/,
+ bool /* is_main_frame */,
url::Origin /* main_frame_origin */,
std::vector<content::WebPluginInfo> /* plugins */)
@@ -1307,9 +1308,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
-IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
+IPC_SYNC_MESSAGE_CONTROL5_3(FrameHostMsg_GetPluginInfo,
int /* render_frame_id */,
GURL /* url */,
+ bool /* is_main_frame */,
url::Origin /* main_frame_origin */,
std::string /* mime_type */,
bool /* found */,
@@ -1677,9 +1679,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
int /* nfr_request_id */,
float /* distance */)
+#endif
IPC_MESSAGE_ROUTED0(FrameHostMsg_NavigationHandledByEmbedder)
-#endif
// Adding a new message? Stick to the sort order above: first platform
// independent FrameMsg, then ifdefs for platform specific FrameMsg, then
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
index e9b8930..42e3aec 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
@@ -213,6 +213,7 @@ std::unique_ptr<blink::WebURLLoader> PpapiBlinkPlatformImpl::CreateURLLoader() {
void PpapiBlinkPlatformImpl::GetPluginList(
bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
NOTREACHED();
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.h content/ppapi_plugin/ppapi_blink_platform_impl.h
index 84d29a5..3541ff0 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.h
+++ content/ppapi_plugin/ppapi_blink_platform_impl.h
@@ -45,6 +45,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
blink::WebThemeEngine* ThemeEngine() override;
std::unique_ptr<blink::WebURLLoader> CreateURLLoader() override;
void GetPluginList(bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder*) override;
blink::WebData LoadResource(const char* name) override;
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
index ac05c13..762262b 100644
--- content/public/browser/plugin_service.h
+++ content/public/browser/plugin_service.h
@@ -74,6 +74,7 @@ class PluginService {
int render_frame_id,
ResourceContext* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/public/browser/plugin_service_filter.h content/public/browser/plugin_service_filter.h
index 3b610b1..7c439e0 100644
--- content/public/browser/plugin_service_filter.h
+++ content/public/browser/plugin_service_filter.h
@@ -33,6 +33,7 @@ class PluginServiceFilter {
int render_frame_id,
const void* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.cc content/public/renderer/content_renderer_client.cc
index 02565ee..de8fa6e 100644
--- content/public/renderer/content_renderer_client.cc
+++ content/public/renderer/content_renderer_client.cc
@@ -104,7 +104,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
-#if defined(OS_ANDROID)
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
@@ -117,6 +116,7 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
+#if defined(OS_ANDROID)
bool ContentRendererClient::ShouldUseMediaPlayerForURL(const GURL& url) {
return false;
}
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 0e554ba..8ac5c54 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -75,6 +75,9 @@ class CONTENT_EXPORT ContentRendererClient {
// Notifies us that the RenderThread has been created.
virtual void RenderThreadStarted() {}
+ // Notifies that the RenderThread can now send sync IPC messages.
+ virtual void RenderThreadConnected() {}
+
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -190,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
-#if defined(OS_ANDROID)
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
@@ -206,6 +208,7 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationPolicy default_policy,
bool is_redirect);
+#if defined(OS_ANDROID)
// Indicates if the Android MediaPlayer should be used instead of Chrome's
// built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index ebf4cd4..27a9df4 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -115,6 +115,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidObserveLoadingBehavior(
blink::WebLoadingBehaviorFlag behavior) {}
+ // Called when this frame gains focus.
+ virtual void FrameFocused() {}
+
// Called when the focused node has changed to |node|.
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index d1e9d50..ad7c36d7 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -2902,7 +2902,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
- routing_id_, params.url, frame_->Top()->GetSecurityOrigin(),
+ routing_id_, params.url, frame_->Parent() == nullptr,
+ frame_->Top()->GetSecurityOrigin(),
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -3390,6 +3391,8 @@ void RenderFrameImpl::FrameDetached(blink::WebLocalFrame* frame,
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
+ for (auto& observer : observers_)
+ observer.FrameFocused();
}
void RenderFrameImpl::WillCommitProvisionalLoad() {
@@ -5495,9 +5498,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
(!IsBrowserSideNavigationEnabled() ||
url != pending_navigation_params_->request_params.redirects[0]));
-#ifdef OS_ANDROID
- bool render_view_was_created_by_renderer =
- render_view_->was_created_by_renderer_;
+ // CEF doesn't use this value, so just pass false.
+ bool render_view_was_created_by_renderer = false;
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation(
@@ -5510,7 +5512,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
}
return blink::kWebNavigationPolicyIgnore;
}
-#endif
Referrer referrer(
RenderViewImpl::GetReferrerFromRequest(frame_, info.url_request));
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 116d31a8..ef645bb 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -754,6 +754,8 @@ void RenderThreadImpl::Init(
StartServiceManagerConnection();
+ GetContentClient()->renderer()->RenderThreadConnected();
+
field_trial_syncer_.InitFieldTrialObserving(
*base::CommandLine::ForCurrentProcess(), switches::kSingleProcess);
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index a540286..41b19d4 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -738,6 +738,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
void RendererBlinkPlatformImpl::GetPluginList(
bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
#if BUILDFLAG(ENABLE_PLUGINS)
@@ -745,7 +746,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
if (!plugin_refresh_allowed_)
refresh = false;
RenderThread::Get()->Send(
- new FrameHostMsg_GetPlugins(refresh, mainFrameOrigin, &plugins));
+ new FrameHostMsg_GetPlugins(refresh, isMainFrame, mainFrameOrigin,
+ &plugins));
for (const WebPluginInfo& plugin : plugins) {
builder->AddPlugin(WebString::FromUTF16(plugin.name),
WebString::FromUTF16(plugin.desc),
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index b931470..af3719a 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -124,6 +124,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
cc::FrameSinkId GenerateFrameSinkId() override;
void GetPluginList(bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) override;
blink::WebPublicSuffixList* PublicSuffixList() override;
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
index 3a48c59..d10ef64 100644
--- content/shell/browser/shell_plugin_service_filter.cc
+++ content/shell/browser/shell_plugin_service_filter.cc
@@ -18,6 +18,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable(
int render_frame_id,
const void* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
WebPluginInfo* plugin) {
return plugin->name == base::ASCIIToUTF16("Blink Test Plugin") ||
diff --git content/shell/browser/shell_plugin_service_filter.h content/shell/browser/shell_plugin_service_filter.h
index 7767a62..8a95377 100644
--- content/shell/browser/shell_plugin_service_filter.h
+++ content/shell/browser/shell_plugin_service_filter.h
@@ -21,6 +21,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter {
int render_frame_id,
const void* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
WebPluginInfo* plugin) override;
diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc
index 6746b9f..8634ada 100644
--- content/test/fake_plugin_service.cc
+++ content/test/fake_plugin_service.cc
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
int render_frame_id,
ResourceContext* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
index db23a83..57a4c536 100644
--- content/test/fake_plugin_service.h
+++ content/test/fake_plugin_service.h
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService {
int render_frame_id,
ResourceContext* context,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
index 7150daf..69fcc9e 100644
--- content/test/test_blink_web_unit_test_support.cc
+++ content/test/test_blink_web_unit_test_support.cc
@@ -289,6 +289,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
void TestBlinkWebUnitTestSupport::GetPluginList(
bool refresh,
+ bool is_main_frame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
builder->AddPlugin("pdf", "pdf", "pdf-files");
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
index 78b7d2c..62a52cb 100644
--- content/test/test_blink_web_unit_test_support.h
+++ content/test/test_blink_web_unit_test_support.h
@@ -68,6 +68,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
const blink::WebSize& size) override;
void GetPluginList(bool refresh,
+ bool is_main_frame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) override;