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

Issue 2671683002: getInstalledRelatedApps: Add browser-side Mojo service (stub). (Closed)

Created:
3 years, 10 months ago by Matt Giuca
Modified:
3 years, 9 months ago
CC:
chromium-reviews, creis+watch_chromium.org, qsr+mojo_chromium.org, Aaron Boodman, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, dglazkov+blink, darin-cc_chromium.org, blink-reviews, darin (slow to review), blink-reviews-api_chromium.org, viettrungluu+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

getInstalledRelatedApps: Add browser-side Mojo service (stub). Adds the InstalledAppProvider Mojo service for getInstalledRelatedApps, which takes a list of related apps (from the app manifest) and filters out those apps that are not installed. The stub implementation always returns the empty list (Android-specific real implementation to follow). Updated layout tests to mock out the Mojo service and therefore fully test the IDL bindings code. Based on a CL by dhnishi: https://codereview.chromium.org/1756793004/ BUG=587623 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2671683002 Cr-Commit-Position: refs/heads/master@{#456652} Committed: https://chromium.googlesource.com/chromium/src/+/35f4c715eb3bb5735cf8148f24076a65fdfe7cbb

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Rebase. #

Patch Set 4 : mojom: Fields are now optional (preserve nulls). #

Patch Set 5 : Added self to OWNERS. #

Total comments: 5

Patch Set 6 : Rebase. #

Patch Set 7 : Remove m_frame and use supplementable(). #

Total comments: 15

Patch Set 8 : Remove origin parameter (security). #

Patch Set 9 : Respond to comments + increase test coverage. #

Total comments: 8

Patch Set 10 : Respond to review. #

