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

Issue 719176 link

Starred by 26 users

Issue metadata

Status: Started
Owner:
OOO until 4th Feb
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome , Mac
Pri: 1
Type: Feature

Blocked on:
issue 517682

Blocking:
issue 685159
issue 919715


Participants' hotlists:
GSuite-Priorities


Sign in to add a comment

App icon notification badge for PWAs

Reported by nekr.fab...@gmail.com, May 6 2017

Issue description

Feature request: support the ability for PWAs installed on desktop and mobile OSs to set the badge notification on app icon. 

Doc with overview: https://docs.google.com/document/d/1AmX53h-gk8wN7LPMi_Mq7fsIMgsMKRD6zKa1Ymxxvvc/edit#
 
Cc: hdodda@chromium.org
Components: UI>Notifications
Labels: -Type-Bug Type-Feature
Status: Untriaged (was: Unconfirmed)
This seems more like a feature request and hence marking it as untraiged for further inuts from respective team.

Thanks!

Comment 2 by peter@chromium.org, May 10 2017

Cc: miguelg@chromium.org awdf@chromium.org benwells@chromium.org owe...@chromium.org
Do you mean showing the number of notifications as a badge on the Chrome icon, or on individual PWA icons? (I guess Chrome Apps could do this?)

If it's the former, we've decided to not do this in Android O, where we have a similar situation. The reason is that the number does not reflect actions available to Chrome, but rather to a number of actors (PWAs) that can be accessed through Chrome. That makes the total number rather meaningless.
I mean per PWA. Display number of unread notifications on PWA icon in the
Dock/Launchpad. Not sure how unread notifications could be counted on
Android O, but seems possible on macOS.

Maybe it makes sense to provide badge API to SW/Notifications, but I'm not
really keen to this idea since I don't see use cases for it right now.

Comment 4 by peter@chromium.org, May 10 2017

Cc: dominickn@chromium.org
How did the PWA end up in your dock? Is it a shortcut or do we do something more elaborate there? (Sorry for the naive question!)
Well, I have a few flags enabled, I don't remember which ones. Here is an example (attached images) of how I can do it. Also I can just DnD a URL into chrome://apps/ and it will add that website to Dock/Launchpad. I guess it makes them hosted applications or something like that.
mac pwa.png
418 KB View Download
mac pwa 2.png
347 KB View Download
I'm guessing that they used "Add to Applications" (which is available behind a flag on macOS since we have some very thorny UI issues that are tricky to work out). It's basically a .app package that can be launched from the Dock, Desktop, or Applications.
Also here is how it looks in launchpad (attached image). E.g. Netflix and Gmail  are web apps (some other are Chrome Packaged Apps).

Anyway, I was using PWAs even before it was a thing on macOS and on Windows. I understand it isn't really mainstream on desktop, but it still would be good to have badge notifications. That way I wouldn't need to use Electron powered Slack app, but rather add their website to my launchpad.


mac pwa3.png
1.6 MB View Download

Comment 8 by sdy@chromium.org, May 10 2017

Blockedon: 517682
Cc: tapted@chromium.org

Comment 9 by tapted@chromium.org, May 11 2017

Cc: mlamouri@chromium.org
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Status: Available (was: Untriaged)
Summary: App icon notification badge for PWAs (was: App icon notification badge for PWAs on macOS)
Mac will be particularly fun to implement, but currently no platform supports badging the Dock/TaskBar/Shelf/Drawer/Launcher icon. Only extensions badging their toolbar icon on Desktop Chrome is supported.

TaskBar badging _was_ actually implemented briefly for Windows ~3 years ago -- See  Issue 311878 . There, as a packaged apps API.

If we want this, it probably needs to start with an API proposal on the w3c web app spec - https://w3c.github.io/manifest/
tapted@, it sounds to me that it should be possible to at least create a badge showing the notification count. We could offer an API for websites to customise the content of this icon but I wouldn't see this as blocking the initial feature.
As stated here[1], both macOS and Android may not call "close" callback. Do you think it's also not possible to implement this feature then?

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=722429

Comment 12 by peter@chromium.org, May 16 2017

That's entirely unrelated. We can definitely support this for enhanced add to homescreen apps on Android O. Support on other platforms would be great :).
Blocking: 685159
Cc: -miguelg@chromium.org mgiuca@chromium.org
Summarizing a conversation that happened today:

