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

Issue 9651020: Pass content-type resources to web intents. Goes through download, then invokes the p… (Closed)

Created:
8 years, 9 months ago by Greg Billock
Modified:
8 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, benwells
Visibility:
Public.

Description

Pass content-type resources to web intents. Goes through download, then invokes the picker. Code to handle policy and intent payload creation is embedder-side. New API for dispatching the browser-initiated internal intent added to content. BUG=105732 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131535

Patch Set 1 #

Patch Set 2 : Add ability to send unserialized intent data from browser process. #

Total comments: 14

Patch Set 3 : Move dispatch logic client-side. #

Total comments: 5

Patch Set 4 : Internal dispatcher checked in. #

Patch Set 5 : Take out policy changes #

Patch Set 6 : Add security policy hole-punch for blob file. #

Patch Set 7 : Move code embedder-side #

Total comments: 4

Patch Set 8 : Move to an internal Create method. #

Total comments: 11

Patch Set 9 : Move static method location #

Total comments: 4

Patch Set 10 : Add TODO. #

Patch Set 11 : Improve security policy invocation #

Patch Set 12 : Fix string handling for getExtra. #

Patch Set 13 : Move Create method to impl cc file #

Total comments: 8

Patch Set 14 : Rebase to head #

Total comments: 2

Patch Set 15 : Pass FilePath #

Total comments: 2

Patch Set 16 : Remove includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -34 lines) Patch
M chrome/browser/download/chrome_download_manager_delegate.h View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +52 lines, -17 lines 0 comments Download
M content/browser/intents/intent_injector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/intents/web_intents_dispatcher_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -0 lines 0 comments Download
M content/common/intents_messages.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_intents_dispatcher.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/web_intents_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +46 lines, -12 lines 0 comments Download
M webkit/glue/web_intent_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +20 lines, -4 lines 0 comments Download
M webkit/glue/web_intent_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +15 lines, -1 line 0 comments Download

Messages

