| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.webapk.lib.client; | |
| 6 | |
| 7 import android.app.Notification; | |
| 8 import android.app.PendingIntent; | |
| 9 import android.graphics.Bitmap; | |
| 10 | |
| 11 /** | |
| 12 * An interface for setting PendingIntents when building a notification. | |
| 13 */ | |
| 14 public interface NotificationBuilderDelegate { | |
| 15 /** | |
| 16 * Sets the PendingIntent to send when the notification is clicked. | |
| 17 */ | |
| 18 NotificationBuilderDelegate setContentIntent(PendingIntent intent); | |
| 19 | |
| 20 /** | |
| 21 * Sets the PendingIntent to send when the notification is cleared by the us
er directly from | |
| 22 * the notification panel. | |
| 23 */ | |
| 24 NotificationBuilderDelegate setDeleteIntent(PendingIntent intent); | |
| 25 | |
| 26 /** | |
| 27 * Adds an action to the notification. Actions are typically displayed as a
button adjacent to | |
| 28 * the notification content. | |
| 29 */ | |
| 30 NotificationBuilderDelegate addAction(Bitmap iconBitmap, CharSequence title, | |
| 31 PendingIntent intent); | |
| 32 | |
| 33 /** | |
| 34 * Sets small icon id for displaying a notification. | |
| 35 */ | |
| 36 NotificationBuilderDelegate setSmallIcon(int icon); | |
| 37 | |
| 38 /** | |
| 39 * Combines all of the options that have been set and returns a new Notifica
tion object. | |
| 40 */ | |
| 41 Notification build(); | |
| 42 | |
| 43 } | |
| OLD | NEW |