| 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..5bdadad5096d7611992a888bae1725873a7ae1eb 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)
|
|
|
| @@ -631,12 +632,13 @@ void ChromeResourceDispatcherHostDelegate::OnStreamCreated(
|
| std::map<net::URLRequest*, StreamTargetInfo>::iterator ix =
|
| stream_target_info_.find(request);
|
| CHECK(ix != stream_target_info_.end());
|
| + bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
|
| 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, embedded));
|
| stream_target_info_.erase(request);
|
| #endif
|
| }
|
|
|