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; | 10 import android.graphics.drawable.Icon; |
| 11 import android.os.Bundle; |
11 import android.support.v4.media.session.MediaSessionCompat; | 12 import android.support.v4.media.session.MediaSessionCompat; |
12 import android.widget.RemoteViews; | 13 import android.widget.RemoteViews; |
13 | 14 |
14 /** | 15 /** |
15 * Abstraction over Notification.Builder and NotificationCompat.Builder interfac
es. | 16 * Abstraction over Notification.Builder and NotificationCompat.Builder interfac
es. |
16 * | 17 * |
17 * TODO(awdf) Remove this once we've updated to revision 26 of the support libra
ry. | 18 * TODO(awdf) Remove this once we've updated to revision 26 of the support libra
ry. |
18 */ | 19 */ |
19 public interface ChromeNotificationBuilder { | 20 public interface ChromeNotificationBuilder { |
20 ChromeNotificationBuilder setAutoCancel(boolean autoCancel); | 21 ChromeNotificationBuilder setAutoCancel(boolean autoCancel); |
21 | 22 |
22 ChromeNotificationBuilder setContentIntent(PendingIntent contentIntent); | 23 ChromeNotificationBuilder setContentIntent(PendingIntent contentIntent); |
23 | 24 |
24 ChromeNotificationBuilder setContentTitle(CharSequence title); | 25 ChromeNotificationBuilder setContentTitle(CharSequence title); |
25 | 26 |
26 ChromeNotificationBuilder setContentText(CharSequence text); | 27 ChromeNotificationBuilder setContentText(CharSequence text); |
27 | 28 |
28 ChromeNotificationBuilder setSmallIcon(int icon); | 29 ChromeNotificationBuilder setSmallIcon(int icon); |
29 | 30 |
30 ChromeNotificationBuilder setSmallIcon(Icon icon); | 31 ChromeNotificationBuilder setSmallIcon(Icon icon); |
31 | 32 |
32 ChromeNotificationBuilder setTicker(CharSequence text); | 33 ChromeNotificationBuilder setTicker(CharSequence text); |
33 | 34 |
34 ChromeNotificationBuilder setLocalOnly(boolean localOnly); | 35 ChromeNotificationBuilder setLocalOnly(boolean localOnly); |
35 | 36 |
36 ChromeNotificationBuilder setGroup(String group); | 37 ChromeNotificationBuilder setGroup(String group); |
37 | 38 |
38 ChromeNotificationBuilder setGroupSummary(boolean isGroupSummary); | 39 ChromeNotificationBuilder setGroupSummary(boolean isGroupSummary); |
39 | 40 |
| 41 ChromeNotificationBuilder addExtras(Bundle extras); |
| 42 |
40 ChromeNotificationBuilder setOngoing(boolean ongoing); | 43 ChromeNotificationBuilder setOngoing(boolean ongoing); |
41 | 44 |
42 ChromeNotificationBuilder setVisibility(int visibility); | 45 ChromeNotificationBuilder setVisibility(int visibility); |
43 | 46 |
44 ChromeNotificationBuilder setShowWhen(boolean showWhen); | 47 ChromeNotificationBuilder setShowWhen(boolean showWhen); |
45 | 48 |
46 ChromeNotificationBuilder addAction(int icon, CharSequence title, PendingInt
ent intent); | 49 ChromeNotificationBuilder addAction(int icon, CharSequence title, PendingInt
ent intent); |
47 | 50 |
48 ChromeNotificationBuilder addAction(Notification.Action action); | 51 ChromeNotificationBuilder addAction(Notification.Action action); |
49 | 52 |
(...skipping 27 matching lines...) Expand all Loading... |
77 | 80 |
78 ChromeNotificationBuilder setMediaStyle(MediaSessionCompat session, int[] ac
tions, | 81 ChromeNotificationBuilder setMediaStyle(MediaSessionCompat session, int[] ac
tions, |
79 PendingIntent intent, boolean showCancelButton); | 82 PendingIntent intent, boolean showCancelButton); |
80 | 83 |
81 Notification buildWithBigContentView(RemoteViews bigView); | 84 Notification buildWithBigContentView(RemoteViews bigView); |
82 | 85 |
83 Notification buildWithBigTextStyle(String bigText); | 86 Notification buildWithBigTextStyle(String bigText); |
84 | 87 |
85 Notification build(); | 88 Notification build(); |
86 } | 89 } |
OLD | NEW |