mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Move the frame/handler association to CefResourceContext (see issue #2622).
A CefBrowserHostImpl is created using a CefRequestContextImpl that may have a CefRequestContextHandler. Multiple CefRequestContextImpl may share the same underlying CefBrowserContext which owns a CefResourceContext. IO-thread callbacks from Chromium are often associated with a CefResourceContext and the target frame is identified using render_process_id/render_frame_id routing IDs. This change forwards frame create/delete notifications from CefBrowserHostImpl (or CefMimeHandlerViewGuestDelegate) to CefResourceContext so that it can properly resolve the association from routing ID to Handler when queried from CefPluginServiceFilter::IsPluginAvailable. To test: Verify that all ceftests pass with NetworkService disabled.
This commit is contained in:
@ -94,7 +94,10 @@ bool CefPluginServiceFilter::IsPluginAvailable(
|
||||
return true;
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestContextHandler> handler = resource_context->GetHandler();
|
||||
// The |render_frame_id| value may not be valid, so allow matches with any
|
||||
// handler that shares the same |render_process_id| value.
|
||||
CefRefPtr<CefRequestContextHandler> handler =
|
||||
resource_context->GetHandler(render_process_id, render_frame_id, false);
|
||||
if (!handler) {
|
||||
// No handler so go with the default plugin load decision.
|
||||
return *status != chrome::mojom::PluginStatus::kDisabled;
|
||||
|
Reference in New Issue
Block a user