- There is interest in supporting badging for desktop PWAs on Windows and macOS
- We understand current thinking is for badges to reflect # of notifications currently showing, with an opt out in the manifest (not per-notification)
- The desktop PWAs group is unclear whether this should be tightly coupled to notifications or decoupled, i.e. an API specific to setting the badge number. Example use case for this is showing # of unread email for a client that doesn't want to show a notification for every email
- I note that on iOS you can disable notifications but keep badging. In this case the notifications API could still make sense, it just requires the app to be disciplined about dismissing it's own notifications once the user opens the app and sees the update
- I also note that on Android O (https://developer.android.com/preview/features/notification-badges.html) the badge by default shows the number of notifications visible, but there is also a setNumber API that allows apps to override this.

Perhaps as a v1 we could show the # of notifications as a badge, with a manifest opt-out and then later follow the Android model of adding an explicit API that allows apps to override their #, if overriding is supported on that OS?
Oh also I forgot to mention that Matt suggested we could go further and give web apps the ability to dynamically provide an badge for Chrome or the OS to composite onto their icon, or an API to dynamically swap their icon to something custom.

Those wouldn't necessarily be supportable on all OSs, and for matching style reasons I suspect we'd still want the ability to support numeric badging.

Comment 16 by peter@chromium.org, Jul 27 2017

Please take "current thinking" with a grain of salt, all of this is still very novel.

In my view, badging is one of these features where it's important to be consistent with the rest of the OS, as that plays a huge role in defining the user's expectations. At the same time, as is the case with any Web exposed API, we want to provide consistency for developers as well. It's likely that we find that there's a mismatch here.

There's still lots to learn on what badging actually means for Android, but we can take learnings from other OSes in the mean time.

Regarding the setNumber override -- it still requires *a* notification to be shown. I don't know what happens when this notification goes away.

I don't really have opinions about whether this should be part of notifications, or be defined as a new specification. Today it may have an overlap with notifications, but, especially if we are going to allow the values to differ, it may make more sense to define something separate.
Btw, what is "notification is shown" for macOS? i.e. does notifications in
notifications center count as currently shown? If not, when it's weird to
show badges for just notifications which are on screen anyway.
Description: Show this description
I've summarized the current discussion and context into this doc FYI: https://docs.google.com/document/d/1AmX53h-gk8wN7LPMi_Mq7fsIMgsMKRD6zKa1Ymxxvvc/edit#

Feel free to suggest edits etc in there, I'll try to keep it up to date with this conversation as we discuss options on how to address it etc.

Comment 20 by luizp@google.com, Jun 18 2018

Labels: Hotlist-Partner-GSuite
Cc: newcomer@chromium.org
Components: -UI>Notifications UI>Browser>WebAppInstalls UI>Shell>Shelf
Owner: estevenson@chromium.org
Status: Assigned (was: Available)
Resurrecting this bug since we've done some serious thinking about this lately. I won't address the above discussion point-for-point, but in summary, we aren't planning to go with an API that's tied to notifications. Just a simple API that lets you set a number or character associated with the app's shelf icon.

https://github.com/mgiuca/badging [hoping to move into WICG soon]

Assigning to estevenson@ for now.
Relevant for implementation on Chrome OS: https://chromium-review.googlesource.com/c/chromium/src/+/862167 (adds support for showing a notification dot on a Chrome OS shelf icon).
Also I'm implementing the indicators for CrOS app icons in the app list by M-70.
#23 Great, will that be hooked up to the same mechanism, or will we need to make a separate call to trigger that indicator?

Also for newcomer@: Looking at the CL mentioned in #22, I noticed that it's tied to notifications (so you have to set an Android app_id, etc). This work we're doing with the Web badging API might require refactoring that out so an app can show or hide its indicator badge without an app_id and unrelated to notifications. Would that be OK? We'll run any CLs by you.
#24, Thanks! Sounds reasonable! What's the timeline for this feature?
#25 ASAP, but realistically, long time (many milestones) because it requires standards work.

Comment 27 Deleted

Cc: -awdf@chromium.org
FYI, the notification indicators are being pushed to M-71. 
Thanks for the heads up. That's fine for us because while we hope to have this testable behind a flag in M70, there's no way we'll be launching the API before (at least) M71.
Project Member

Comment 31 by bugdroid1@chromium.org, Oct 1

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

commit c3b18058d0707a6a84a73be4842a83e80d9eace1
Author: Eric Stevenson <estevenson@chromium.org>
Date: Mon Oct 01 22:22:00 2018

Add Badging experimental web API.

This CL introduces the badging api. The badging API will eventually
allow developers to set and clear badges for installed PWAs.

Intent to implement:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Fw764MVF5nI

Explainer:
https://github.com/WICG/badging/blob/master/explainer.md

Bug: 719176
Change-Id: I68aa5a9310469bd3a38b1029f2141be335121b06
Reviewed-on: https://chromium-review.googlesource.com/1166603
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595587}
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/BUILD.gn
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/DEPS
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/badging/OWNERS
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/badging/badge_service_impl.cc
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/chrome/browser/chrome_content_browser_manifest_overlay.json
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/WebKit/LayoutTests/badging/badge-error.html
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/WebKit/LayoutTests/badging/badge-success.html
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/WebKit/LayoutTests/badging/idl.html
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/WebKit/LayoutTests/badging/resources/mock-badge-service.js
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/public/BUILD.gn
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/public/platform/modules/badging/OWNERS
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/public/platform/modules/badging/badging.mojom
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/bindings/modules/v8/generated.gni
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/BUILD.gn
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/BUILD.gn
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/OWNERS
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/README.md
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/badge.cc
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/badge.h
[add] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/badging/badge.idl
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/c3b18058d0707a6a84a73be4842a83e80d9eace1/third_party/blink/renderer/platform/runtime_enabled_features.json5

