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

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome , Mac
Pri: 1
Type: Feature

Blocked on:
issue 517682

Blocking:
issue 685159
issue 917505
issue 917512
issue 917516
issue 917520
issue 919715


Participants' hotlists:
GSuite-Priorities


Sign in to add a comment
link

Issue 719176: 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#
 

Comment 1 by hdodda@chromium.org, May 8 2017

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.

Comment 3 by nekr.fab...@gmail.com, May 10 2017

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!)

Comment 5 by nekr.fab...@gmail.com, May 10 2017

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

Comment 6 by dominickn@chromium.org, May 10 2017

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.

Comment 7 by nekr.fab...@gmail.com, May 10 2017

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/

Comment 10 by mlamouri@chromium.org, May 11 2017

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.

Comment 11 by nekr.fab...@gmail.com, May 16 2017

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 :).

Comment 13 by mgiuca@chromium.org, Jul 27 2017

Blocking: 685159

Comment 14 by owe...@chromium.org, Jul 27 2017

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?

Comment 15 by owe...@chromium.org, Jul 27 2017

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.

Comment 17 by nekr.fab...@gmail.com, Jul 27 2017

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.

Comment 18 by owe...@chromium.org, Aug 2 2017

Description: Show this description

Comment 19 by owe...@chromium.org, Aug 2 2017

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

Comment 21 by mgiuca@chromium.org, Jul 23 2018

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.

Comment 22 by mgiuca@chromium.org, Jul 23 2018

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).

Comment 23 by newcomer@chromium.org, Jul 23 2018

Also I'm implementing the indicators for CrOS app icons in the app list by M-70.

Comment 24 by mgiuca@chromium.org, Jul 23 2018

#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.

Comment 25 by newcomer@chromium.org, Jul 23 2018

#24, Thanks! Sounds reasonable! What's the timeline for this feature?

Comment 26 by mgiuca@chromium.org, Jul 24 2018

#25 ASAP, but realistically, long time (many milestones) because it requires standards work.

Comment 27 Deleted

Comment 28 by awdf@chromium.org, Jul 25 2018

Cc: -awdf@chromium.org

Comment 29 by newcomer@chromium.org, Aug 3

FYI, the notification indicators are being pushed to M-71.

Comment 30 by mgiuca@chromium.org, Aug 6

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.

Comment 31 by bugdroid1@chromium.org, Oct 1

Project Member
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

Comment 32 by dxie@google.com, Oct 12

Labels: -Pri-2 Proj-Fugu Pri-1

Comment 33 by dxie@google.com, Oct 19

Labels: M-72

Comment 34 by bugdroid1@chromium.org, Nov 28

Project Member
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

Comment 35 by mgiuca@chromium.org, Dec 4

Labels: -M-72 M-73

Comment 36 by newcomer@chromium.org, Dec 6

Labels: Not-Touch-Friendly-Launcher

Comment 37 by bugdroid1@chromium.org, Dec 7

Project Member
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

Comment 38 by dxie@google.com, Dec 13

Labels: -M-73 M-76 Target-73
Owner: mgiuca@chromium.org

Comment 39 by mgiuca@chromium.org, Dec 13

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

Comment 40 by nekr.fab...@gmail.com, Dec 13

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?

Comment 41 by mgiuca@chromium.org, Dec 13

#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).

Comment 42 by harrisjay@chromium.org, Dec 13

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

Comment 43 by nekr.fab...@gmail.com, Dec 13

#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.

Comment 44 by bugdroid1@chromium.org, Dec 14

Project Member
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

Comment 45 by harrisjay@chromium.org, Dec 16

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

Comment 46 by bugdroid1@chromium.org, Dec 17

Project Member
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

Comment 47 by bugdroid1@chromium.org, Dec 17

Project Member
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

Comment 48 by bugdroid1@chromium.org, Dec 20

Project Member
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

Comment 49 by bugdroid1@chromium.org, Jan 7

Project Member
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

Comment 50 by raymes@google.com, Jan 8

Owner: raymes@chromium.org

Comment 51 by raymes@google.com, Jan 8

Blocking: 919715

Comment 54 by bugdroid1@chromium.org, Jan 10

Project Member
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

Comment 55 by bugdroid1@chromium.org, Jan 21

Project Member
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

Comment 56 by bugdroid, Jan 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e03e2f06f7b0de88567eda843488e2b72bdb0a3

commit 3e03e2f06f7b0de88567eda843488e2b72bdb0a3
Author: Jay Harris <harrisjay@chromium.org>
Date: Thu Jan 31 01:36:31 2019

Refactors Taskbar Decoration to make it accessible outside of views.

This change is in preparation for
https://chromium-review.googlesource.com/c/chromium/src/+/1429324

