content_1129_2015.patch 22.6 KB
Newer Older
1
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
2
index 502b3d3..c37efa9 100644
3
4
--- chrome/browser/download/download_target_determiner.cc
+++ chrome/browser/download/download_target_determiner.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
5
@@ -476,8 +476,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
   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
Gustavo Noronha's avatar
Gustavo Noronha committed
41
index 29d2d13..5c72963 100644
42
43
--- chrome/browser/plugins/plugin_info_message_filter.cc
+++ chrome/browser/plugins/plugin_info_message_filter.cc
44
@@ -451,8 +451,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
45
46
47
48
49
50
51
52
53
54
55
   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
56
index 0ce31db0..58c4633 100644
57
58
--- chrome/browser/ui/cocoa/drag_util.mm
+++ chrome/browser/ui/cocoa/drag_util.mm
59
@@ -54,7 +54,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) {
60
61
62
63
64
65
66
67
68
   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
Gustavo Noronha's avatar
Gustavo Noronha committed
69
index efc5b8b..0f39dc8 100644
70
71
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
72
@@ -586,6 +586,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
73
74
75
76
77
78
79
           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));
 }
80
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
81
index b86f81e..c4d39fb 100644
82
83
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
84
@@ -266,12 +266,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
85
86
87
88
89
90
91
92
93
94
95
96
97
 }
 
 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
Gustavo Noronha's avatar
Gustavo Noronha committed
98
index 88f071a..58533a7 100644
99
100
101
102
103
104
105
106
107
108
109
110
111
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -814,10 +814,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_ShowCreatedWindow, OnShowCreatedWindow)
   IPC_END_MESSAGE_MAP()
 
Gustavo Noronha's avatar
Gustavo Noronha committed
112
@@ -1242,6 +1240,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
113
114
115
116
117
118
119
   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);
Gustavo Noronha's avatar
Gustavo Noronha committed
120
@@ -2441,14 +2440,12 @@ void RenderFrameHostImpl::OnHidePopup() {
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
 }
 #endif
 
-#if defined(OS_ANDROID)
 void RenderFrameHostImpl::OnNavigationHandledByEmbedder() {
   if (navigation_handle_)
     navigation_handle_->set_net_error_code(net::ERR_ABORTED);
 
   OnDidStopLoading();
 }
-#endif
 
 void RenderFrameHostImpl::OnShowCreatedWindow(int pending_widget_routing_id,
                                               WindowOpenDisposition disposition,
diff --git content/browser/frame_host/render_frame_host_impl.h content/browser/frame_host/render_frame_host_impl.h
Gustavo Noronha's avatar
Gustavo Noronha committed
136
index c155890..1216213 100644
137
138
--- content/browser/frame_host/render_frame_host_impl.h
+++ content/browser/frame_host/render_frame_host_impl.h
Gustavo Noronha's avatar
Gustavo Noronha committed
139
@@ -787,8 +787,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
140
141
142
143
144
145
146
147
148
   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
149
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
150
index 35f7afc..280e3ae 100644
151
152
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
153
@@ -448,6 +448,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
154
155
156
157
158
159
160
 
 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
Gustavo Noronha's avatar
Gustavo Noronha committed
161
@@ -469,18 +470,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
 
   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.
Gustavo Noronha's avatar
Gustavo Noronha committed
183
@@ -489,7 +491,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
184
185
186
187
188
189
190
191
     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);
     }
   }
Gustavo Noronha's avatar
Gustavo Noronha committed
192
@@ -501,6 +503,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
193
194
195
196
197
198
199
 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,
Gustavo Noronha's avatar
Gustavo Noronha committed
200
@@ -509,8 +512,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
   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 05500b4..cd00c4c 100644
--- content/browser/frame_host/render_frame_message_filter.h
+++ content/browser/frame_host/render_frame_message_filter.h
@@ -125,13 +125,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
233
index 11adad4..283f116 100644
234
235
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
236
@@ -519,8 +519,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
   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 480c659..ec4d108 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -243,6 +243,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,
@@ -259,7 +260,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
270
index 9e7a5ef..ee721d0 100644
271
272
--- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h
273
@@ -70,6 +70,7 @@ class CONTENT_EXPORT PluginServiceImpl
274
275
276
277
278
279
280
281
                      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
Gustavo Noronha's avatar
Gustavo Noronha committed
282
index aebe975..19be16a 100644
283
284
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
Gustavo Noronha's avatar
Gustavo Noronha committed
285
@@ -1284,8 +1284,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
286
287
288
289
290
291
292
293
294
295
 
 // 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 */)
 
Gustavo Noronha's avatar
Gustavo Noronha committed
296
@@ -1293,9 +1294,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
297
298
299
300
301
302
303
304
305
306
307
 // 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 */,
Gustavo Noronha's avatar
Gustavo Noronha committed
308
@@ -1655,9 +1657,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
309
310
311
312
313
314
315
316
317
318
 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
