|
Upstream: Add additional checks before creating a WebAPK after clicking "Add to Homescreen"
This CL makes "Add to Homescreen" from the app banner and from the app menu
create a WebAPK if the following conditions are met:
- Chrome is run with the --enable-webapk command line flag
- active tab is controlled by a service worker
- web manifest has the following non-empty fields:
- name
- short name
- start_url
- display field in web manifest is either "fullscreen" or "standalone"
Additionally, this CL:
- Moves AppBannerDataFetcher::IsManifestValidForWebApp() to
webapp_manifest_validator.cc because the function is used by both
app_banner_data_fetcher.cc and add_to_homescreen_data_fetcher.cc
- Moves the computation of whether a web page is "web app capable" from
ShortcutHelper.java to app_banner_data_fetcher.cc and
add_to_homescreen_data_fetcher.cc - the same place that the computation of
whether a web page is "WebAPK capable" is made.
BUG= 609122
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+425 lines, -252 lines) |
Patch |
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
View
|
1
|
3 chunks |
+13 lines, -17 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/banners/app_banner_data_fetcher_android.h
|
View
|
1
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/banners/app_banner_data_fetcher_android.cc
|
View
|
1
|
5 chunks |
+19 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/android/banners/app_banner_infobar_delegate_android.h
|
View
|
1
|
3 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
|
View
|
1
|
5 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/shortcut_helper.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/shortcut_info.h
|
View
|
1
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/shortcut_info.cc
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
|
View
|
1
|
2 chunks |
+17 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
|
View
|
1
|
4 chunks |
+54 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/banners/app_banner_data_fetcher.h
|
View
|
1
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/banners/app_banner_data_fetcher.cc
|
View
|
1
|
5 chunks |
+9 lines, -73 lines |
0 comments
|
Download
|
 |
D |
chrome/browser/banners/app_banner_data_fetcher_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -148 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/banners/app_banner_debug_log.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/banners/app_banner_debug_log.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/banners/webapp_manifest_validator.h
|
View
|
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/banners/webapp_manifest_validator.cc
|
View
|
|
1 chunk |
+88 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/banners/webapp_manifest_validator_unittest.cc
|
View
|
1
|
1 chunk |
+150 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser.gypi
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_tests_unit.gypi
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 20 (10 generated)
|