| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.notifications; | 5 package org.chromium.chrome.browser.notifications; |
| 6 | 6 |
| 7 import android.app.Notification; | 7 import android.app.Notification; |
| 8 import android.app.PendingIntent; | 8 import android.app.PendingIntent; |
| 9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
| 10 import android.graphics.drawable.Icon; |
| 11 import android.widget.RemoteViews; |
| 10 | 12 |
| 11 /** | 13 /** |
| 12 * Abstraction over Notification.Builder and NotificationCompat.Builder interfac
es. | 14 * Abstraction over Notification.Builder and NotificationCompat.Builder interfac
es. |
| 13 * | 15 * |
| 14 * TODO(awdf) Remove this once we've updated to revision 26 of the support libra
ry. | 16 * TODO(awdf) Remove this once we've updated to revision 26 of the support libra
ry. |
| 15 */ | 17 */ |
| 16 public interface ChromeNotificationBuilder { | 18 public interface ChromeNotificationBuilder { |
| 17 ChromeNotificationBuilder setAutoCancel(boolean autoCancel); | 19 ChromeNotificationBuilder setAutoCancel(boolean autoCancel); |
| 18 | 20 |
| 19 ChromeNotificationBuilder setContentIntent(PendingIntent contentIntent); | 21 ChromeNotificationBuilder setContentIntent(PendingIntent contentIntent); |
| 20 | 22 |
| 21 ChromeNotificationBuilder setContentTitle(String title); | 23 ChromeNotificationBuilder setContentTitle(CharSequence title); |
| 22 | 24 |
| 23 ChromeNotificationBuilder setContentText(String text); | 25 ChromeNotificationBuilder setContentText(CharSequence text); |
| 24 | 26 |
| 25 ChromeNotificationBuilder setSmallIcon(int icon); | 27 ChromeNotificationBuilder setSmallIcon(int icon); |
| 26 | 28 |
| 27 ChromeNotificationBuilder setTicker(String text); | 29 ChromeNotificationBuilder setSmallIcon(Icon icon); |
| 30 |
| 31 ChromeNotificationBuilder setTicker(CharSequence text); |
| 28 | 32 |
| 29 ChromeNotificationBuilder setLocalOnly(boolean localOnly); | 33 ChromeNotificationBuilder setLocalOnly(boolean localOnly); |
| 30 | 34 |
| 31 ChromeNotificationBuilder setGroup(String group); | 35 ChromeNotificationBuilder setGroup(String group); |
| 32 | 36 |
| 33 ChromeNotificationBuilder setOngoing(boolean ongoing); | 37 ChromeNotificationBuilder setOngoing(boolean ongoing); |
| 34 | 38 |
| 35 ChromeNotificationBuilder setVisibility(int visibility); | 39 ChromeNotificationBuilder setVisibility(int visibility); |
| 36 | 40 |
| 37 ChromeNotificationBuilder setShowWhen(boolean showWhen); | 41 ChromeNotificationBuilder setShowWhen(boolean showWhen); |
| 38 | 42 |
| 39 ChromeNotificationBuilder addAction(int icon, String title, PendingIntent in
tent); | 43 ChromeNotificationBuilder addAction(int icon, CharSequence title, PendingInt
ent intent); |
| 44 |
| 45 ChromeNotificationBuilder addAction(Notification.Action action); |
| 40 | 46 |
| 41 ChromeNotificationBuilder setDeleteIntent(PendingIntent intent); | 47 ChromeNotificationBuilder setDeleteIntent(PendingIntent intent); |
| 42 | 48 |
| 43 ChromeNotificationBuilder setPriority(int pri); | 49 ChromeNotificationBuilder setPriority(int pri); |
| 44 | 50 |
| 45 ChromeNotificationBuilder setProgress(int max, int percentage, boolean indet
erminate); | 51 ChromeNotificationBuilder setProgress(int max, int percentage, boolean indet
erminate); |
| 46 | 52 |
| 47 ChromeNotificationBuilder setSubText(String text); | 53 ChromeNotificationBuilder setSubText(CharSequence text); |
| 48 | 54 |
| 49 ChromeNotificationBuilder setContentInfo(String info); | 55 ChromeNotificationBuilder setContentInfo(String info); |
| 50 | 56 |
| 51 ChromeNotificationBuilder setWhen(long time); | 57 ChromeNotificationBuilder setWhen(long time); |
| 52 | 58 |
| 53 ChromeNotificationBuilder setLargeIcon(Bitmap icon); | 59 ChromeNotificationBuilder setLargeIcon(Bitmap icon); |
| 54 | 60 |
| 55 ChromeNotificationBuilder setVibrate(long[] vibratePattern); | 61 ChromeNotificationBuilder setVibrate(long[] vibratePattern); |
| 56 | 62 |
| 63 ChromeNotificationBuilder setDefaults(int defaults); |
| 64 |
| 65 ChromeNotificationBuilder setOnlyAlertOnce(boolean onlyAlertOnce); |
| 66 |
| 67 ChromeNotificationBuilder setPublicVersion(Notification publicNotification); |
| 68 |
| 69 ChromeNotificationBuilder setContent(RemoteViews views); |
| 70 |
| 71 ChromeNotificationBuilder setStyle(Notification.BigPictureStyle style); |
| 72 |
| 73 ChromeNotificationBuilder setStyle(Notification.BigTextStyle bigTextStyle); |
| 74 |
| 75 Notification buildWithBigContentView(RemoteViews bigView); |
| 76 |
| 57 Notification buildWithBigTextStyle(String bigText); | 77 Notification buildWithBigTextStyle(String bigText); |
| 58 | 78 |
| 59 Notification build(); | 79 Notification build(); |
| 60 } | 80 } |
| OLD | NEW |