mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			438 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			438 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
 | 
						|
index c07ba782b810..7ae3ab09a15a 100644
 | 
						|
--- chrome/browser/download/download_target_determiner.cc
 | 
						|
+++ chrome/browser/download/download_target_determiner.cc
 | 
						|
@@ -639,7 +639,7 @@ void IsHandledBySafePlugin(int render_process_id,
 | 
						|
   content::PluginService* plugin_service =
 | 
						|
       content::PluginService::GetInstance();
 | 
						|
   bool plugin_found = plugin_service->GetPluginInfo(
 | 
						|
-      render_process_id, routing_id, url, url::Origin(), mime_type, false,
 | 
						|
+      render_process_id, routing_id, 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
 | 
						|
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
 | 
						|
index e46003ea5e4a..503876cf7725 100644
 | 
						|
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
 | 
						|
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
 | 
						|
@@ -163,6 +163,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
 | 
						|
     int render_process_id,
 | 
						|
     int render_frame_id,
 | 
						|
     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 937d3d5bc84f..ac327392dcf3 100644
 | 
						|
--- chrome/browser/plugins/chrome_plugin_service_filter.h
 | 
						|
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
 | 
						|
@@ -64,6 +64,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
 | 
						|
   bool IsPluginAvailable(int render_process_id,
 | 
						|
                          int render_frame_id,
 | 
						|
                          const GURL& plugin_content_url,
 | 
						|
+                         bool is_main_frame,
 | 
						|
                          const url::Origin& main_frame_origin,
 | 
						|
                          content::WebPluginInfo* plugin) override;
 | 
						|
 
 | 
						|
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
 | 
						|
index 8d7b5276955d..787f338e7ca6 100644
 | 
						|
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
 | 
						|
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
 | 
						|
@@ -68,7 +68,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle,
 | 
						|
 
 | 
						|
   content::WebPluginInfo plugin_info;
 | 
						|
   return content::PluginService::GetInstance()->GetPluginInfo(
 | 
						|
-      process_id, routing_id, navigation_handle->GetURL(),
 | 
						|
+      process_id, routing_id, navigation_handle->GetURL(), false,
 | 
						|
       web_contents->GetMainFrame()->GetLastCommittedOrigin(), kPDFMimeType,
 | 
						|
       false /* allow_wildcard */, is_stale, &plugin_info,
 | 
						|
       nullptr /* actual_mime_type */);
 | 
						|
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc
 | 
						|
index e622e8099e95..2b08fc4e3727 100644
 | 
						|
--- chrome/browser/ui/views/frame/browser_root_view.cc
 | 
						|
+++ chrome/browser/ui/views/frame/browser_root_view.cc
 | 
						|
@@ -75,7 +75,7 @@ void OnFindURLMimeType(const GURL& url,
 | 
						|
 #if BUILDFLAG(ENABLE_PLUGINS)
 | 
						|
   content::WebPluginInfo plugin;
 | 
						|
   result = result || content::PluginService::GetInstance()->GetPluginInfo(
 | 
						|
-                         process_id, routing_id, url, url::Origin(), mime_type,
 | 
						|
+                         process_id, routing_id, url, true, url::Origin(), mime_type,
 | 
						|
                          false, nullptr, &plugin, nullptr);
 | 
						|
 #endif
 | 
						|
 
 | 
						|
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
 | 
						|
index 6518a57a5f16..e88984c8150c 100644
 | 
						|
--- content/browser/devtools/devtools_http_handler.cc
 | 
						|
+++ content/browser/devtools/devtools_http_handler.cc
 | 
						|
@@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest(
 | 
						|
     version.SetString("Protocol-Version",
 | 
						|
                       DevToolsAgentHost::GetProtocolVersion());
 | 
						|
     version.SetString("WebKit-Version", GetWebKitVersion());
 | 
						|
-    version.SetString("Browser", GetContentClient()->browser()->GetProduct());
 | 
						|
+    version.SetString("Browser", GetContentClient()->browser()->GetChromeProduct());
 | 
						|
     version.SetString("User-Agent",
 | 
						|
                       GetContentClient()->browser()->GetUserAgent());
 | 
						|
     version.SetString("V8-Version", V8_VERSION_STRING);
 | 
						|
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
 | 
						|
index c80e4075de69..7bc702749974 100644
 | 
						|
--- content/browser/frame_host/render_frame_message_filter.cc
 | 
						|
+++ content/browser/frame_host/render_frame_message_filter.cc
 | 
						|
@@ -308,6 +308,7 @@ void RenderFrameMessageFilter::OnAre3DAPIsBlocked(int render_frame_id,
 | 
						|
 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,
 | 
						|
@@ -315,8 +316,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
 | 
						|
     std::string* actual_mime_type) {
 | 
						|
   bool allow_wildcard = true;
 | 
						|
   *found = plugin_service_->GetPluginInfo(
 | 
						|
-      render_process_id_, render_frame_id, url, main_frame_origin, mime_type,
 | 
						|
-      allow_wildcard, nullptr, info, actual_mime_type);
 | 
						|
+      render_process_id_, render_frame_id, url, 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 9ce9487ef40c..78421b32149c 100644
 | 
						|
--- content/browser/frame_host/render_frame_message_filter.h
 | 
						|
+++ content/browser/frame_host/render_frame_message_filter.h
 | 
						|
@@ -90,6 +90,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
 | 
						|
 #if BUILDFLAG(ENABLE_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/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
 | 
						|
index 7f322176a102..9301825b8b59 100644
 | 
						|
--- content/browser/loader/navigation_url_loader_impl.cc
 | 
						|
+++ content/browser/loader/navigation_url_loader_impl.cc
 | 
						|
@@ -716,6 +716,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
 | 
						|
             resource_request_->has_user_gesture,
 | 
						|
             resource_request_->request_initiator, &loader_factory);
 | 
						|
 
 | 
						|
+        if (!handled) {
 | 
						|
+          handled = GetContentClient()->browser()->HandleExternalProtocol(
 | 
						|
+              web_contents_getter_, frame_tree_node_id_,
 | 
						|
+              navigation_ui_data_.get(), *resource_request_,
 | 
						|
+              &loader_factory);
 | 
						|
+        }
 | 
						|
+
 | 
						|
         if (loader_factory) {
 | 
						|
           factory =
 | 
						|
               base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
 | 
						|
@@ -924,7 +931,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
 | 
						|
         frame_tree_node->current_frame_host()->GetProcess()->GetID();
 | 
						|
     int routing_id = frame_tree_node->current_frame_host()->GetRoutingID();
 | 
						|
     bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
 | 
						|
-        render_process_id, routing_id, resource_request_->url, url::Origin(),
 | 
						|
+        render_process_id, routing_id, resource_request_->url, true, url::Origin(),
 | 
						|
         head->mime_type, false /* allow_wildcard */, &stale, &plugin, nullptr);
 | 
						|
 
 | 
						|
     if (stale) {
 | 
						|
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
 | 
						|
index 848431a0cad6..9001ad4c9e68 100644
 | 
						|
--- content/browser/plugin_service_impl.cc
 | 
						|
+++ content/browser/plugin_service_impl.cc
 | 
						|
@@ -311,6 +311,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
 | 
						|
 bool PluginServiceImpl::GetPluginInfo(int render_process_id,
 | 
						|
                                       int render_frame_id,
 | 
						|
                                       const GURL& url,
 | 
						|
+                                      bool is_main_frame,
 | 
						|
                                       const url::Origin& main_frame_origin,
 | 
						|
                                       const std::string& mime_type,
 | 
						|
                                       bool allow_wildcard,
 | 
						|
@@ -328,7 +329,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, url,
 | 
						|
-                                   main_frame_origin, &plugins[i])) {
 | 
						|
+                                   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 79ac3b705511..71d73d3da158 100644
 | 
						|
--- content/browser/plugin_service_impl.h
 | 
						|
+++ content/browser/plugin_service_impl.h
 | 
						|
@@ -54,6 +54,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
 | 
						|
   bool GetPluginInfo(int render_process_id,
 | 
						|
                      int render_frame_id,
 | 
						|
                      const GURL& url,
 | 
						|
+                     bool is_main_frame,
 | 
						|
                      const url::Origin& main_frame_origin,
 | 
						|
                      const std::string& mime_type,
 | 
						|
                      bool allow_wildcard,
 | 
						|
diff --git content/browser/renderer_host/plugin_registry_impl.cc content/browser/renderer_host/plugin_registry_impl.cc
 | 
						|
index a6d6188fb139..7ac57de6fd55 100644
 | 
						|
--- content/browser/renderer_host/plugin_registry_impl.cc
 | 
						|
+++ content/browser/renderer_host/plugin_registry_impl.cc
 | 
						|
@@ -29,6 +29,7 @@ void PluginRegistryImpl::Bind(
 | 
						|
 }
 | 
						|
 
 | 
						|
 void PluginRegistryImpl::GetPlugins(bool refresh,
 | 
						|
+                                    bool is_main_frame,
 | 
						|
                                     const url::Origin& main_frame_origin,
 | 
						|
                                     GetPluginsCallback callback) {
 | 
						|
   auto* plugin_service = PluginServiceImpl::GetInstance();
 | 
						|
@@ -50,10 +51,11 @@ void PluginRegistryImpl::GetPlugins(bool refresh,
 | 
						|
 
 | 
						|
   plugin_service->GetPlugins(base::BindOnce(
 | 
						|
       &PluginRegistryImpl::GetPluginsComplete, weak_factory_.GetWeakPtr(),
 | 
						|
-      main_frame_origin, std::move(callback)));
 | 
						|
+      is_main_frame, main_frame_origin, std::move(callback)));
 | 
						|
 }
 | 
						|
 
 | 
						|
 void PluginRegistryImpl::GetPluginsComplete(
 | 
						|
+    bool is_main_frame,
 | 
						|
     const url::Origin& main_frame_origin,
 | 
						|
     GetPluginsCallback callback,
 | 
						|
     const std::vector<WebPluginInfo>& all_plugins) {
 | 
						|
@@ -76,6 +78,7 @@ void PluginRegistryImpl::GetPluginsComplete(
 | 
						|
     // TODO(crbug.com/621724): Pass an url::Origin instead of a GURL.
 | 
						|
     if (!filter || filter->IsPluginAvailable(render_process_id_, routing_id,
 | 
						|
                                              main_frame_origin.GetURL(),
 | 
						|
+                                             is_main_frame,
 | 
						|
                                              main_frame_origin, &plugin)) {
 | 
						|
       auto plugin_blink = blink::mojom::PluginInfo::New();
 | 
						|
       plugin_blink->name = plugin.name;
 | 
						|
diff --git content/browser/renderer_host/plugin_registry_impl.h content/browser/renderer_host/plugin_registry_impl.h
 | 
						|
index 632ae86c6fd6..55b749ec1242 100644
 | 
						|
--- content/browser/renderer_host/plugin_registry_impl.h
 | 
						|
+++ content/browser/renderer_host/plugin_registry_impl.h
 | 
						|
@@ -24,11 +24,13 @@ class PluginRegistryImpl : public blink::mojom::PluginRegistry {
 | 
						|
 
 | 
						|
   // blink::mojom::PluginRegistry
 | 
						|
   void GetPlugins(bool refresh,
 | 
						|
+                  bool is_main_frame,
 | 
						|
                   const url::Origin& main_frame_origin,
 | 
						|
                   GetPluginsCallback callback) override;
 | 
						|
 
 | 
						|
  private:
 | 
						|
-  void GetPluginsComplete(const url::Origin& main_frame_origin,
 | 
						|
+  void GetPluginsComplete(bool is_main_frame,
 | 
						|
+                          const url::Origin& main_frame_origin,
 | 
						|
                           GetPluginsCallback callback,
 | 
						|
                           const std::vector<WebPluginInfo>& all_plugins);
 | 
						|
 
 | 
						|
diff --git content/common/frame_messages.h content/common/frame_messages.h
 | 
						|
index 4a4085021a61..d822c9c99e06 100644
 | 
						|
--- content/common/frame_messages.h
 | 
						|
+++ content/common/frame_messages.h
 | 
						|
@@ -825,9 +825,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
 | 
						|
 // 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 */,
 | 
						|
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
 | 
						|
index 51f31b2c7e43..85faf2c0486b 100644
 | 
						|
--- content/public/browser/content_browser_client.h
 | 
						|
+++ content/public/browser/content_browser_client.h
 | 
						|
@@ -26,6 +26,7 @@
 | 
						|
 #include "content/common/content_export.h"
 | 
						|
 #include "content/public/browser/certificate_request_result_type.h"
 | 
						|
 #include "content/public/browser/generated_code_cache_settings.h"
 | 
						|
+#include "content/public/browser/web_contents.h"
 | 
						|
 #include "content/public/common/page_visibility_state.h"
 | 
						|
 #include "content/public/common/previews_state.h"
 | 
						|
 #include "content/public/common/window_container_type.mojom-forward.h"
 | 
						|
@@ -1626,6 +1627,14 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
						|
       const base::Optional<url::Origin>& initiating_origin,
 | 
						|
       mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
 | 
						|
 
 | 
						|
+  // Same as above, but exposing the whole ResourceRequest object.
 | 
						|
+  virtual bool HandleExternalProtocol(
 | 
						|
+      WebContents::Getter web_contents_getter,
 | 
						|
+      int frame_tree_node_id,
 | 
						|
+      NavigationUIData* navigation_data,
 | 
						|
+      const network::ResourceRequest& request,
 | 
						|
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) { return false; }
 | 
						|
+
 | 
						|
   // Creates an OverlayWindow to be used for Picture-in-Picture. This window
 | 
						|
   // will house the content shown when in Picture-in-Picture mode. This will
 | 
						|
   // return a new OverlayWindow.
 | 
						|
@@ -1689,6 +1698,10 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
						|
   // Used as part of the user agent string.
 | 
						|
   virtual std::string GetProduct();
 | 
						|
 
 | 
						|
+  // Returns the Chrome-specific product string. This is used for compatibility
 | 
						|
+  // purposes with external tools like Selenium.
 | 
						|
+  virtual std::string GetChromeProduct() { return GetProduct(); }
 | 
						|
+
 | 
						|
   // Returns the user agent.  Content may cache this value.
 | 
						|
   virtual std::string GetUserAgent();
 | 
						|
 
 | 
						|
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
 | 
						|
index dcfd3ff37186..4e822ee5f750 100644
 | 
						|
--- content/public/browser/plugin_service.h
 | 
						|
+++ content/public/browser/plugin_service.h
 | 
						|
@@ -74,6 +74,7 @@ class CONTENT_EXPORT PluginService {
 | 
						|
   virtual bool GetPluginInfo(int render_process_id,
 | 
						|
                              int render_frame_id,
 | 
						|
                              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 98c59005599e..69752184745d 100644
 | 
						|
--- content/public/browser/plugin_service_filter.h
 | 
						|
+++ content/public/browser/plugin_service_filter.h
 | 
						|
@@ -32,6 +32,7 @@ class PluginServiceFilter {
 | 
						|
   virtual bool IsPluginAvailable(int render_process_id,
 | 
						|
                                  int render_frame_id,
 | 
						|
                                  const GURL& url,
 | 
						|
+                                 bool is_main_frame,
 | 
						|
                                  const url::Origin& main_frame_origin,
 | 
						|
                                  WebPluginInfo* plugin) = 0;
 | 
						|
 
 | 
						|
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
 | 
						|
index 87df60c52d1e..c3841a7845dd 100644
 | 
						|
--- content/public/renderer/content_renderer_client.h
 | 
						|
+++ content/public/renderer/content_renderer_client.h
 | 
						|
@@ -80,6 +80,9 @@ class CONTENT_EXPORT ContentRendererClient {
 | 
						|
   // binding requests from RenderProcessHost::BindReceiver().
 | 
						|
   virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {}
 | 
						|
 
 | 
						|
+  // 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) {}
 | 
						|
 
 | 
						|
@@ -321,6 +324,10 @@ class CONTENT_EXPORT ContentRendererClient {
 | 
						|
   // This method may invalidate the frame.
 | 
						|
   virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
 | 
						|
 
 | 
						|
+  // Notifies that a DevTools agent has attached or detached.
 | 
						|
+  virtual void DevToolsAgentAttached() {}
 | 
						|
+  virtual void DevToolsAgentDetached() {}
 | 
						|
+
 | 
						|
   // Allows subclasses to enable some runtime features before Blink has
 | 
						|
   // started.
 | 
						|
   virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
 | 
						|
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
 | 
						|
index 3f3f5da903d4..00af07f80d4c 100644
 | 
						|
--- content/renderer/render_frame_impl.cc
 | 
						|
+++ content/renderer/render_frame_impl.cc
 | 
						|
@@ -3798,7 +3798,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;
 | 
						|
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
 | 
						|
index ae1a77a219f1..f91dd6477bf3 100644
 | 
						|
--- content/renderer/render_thread_impl.cc
 | 
						|
+++ content/renderer/render_thread_impl.cc
 | 
						|
@@ -620,6 +620,8 @@ void RenderThreadImpl::Init() {
 | 
						|
       GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
 | 
						|
           URLLoaderThrottleProviderType::kFrame);
 | 
						|
 
 | 
						|
+  GetContentClient()->renderer()->RenderThreadConnected();
 | 
						|
+
 | 
						|
   GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
 | 
						|
       &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
 | 
						|
 
 | 
						|
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
 | 
						|
index 58c1b0e78a66..e8efa7277f33 100644
 | 
						|
--- content/renderer/renderer_blink_platform_impl.cc
 | 
						|
+++ content/renderer/renderer_blink_platform_impl.cc
 | 
						|
@@ -914,6 +914,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() {
 | 
						|
 
 | 
						|
 //------------------------------------------------------------------------------
 | 
						|
 
 | 
						|
+void RendererBlinkPlatformImpl::DevToolsAgentAttached() {
 | 
						|
+  GetContentClient()->renderer()->DevToolsAgentAttached();
 | 
						|
+}
 | 
						|
+void RendererBlinkPlatformImpl::DevToolsAgentDetached() {
 | 
						|
+  GetContentClient()->renderer()->DevToolsAgentDetached();
 | 
						|
+}
 | 
						|
+
 | 
						|
+//------------------------------------------------------------------------------
 | 
						|
+
 | 
						|
 blink::mojom::CodeCacheHost& RendererBlinkPlatformImpl::GetCodeCacheHost() {
 | 
						|
   if (!code_cache_host_) {
 | 
						|
     code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
 | 
						|
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
 | 
						|
index 096cd162c7d5..c409b6eb08ca 100644
 | 
						|
--- content/renderer/renderer_blink_platform_impl.h
 | 
						|
+++ content/renderer/renderer_blink_platform_impl.h
 | 
						|
@@ -197,6 +197,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
 | 
						|
 
 | 
						|
   media::GpuVideoAcceleratorFactories* GetGpuFactories() override;
 | 
						|
 
 | 
						|
+  void DevToolsAgentAttached() override;
 | 
						|
+  void DevToolsAgentDetached() override;
 | 
						|
+
 | 
						|
   // Returns non-null.
 | 
						|
   // It is invalid to call this in an incomplete env where
 | 
						|
   // RenderThreadImpl::current() returns nullptr (e.g. in some tests).
 | 
						|
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
 | 
						|
index 427132c6920e..4809ddaf21e1 100644
 | 
						|
--- content/shell/browser/shell_plugin_service_filter.cc
 | 
						|
+++ content/shell/browser/shell_plugin_service_filter.cc
 | 
						|
@@ -17,6 +17,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable(
 | 
						|
     int render_process_id,
 | 
						|
     int render_frame_id,
 | 
						|
     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 337b4b0653fe..107ab4c9d8a8 100644
 | 
						|
--- content/shell/browser/shell_plugin_service_filter.h
 | 
						|
+++ content/shell/browser/shell_plugin_service_filter.h
 | 
						|
@@ -20,6 +20,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter {
 | 
						|
   bool IsPluginAvailable(int render_process_id,
 | 
						|
                          int render_frame_id,
 | 
						|
                          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 eb280cd21c6d..b499b2536b2d 100644
 | 
						|
--- content/test/fake_plugin_service.cc
 | 
						|
+++ content/test/fake_plugin_service.cc
 | 
						|
@@ -28,6 +28,7 @@ bool FakePluginService::GetPluginInfoArray(
 | 
						|
 bool FakePluginService::GetPluginInfo(int render_process_id,
 | 
						|
                                       int render_frame_id,
 | 
						|
                                       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 df49da7cbec0..edf526fff7f8 100644
 | 
						|
--- content/test/fake_plugin_service.h
 | 
						|
+++ content/test/fake_plugin_service.h
 | 
						|
@@ -29,6 +29,7 @@ class FakePluginService : public PluginService {
 | 
						|
   bool GetPluginInfo(int render_process_id,
 | 
						|
                      int render_frame_id,
 | 
						|
                      const GURL& url,
 | 
						|
+                     bool is_main_frame,
 | 
						|
                      const url::Origin& main_frame_origin,
 | 
						|
                      const std::string& mime_type,
 | 
						|
                      bool allow_wildcard,
 |