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

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)

Created:
4 years, 2 months ago by Matt Giuca
Modified:
4 years ago
CC:
agrieve+watch_chromium.org, asvitkine+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-bindings_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, dglazkov+blink, dominickn+watch_chromium.org, haraken, kinuko+watch, mlamouri+watch-blink_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement "appinstalled" event on Android. This event is fired when a web app is "installed" (i.e., a shortcut is added to home screen). This implements from the working draft of Web App Manifest: https://www.w3.org/TR/appmanifest/#onappinstalled-attribute BUG=621393 Committed: https://crrev.com/b02c2580cd1427502c41072ebe834993b1d139d0 Cr-Commit-Position: refs/heads/master@{#439416}

Patch Set 1 #

Patch Set 2 : Added link in IDL. #

Patch Set 3 : Convert to mojo [violating checkdeps]. #

Patch Set 4 : Rebase (including Blink reformat). #

Patch Set 5 : Fix presubmit errors. #

Patch Set 6 : Rebase. #

Patch Set 7 : Moved InstallationServiceImpl to a separate file. #

Patch Set 8 : Also send the install event when an app is installed via banners. #

Patch Set 9 : Remove AppBannerInstallEvent class. #

Patch Set 10 : Added UMA logging for registering install event listener. #

Patch Set 11 : Added oninstall attribute event handler. #

Patch Set 12 : Moved event dispatch code out of AppBannerController. #

Patch Set 13 : Rebase. #

Patch Set 14 : Renamed event from install to appinstalled (spec change). #

Patch Set 15 : Moved onappinstalled IDL to separate partial interface file. #

Patch Set 16 : Fix style error. #

Patch Set 17 : Added Android end-to-end test for appinstalled event. #

Patch Set 18 : Minor refactor. #

Total comments: 12

Patch Set 19 : Rebase. #

Patch Set 20 : Rebase. #

Patch Set 21 : Fix includes. #

Patch Set 22 : Paddling to stay afloat. #

Patch Set 23 : Trying to add tests (not working). #

Patch Set 24 : Rebase. #

Patch Set 25 : Rebase. #

Patch Set 26 : Fix new AppBannerManagerTest and move into its own test. #

Patch Set 27 : Rebase. #

Patch Set 28 : Removed onappinstalled attribute (to add in future CL). #

Patch Set 29 : Rebase. #

Patch Set 30 : Moved onAppInstalled from WebLocalFrame to LocalFrame. #

Patch Set 31 : Fix DEPS issues. #

Patch Set 32 : Blink style. #

Total comments: 16

Patch Set 33 : Rebase. #

Patch Set 34 : Respond to review / fix compile. #

Total comments: 8

Patch Set 35 : Do all of Dom's things. #

Patch Set 36 : Rebase. #

Total comments: 8

Patch Set 37 : Fix up some includes. #

Total comments: 6

Patch Set 38 : Check null. #

