New issue
Advanced search Search tips

Issue 897836 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 903981



Sign in to add a comment

Add a notification for controlling media

Project Member Reported by beccahughes@chromium.org, Oct 22

Issue description

As part of the media sesssion and controls work we should add a notification for controlling media playback on Chrome OS. This currently exists for Android apps on CrOS but we should add support for Chrome tabs too.

For context this is what the notification looks like on Android:

https://developers.google.com/web/updates/images/2017/02/tldr.png
 
Description: Show this description
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 25

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

commit c6a0a066445d607750750e8fdea29334c2b6ed46
Author: Becca Hughes <beccahughes@chromium.org>
Date: Thu Oct 25 16:54:13 2018

[Media Notification] Add a controller to hide/show

Add a MediaNotificationController to //ash that will
toggle a media notification if there is currently an
active media session.

At the moment, the notification does not do anything or
have an real data.

BUG=897836

Change-Id: I0672f6b830a962e8f6387b479c40a1e9e1fd2823
Reviewed-on: https://chromium-review.googlesource.com/c/1294415
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602757}
[modify] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/BUILD.gn
[add] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/media/media_notification_controller.cc
[add] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/media/media_notification_controller.h
[add] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/media/media_notification_controller_unittest.cc
[modify] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/public/cpp/ash_features.cc
[modify] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/public/cpp/ash_features.h
[modify] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/shell.cc
[modify] https://crrev.com/c6a0a066445d607750750e8fdea29334c2b6ed46/ash/shell.h

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 29

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

commit e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48
Author: Becca Hughes <beccahughes@chromium.org>
Date: Mon Oct 29 21:32:18 2018

Add a custom view type to Notification

At the moment there can only be one custom notification
view factory which is currently used for ARC. This adds
a `custom_view_type` to Notification which can be used
to differentiate between different factories.

This is part of the media session notification work as
we would like to show a notification with media controls
and this requires having our own custom view.

BUG=897836

Change-Id: I68ffadb3e6e04422a5522fdf302652046a9c5b0f
Reviewed-on: https://chromium-review.googlesource.com/c/1294417
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Oliver Chang <ochang@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603633}
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_constants.h
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_item_impl.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_manager.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_view.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ash/system/message_center/arc/arc_notification_view_unittest.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/chrome/browser/chromeos/arc/accessibility/DEPS
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ui/message_center/public/cpp/notification.h
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ui/message_center/public/mojo/notification.mojom
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ui/message_center/views/message_view_factory.cc
[modify] https://crrev.com/e8e9e7cc77eff2e5cbc8f76ce0ed329c1ffdef48/ui/message_center/views/message_view_factory.h

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 29

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

commit c8740df3c802a0bd10d5aae3763a5e3438e59dbc
Author: Becca Hughes <beccahughes@chromium.org>
Date: Mon Oct 29 23:22:42 2018

[Media Notification] Add a custom view

Add a custom view to use when showing a media
notification. At the moment this will just show
and hide the control buttons on hover.

BUG=897836

Change-Id: Ie6335b3fbff55e1f9d588cfbe3e95678fb0b8e1a
Reviewed-on: https://chromium-review.googlesource.com/c/1297246
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603684}
[modify] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/BUILD.gn
[add] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_constants.cc
[add] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_constants.h
[modify] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_controller.cc
[modify] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_controller_unittest.cc
[add] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_view.cc
[add] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_view.h
[add] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/media/media_notification_view_unittest.cc
[modify] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ash/system/message_center/message_center_view.h
[modify] https://crrev.com/c8740df3c802a0bd10d5aae3763a5e3438e59dbc/ui/message_center/views/notification_header_view.h

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 8

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

commit 2e2956a6f877cc4f7c7ef757e41c5b355bc68069
Author: Becca Hughes <beccahughes@chromium.org>
Date: Thu Nov 08 00:27:55 2018

[Media Notification] Add play pause button

Add a play pause button that will trigger the delegate
to call MediaController and toggle playback.

This also moves the play pause icons from //chrome into
//ui as they are needed in both //chrome and //ash.

BUG=897836