319
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
320
index b13765a..d6ce568 100644
321
322
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
323
@@ -212,6 +212,7 @@ std::unique_ptr<blink::WebURLLoader> PpapiBlinkPlatformImpl::CreateURLLoader() {
324
 
325
 void PpapiBlinkPlatformImpl::GetPluginList(
326
327
328
329
330
331
     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
Gustavo Noronha's avatar
Gustavo Noronha committed
332
index 097b5eb..34e5937 100644
333
334
--- content/ppapi_plugin/ppapi_blink_platform_impl.h
+++ content/ppapi_plugin/ppapi_blink_platform_impl.h
335
336
@@ -45,6 +45,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
   blink::WebThemeEngine* ThemeEngine() override;
Gustavo Noronha's avatar
Gustavo Noronha committed
337
   std::unique_ptr<blink::WebURLLoader> CreateURLLoader() override;
338
   void GetPluginList(bool refresh,
339
340
341
+                     bool isMainFrame,
                      const blink::WebSecurityOrigin& mainFrameOrigin,
                      blink::WebPluginListBuilder*) override;
342
   blink::WebData LoadResource(const char* name) override;
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
index c404ac8..9dd87e7 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;
 
367
diff --git content/public/renderer/content_renderer_client.cc content/public/renderer/content_renderer_client.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
368
index 5d42160..8e2027e 100644
369
370
--- content/public/renderer/content_renderer_client.cc
+++ content/public/renderer/content_renderer_client.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
371
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
372
373
374
375
376
377
378
   return false;
 }
 
-#if defined(OS_ANDROID)
 bool ContentRendererClient::HandleNavigation(
     RenderFrame* render_frame,
     bool is_content_initiated,
Gustavo Noronha's avatar
Gustavo Noronha committed
379
@@ -111,6 +110,7 @@ bool ContentRendererClient::HandleNavigation(
380
381
382
383
384
385
386
387
   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
Gustavo Noronha's avatar
Gustavo Noronha committed
388
index 097e8c0..2e85b99 100644
389
390
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
Gustavo Noronha's avatar
Gustavo Noronha committed
391
@@ -195,7 +195,6 @@ class CONTENT_EXPORT ContentRendererClient {
392
393
394
395
396
397
398
   // 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
Gustavo Noronha's avatar
Gustavo Noronha committed
399
@@ -211,6 +210,7 @@ class CONTENT_EXPORT ContentRendererClient {
400
401
402
403
404
405
406
                                 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);
407
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
408
index f68037c..2b6155e 100644
409
410
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
411
@@ -2798,7 +2798,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
412
413
414
   std::string mime_type;
   bool found = false;
   Send(new FrameHostMsg_GetPluginInfo(
415
416
417
418
-      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));
419
420
   if (!found)
     return NULL;
Gustavo Noronha's avatar
Gustavo Noronha committed
421
@@ -5354,9 +5355,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
422
423
        (!IsBrowserSideNavigationEnabled() ||
         url != pending_navigation_params_->request_params.redirects[0]));
424
425
426
427
428
429
430
431
432
 
-#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(
Gustavo Noronha's avatar
Gustavo Noronha committed
433
@@ -5369,7 +5369,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
434
435
     }
     return blink::kWebNavigationPolicyIgnore;
436
437
438
439
   }
-#endif
 
   Referrer referrer(
440
       RenderViewImpl::GetReferrerFromRequest(frame_, info.url_request));
441
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
442
index 4f920ce..4cd548c 100644
443
444
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
Gustavo Noronha's avatar
Gustavo Noronha committed
445
@@ -736,6 +736,7 @@ blink::WebMIDIAccessor* RendererBlinkPlatformImpl::CreateMIDIAccessor(
446
 
447
 void RendererBlinkPlatformImpl::GetPluginList(
448
449
450
451
452
     bool refresh,
+    bool isMainFrame,
     const blink::WebSecurityOrigin& mainFrameOrigin,
     blink::WebPluginListBuilder* builder) {
 #if BUILDFLAG(ENABLE_PLUGINS)
Gustavo Noronha's avatar
Gustavo Noronha committed
453
@@ -743,7 +744,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
454
455
456
457
458
459
460
   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) {
461
462
     builder->AddPlugin(WebString::FromUTF16(plugin.name),
                        WebString::FromUTF16(plugin.desc),
463
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
Gustavo Noronha's avatar
Gustavo Noronha committed
464
index ff5ee76..f570e2a 100644
465
466
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
Gustavo Noronha's avatar
Gustavo Noronha committed
467
@@ -122,6 +122,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
468
   cc::FrameSinkId GenerateFrameSinkId() override;
469
 
470
   void GetPluginList(bool refresh,
471
472
473
+                     bool isMainFrame,
                      const blink::WebSecurityOrigin& mainFrameOrigin,
                      blink::WebPluginListBuilder* builder) override;
474
   blink::WebPublicSuffixList* PublicSuffixList() override;