Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Issue 1491943002: Refactoring media notification (Closed)

Created:
5 years ago by Zhiqiang Zhang (Slow)
Modified:
5 years ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mlamouri+watch-media_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactoring media notification Some refactoring in the media notification. Media notification will no longer updates itself. When after a control message is received, it only sends command to the underlying MediaSession. Then when MediaSession has changed its state, it will tell the media notification to update accordingly. Besides, a lot of redundant code has been cleaned up. BUG=546981 Committed: https://crrev.com/134cb4ede9e4d62fe675424eb5827767e2165963 Cr-Commit-Position: refs/heads/master@{#364364}

Patch Set 1 #

Total comments: 4

Patch Set 2 : more fixes for control & update, refactored for notification id #

Patch Set 3 : Fixed media_session_browsertests #

Patch Set 4 : Moved UpdateWebContents into OnSuspendInternal/OnResumeInternal #

Total comments: 12

Patch Set 5 : Revert last patch. Moving UpdateWebContents to OnSuspendInternal/OnResumeInternal will break some U… #

Patch Set 6 : Moved UpdateWebContents, removed getNotification, replace temporary flag in MediaSession::OnSuspend… #

Patch Set 7 : added two MediaSessionBrowserTests to test MediaSession.Stop() #

Total comments: 12

Patch Set 8 : small fixes #

Patch Set 9 : removed manager.mNotificationId, some small fixes #

Messages

Total messages: 28 (11 generated)
Zhiqiang Zhang (Slow)
5 years ago (2015-12-02 14:21:09 UTC) #2
whywhat
https://codereview.chromium.org/1491943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (left): https://codereview.chromium.org/1491943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#oldcode419 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:419: updateNotification(); I think the idea was to replace onPlay ...
5 years ago (2015-12-02 14:41:09 UTC) #3
Zhiqiang Zhang (Slow)
PTAL. I've done some more refactoring with respect to the notification id. As well, please ...
5 years ago (2015-12-03 16:34:59 UTC) #4
Zhiqiang Zhang (Slow)
PTAL. I've fixed some media_session_browsertests, and moved UpdateWebContents into OnSuspendInternal/OnResumeInternal.
5 years ago (2015-12-07 15:24:06 UTC) #5
mlamouri (slow - plz ping)
Looks very good. Very exciting to see so much code cleanup! :) https://codereview.chromium.org/1491943002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java ...
5 years ago (2015-12-07 18:38:03 UTC) #6
Zhiqiang Zhang (Slow)
PTAL. Changes: 1. Removed getNotificationId() from ListenerService and MediaButtonReceiver; 2. Moved UpdateWebContents into OnSuspendInternal/OnResumeInternal; 3. ...
5 years ago (2015-12-08 16:28:16 UTC) #7
mlamouri (slow - plz ping)
This looks great! :) lgtm but please wait for avayvod@ before landing. https://codereview.chromium.org/1491943002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java ...
5 years ago (2015-12-09 14:31:37 UTC) #8
whywhat
https://codereview.chromium.org/1491943002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java (right): https://codereview.chromium.org/1491943002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java#newcode23 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java:23: context.startService(intent); Why is setClassName() equivalent to setComponent() then? Why ...
5 years ago (2015-12-09 16:59:27 UTC) #9
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/1491943002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java (right): https://codereview.chromium.org/1491943002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java#newcode23 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java:23: context.startService(intent); On 2015/12/09 16:59:27, whywhat wrote: > Why is ...
5 years ago (2015-12-09 18:02:56 UTC) #10
whywhat
lgtm (extra bonus lgtm if you can get rid of mNotificationId as discussed offline). Thanks ...
5 years ago (2015-12-09 20:46:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491943002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491943002/140001
5 years ago (2015-12-09 21:07:51 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/127218)
5 years ago (2015-12-09 21:49:16 UTC) #16
Zhiqiang Zhang (Slow)
+miguelg@ because we don't own PauseOnHeadsetUnplugTest.java. Perhaps consider adding an OWNER file to .../javatests/.../media/ui/ in ...
5 years ago (2015-12-10 11:04:22 UTC) #20
mlamouri (slow - plz ping)
I've sent https://codereview.chromium.org/1520463002 for review. If miguelg@ can review that. we will be able to ...
5 years ago (2015-12-10 11:20:00 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1491943002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1491943002/180001
5 years ago (2015-12-10 14:12:12 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years ago (2015-12-10 15:30:56 UTC) #26
commit-bot: I haz the power
5 years ago (2015-12-10 15:32:06 UTC) #28
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/134cb4ede9e4d62fe675424eb5827767e2165963
Cr-Commit-Position: refs/heads/master@{#364364}

Powered by Google App Engine
This is Rietveld 408576698