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

Issue 797183005: Add a mimeHandler extension API. (Closed)

Created:
5 years, 11 months ago by Sam McNally
Modified:
5 years, 11 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, arv+watch_chromium.org, chromium-apps-reviews_chromium.org, darin (slow to review), ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@streams-lifetime
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a mimeHandler extension API. This adds the mimeHandler extension API, which is a simplified version of the streamsPrivateApi. Unlike the streamsPrivateApi, mimeHandler only allows access to streams from RenderFrames within MimeHandlerViewGuests, and in particular only allows access to the stream being handled by that MimeHandlerViewGuest instance. This removes the need for an event to be dispatched to the background page and a user-exposed view_id. BUG=439867 Committed: https://crrev.com/c5eb526d0e15b28dbbbcaae87d82e022e413b20d Cr-Commit-Position: refs/heads/master@{#312728}

Patch Set 1 : #

Total comments: 32

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 5

Patch Set 4 : #

Total comments: 3

Patch Set 5 : rebase #

Patch Set 6 : mimeHandlerPrivate #

Patch Set 7 : Create a ChromeExtensionWebContentsObserver for MimeHandleViewGuests #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : rebase #

Patch Set 11 : #

Patch Set 12 : rebase #

Total comments: 8

Patch Set 13 : debug logspam #

Total comments: 2

Patch Set 14 : debug logspam 2 #

Patch Set 15 : debug logspam 3 #

Patch Set 16 : maybe fix tests #

Patch Set 17 : update more tests #

Total comments: 1

