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 org.chromium.base.BuildInfo; | 7 import org.chromium.base.BuildInfo; |
8 import org.chromium.base.annotations.CalledByNative; | 8 import org.chromium.base.annotations.CalledByNative; |
9 | 9 |
10 /** | 10 /** |
(...skipping 20 matching lines...) Expand all Loading... |
31 return false; | 31 return false; |
32 } | 32 } |
33 | 33 |
34 @CalledByNative | 34 @CalledByNative |
35 static @NotificationChannelStatus int getChannelStatus(String origin) { | 35 static @NotificationChannelStatus int getChannelStatus(String origin) { |
36 // TODO(crbug.com/700377) Actually check channel status. | 36 // TODO(crbug.com/700377) Actually check channel status. |
37 return NotificationChannelStatus.UNAVAILABLE; | 37 return NotificationChannelStatus.UNAVAILABLE; |
38 } | 38 } |
39 | 39 |
40 @CalledByNative | 40 @CalledByNative |
| 41 static SiteChannel[] getSiteChannels() { |
| 42 // TODO(crbug.com/700377) Actually get site channels. |
| 43 return new SiteChannel[] {}; |
| 44 } |
| 45 |
| 46 @CalledByNative |
41 static void deleteChannel(String origin) { | 47 static void deleteChannel(String origin) { |
42 // TODO(crbug.com/700377) Actually delete channel. | 48 // TODO(crbug.com/700377) Actually delete channel. |
43 } | 49 } |
| 50 |
| 51 static class SiteChannel { |
| 52 private final String mOrigin; |
| 53 private final @NotificationChannelStatus int mStatus; |
| 54 |
| 55 private SiteChannel(String origin, @NotificationChannelStatus int status
) { |
| 56 mOrigin = origin; |
| 57 mStatus = status; |
| 58 } |
| 59 |
| 60 @CalledByNative("SiteChannel") |
| 61 private String getOrigin() { |
| 62 return mOrigin; |
| 63 } |
| 64 |
| 65 @CalledByNative("SiteChannel") |
| 66 private @NotificationChannelStatus int getStatus() { |
| 67 return mStatus; |
| 68 } |
| 69 } |
44 } | 70 } |
OLD | NEW |