Total messages: 44 (0 generated)
Greg Billock
This code now works for a main use case, but needs some discussion. Mechanically, I'm ...
8 years, 9 months ago (2012-03-10 00:18:30 UTC) #1
darin (slow to review)
http://codereview.chromium.org/9651020/diff/2001/content/browser/renderer_host/buffered_resource_handler.cc File content/browser/renderer_host/buffered_resource_handler.cc (right): http://codereview.chromium.org/9651020/diff/2001/content/browser/renderer_host/buffered_resource_handler.cc#newcode186 content/browser/renderer_host/buffered_resource_handler.cc:186: /* are these comments intended?
8 years, 9 months ago (2012-03-10 01:02:13 UTC) #2
michaeln
I'm mostly just looking at the blob handling aspects of this. The closest example of ...
8 years, 9 months ago (2012-03-12 21:16:12 UTC) #3
Greg Billock
https://chromiumcodereview.appspot.com/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://chromiumcodereview.appspot.com/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode98 chrome/browser/download/chrome_download_manager_delegate.cc:98: // TODO: Check for explicit user-caused download? Yes, it ...
8 years, 9 months ago (2012-03-13 17:56:10 UTC) #4
jam
http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode93 chrome/browser/download/chrome_download_manager_delegate.cc:93: bool ChromeDownloadManagerDelegate::ShouldWebIntentsHandle( why is this stuff in chrome vs ...
8 years, 9 months ago (2012-03-13 20:05:01 UTC) #5
Greg Billock
http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode93 chrome/browser/download/chrome_download_manager_delegate.cc:93: bool ChromeDownloadManagerDelegate::ShouldWebIntentsHandle( On 2012/03/13 20:05:01, John Abd-El-Malek wrote: > ...
8 years, 9 months ago (2012-03-13 20:53:56 UTC) #6
jam
On 2012/03/13 20:53:56, Greg Billock wrote: > http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc > File chrome/browser/download/chrome_download_manager_delegate.cc (right): > > http://codereview.chromium.org/9651020/diff/2001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode93 ...
8 years, 9 months ago (2012-03-14 00:49:03 UTC) #7
Greg Billock
On 2012/03/14 00:49:03, John Abd-El-Malek wrote: > On 2012/03/13 20:53:56, Greg Billock wrote: > > ...
8 years, 9 months ago (2012-03-14 16:14:28 UTC) #8
jam
On 2012/03/14 16:14:28, Greg Billock wrote: > On 2012/03/14 00:49:03, John Abd-El-Malek wrote: > > ...
8 years, 9 months ago (2012-03-14 18:02:13 UTC) #9
Greg Billock
Moved implementation logic to content code. Still a bit cluttered; I'll merge once the other ...
8 years, 9 months ago (2012-03-16 00:59:10 UTC) #10
jam
http://codereview.chromium.org/9651020/diff/14001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): http://codereview.chromium.org/9651020/diff/14001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode218 chrome/browser/download/chrome_download_manager_delegate.cc:218: if (mime_type == "application/rss+xml" || why is this stuff ...
8 years, 9 months ago (2012-03-16 21:36:26 UTC) #11
Greg Billock
(Note, I'm in China for a few days, so this is going to stagnate a ...
8 years, 9 months ago (2012-03-18 00:32:21 UTC) #12
Greg Billock
OK, I've changed this CL in a couple of ways. 1. Removed the internal dispatcher, ...
8 years, 9 months ago (2012-03-26 18:48:36 UTC) #13
Randy Smith (Not in Mondays)
I apologize profusely for coming so late to the game; I saw this CL when ...
8 years, 9 months ago (2012-03-26 21:22:11 UTC) #14
Randy Smith (Not in Mondays)
On 2012/03/26 18:48:36, Greg Billock wrote: > OK, I've changed this CL in a couple ...
8 years, 9 months ago (2012-03-26 21:25:03 UTC) #15
Greg Billock
On 2012/03/26 21:22:11, rdsmith wrote: > I apologize profusely for coming so late to the ...
8 years, 9 months ago (2012-03-26 22:05:15 UTC) #16
Randy Smith (Not in Mondays)
On 2012/03/26 22:05:15, Greg Billock wrote: > On 2012/03/26 21:22:11, rdsmith wrote: > > I ...
8 years, 9 months ago (2012-03-27 16:34:50 UTC) #17
Greg Billock
OK, this is updated as per our discussion. The logic of interest is in chrome_download_manager_delegate, ...
8 years, 9 months ago (2012-03-28 23:34:03 UTC) #18
jam
http://codereview.chromium.org/9651020/diff/30001/content/public/browser/web_intents_dispatcher.h File content/public/browser/web_intents_dispatcher.h (right): http://codereview.chromium.org/9651020/diff/30001/content/public/browser/web_intents_dispatcher.h#newcode66 content/public/browser/web_intents_dispatcher.h:66: CONTENT_EXPORT void DispatchInternalIntent( perhaps this should be a static ...
8 years, 9 months ago (2012-03-29 02:33:51 UTC) #19
Greg Billock
http://codereview.chromium.org/9651020/diff/30001/content/public/browser/web_intents_dispatcher.h File content/public/browser/web_intents_dispatcher.h (right): http://codereview.chromium.org/9651020/diff/30001/content/public/browser/web_intents_dispatcher.h#newcode66 content/public/browser/web_intents_dispatcher.h:66: CONTENT_EXPORT void DispatchInternalIntent( Sounds good. I was trying to ...
8 years, 8 months ago (2012-03-29 17:33:03 UTC) #20
jam
lgtm http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc#newcode65 content/browser/intents/internal_web_intents_dispatcher.cc:65: content::WebIntentsDispatcher* WebIntentsDispatcher::Create( nit: by convention we put this ...
8 years, 8 months ago (2012-03-29 17:59:19 UTC) #21
Greg Billock
http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc#newcode65 content/browser/intents/internal_web_intents_dispatcher.cc:65: content::WebIntentsDispatcher* WebIntentsDispatcher::Create( I can't put an impl file in ...
8 years, 8 months ago (2012-03-29 18:45:08 UTC) #22
Randy Smith (Not in Mondays)
This looks basically fine, and I'm willing for it to go in as is. But ...
8 years, 8 months ago (2012-03-29 18:47:24 UTC) #23
michaeln
lgtm https://chromiumcodereview.appspot.com/9651020/diff/36003/content/browser/intents/intent_injector.cc File content/browser/intents/intent_injector.cc (right): https://chromiumcodereview.appspot.com/9651020/diff/36003/content/browser/intents/intent_injector.cc#newcode73 content/browser/intents/intent_injector.cc:73: policy->GrantReadFile(child_id, are read rights ever revoked, should they ...
8 years, 8 months ago (2012-03-29 20:51:57 UTC) #24
Greg Billock
http://codereview.chromium.org/9651020/diff/32003/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): http://codereview.chromium.org/9651020/diff/32003/chrome/browser/download/chrome_download_manager_delegate.cc#newcode285 chrome/browser/download/chrome_download_manager_delegate.cc:285: item->GetWebContents(), dispatcher); Perhaps a better thing to do here ...
8 years, 8 months ago (2012-03-29 20:53:00 UTC) #25
Greg Billock
https://chromiumcodereview.appspot.com/9651020/diff/36003/content/browser/intents/intent_injector.cc File content/browser/intents/intent_injector.cc (right): https://chromiumcodereview.appspot.com/9651020/diff/36003/content/browser/intents/intent_injector.cc#newcode73 content/browser/intents/intent_injector.cc:73: policy->GrantReadFile(child_id, On 2012/03/29 20:51:57, michaeln wrote: > are read ...
8 years, 8 months ago (2012-03-29 21:04:45 UTC) #26
michaeln
Similar usage in page_capture_custom_bindings.cc would indicate that your fine as is. I am by no ...
8 years, 8 months ago (2012-03-29 21:50:12 UTC) #27
Randy Smith (Not in Mondays)
Sounds good; thanks. LGTM. On 2012/03/29 20:53:00, Greg Billock wrote: > http://codereview.chromium.org/9651020/diff/32003/chrome/browser/download/chrome_download_manager_delegate.cc > File chrome/browser/download/chrome_download_manager_delegate.cc ...
8 years, 8 months ago (2012-03-30 14:23:51 UTC) #28
jam
http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc#newcode65 content/browser/intents/internal_web_intents_dispatcher.cc:65: content::WebIntentsDispatcher* WebIntentsDispatcher::Create( On 2012/03/29 18:45:08, Greg Billock wrote: > ...
8 years, 8 months ago (2012-03-30 16:09:44 UTC) #29
jam
On 2012/03/29 20:53:00, Greg Billock wrote: > http://codereview.chromium.org/9651020/diff/32003/chrome/browser/download/chrome_download_manager_delegate.cc > File chrome/browser/download/chrome_download_manager_delegate.cc (right): > > http://codereview.chromium.org/9651020/diff/32003/chrome/browser/download/chrome_download_manager_delegate.cc#newcode285 ...
8 years, 8 months ago (2012-03-30 16:12:11 UTC) #30
Greg Billock
On 2012/03/30 16:12:11, John Abd-El-Malek wrote: > On 2012/03/29 20:53:00, Greg Billock wrote: > > ...
8 years, 8 months ago (2012-03-31 00:24:13 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gbillock@chromium.org/9651020/50001
8 years, 8 months ago (2012-03-31 02:43:11 UTC) #32
commit-bot: I haz the power
Presubmit check for 9651020-50001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 8 months ago (2012-03-31 02:43:20 UTC) #33
jam
http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc#newcode65 content/browser/intents/internal_web_intents_dispatcher.cc:65: content::WebIntentsDispatcher* WebIntentsDispatcher::Create( ping?
8 years, 8 months ago (2012-04-02 15:05:08 UTC) #34
Greg Billock
http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/32003/content/browser/intents/internal_web_intents_dispatcher.cc#newcode65 content/browser/intents/internal_web_intents_dispatcher.cc:65: content::WebIntentsDispatcher* WebIntentsDispatcher::Create( On 2012/04/02 15:05:08, John Abd-El-Malek wrote: > ...
8 years, 8 months ago (2012-04-02 16:15:03 UTC) #35
darin (slow to review)
http://codereview.chromium.org/9651020/diff/48005/webkit/glue/web_intent_data.h File webkit/glue/web_intent_data.h (right): http://codereview.chromium.org/9651020/diff/48005/webkit/glue/web_intent_data.h#newcode26 webkit/glue/web_intent_data.h:26: // SerializedScriptObject. nit: SerializedScriptObject -> WebSerializedScriptValue http://codereview.chromium.org/9651020/diff/48005/webkit/glue/web_intent_data.h#newcode28 webkit/glue/web_intent_data.h:28: // ...
8 years, 8 months ago (2012-04-02 16:35:43 UTC) #36
Greg Billock
http://codereview.chromium.org/9651020/diff/48005/webkit/glue/web_intent_data.h File webkit/glue/web_intent_data.h (right): http://codereview.chromium.org/9651020/diff/48005/webkit/glue/web_intent_data.h#newcode26 webkit/glue/web_intent_data.h:26: // SerializedScriptObject. On 2012/04/02 16:35:43, darin wrote: > nit: ...
8 years, 8 months ago (2012-04-02 17:49:44 UTC) #37
jam
http://codereview.chromium.org/9651020/diff/47018/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/47018/content/browser/intents/internal_web_intents_dispatcher.cc#newcode9 content/browser/intents/internal_web_intents_dispatcher.cc:9: #include "content/public/browser/web_contents_delegate.h" nit: i think these aren't needed anymore
8 years, 8 months ago (2012-04-03 01:59:18 UTC) #38
Greg Billock
http://codereview.chromium.org/9651020/diff/47018/content/browser/intents/internal_web_intents_dispatcher.cc File content/browser/intents/internal_web_intents_dispatcher.cc (right): http://codereview.chromium.org/9651020/diff/47018/content/browser/intents/internal_web_intents_dispatcher.cc#newcode9 content/browser/intents/internal_web_intents_dispatcher.cc:9: #include "content/public/browser/web_contents_delegate.h" On 2012/04/03 01:59:18, John Abd-El-Malek wrote: > ...
8 years, 8 months ago (2012-04-03 19:56:55 UTC) #39
jam
btw if it's not clear, still lgtm
8 years, 8 months ago (2012-04-04 00:43:55 UTC) #40
Greg Billock
On 2012/04/04 00:43:55, John Abd-El-Malek wrote: > btw if it's not clear, still lgtm Darin, ...
8 years, 8 months ago (2012-04-06 22:08:30 UTC) #41
darin (slow to review)
LGTM
8 years, 8 months ago (2012-04-10 01:04:36 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gbillock@chromium.org/9651020/50008
8 years, 8 months ago (2012-04-10 02:37:28 UTC) #43
commit-bot: I haz the power
8 years, 8 months ago (2012-04-10 04:15:04 UTC) #44
Change committed as 131535

Powered by Google App Engine
This is Rietveld 408576698