Labels: -Pri-2 Proj-Fugu Pri-1
Labels: M-72
Project Member

Comment 34 by bugdroid1@chromium.org, Nov 28

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

commit 5a42aa21b51577dcd120736729eff45c6c7b908f
Author: Jay Harris <harrisjay@chromium.org>
Date: Wed Nov 28 01:23:55 2018

Enables Badging API on all desktop platforms

Previously it was only available in test on Chrome OS

Bug: 719176
Change-Id: Ie329c8c900f0f9e57a2aadfe4863133b0fd8e39d
Reviewed-on: https://chromium-review.googlesource.com/c/1350376
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611489}
[modify] https://crrev.com/5a42aa21b51577dcd120736729eff45c6c7b908f/chrome/browser/BUILD.gn
[modify] https://crrev.com/5a42aa21b51577dcd120736729eff45c6c7b908f/chrome/browser/chrome_content_browser_client.cc

Labels: -M-72 M-73
Labels: Not-Touch-Friendly-Launcher
Project Member

Comment 37 by bugdroid1@chromium.org, Dec 7

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

commit 1d074a97a7b9bc0adfb948cdc4ce998467f7e661
Author: Eric Stevenson <estevenson@chromium.org>
Date: Fri Dec 07 14:16:45 2018

Desktop PWAs: Add badge record keeping to the badging service.

This CL introduces a per-Profile BadgeManager that keeps a record of
badge contents for installed PWAs and handles dispatching badge changes
via. a delegate.

This CL doesn't add any UI support.

Bug: 719176
Change-Id: I4779c1ec5486ee1c71e35f1a4116580fdaefe7da
Reviewed-on: https://chromium-review.googlesource.com/c/1170451
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614690}
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/BUILD.gn
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager.cc
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager.h
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager_delegate.h
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager_factory.cc
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager_factory.h
[add] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_manager_unittest.cc
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_service_impl.cc
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/chrome/test/BUILD.gn
[modify] https://crrev.com/1d074a97a7b9bc0adfb948cdc4ce998467f7e661/third_party/blink/renderer/platform/runtime_enabled_features.json5

Labels: -M-73 M-76 Target-73
Owner: mgiuca@chromium.org
Cc: estevenson@chromium.org harrisjay@chromium.org
Labels: -OS-Linux -OS-Android
Status: Started (was: Assigned)
Going to origin trial in M73 on Windows and Mac:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/KEUnHsvulEU/tMzKbzHxBQAJ
On some devices, e.g. Huawei, Samsung devices (probably some others too), there are badges on Android. It's cool when apps support it. Can PWAs support that as well?
#40 as far as I know, there is no API for this in the main-line Android. Android has badges automatically showing from notifications, but no API for it.

If Huawei and Samsung have a dedicated API for setting a badge, that's something we could consider supporting in Chrome at some point in the future, but it would be a lower priority (being not available on all Android devices).
Attached a file of the taskbar icon with (left) a badge and without a badge (right). Note: The users profile icon in this case is the burger, which is why there is a burger in the right hand view. 

The color of the badge was chosen so as to match the windows 10 badge color.
badges.png
5.9 KB View Download
#41 that sounds good. Yes, there is specific, non-official Android API which those platforms use. 

