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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java

Issue 1978833002: [Media, UI] New default large icon in MediaNotification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving all the logic into MediaNotificationManager Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.media.ui; 5 package org.chromium.chrome.browser.media.ui;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.media.AudioManager; 10 import android.media.AudioManager;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 mNotificationInfoBuilder = 122 mNotificationInfoBuilder =
123 new MediaNotificationInfo.Builder() 123 new MediaNotificationInfo.Builder()
124 .setMetadata(metadata) 124 .setMetadata(metadata)
125 .setPaused(isPaused) 125 .setPaused(isPaused)
126 .setOrigin(mOrigin) 126 .setOrigin(mOrigin)
127 .setTabId(mTab.getId()) 127 .setTabId(mTab.getId())
128 .setPrivate(mTab.isIncognito()) 128 .setPrivate(mTab.isIncognito())
129 .setIcon(R.drawable.audio_playing) 129 .setIcon(R.drawable.audio_playing)
130 .setLargeIcon(mFavicon) 130 .setLargeIcon(mFavicon)
131 .setDefaultLargeIcon(R.drawable.audio_playing_sq uare)
131 .setActions(MediaNotificationInfo.ACTION_PLAY_PA USE 132 .setActions(MediaNotificationInfo.ACTION_PLAY_PA USE
132 | MediaNotificationInfo.ACTION_SWIPEAWAY ) 133 | MediaNotificationInfo.ACTION_SWIPEAWAY )
133 .setContentIntent(contentIntent) 134 .setContentIntent(contentIntent)
134 .setId(R.id.media_playback_notification) 135 .setId(R.id.media_playback_notification)
135 .setListener(mControlsListener); 136 .setListener(mControlsListener);
136 137
137 MediaNotificationManager.show(ContextUtils.getApplicationContext (), 138 MediaNotificationManager.show(ContextUtils.getApplicationContext (),
138 mNotificationInfoBuilder.build()); 139 mNotificationInfoBuilder.build());
139 140
140 Activity activity = getActivityFromTab(mTab); 141 Activity activity = getActivityFromTab(mTab);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 return false; 301 return false;
301 } 302 }
302 if (mFavicon != null && (icon.getWidth() < mFavicon.getWidth() 303 if (mFavicon != null && (icon.getWidth() < mFavicon.getWidth()
303 || icon.getHeight() < mFavicon.getHeight ())) { 304 || icon.getHeight() < mFavicon.getHeight ())) {
304 return false; 305 return false;
305 } 306 }
306 mFavicon = icon; 307 mFavicon = icon;
307 return true; 308 return true;
308 } 309 }
309 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698