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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationSettingsBridge.java

Issue 2886433002: [Android] Adding content settings provider for notification channels (Closed)
Patch Set: Conditionally include new header file Created 3 years, 6 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
« no previous file with comments | « chrome/android/BUILD.gn ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.notifications;
6
7 import org.chromium.base.BuildInfo;
8 import org.chromium.base.annotations.CalledByNative;
9
10 /**
11 * Interface for native code to interact with Android notification channels.
12 */
13 public class NotificationSettingsBridge {
14 // TODO(awdf): Remove this and check BuildInfo.sdk_int() from native instead , once SdkVersion
15 // enum includes Android O.
16 @CalledByNative
17 static boolean shouldUseChannelSettings() {
18 return BuildInfo.isAtLeastO();
19 }
20
21 /**
22 * Creates a notification channel for the given origin.
23 * @param origin The site origin to be used as the channel name.
24 * @param enabled True if the channel should be initially enabled, false if
25 * it should start off as blocked.
26 * @return true if the channel was successfully created, false otherwise.
27 */
28 @CalledByNative
29 static boolean createChannel(String origin, boolean enabled) {
30 // TODO(crbug.com/700377) Actually construct a channel.
31 return false;
32 }
33
34 @CalledByNative
35 static @NotificationChannelStatus int getChannelStatus(String origin) {
36 // TODO(crbug.com/700377) Actually check channel status.
37 return NotificationChannelStatus.UNAVAILABLE;
38 }
39
40 @CalledByNative
41 static void deleteChannel(String origin) {
42 // TODO(crbug.com/700377) Actually delete channel.
43 }
44 }
OLDNEW
« no previous file with comments | « chrome/android/BUILD.gn ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698