Patch Set 18 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+627 lines, -442 lines) Patch
M chrome/browser/extensions/api/streams_private/streams_private_api.h View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +18 lines, -62 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/plugin_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/component_extension_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -1 line 0 comments Download
D chrome/browser/resources/pdf/background.js View 1 chunk +0 lines, -63 lines 0 comments Download
M chrome/browser/resources/pdf/main.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +24 lines, -32 lines 0 comments Download
M chrome/browser/resources/pdf/manifest-common.json.unflattened View 1 2 3 1 chunk +1 line, -7 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/pdf/pdf_extension_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/_manifest_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -24 lines 0 comments Download
M chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/chrome_manifest_handlers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -15 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -8 lines 0 comments Download
D chrome/common/extensions/manifest_handlers/mime_types_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -68 lines 0 comments Download
D chrome/common/extensions/manifest_handlers/mime_types_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -117 lines 0 comments Download
M chrome/test/data/extensions/api_test/mime_handler_view/embedded.js View 1 2 3 4 5 13 14 15 1 chunk +81 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/mime_handler_view/manifest.json View 1 1 chunk +5 lines, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/mime_handler_view/testAbort.csv View 1 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/mime_handler_view/testBasic.csv View 1 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/mime_handler_view/testEmbedded.csv View 1 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/mime_handler_view/test_embedded.html View 1 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
A extensions/browser/api/mime_handler_private/mime_handler_private.h View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
A extensions/browser/api/mime_handler_private/mime_handler_private.cc View 1 2 3 4 5 1 chunk +95 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +7 lines, -1 line 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +14 lines, -1 line 0 comments Download
M extensions/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/api/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +18 lines, -2 lines 0 comments Download
M extensions/common/api/_api_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/common/api/_manifest_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +20 lines, -0 lines 0 comments Download
M extensions/common/api/api.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +22 lines, -0 lines 0 comments Download
A extensions/common/api/mime_handler.mojom View 1 1 chunk +40 lines, -0 lines 0 comments Download
A extensions/common/api/mime_handler_private.idl View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
M extensions/common/api/schemas.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/common_manifest_handlers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/common/constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +15 lines, -0 lines 0 comments Download
M extensions/common/constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +9 lines, -0 lines 0 comments Download
A + extensions/common/manifest_handlers/mime_types_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
A + extensions/common/manifest_handlers/mime_types_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -0 lines 0 comments Download
M extensions/extensions_resources.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/guest_view/mime_handler_view/mime_handler_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +30 lines, -9 lines 0 comments Download
M extensions/renderer/resources/binding.js View 1 chunk +8 lines, -4 lines 0 comments Download
M extensions/renderer/resources/extensions_renderer_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
A extensions/renderer/resources/mime_handler_private_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +75 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (13 generated)
Sam McNally
5 years, 11 months ago (2015-01-09 05:54:46 UTC) #6
raymes
https://codereview.chromium.org/797183005/diff/80001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (left): https://codereview.chromium.org/797183005/diff/80001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#oldcode126 chrome/browser/extensions/api/streams_private/streams_private_api.cc:126: streams_[extension_id][url] = make_linked_ptr(stream->handle.release()); I think we might need this. ...
5 years, 11 months ago (2015-01-12 05:26:05 UTC) #7
Sam McNally
https://codereview.chromium.org/797183005/diff/80001/chrome/browser/extensions/api/streams_private/streams_private_api.cc File chrome/browser/extensions/api/streams_private/streams_private_api.cc (left): https://codereview.chromium.org/797183005/diff/80001/chrome/browser/extensions/api/streams_private/streams_private_api.cc#oldcode126 chrome/browser/extensions/api/streams_private/streams_private_api.cc:126: streams_[extension_id][url] = make_linked_ptr(stream->handle.release()); On 2015/01/12 05:26:04, raymes wrote: > ...
5 years, 11 months ago (2015-01-12 07:13:35 UTC) #9
raymes
https://codereview.chromium.org/797183005/diff/80001/extensions/renderer/resources/mime_handler_custom_bindings.js File extensions/renderer/resources/mime_handler_custom_bindings.js (right): https://codereview.chromium.org/797183005/diff/80001/extensions/renderer/resources/mime_handler_custom_bindings.js#newcode27 extensions/renderer/resources/mime_handler_custom_bindings.js:27: var streamInfoPromise; Do we really need to store this ...
5 years, 11 months ago (2015-01-13 00:05:11 UTC) #10
Sam McNally
https://codereview.chromium.org/797183005/diff/80001/extensions/renderer/resources/mime_handler_custom_bindings.js File extensions/renderer/resources/mime_handler_custom_bindings.js (right): https://codereview.chromium.org/797183005/diff/80001/extensions/renderer/resources/mime_handler_custom_bindings.js#newcode27 extensions/renderer/resources/mime_handler_custom_bindings.js:27: var streamInfoPromise; On 2015/01/13 00:05:11, raymes wrote: > Do ...
5 years, 11 months ago (2015-01-13 05:30:09 UTC) #12
raymes
lgtm
5 years, 11 months ago (2015-01-13 06:28:50 UTC) #13
Sam McNally
+zork for chrome/browser/extensions/api/streams_private/ +benwells for extensions/ +thestig for chrome/browser/resources/component_extension_resources.grd
5 years, 11 months ago (2015-01-13 06:41:10 UTC) #15
Lei Zhang
On 2015/01/13 06:41:10, Sam McNally wrote: > +thestig for chrome/browser/resources/component_extension_resources.grd .grd lgtm
5 years, 11 months ago (2015-01-13 19:55:28 UTC) #16
Zachary Kuznia
https://codereview.chromium.org/797183005/diff/160001/chrome/common/extensions/api/_api_features.json File chrome/common/extensions/api/_api_features.json (right): https://codereview.chromium.org/797183005/diff/160001/chrome/common/extensions/api/_api_features.json#newcode521 chrome/common/extensions/api/_api_features.json:521: "dependencies": ["permission:streamsPrivate"], Is there a reason to reuse this ...
5 years, 11 months ago (2015-01-14 00:40:08 UTC) #17
Sam McNally
https://codereview.chromium.org/797183005/diff/160001/chrome/common/extensions/api/_api_features.json File chrome/common/extensions/api/_api_features.json (right): https://codereview.chromium.org/797183005/diff/160001/chrome/common/extensions/api/_api_features.json#newcode521 chrome/common/extensions/api/_api_features.json:521: "dependencies": ["permission:streamsPrivate"], On 2015/01/14 00:40:08, Zachary Kuznia wrote: > ...
5 years, 11 months ago (2015-01-14 01:48:49 UTC) #18
benwells
https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl File extensions/common/api/mime_handler.idl (right): https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl#newcode6 extensions/common/api/mime_handler.idl:6: [nodoc] namespace mimeHandler { Is this meant to be ...
5 years, 11 months ago (2015-01-14 04:21:07 UTC) #19
Sam McNally
https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl File extensions/common/api/mime_handler.idl (right): https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl#newcode6 extensions/common/api/mime_handler.idl:6: [nodoc] namespace mimeHandler { On 2015/01/14 04:21:07, benwells wrote: ...
5 years, 11 months ago (2015-01-14 05:53:15 UTC) #20
benwells
On 2015/01/14 05:53:15, Sam McNally wrote: > https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl > File extensions/common/api/mime_handler.idl (right): > > https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl#newcode6 ...
5 years, 11 months ago (2015-01-14 06:31:28 UTC) #21
Zachary Kuznia
On 2015/01/14 06:31:28, benwells wrote: > On 2015/01/14 05:53:15, Sam McNally wrote: > > > ...
5 years, 11 months ago (2015-01-15 00:14:59 UTC) #22
Zachary Kuznia
lgtm
5 years, 11 months ago (2015-01-15 00:17:33 UTC) #23
Sam McNally
https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl File extensions/common/api/mime_handler.idl (right): https://codereview.chromium.org/797183005/diff/180001/extensions/common/api/mime_handler.idl#newcode6 extensions/common/api/mime_handler.idl:6: [nodoc] namespace mimeHandler { On 2015/01/14 05:53:15, Sam McNally ...
5 years, 11 months ago (2015-01-15 05:40:16 UTC) #25
benwells
This CL is kind of special. It is creating and enabling the first mojo based ...
5 years, 11 months ago (2015-01-19 01:05:19 UTC) #26
benwells
For kalman / rockot's benefit: this API is just for the PDF viewer currently, and ...
5 years, 11 months ago (2015-01-19 01:08:37 UTC) #27
Sam McNally
https://codereview.chromium.org/797183005/diff/360001/extensions/common/api/mime_handler_private.idl File extensions/common/api/mime_handler_private.idl (right): https://codereview.chromium.org/797183005/diff/360001/extensions/common/api/mime_handler_private.idl#newcode19 extensions/common/api/mime_handler_private.idl:19: long tabId; On 2015/01/19 01:05:19, benwells wrote: > Are ...
5 years, 11 months ago (2015-01-19 04:29:57 UTC) #28
benwells
lgtm BUT +kalman and +rockot for their opinions on shipping our first mojo based API. ...
5 years, 11 months ago (2015-01-19 04:56:54 UTC) #30
Ken Rockot(use gerrit already)
heck yeah, lgtm https://codereview.chromium.org/797183005/diff/460001/extensions/common/api/mime_handler_private.idl File extensions/common/api/mime_handler_private.idl (right): https://codereview.chromium.org/797183005/diff/460001/extensions/common/api/mime_handler_private.idl#newcode19 extensions/common/api/mime_handler_private.idl:19: long tabId; I'm pretty wary of ...
5 years, 11 months ago (2015-01-20 00:16:12 UTC) #31
not at google - send to devlin
If the question is "what do you think of a mojo based API" then my ...
5 years, 11 months ago (2015-01-20 18:34:09 UTC) #32
benwells
On 2015/01/20 18:34:09, kalman wrote: > If the question is "what do you think of ...
5 years, 11 months ago (2015-01-21 03:20:53 UTC) #33
not at google - send to devlin
Ok cool. Yes mojo APIs sound good in theory. My one question: how much of ...
5 years, 11 months ago (2015-01-21 19:13:27 UTC) #34
raymes
Hey Ben! We're definitely aware of the custom bindings issue (that came up as a ...
5 years, 11 months ago (2015-01-22 05:01:50 UTC) #35
Ken Rockot(use gerrit already)
Oh, yeah. I started writing a response and it got lost in the land of ...
5 years, 11 months ago (2015-01-22 05:31:10 UTC) #36
benwells
On 2015/01/22 05:31:10, Ken Rockot wrote: > Oh, yeah. I started writing a response and ...
5 years, 11 months ago (2015-01-22 05:36:18 UTC) #37
not at google - send to devlin
Oh, I certainly don't want to block this CL on figuring out an automated (or ...
5 years, 11 months ago (2015-01-22 15:21:58 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/797183005/480001
5 years, 11 months ago (2015-01-22 22:25:01 UTC) #40
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
5 years, 11 months ago (2015-01-23 00:28:20 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/797183005/480001
5 years, 11 months ago (2015-01-23 00:32:33 UTC) #44
commit-bot: I haz the power
Committed patchset #18 (id:480001)
5 years, 11 months ago (2015-01-23 01:22:26 UTC) #45
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 01:23:54 UTC) #46
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/c5eb526d0e15b28dbbbcaae87d82e022e413b20d
Cr-Commit-Position: refs/heads/master@{#312728}

Powered by Google App Engine
This is Rietveld 408576698