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

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

Issue 726343002: OOP PDF: Add whether a resource is embedded to StreamInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@embedded-pdfs
Patch Set: !streamDetails.embedded => 'full-frame' Created 6 years, 1 month 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 6188b5e7ae01d74f95374f8834e4f1b2f2131d99..eed60375cf9f56e87bb47a22eb3728149af5d82f 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -176,7 +176,8 @@ void SendExecuteMimeTypeHandlerEvent(scoped_ptr<content::StreamInfo> stream,
int render_process_id,
int render_view_id,
const std::string& extension_id,
- const std::string& view_id) {
+ const std::string& view_id,
+ bool embedded) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
content::WebContents* web_contents =
@@ -199,9 +200,9 @@ void SendExecuteMimeTypeHandlerEvent(scoped_ptr<content::StreamInfo> stream,
StreamsPrivateAPI* streams_private = StreamsPrivateAPI::Get(profile);
if (!streams_private)
return;
- streams_private->ExecuteMimeTypeHandler(
- extension_id, web_contents, stream.Pass(), view_id,
- expected_content_size);
+ streams_private->ExecuteMimeTypeHandler(extension_id, web_contents,
+ stream.Pass(), view_id,
+ expected_content_size, embedded);
}
#endif // !defined(ENABLE_EXTENSIONS)
@@ -634,9 +635,10 @@ void ChromeResourceDispatcherHostDelegate::OnStreamCreated(
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&SendExecuteMimeTypeHandlerEvent, base::Passed(&stream),
- request->GetExpectedContentSize(),
- info->GetChildID(), info->GetRouteID(),
- ix->second.extension_id, ix->second.view_id));
+ request->GetExpectedContentSize(), info->GetChildID(),
+ info->GetRouteID(), ix->second.extension_id,
+ ix->second.view_id,
+ info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME));
raymes 2014/11/17 04:09:38 nit: maybe just split this out into a separate sta
Sam McNally 2014/11/17 04:31:29 Done.
stream_target_info_.erase(request);
#endif
}
« no previous file with comments | « chrome/browser/extensions/api/streams_private/streams_private_api.cc ('k') | chrome/browser/resources/pdf/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698