Patch Set 39 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -1 line) Patch
M chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 2 chunks +10 lines, -0 lines 0 comments Download
A chrome/test/data/banners/appinstalled_test_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/test/data/banners/main.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/app/mojo/content_renderer_manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTarget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTypeNames.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/installation/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/installation/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/installation/InstallationServiceImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/installation/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/installation/installation.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +11 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 93 (72 generated)
Matt Giuca
dominickn for initial review. (OWNERS of chrome/android/*, chrome/browser/*) Will follow up with reviewers: esprehn: third_party/WebKit/* ...
4 years, 2 months ago (2016-10-12 07:06:47 UTC) #8
dominickn
First pass. https://codereview.chromium.org/2379923002/diff/400001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java (right): https://codereview.chromium.org/2379923002/diff/400001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java#newcode1 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java:1: // Copyright 2015 The Chromium Authors. All ...
4 years, 2 months ago (2016-10-12 22:35:09 UTC) #9
Matt Giuca
Finally addressed your comments! https://codereview.chromium.org/2379923002/diff/400001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java (right): https://codereview.chromium.org/2379923002/diff/400001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java#newcode1 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java:1: // Copyright 2015 The Chromium ...
4 years ago (2016-12-09 04:36:48 UTC) #40
dominickn
https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/android/webapps/add_to_homescreen_manager.h File chrome/browser/android/webapps/add_to_homescreen_manager.h (right): https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/android/webapps/add_to_homescreen_manager.h#newcode82 chrome/browser/android/webapps/add_to_homescreen_manager.h:82: blink::mojom::InstallationServicePtr installation_service_; Doesn't need to be a member, use ...
4 years ago (2016-12-09 06:08:18 UTC) #43
Matt Giuca
https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/android/webapps/add_to_homescreen_manager.h File chrome/browser/android/webapps/add_to_homescreen_manager.h (right): https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/android/webapps/add_to_homescreen_manager.h#newcode82 chrome/browser/android/webapps/add_to_homescreen_manager.h:82: blink::mojom::InstallationServicePtr installation_service_; On 2016/12/09 06:08:17, dominickn wrote: > Doesn't ...
4 years ago (2016-12-12 04:28:20 UTC) #45
dominickn
https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/banners/app_banner_manager.cc#newcode137 chrome/browser/banners/app_banner_manager.cc:137: if (!installation_service_) { On 2016/12/12 04:28:20, Matt Giuca wrote: ...
4 years ago (2016-12-12 05:03:31 UTC) #49
Matt Giuca
https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2379923002/diff/750001/chrome/browser/banners/app_banner_manager.cc#newcode137 chrome/browser/banners/app_banner_manager.cc:137: if (!installation_service_) { On 2016/12/12 05:03:30, dominickn wrote: > ...
4 years ago (2016-12-14 03:39:41 UTC) #50
dominickn
lgtm % nits https://codereview.chromium.org/2379923002/diff/850001/chrome/browser/android/webapps/add_to_homescreen_manager.cc File chrome/browser/android/webapps/add_to_homescreen_manager.cc (right): https://codereview.chromium.org/2379923002/diff/850001/chrome/browser/android/webapps/add_to_homescreen_manager.cc#newcode23 chrome/browser/android/webapps/add_to_homescreen_manager.cc:23: #include "jni/AddToHomescreenManager_jni.h" #include "mojo/public/cpp/bindings/interface_request.h" for GetProxy ...
4 years ago (2016-12-15 03:45:59 UTC) #62
Matt Giuca
https://codereview.chromium.org/2379923002/diff/850001/chrome/browser/android/webapps/add_to_homescreen_manager.cc File chrome/browser/android/webapps/add_to_homescreen_manager.cc (right): https://codereview.chromium.org/2379923002/diff/850001/chrome/browser/android/webapps/add_to_homescreen_manager.cc#newcode23 chrome/browser/android/webapps/add_to_homescreen_manager.cc:23: #include "jni/AddToHomescreenManager_jni.h" On 2016/12/15 03:45:59, dominickn wrote: > #include ...
4 years ago (2016-12-15 06:17:23 UTC) #65
Matt Giuca
Hi reviewers, please review the following files: haraken: third_party/WebKit/* jochen: chrome/browser/DEPS rkaplow: tools/metrics/histograms/histograms.xml, third_party/WebKit/Source/core/frame/UseCounter.h (metrics ...
4 years ago (2016-12-15 06:25:16 UTC) #69
Matt Giuca
+chrishtr: I got this presubmit error. You need LGTM from owners of depends-on paths in ...
4 years ago (2016-12-15 06:29:38 UTC) #71
haraken
WebKit LGTM https://codereview.chromium.org/2379923002/diff/870001/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp File third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp (right): https://codereview.chromium.org/2379923002/diff/870001/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp#newcode8 third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp:8: #include "core/frame/LocalDOMWindow.h" unused https://codereview.chromium.org/2379923002/diff/870001/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp#newcode12 third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp:12: #include <utility> ...
4 years ago (2016-12-15 07:27:50 UTC) #72
jochen (gone - plz use gerrit)
lgtm
4 years ago (2016-12-15 14:18:27 UTC) #75
Tom Sepez
mojom LGTM
4 years ago (2016-12-15 17:42:11 UTC) #76
Matt Giuca
https://codereview.chromium.org/2379923002/diff/870001/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp File third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp (right): https://codereview.chromium.org/2379923002/diff/870001/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp#newcode8 third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp:8: #include "core/frame/LocalDOMWindow.h" On 2016/12/15 07:27:50, haraken wrote: > > ...
4 years ago (2016-12-16 03:53:47 UTC) #77
Matt Giuca
+isherman: I haven't heard from rkaplow in many days so maybe you can review histograms?
4 years ago (2016-12-19 02:08:38 UTC) #83
Ilya Sherman
histograms.xml lgtm
4 years ago (2016-12-19 02:50:12 UTC) #84
Matt Giuca
On 2016/12/19 02:50:12, Ilya Sherman wrote: > histograms.xml lgtm Thanks!
4 years ago (2016-12-19 02:51:39 UTC) #85
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/2379923002/910001
4 years ago (2016-12-19 02:53:48 UTC) #88
commit-bot: I haz the power
Committed patchset #39 (id:910001)
4 years ago (2016-12-19 05:44:52 UTC) #91
commit-bot: I haz the power
4 years ago (2016-12-19 05:47:23 UTC) #93
Message was sent while issue was closed.
Patchset 39 (id:??) landed as
https://crrev.com/b02c2580cd1427502c41072ebe834993b1d139d0
Cr-Commit-Position: refs/heads/master@{#439416}

Powered by Google App Engine
This is Rietveld 408576698