Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 2331343005: PlzNavigate: Get StreamPrivate API to work. (Closed)
Patch Set: Remove include file Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index bc8d974c05a46b49907bab0b74e34a4ce9f95984..88850493d2f77369a5a4c2fb0eb90a1f88c72cee 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -181,15 +181,13 @@ void UpdatePrerenderNetworkBytesCallback(content::WebContents* web_contents,
void SendExecuteMimeTypeHandlerEvent(
std::unique_ptr<content::StreamInfo> stream,
int64_t expected_content_size,
- int render_process_id,
- int render_frame_id,
const std::string& extension_id,
const std::string& view_id,
- bool embedded) {
+ bool embedded,
+ const ResourceRequestInfo::WebContentsGetter& web_contents_getter) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- content::WebContents* web_contents =
- tab_util::GetWebContentsByFrameID(render_process_id, render_frame_id);
+ content::WebContents* web_contents = web_contents_getter.Run();
if (!web_contents)
return;
@@ -208,9 +206,9 @@ void SendExecuteMimeTypeHandlerEvent(
StreamsPrivateAPI* streams_private = StreamsPrivateAPI::Get(profile);
if (!streams_private)
return;
- streams_private->ExecuteMimeTypeHandler(
- extension_id, web_contents, std::move(stream), view_id,
- expected_content_size, embedded, render_process_id, render_frame_id);
+ streams_private->ExecuteMimeTypeHandler(extension_id, web_contents,
+ std::move(stream), view_id,
+ expected_content_size, embedded);
}
#endif // !defined(ENABLE_EXTENSIONS)
@@ -722,9 +720,9 @@ void ChromeResourceDispatcherHostDelegate::OnStreamCreated(
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&SendExecuteMimeTypeHandlerEvent, base::Passed(&stream),
- request->GetExpectedContentSize(), info->GetChildID(),
- info->GetRenderFrameID(), ix->second.extension_id,
- ix->second.view_id, embedded));
+ request->GetExpectedContentSize(), ix->second.extension_id,
+ ix->second.view_id, embedded,
+ info->GetWebContentsGetterForRequest()));
stream_target_info_.erase(request);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698