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

Issue 10828172: Allow platform apps to respond to Web Intents (Closed)

Created:
8 years, 4 months ago by thorogood
Modified:
4 years, 4 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, Aaron Boodman, darin-cc_chromium.org, brettw-cc_chromium.org, gbillock+watch_chromium.org, smckay+watch_chromium.org, koz (OOO until 15th September), bryeung
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

This adds WebIntentCallbacks, which is a ProfileKeyedService. It manages WebIntentsDispatcher instances which represent the callback type for Web Intents currently being handled by packaged apps. These dispatchers are cleared on reply, or when the source WebContents disappears. This patch also adds a hidden API call which allows packaged apps to actually send their response, this is in app_runtime_api.cc. BUG=134044 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154658

Patch Set 1 #

Patch Set 2 : Added WebIntentCallbacks profile keyed class to manage callbacks #

Total comments: 14

Patch Set 3 : all comments except listener/cleanup code #

Total comments: 8

Patch Set 4 : Extension* use in callback code #

Patch Set 5 : Uses dispatcher->RegisterReplyNotification to watch for expiry of the web intent #

Patch Set 6 : comments #

Total comments: 8

Patch Set 7 : Hooked up observing of source WebContents #

Total comments: 33

Patch Set 8 : Ben' #

Total comments: 4

Patch Set 9 : intentId at end of call, rearrangement of postIntentResponse into app_runtime_api #

Patch Set 10 : more [nodoc] #

Patch Set 11 : Adds basic test #

Total comments: 13

Patch Set 12 : slight comment fixes #

Patch Set 13 : sync #

Patch Set 14 : Sync to HEAD #

Patch Set 15 : sync to head -- actually tested this time #

