New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649771 link

Starred by 6 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Use small icon from Web Manifest "purpose" member for WebAPK

Project Member Reported by pkotw...@chromium.org, Sep 23 2016

Issue description

Forked from Issue 604204

peter@ suggested adding a value to the Web Manifest to specify the small icon to use for WebAPKs

Here is the discussion: https://github.com/w3c/manifest/issues/480
Here is the change in the Web Manifest spec from this discussion: https://www.w3.org/TR/appmanifest/#purpose-member
 
Labels: Hotlist-GoodFirstBug
Owner: zpeng@chromium.org
Status: Assigned (was: Untriaged)
Cc: dominickn@chromium.org
Dominick FYI (so that you are not surprised to see CLs coming your way). Issue 604204 has a lot of discussion as to why we are doing this
Please cc me on the content/ changes you'll need to do to implement the new member. :)
Cc: peter@chromium.org pkotw...@chromium.org zpeng@chromium.org mlamouri@chromium.org
Owner: peter@chromium.org
+CC mlamouri@ peter@

Mounir has a bunch of spec questions that he filed here:
https://github.com/w3c/manifest/issues/511
https://github.com/w3c/manifest/issues/510
https://github.com/w3c/manifest/issues/509
https://github.com/w3c/manifest/issues/508

Peter Beverloo, you drove a lot of the W3C spec discussion (Thank you!). Can you please help resolve Mounir's concerns?

Comment 5 by peter@chromium.org, Oct 25 2016

Owner: mlamouri@chromium.org
Other than #509, I don't think any of these should be blocking for your CL. (They're either editorial or out of scope.)

It looks like various people already shared their opinions on #509, so let's have that run its course.
Owner: ----
Owner: pkotw...@chromium.org
Owner: zpeng@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76b843bdcc0284eedd4c66c381dd85a4300b77b0

commit 76b843bdcc0284eedd4c66c381dd85a4300b77b0
Author: zpeng <zpeng@chromium.org>
Date: Fri Oct 28 15:32:38 2016

Update comments in InstallableManager.