I also just wanted to point out that there is a good chance that there's more people on Samsung + Huawei devices than on macOS devices. Also taking in account that most of the current PWAs are mobile targeted, it would be great to have support for that API.
Project Member

Comment 44 by bugdroid1@chromium.org, Dec 14

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

commit ac47456668b1ecd0b752e319f05505217639719f
Author: Jay Harris <harrisjay@chromium.org>
Date: Fri Dec 14 02:09:18 2018

Adds Badging API support on Windows.

Explainer: https://github.com/WICG/badging/blob/master/explainer.md

The Windows 7 API for drawing badges on the taskbar requires that
we create a 16x16px bitmap which is rendered on the bottom right
corner of the taskbar icon.

Notes:
- This does not support numeric badges, only a '•' when
Badge.set called.
- The Windows 7 taskbar decoration API is limited in that it can
only display the decoration while the application is open,
which diverges from the spec, as the spec calls for a badge that
persists.
- There is some duplication and mess with the ChromeOS Badging
implementation. This has been left intentionally, as we're
trying to get it in for the M73 milestone, and will be cleaned up
in a future CL.

See https://bugs.chromium.org/p/chromium/issues/attachment?aid=371505&signed_aid=JfhG8iHpWlMp1bt1GRS6Eg==&inline=1
for an example of what badging looks like (note that the user's
profile icon is a burger, which is why it displays when there
is no badge).

Bug: 719176
Change-Id: I1267a3a37d11ac365348201facbd0bc1ea4deb36
Reviewed-on: https://chromium-review.googlesource.com/c/1353049
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616560}
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/BUILD.gn
[add] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/badging/badge_service_delegate.h
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/badging/badge_service_impl.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/browser_window.h
[add] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/badge_service_delegate_impl.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/browser_view.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/browser_view.h
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/browser/ui/views/frame/taskbar_decorator_win.h
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/test/base/test_browser_window.cc
[modify] https://crrev.com/ac47456668b1ecd0b752e319f05505217639719f/chrome/test/base/test_browser_window.h

Badging example on OSX
Screen Shot 2018-12-17 at 9.51.50 am.png
54.1 KB View Download
Project Member

Comment 46 by bugdroid1@chromium.org, Dec 17

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

commit c8ab016f530f2e3d2556d940da6eae604e56222a
Author: Jay Harris <harrisjay@chromium.org>
Date: Mon Dec 17 00:42:51 2018

Only allows the badge to be set when inside app scope in a hosted app.

Previously, if you navigated to another site inside the PWA that site
could set a badge.

Bug: 719176
Change-Id: If9a41a90751f4806d0d61927cd80a2ac77bfcc06
Reviewed-on: https://chromium-review.googlesource.com/c/1362680
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617030}
[modify] https://crrev.com/c8ab016f530f2e3d2556d940da6eae604e56222a/chrome/browser/badging/badge_service_impl.cc
[modify] https://crrev.com/c8ab016f530f2e3d2556d940da6eae604e56222a/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/c8ab016f530f2e3d2556d940da6eae604e56222a/chrome/browser/ui/extensions/hosted_app_browser_controller.cc
[modify] https://crrev.com/c8ab016f530f2e3d2556d940da6eae604e56222a/chrome/browser/ui/extensions/hosted_app_browser_controller.h

Project Member

Comment 47 by bugdroid1@chromium.org, Dec 17

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

commit 6b896fa77bf37a780f408b1c9d0f67171ceca593
Author: Jay Harris <harrisjay@chromium.org>
Date: Mon Dec 17 22:22:59 2018

Gets badging working on OSX

Notes:
- This does not implement numeric badging, only setting the "•" flag

Screenshot of badging:
https://bugs.chromium.org/p/chromium/issues/attachment?aid=371996&signed_aid=8FWkJWCYvpRVNNsTHoJOOg==&inline=1


Bug: 719176
Change-Id: Ife16d71ea9be2dcf3d951914610926d48a226d49
Reviewed-on: https://chromium-review.googlesource.com/c/1377950
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617256}
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/app_shim/app_shim_controller.h
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/app_shim/app_shim_controller.mm
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/browser/ui/views/badge_service_delegate_impl.cc
[modify] https://crrev.com/6b896fa77bf37a780f408b1c9d0f67171ceca593/chrome/common/mac/app_shim.mojom

Project Member

Comment 48 by bugdroid1@chromium.org, Dec 20

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

commit 55320dc2db54a283db82efef14f254b12259c46a
Author: Jay Harris <harrisjay@chromium.org>
Date: Thu Dec 20 00:47:00 2018