Patch Set 11 : Added TODO. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -35 lines) Patch
M chrome/browser/chrome_content_browser_manifest_overlay.json View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
A content/browser/installedapp/OWNERS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/installedapp/installed_app_provider_impl_default.h View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -0 lines 0 comments Download
A content/browser/installedapp/installed_app_provider_impl_default.cc View 1 2 3 4 5 6 7 8 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/installedapp/getinstalledrelatedapps.html View 1 2 3 4 5 6 7 8 1 chunk +43 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/installedapp/getinstalledrelatedapps-empty.html View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/installedapp/resources/installedapp-test-helper.js View 1 2 3 4 5 6 7 8 9 1 chunk +67 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/installedapp/InstalledAppController.h View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp View 1 2 3 4 5 6 7 8 5 chunks +45 lines, -16 lines 3 comments Download
M third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/installedapp/OWNERS View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/installedapp/installed_app_provider.mojom View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/installedapp/related_application.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (9 generated)
Matt Giuca
Hi Martin: I randomly chose you from IPC security owners for adding this new Mojo ...
3 years, 10 months ago (2017-02-23 07:25:13 UTC) #3
dcheng
drive-by: let's not check in stubs for mojo/ipc, since it's difficult to do an ipc ...
3 years, 10 months ago (2017-02-23 08:15:00 UTC) #4
haraken
Drive-by https://codereview.chromium.org/2671683002/diff/80001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h File third_party/WebKit/Source/modules/installedapp/InstalledAppController.h (right): https://codereview.chromium.org/2671683002/diff/80001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h#newcode66 third_party/WebKit/Source/modules/installedapp/InstalledAppController.h:66: WeakMember<LocalFrame> m_frame; You can use supplementable(), which will ...
3 years, 10 months ago (2017-02-23 08:35:51 UTC) #6
Matt Giuca
On 2017/02/23 08:15:00, dcheng wrote: > drive-by: let's not check in stubs for mojo/ipc, since ...
3 years, 10 months ago (2017-02-24 01:04:38 UTC) #7
dcheng
On 2017/02/24 01:04:38, Matt Giuca wrote: > On 2017/02/23 08:15:00, dcheng wrote: > > drive-by: ...
3 years, 10 months ago (2017-02-25 08:02:31 UTC) #8
Matt Giuca
On 2017/02/25 08:02:31, dcheng wrote: > On 2017/02/24 01:04:38, Matt Giuca wrote: > > On ...
3 years, 9 months ago (2017-02-26 22:44:09 UTC) #9
Matt Giuca
-jochen (OOO), +clamy: Please review content/browser. Martin: friendly ping? (IPC security owners).
3 years, 9 months ago (2017-02-26 22:47:42 UTC) #11
clamy
Thanks! One question below. https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc#newcode2314 content/browser/frame_host/render_frame_host_impl.cc:2314: GetInterfaceRegistry()->AddInterface( Do we envision the ...
3 years, 9 months ago (2017-02-27 14:49:27 UTC) #12
Matt Giuca
https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc#newcode2314 content/browser/frame_host/render_frame_host_impl.cc:2314: GetInterfaceRegistry()->AddInterface( On 2017/02/27 14:49:27, clamy wrote: > Do we ...
3 years, 9 months ago (2017-02-27 22:51:15 UTC) #13
Matt Giuca
+dcheng: Martin hasn't responded. Are you able to be the IPC security owner since you've ...
3 years, 9 months ago (2017-02-28 23:07:31 UTC) #15
Matt Giuca
Oops, forgot to address haraken@'s comment. https://codereview.chromium.org/2671683002/diff/80001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h File third_party/WebKit/Source/modules/installedapp/InstalledAppController.h (right): https://codereview.chromium.org/2671683002/diff/80001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h#newcode66 third_party/WebKit/Source/modules/installedapp/InstalledAppController.h:66: WeakMember<LocalFrame> m_frame; On ...
3 years, 9 months ago (2017-03-02 05:45:34 UTC) #16
haraken
https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode135 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:135: WTF::Vector<mojom::blink::RelatedApplicationPtr> result) { dcheng@: Is there any way to ...
3 years, 9 months ago (2017-03-02 07:33:28 UTC) #17
dcheng
Sorry for the delay, I missed the reply where you asked me to take a ...
3 years, 9 months ago (2017-03-02 07:41:51 UTC) #18
clamy
Thanks! content/ lgtm with a nit. https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2671683002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc#newcode2314 content/browser/frame_host/render_frame_host_impl.cc:2314: GetInterfaceRegistry()->AddInterface( On 2017/02/27 ...
3 years, 9 months ago (2017-03-02 13:31:54 UTC) #19
Matt Giuca
Done those things (mostly). Please note Patch Set 8, where I changed the Mojo interface. ...
3 years, 9 months ago (2017-03-10 03:35:47 UTC) #20
dcheng
https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode135 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:135: WTF::Vector<mojom::blink::RelatedApplicationPtr> result) { On 2017/03/10 03:35:47, Matt Giuca wrote: ...
3 years, 9 months ago (2017-03-13 06:16:51 UTC) #21
dcheng
https://codereview.chromium.org/2671683002/diff/160001/third_party/WebKit/public/platform/modules/installedapp/related_application.mojom File third_party/WebKit/public/platform/modules/installedapp/related_application.mojom (right): https://codereview.chromium.org/2671683002/diff/160001/third_party/WebKit/public/platform/modules/installedapp/related_application.mojom#newcode8 third_party/WebKit/public/platform/modules/installedapp/related_application.mojom:8: // See: https://www.w3.org/TR/appmanifest/#related_applications-member https://www.w3.org/TR/appmanifest/#dfn-application-object might be a more helpful ...
3 years, 9 months ago (2017-03-13 07:15:08 UTC) #22
Matt Giuca
https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode135 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:135: WTF::Vector<mojom::blink::RelatedApplicationPtr> result) { On 2017/03/13 06:16:51, dcheng wrote: > ...
3 years, 9 months ago (2017-03-14 06:38:11 UTC) #23
dcheng
LGTM with nits https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/120001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode135 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:135: WTF::Vector<mojom::blink::RelatedApplicationPtr> result) { On 2017/03/14 06:38:11, ...
3 years, 9 months ago (2017-03-14 06:41:54 UTC) #24
dcheng
(I'll start a thread about IDL typemapping later as well, so I guess we can ...
3 years, 9 months ago (2017-03-14 06:43:53 UTC) #25
dcheng
(I'll start a thread about IDL typemapping later as well, so I guess we can ...
3 years, 9 months ago (2017-03-14 06:43:53 UTC) #26
Matt Giuca
Done. I literally can't see whether I have enough reviewers so going to check the ...
3 years, 9 months ago (2017-03-14 06:53:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2671683002/200001
3 years, 9 months ago (2017-03-14 06:54:23 UTC) #30
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/chromium/src/+/35f4c715eb3bb5735cf8148f24076a65fdfe7cbb
3 years, 9 months ago (2017-03-14 08:31:42 UTC) #33
haraken
https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode106 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:106: convertedApplication->url = relatedApplication.url; Would it be possible to type-map ...
3 years, 9 months ago (2017-03-14 08:58:55 UTC) #34
Matt Giuca
https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode106 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:106: convertedApplication->url = relatedApplication.url; On 2017/03/14 08:58:55, haraken wrote: > ...
3 years, 9 months ago (2017-03-14 23:21:04 UTC) #35
haraken
3 years, 9 months ago (2017-03-15 07:41:14 UTC) #36
Message was sent while issue was closed.
On 2017/03/14 23:21:04, Matt Giuca wrote:
>
https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Sou...
> File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp
> (right):
> 
>
https://codereview.chromium.org/2671683002/diff/200001/third_party/WebKit/Sou...
> third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:106:
> convertedApplication->url = relatedApplication.url;
> On 2017/03/14 08:58:55, haraken wrote:
> > 
> > Would it be possible to type-map between RelatedApplicationPtr and
> > WebRelatedApplication?
> 
> This was discussed above (see #17 to #23). I think the typemap there is
> unnecessary as I'll remove this intermediate step of converting RAP to WRA
(I'm
> not sure why it was there in the first place; before my time).
> 
> But some typemaps are probably a good idea... we have FOUR different
structures
> for representing a RelatedApplication (content::Manifest::RelatedApplication,
> blink::mojom::RelatedApplication, blink::RelatedApplication [the JavaScript
> type], and blink::WebRelatedApplication). This whole process converts back and
> forth between all four of these types, so it would be good to have some type
> mapping. But I think the first step is to simplify the logic to avoid so many
> conversions in the first place.

Ah, sorry I missed the discussion. LGTM.

Powered by Google App Engine
This is Rietveld 408576698