Update comments on kIconMinimumSizeInPx to reveal the origin of the
144px minimum icon size requirement.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2452603004
Cr-Commit-Position: refs/heads/master@{#428379}

[modify] https://crrev.com/76b843bdcc0284eedd4c66c381dd85a4300b77b0/chrome/browser/installable/installable_manager.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8fb77ce37de979cade424ef74f4301ba7241068b

commit 8fb77ce37de979cade424ef74f4301ba7241068b
Author: zpeng <zpeng@chromium.org>
Date: Wed Dec 21 01:31:36 2016

Parse "purpose" member from Web Manifest

This CL adds functionality to parse "purpose" member of Web Manifest. The
"purpose" member identifies the intended use of the icon. Chrome will use the
"purpose" member to identify icons to use as system tray icons for
notifications. On Android, system tray icons must be "white on a transparent
background"
https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html

Link to Intent to Ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/1ebMBNhqRew

BUG= 649771 

Review-Url: https://codereview.chromium.org/2425833002
Cr-Commit-Position: refs/heads/master@{#439967}

[modify] https://crrev.com/8fb77ce37de979cade424ef74f4301ba7241068b/content/public/common/manifest.h
[modify] https://crrev.com/8fb77ce37de979cade424ef74f4301ba7241068b/content/renderer/manifest/manifest_parser.cc
[modify] https://crrev.com/8fb77ce37de979cade424ef74f4301ba7241068b/content/renderer/manifest/manifest_parser.h
[modify] https://crrev.com/8fb77ce37de979cade424ef74f4301ba7241068b/content/renderer/manifest/manifest_parser_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 16 2017

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 23 2017

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4ca25bc262eece0c27b52eefec27ffb969359144

commit 4ca25bc262eece0c27b52eefec27ffb969359144
Author: zpeng <zpeng@chromium.org>
Date: Tue Jan 24 00:18:01 2017

Require WebApp & WebAPK primary icons to have IconPurpose::ANY

Icons with only IconPurpose::BADGE as icon purposes should not be used
as primary icons for WebApps or WebAPKs. The "purpose" attribute of
icons, if not set, defaults to IconPurpose::ANY.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2642233002
Cr-Commit-Position: refs/heads/master@{#445554}

[modify] https://crrev.com/4ca25bc262eece0c27b52eefec27ffb969359144/chrome/browser/installable/installable_logging.cc
[modify] https://crrev.com/4ca25bc262eece0c27b52eefec27ffb969359144/chrome/browser/installable/installable_manager.cc
[modify] https://crrev.com/4ca25bc262eece0c27b52eefec27ffb969359144/chrome/browser/installable/installable_manager_unittest.cc

Comment 14 by zpeng@chromium.org, Jan 24 2017

Labels: -Hotlist-GoodFirstBug
Project Member

Comment 15 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b205d0d471142ed307b73146e51e3576e4ffcd6e

commit b205d0d471142ed307b73146e51e3576e4ffcd6e
Author: zpeng <zpeng@chromium.org>
Date: Tue Jan 31 01:29:29 2017

Allow InstallableManager to fetch optional badge icon

This CL updates InstallableManager so that users can specify badge-icon-related
parameters in InstallableParams and retrieve the most suitable badge icon in
InstallableData. Unlike the primary icon, badge icon is optional. Therefore, when a
badge icon is requested yet no suitable icons are found in the web manifest, the
GetData process would still succeed.

The badge icon is to be used for Status Bar Icons for WebAPK's notifications.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2641413002
Cr-Commit-Position: refs/heads/master@{#447154}

[modify] https://crrev.com/b205d0d471142ed307b73146e51e3576e4ffcd6e/chrome/browser/installable/installable_manager.cc
[modify] https://crrev.com/b205d0d471142ed307b73146e51e3576e4ffcd6e/chrome/browser/installable/installable_manager.h
[modify] https://crrev.com/b205d0d471142ed307b73146e51e3576e4ffcd6e/chrome/browser/installable/installable_manager_browsertest.cc
[modify] https://crrev.com/b205d0d471142ed307b73146e51e3576e4ffcd6e/chrome/browser/installable/installable_manager_unittest.cc
[modify] https://crrev.com/b205d0d471142ed307b73146e51e3576e4ffcd6e/chrome/test/data/banners/manifest.json

Project Member

Comment 16 by bugdroid1@chromium.org, Feb 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c

commit 19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c
Author: zpeng <zpeng@chromium.org>
Date: Wed Feb 01 20:22:22 2017

Refactor ManifestIconSelector and update it for Manifest.icon.purpose

This CL refactors ManifestIconSelector:
1. Removes the extra copy of icons introduced in FilterIconsByType;
2. Combines the iteration for finding the ideal icon and the iteration
for finding the icon closest to ideal icon into one iteration;
3. Changes out-dated name "preferred icon" to current "ideal icon";
4. Removes non-static class members and functions.

This CL also updates ManifestIconSelector to allow users to pass
desired icon purpose as a parameter to FindBestMatchingIcon.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2662103002
Cr-Commit-Position: refs/heads/master@{#447595}

[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/android/banners/app_banner_manager_android.cc
[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/installable/installable_manager.cc
[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/manifest/manifest_icon_selector.cc
[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/manifest/manifest_icon_selector.h
[modify] https://crrev.com/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c/chrome/browser/manifest/manifest_icon_selector_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Feb 2 2017

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7856eef7d2f632f777a82a8af8eec76315c58b8

commit a7856eef7d2f632f777a82a8af8eec76315c58b8
Author: zpeng <zpeng@chromium.org>
Date: Tue Feb 07 11:42:44 2017

Rename best icon to best primary icon in Web app related code.

In order to differentiate primary icon from newly introduced badge
icon, this CL renames all occurrences of best icon mentions in Web app
code or WebAPK code.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2671853002
Cr-Commit-Position: refs/heads/master@{#448601}

[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/banners/app_banner_manager_android.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/shortcut_helper.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/shortcut_info.h
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_installer.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_installer.h
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_installer_unittest.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_update_data_fetcher.h
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapk/webapk_update_manager.cc
[modify] https://crrev.com/a7856eef7d2f632f777a82a8af8eec76315c58b8/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb90fb92c0ce0e549112e9dfbeaeb2309aad883d

commit fb90fb92c0ce0e549112e9dfbeaeb2309aad883d
Author: zpeng <zpeng@chromium.org>
Date: Thu Feb 09 10:38:30 2017

Add "usages" field to Image in WebApk.proto

"usages" field is used by Chrome to specify intended usages for the image
sent in a WebAPK proto. An image can have multiple usages, e.g. "primary
icon" and "badge icon".

At most two images can have non-empty "usages" fields: the image most
suitable for primary icon, and the image most suitable for badge icon.

The "usages" field in the proto and manifest.icon.purpose defined in the W3C Web
Manifest specification are different.
- "usages" is used by Chrome to distinguish the image most suitable for primary
icon and the image most suitable for badge icon from other images, and from
each other.
- manifest.icon.purpose is used by Web developers to specify intended
usage for the images.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2686543002
Cr-Commit-Position: refs/heads/master@{#449255}

[modify] https://crrev.com/fb90fb92c0ce0e549112e9dfbeaeb2309aad883d/chrome/browser/android/webapk/webapk.proto

Project Member

Comment 21 by bugdroid1@chromium.org, Feb 22 2017

Project Member

Comment 22 by bugdroid1@chromium.org, Apr 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/efb812e9274d2f1e0c3761d7307921f0e44f9a8d

commit efb812e9274d2f1e0c3761d7307921f0e44f9a8d
Author: zpeng <zpeng@chromium.org>
Date: Mon Apr 03 14:29:31 2017

Add static method WebApkIconHasher::DownloadAndComputeMurmur2Hash

Static method WebApkIconHasher::DownloadAndCompauteMurmur2Hash creates
a WebApkIconHasher and lets it download and hash the image. This change
would give WebApkIconHasher control of its life cycle and simplifies
usage.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2782313002
Cr-Commit-Position: refs/heads/master@{#461427}

[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_icon_hasher.cc
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_icon_hasher.h
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_installer.cc
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_installer.h
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
[modify] https://crrev.com/efb812e9274d2f1e0c3761d7307921f0e44f9a8d/chrome/browser/android/webapk/webapk_update_data_fetcher.h

Project Member

Comment 23 by bugdroid1@chromium.org, Apr 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1fd959d6b3a68e527f7b2be9e9ef93d996839c00

commit 1fd959d6b3a68e527f7b2be9e9ef93d996839c00
Author: zpeng <zpeng@chromium.org>
Date: Fri Apr 07 19:34:30 2017

Update WebApkInstaller to support badge icon in installation.

This CL updates WebApkInstaller so that the murmur2 hash of the best
badge icon would be calculated and passed to the WAM server in WebAPK
proto along with the url of the best badge icon.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2676863002
Cr-Commit-Position: refs/heads/master@{#462963}

[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/banners/app_banner_infobar_delegate_android.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/banners/app_banner_manager_android.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/banners/app_banner_manager_android.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/shortcut_helper.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/shortcut_helper.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapk/webapk_install_service.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapk/webapk_install_service.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapk/webapk_installer.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapk/webapk_installer.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapk/webapk_installer_unittest.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapps/add_to_homescreen_manager.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/android/webapps/add_to_homescreen_manager.h
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/banners/app_banner_manager.cc
[modify] https://crrev.com/1fd959d6b3a68e527f7b2be9e9ef93d996839c00/chrome/browser/banners/app_banner_manager.h

Project Member

Comment 24 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f3ee4aef9982d1c5579bd78ac12895ffc161f45

commit 6f3ee4aef9982d1c5579bd78ac12895ffc161f45
Author: zpeng <zpeng@chromium.org>
Date: Thu Apr 13 17:27:27 2017

Fails InstallableManager if a selected badge icon cannot be fetched.

This CL makes InstallableManager fail when an icon is selected as the
badge icon yet cannot be fetched. For an icon to be selected as a badge
icon, the web developer needs to explicitly add
manifest.icon.purpose.BADGE to the icon's purpose field. Providing a
badge icon is still optional; however, the WebAPK installation will not
proceed if the provided badge icon cannot be downloaded.

This CL gets rid of Clank's manifest protocol buffer's dependency on
the network condition.

BUG= 649771 

Review-Url: https://codereview.chromium.org/2791923005
Cr-Commit-Position: refs/heads/master@{#464452}

[modify] https://crrev.com/6f3ee4aef9982d1c5579bd78ac12895ffc161f45/chrome/browser/installable/installable_logging.cc
[modify] https://crrev.com/6f3ee4aef9982d1c5579bd78ac12895ffc161f45/chrome/browser/installable/installable_manager.cc
[modify] https://crrev.com/6f3ee4aef9982d1c5579bd78ac12895ffc161f45/chrome/browser/installable/installable_manager_browsertest.cc
[add] https://crrev.com/6f3ee4aef9982d1c5579bd78ac12895ffc161f45/chrome/test/data/banners/manifest_bad_badge.json

Comment 25 by zpeng@chromium.org, Apr 25 2017

Status: Archived (was: Assigned)
Forked into crbug.com/715158, crbug.com/715163, crbug.com/715166

Sign in to add a comment