Change-Id: I691695f6ac1ba11bbd17537637d4d66e37f9725b
Reviewed-on: https://chromium-review.googlesource.com/c/1298250
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606246}
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/ash/media/media_notification_controller.cc
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/ash/media/media_notification_controller.h
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/ash/media/media_notification_view.cc
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/ash/media/media_notification_view.h
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/ash/media/media_notification_view_unittest.cc
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/chrome/app/vector_icons/BUILD.gn
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/chrome/browser/ui/views/overlay/overlay_window_views.cc
[modify] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/components/vector_icons/BUILD.gn
[rename] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/components/vector_icons/pause.icon
[rename] https://crrev.com/2e2956a6f877cc4f7c7ef757e41c5b355bc68069/components/vector_icons/play_arrow.icon

Blockedon: 903981
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 14

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

commit b8380984ef10ac7bb9774f00d566f408a398964d
Author: Becca Hughes <beccahughes@chromium.org>
Date: Wed Nov 14 22:56:21 2018

[Audio Focus] Add active changed observer

In audio focus there is a concept of an "active"
media session. This is the top most non-temporary
session. This is slightly different from the current
focused session which may be temporary. We use the
active media session for media controller too.

This adds a method for tracking the current active
media session. This will be used for the media
notification for hiding/showing it. At the moment
it uses focus which may result it being shown
incorrectly.

BUG=897836

Change-Id: I0e2f82ffe23394e04d72622aa0d27cd4e8834d7a
Reviewed-on: https://chromium-review.googlesource.com/c/1330696
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608153}
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/ash/media/media_notification_controller.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/ash/media/media_notification_controller.h
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/ash/media/media_notification_controller_unittest.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/ash/media/media_notification_view_unittest.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/content/browser/media/media_internals_audio_focus_helper.h
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/audio_focus_manager.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/audio_focus_manager.h
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/audio_focus_manager_unittest.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/media_controller.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/media_controller.h
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/public/cpp/test/audio_focus_test_util.cc
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/public/cpp/test/audio_focus_test_util.h
[modify] https://crrev.com/b8380984ef10ac7bb9774f00d566f408a398964d/services/media_session/public/mojom/audio_focus.mojom

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 20

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

commit be456a872f025227da86be99fdb371957f474c00
Author: Becca Hughes <beccahughes@chromium.org>
Date: Thu Dec 20 13:04:55 2018

[Media Notification] Support for multiple notifications

At the moment we have a single notification. We should
have one per site. This moves individual media session
logic into a new MediaNotificationItem class.

BUG=897836

Change-Id: I019dbefb5f14e6b8fe944aae00fce9feca399d03
Reviewed-on: https://chromium-review.googlesource.com/c/1364218
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618187}
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/BUILD.gn
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_constants.cc
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_constants.h
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_controller.cc
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_controller.h
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_controller_unittest.cc
[add] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_item.cc
[add] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_item.h
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_view.cc
[modify] https://crrev.com/be456a872f025227da86be99fdb371957f474c00/ash/media/media_notification_view_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 2

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

commit a32eac35468c42a6eff8518e93b18ed81d7ee573
Author: Becca Hughes <beccahughes@chromium.org>
Date: Wed Jan 02 19:15:09 2019

[Media Notification] Use actions for notification

This updates the media notification to only show
action buttons for actions that are supported by
the media session.

BUG=897836

Change-Id: I0809167fb108e803a44f9e4f5220259555550fe9
Reviewed-on: https://chromium-review.googlesource.com/c/1386646
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619449}
[modify] https://crrev.com/a32eac35468c42a6eff8518e93b18ed81d7ee573/ash/media/media_notification_item.cc
[modify] https://crrev.com/a32eac35468c42a6eff8518e93b18ed81d7ee573/ash/media/media_notification_item.h
[modify] https://crrev.com/a32eac35468c42a6eff8518e93b18ed81d7ee573/ash/media/media_notification_view.cc
[modify] https://crrev.com/a32eac35468c42a6eff8518e93b18ed81d7ee573/ash/media/media_notification_view.h
[modify] https://crrev.com/a32eac35468c42a6eff8518e93b18ed81d7ee573/ash/media/media_notification_view_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 17 (6 days ago)

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

commit 3fade378df58860293bc54af79de47cf9c54b40f
Author: Becca Hughes <beccahughes@chromium.org>
Date: Thu Jan 17 02:25:28 2019

[Media Notification] Fix bug in binding

Fix mojo binding in ash::MediaNotificationController.

BUG=897836

Change-Id: I9ba23b10d6078cc99d58ba8e09487e9cc8a310bd
Reviewed-on: https://chromium-review.googlesource.com/c/1410012
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623523}
[modify] https://crrev.com/3fade378df58860293bc54af79de47cf9c54b40f/ash/media/media_notification_controller.cc

Sign in to add a comment