Bug: 719176
Change-Id: Ibb98c8fa087478a42de9868c372942919e3573fa
Reviewed-on: https://chromium-review.googlesource.com/c/1441971
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627726}
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/BUILD.gn
[rename] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/taskbar/taskbar_decorator_win.cc
[add] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/taskbar/taskbar_decorator_win.h
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/ui/views/badge_service_delegate_impl.cc
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
[modify] https://crrev.com/3e03e2f06f7b0de88567eda843488e2b72bdb0a3/chrome/browser/ui/views/frame/browser_view.cc
[delete] https://crrev.com/92b36a95e2b94c2f86103ee27dd3a7aa796bda20/chrome/browser/ui/views/frame/taskbar_decorator_win.h

Comment 57 by bugdroid, Jan 31

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

commit b15e3797fc2de60cea8cd8b34a26123491687dca
Author: Jay Harris <harrisjay@chromium.org>
Date: Thu Jan 31 10:17:31 2019

Make harrisjay@ an OWNER of badging

Bug: 719176
Change-Id: I144619ed5ac640bb8df3e90e6f4452274d6c59d7
Reviewed-on: https://chromium-review.googlesource.com/c/1447396
Auto-Submit: Jay Harris <harrisjay@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627881}
[modify] https://crrev.com/b15e3797fc2de60cea8cd8b34a26123491687dca/third_party/blink/renderer/modules/badging/OWNERS

Comment 58 by bugdroid, Jan 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/867b07799e9d68f716a263d30951ea12613e5546

commit 867b07799e9d68f716a263d30951ea12613e5546
Author: Jay Harris <harrisjay@chromium.org>
Date: Thu Jan 31 23:22:25 2019

Unifies Badging logic across Chrome OS, Windows and Mac.

- Updates Windows and Mac to run through the
badge manager so that the last badge value is stored.
- Threshes out the concept of a badge_manager_delegate,
as it was too tightly coupled to Chrome OS to be used
for Windows and Mac.
- Checks the app is in scope before calling the badge
manager, so as to not regress Windows/Mac.
- Moves Windows and Mac specific badging code from
badge_service_delegate_impl to specific
badge_manager_delegates.

Bug: 719176
Change-Id: I01289830d3d1f1d34fec846785f0fd60deed6e97
Reviewed-on: https://chromium-review.googlesource.com/c/1429324
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628139}
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/BUILD.gn
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_delegate.h
[add] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_delegate_mac.cc
[add] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_delegate_mac.h
[add] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_delegate_win.cc
[add] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_delegate_win.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_factory.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_manager_unittest.cc
[delete] https://crrev.com/6fa79ac30b077e3c4962eb7f4b773012265ed419/chrome/browser/badging/badge_service_delegate.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_service_impl.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/badging/badge_service_impl.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/browser_window.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/extensions/hosted_app_browser_controller.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/extensions/hosted_app_browser_controller.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/extensions/hosted_app_browsertest.cc
[delete] https://crrev.com/6fa79ac30b077e3c4962eb7f4b773012265ed419/chrome/browser/ui/views/badge_service_delegate_impl.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/views/frame/browser_view.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/browser/ui/views/frame/browser_view.h
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/test/base/test_browser_window.cc
[modify] https://crrev.com/867b07799e9d68f716a263d30951ea12613e5546/chrome/test/base/test_browser_window.h

Comment 59 by nattestad@google.com, Feb 6

Blocking: 917520

Comment 60 by nattestad@google.com, Feb 6

Blocking: 917516

Comment 61 by nattestad@google.com, Feb 6

Blocking: 917512

Comment 62 by jsbell@google.com, Feb 7

Blocking: 917505

Comment 64 by raymes@google.com, Feb 18 (5 days ago)

Owner: harrisjay@chromium.org

Comment 65 by bugdroid, Feb 22 (2 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71a8024af0bc7411197e6df2a3fc4c723eec7df3

commit 71a8024af0bc7411197e6df2a3fc4c723eec7df3
Author: Jay Harris <harrisjay@chromium.org>
Date: Fri Feb 22 01:23:19 2019

Updates the badge accessibility text on Windows.

Previously, the accessibility text for saturated badges (e.g. 99+ for
badge values greater than 99) was the full number (e.g. 125).
Accessibility recommended that we update the text to match what is
displayed on the badge, as the consistency can be helpful to those with
low vision.

Bug: 719176
Change-Id: Ide81d0dd6f51b0ac2571944db05bd64c00682d90
Reviewed-on: https://chromium-review.googlesource.com/c/1480290
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634453}
[modify] https://crrev.com/71a8024af0bc7411197e6df2a3fc4c723eec7df3/chrome/browser/badging/badge_manager.cc
[modify] https://crrev.com/71a8024af0bc7411197e6df2a3fc4c723eec7df3/chrome/browser/badging/badge_manager.h
[modify] https://crrev.com/71a8024af0bc7411197e6df2a3fc4c723eec7df3/chrome/browser/badging/badge_manager_delegate_win.cc
[modify] https://crrev.com/71a8024af0bc7411197e6df2a3fc4c723eec7df3/ui/strings/ui_strings.grd

Sign in to add a comment