Patch Set 16 : about to submit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -27 lines) Patch
M chrome/browser/extensions/api/app_runtime/app_runtime_api.h View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/app_runtime/app_runtime_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +47 lines, -1 line 0 comments Download
M chrome/browser/extensions/platform_app_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +81 lines, -0 lines 0 comments Download
M chrome/browser/extensions/platform_app_launcher.h View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/platform_app_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +20 lines, -8 lines 0 comments Download
M chrome/browser/extensions/shell_window_registry.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/extensions/web_intent_callbacks.h View 1 2 3 4 5 6 7 8 1 chunk +84 lines, -0 lines 0 comments Download
A chrome/browser/extensions/web_intent_callbacks.cc View 1 2 3 4 5 6 7 8 1 chunk +128 lines, -0 lines 0 comments Download
M chrome/browser/ui/intents/web_intent_picker_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -5 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/app_runtime.idl View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/app_runtime_custom_bindings.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/app_runtime_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +19 lines, -6 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/launch_reply/manifest.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/launch_reply/test.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
thorogood
Koz, can you PTAL? I've broken this out into a seperate class, although it still ...
8 years, 4 months ago (2012-08-08 02:45:25 UTC) #1
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/10828172/diff/2001/chrome/browser/extensions/api/app/app_api.cc File chrome/browser/extensions/api/app/app_api.cc (right): https://chromiumcodereview.appspot.com/10828172/diff/2001/chrome/browser/extensions/api/app/app_api.cc#newcode133 chrome/browser/extensions/api/app/app_api.cc:133: if (details->HasKey(kIntentIdKey)) Is this not always present? https://chromiumcodereview.appspot.com/10828172/diff/2001/chrome/browser/extensions/api/app/app_api.cc#newcode154 chrome/browser/extensions/api/app/app_api.cc:154: ...
8 years, 4 months ago (2012-08-08 04:47:30 UTC) #2
thorogood
http://codereview.chromium.org/10828172/diff/2001/chrome/browser/extensions/api/app/app_api.cc File chrome/browser/extensions/api/app/app_api.cc (right): http://codereview.chromium.org/10828172/diff/2001/chrome/browser/extensions/api/app/app_api.cc#newcode133 chrome/browser/extensions/api/app/app_api.cc:133: if (details->HasKey(kIntentIdKey)) On 2012/08/08 04:47:30, koz wrote: > Is ...
8 years, 4 months ago (2012-08-08 07:15:49 UTC) #3
Mihai Parparita -not on Chrome
(some drive-by comments) http://codereview.chromium.org/10828172/diff/4005/chrome/browser/extensions/web_intent_callbacks.cc File chrome/browser/extensions/web_intent_callbacks.cc (right): http://codereview.chromium.org/10828172/diff/4005/chrome/browser/extensions/web_intent_callbacks.cc#newcode21 chrome/browser/extensions/web_intent_callbacks.cc:21: std::string key = StringPrintf("key_%d", last_id_++); Can ...
8 years, 4 months ago (2012-08-09 04:38:33 UTC) #4
thorogood
http://codereview.chromium.org/10828172/diff/4005/chrome/browser/extensions/web_intent_callbacks.cc File chrome/browser/extensions/web_intent_callbacks.cc (right): http://codereview.chromium.org/10828172/diff/4005/chrome/browser/extensions/web_intent_callbacks.cc#newcode21 chrome/browser/extensions/web_intent_callbacks.cc:21: std::string key = StringPrintf("key_%d", last_id_++); On 2012/08/09 04:38:33, Mihai ...
8 years, 4 months ago (2012-08-09 09:56:50 UTC) #5
thorogood
PTAL: I'm seeing some bugs, but I've taken a slightly new approach. We should clear ...
8 years, 4 months ago (2012-08-10 08:23:26 UTC) #6
Mihai Parparita -not on Chrome
BTW, you'll probably want to add a test too. https://chromiumcodereview.appspot.com/10828172/diff/11001/chrome/browser/extensions/web_intent_callbacks.h File chrome/browser/extensions/web_intent_callbacks.h (right): https://chromiumcodereview.appspot.com/10828172/diff/11001/chrome/browser/extensions/web_intent_callbacks.h#newcode51 chrome/browser/extensions/web_intent_callbacks.h:51: ...
8 years, 4 months ago (2012-08-11 00:25:44 UTC) #7
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/10828172/diff/11001/chrome/browser/extensions/api/app/app_api.cc File chrome/browser/extensions/api/app/app_api.cc (right): https://chromiumcodereview.appspot.com/10828172/diff/11001/chrome/browser/extensions/api/app/app_api.cc#newcode128 chrome/browser/extensions/api/app/app_api.cc:128: DictionaryValue* details; nit: initialize to NULL. https://chromiumcodereview.appspot.com/10828172/diff/11001/chrome/browser/extensions/api/app/app_api.cc#newcode130 chrome/browser/extensions/api/app/app_api.cc:130: EXTENSION_FUNCTION_VALIDATE(details ...
8 years, 4 months ago (2012-08-13 00:29:40 UTC) #8
thorogood
I definitely need to add a test: but for now, I've hooked up the code ...
8 years, 4 months ago (2012-08-13 05:00:12 UTC) #9
benwells
https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/shell_window_registry.h File chrome/browser/extensions/shell_window_registry.h (right): https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/shell_window_registry.h#newcode51 chrome/browser/extensions/shell_window_registry.h:51: // a convenience wrapper around ShellWindowRegistry::Factory::GetForProfile. Nice catch! https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.cc ...
8 years, 4 months ago (2012-08-13 08:27:29 UTC) #10
thorogood
Thanks for the thorough review! https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.cc File chrome/browser/extensions/web_intent_callbacks.cc (right): https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.cc#newcode13 chrome/browser/extensions/web_intent_callbacks.cc:13: #include "webkit/glue/web_intent_reply_data.h" On 2012/08/13 ...
8 years, 4 months ago (2012-08-14 02:59:07 UTC) #11
thorogood
+gbillock, who wrote a bunch of Web Intents stuff
8 years, 4 months ago (2012-08-14 05:59:42 UTC) #12
benwells
https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.h File chrome/browser/extensions/web_intent_callbacks.h (right): https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.h#newcode30 chrome/browser/extensions/web_intent_callbacks.h:30: class WebIntentCallbacks : public ProfileKeyedService { On 2012/08/14 02:59:08, ...
8 years, 4 months ago (2012-08-14 06:57:07 UTC) #13
thorogood
https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.h File chrome/browser/extensions/web_intent_callbacks.h (right): https://chromiumcodereview.appspot.com/10828172/diff/5003/chrome/browser/extensions/web_intent_callbacks.h#newcode30 chrome/browser/extensions/web_intent_callbacks.h:30: class WebIntentCallbacks : public ProfileKeyedService { On 2012/08/14 06:57:07, ...
8 years, 4 months ago (2012-08-15 06:15:49 UTC) #14
thorogood
Hi everyone, I've added a basic test for this feature. It's hardly exhaustive, but it's ...
8 years, 3 months ago (2012-08-28 04:20:36 UTC) #15
benwells
http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/api/app/app_api.cc File chrome/browser/extensions/api/app/app_api.cc (right): http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/api/app/app_api.cc#newcode9 chrome/browser/extensions/api/app/app_api.cc:9: #include "base/utf_string_conversions.h" Is this needed? http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/platform_app_browsertest.cc File chrome/browser/extensions/platform_app_browsertest.cc (right): ...
8 years, 3 months ago (2012-08-29 12:19:21 UTC) #16
thorogood
http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/api/app/app_api.cc File chrome/browser/extensions/api/app/app_api.cc (right): http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/api/app/app_api.cc#newcode9 chrome/browser/extensions/api/app/app_api.cc:9: #include "base/utf_string_conversions.h" On 2012/08/29 12:19:21, benwells wrote: > Is ...
8 years, 3 months ago (2012-08-30 02:37:42 UTC) #17
benwells
lgtm http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/platform_app_browsertest.cc File chrome/browser/extensions/platform_app_browsertest.cc (right): http://codereview.chromium.org/10828172/diff/15001/chrome/browser/extensions/platform_app_browsertest.cc#newcode76 chrome/browser/extensions/platform_app_browsertest.cc:76: waiting_ = true; On 2012/08/30 02:37:42, thorogood wrote: ...
8 years, 3 months ago (2012-08-30 04:29:07 UTC) #18
thorogood
Can I get some more concrete reviews for my change? :) mihaip: chrome/{browser,common,renderer}/extensions sky: chrome ...
8 years, 3 months ago (2012-08-30 04:48:27 UTC) #19
sky
LGTM
8 years, 3 months ago (2012-08-30 15:40:12 UTC) #20
Mihai Parparita -not on Chrome
LGTM
8 years, 3 months ago (2012-08-30 20:43:43 UTC) #21
thorogood
I'm going to CQ this as the change to this file: chrome/browser/ui/intents/web_intent_picker_controller.cc is absolutely tiny ...
8 years, 3 months ago (2012-09-01 02:33:02 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10828172/34001
8 years, 3 months ago (2012-09-01 02:33:37 UTC) #23
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/platform_app_browsertest.cc: While running patch -p1 --forward --force; patching file chrome/browser/extensions/platform_app_browsertest.cc ...
8 years, 3 months ago (2012-09-01 02:33:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10828172/25004
8 years, 3 months ago (2012-09-03 00:34:17 UTC) #25
commit-bot: I haz the power
Try job failure for 10828172-25004 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-03 00:56:19 UTC) #26
thorogood
http://codereview.chromium.org/10828172/diff/15001/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js File chrome/renderer/resources/extensions/app_runtime_custom_bindings.js (right): http://codereview.chromium.org/10828172/diff/15001/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js#newcode24 chrome/renderer/resources/extensions/app_runtime_custom_bindings.js:24: // TODO(thorogood): What if data is not of a ...
8 years, 3 months ago (2012-09-03 03:37:40 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10828172/31019
8 years, 3 months ago (2012-09-03 03:40:35 UTC) #28
commit-bot: I haz the power
8 years, 3 months ago (2012-09-03 06:00:25 UTC) #29
Change committed as 154658

Powered by Google App Engine
This is Rietveld 408576698