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

Unified Diff: chrome/browser/extensions/api/streams_private/streams_private_api.cc

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes Created 6 years, 8 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/extensions/api/streams_private/streams_private_api.cc
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 66bf858d750fbf075e72c41c370d6664818f77e9..05763c7e64c8f4cc8230887295087a4e9cb7974a 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -61,13 +61,19 @@ void StreamsPrivateAPI::ExecuteMimeTypeHandler(
const std::string& extension_id,
const content::WebContents* web_contents,
scoped_ptr<content::StreamHandle> stream,
+ const std::string& view_id,
int64 expected_content_size) {
// Create the event's arguments value.
streams_private::StreamInfo info;
info.mime_type = stream->GetMimeType();
info.original_url = stream->GetOriginalURL().spec();
info.stream_url = stream->GetURL().spec();
- info.tab_id = ExtensionTabUtil::GetTabId(web_contents);
+
+ if (view_id.empty()) {
+ info.tab_id.reset(new int(ExtensionTabUtil::GetTabId(web_contents)));
not at google - send to devlin 2014/04/30 15:42:43 with regards to my previous comment, it's a little
Zachary Kuznia 2014/05/01 00:38:22 I'll go the route of always setting it.
+ } else {
+ info.view_id.reset(new std::string(view_id));
+ }
int size = -1;
if (expected_content_size <= INT_MAX)

Powered by Google App Engine
This is Rietveld 408576698