Adds support for setting numeric badges on Windows and OSX.

Spec Draft: https://wicg.github.io/badging/

In previous CLs, support for setting "•" badge
was added. This CL updates the mojo interface
to pass an optional numeric value through from the
render process to display on the badge (falling
back to the "•" when no number is specified).

Notes
- Negative numbers are not supported
- Setting the badge to '0' will clear the badge
- Numeric badges are saturated to '99+' for
numbers greater than 99, as we only have 16x16px
in which to draw on Windows.

Bug: 719176
Change-Id: I470f28e770ed4a5db29d0e61c86da3e7fd152acc
Reviewed-on: https://chromium-review.googlesource.com/c/1358102
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618040}
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/badging/badge_service_delegate.h
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/badging/badge_service_impl.cc
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/ui/views/badge_service_delegate_impl.cc
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/chrome/browser/ui/views/frame/taskbar_decorator_win.h
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/public/platform/modules/badging/badging.mojom
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/renderer/bindings/modules/v8/generated.gni
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/renderer/modules/badging/badge.cc
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/renderer/modules/badging/badge.h
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/renderer/modules/badging/badge.idl
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/web_tests/badging/badge-error.html
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/web_tests/badging/badge-success.html
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/web_tests/badging/idl.html
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/third_party/blink/web_tests/badging/resources/mock-badge-service.js
[modify] https://crrev.com/55320dc2db54a283db82efef14f254b12259c46a/ui/strings/ui_strings.grd

Project Member

Comment 49 by bugdroid1@chromium.org, Jan 7

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

commit 203ce4f71f0faeca509449ddeac1447848ec6a69
Author: Jay Harris <harrisjay@chromium.org>
Date: Mon Jan 07 23:42:44 2019

Updates badging idl test to match badge.idl

The badging idl test got out of sync with the actual idl. This CL
updates it.

Bug: 719176
Change-Id: I94af3b8732eb8e6bc6bb273f0e00aba83aed68e0
Reviewed-on: https://chromium-review.googlesource.com/c/1388345
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620524}
[modify] https://crrev.com/203ce4f71f0faeca509449ddeac1447848ec6a69/third_party/blink/web_tests/badging/idl.html

Owner: raymes@chromium.org
Blocking: 919715
Project Member

Comment 54 by bugdroid1@chromium.org, Jan 10

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

commit fb59e42d78b4a15d12a016ba099e3c638e9cf7b5
Author: Jay Harris <harrisjay@chromium.org>
Date: Thu Jan 10 22:31:21 2019

Adds test to confirm that Badge API calls reach the BadgeServiceDelegate

Bug: 719176
Change-Id: I4be4c30d5f565931d062081b070423476e6ed444
Reviewed-on: https://chromium-review.googlesource.com/c/1402381
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621780}
[modify] https://crrev.com/fb59e42d78b4a15d12a016ba099e3c638e9cf7b5/chrome/browser/badging/badge_service_delegate.h
[modify] https://crrev.com/fb59e42d78b4a15d12a016ba099e3c638e9cf7b5/chrome/browser/ui/extensions/hosted_app_browsertest.cc
[modify] https://crrev.com/fb59e42d78b4a15d12a016ba099e3c638e9cf7b5/chrome/browser/ui/views/badge_service_delegate_impl.cc

Project Member

Comment 55 by bugdroid1@chromium.org, Jan 21 (2 days ago)

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

commit a6de82f86f33a9b655a1767828c473bcf52d477a
Author: Jay Harris <harrisjay@chromium.org>
Date: Mon Jan 21 01:36:14 2019

Renames Badge api to ExperimentalBadge for OriginTrial

This is to satisfy the requirement that there should be some breakage
when an origin trial ends.

Note: When the origin trial finishes, this CL should be reverted.

Bug: 719176
Change-Id: I3520d4e99896bc4dbe81833e536b471b2f606e47
Reviewed-on: https://chromium-review.googlesource.com/c/1420177
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624504}
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/chrome/browser/badging/badge_manager_delegate.h
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/chrome/browser/ui/extensions/hosted_app_browsertest.cc
[rename] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/renderer/modules/badging/experimental_badge.idl
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/web_tests/badging/badge-error.html
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/web_tests/badging/badge-success.html
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/web_tests/badging/idl.html
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/web_tests/http/tests/origin_trials/webexposed/badging-origin-trial-interfaces.html
[modify] https://crrev.com/a6de82f86f33a9b655a1767828c473bcf52d477a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

Sign in to add a comment