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

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: update filenames elsewhere Created 3 years, 7 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
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 @CalledByNative
Peter Beverloo 2017/05/15 15:10:08 nit: TODO w/ comment to remove once the the SDK ve
awdf 2017/05/16 15:17:35 Done.
15 static boolean shouldUseChannelSettings() {
16 return BuildInfo.isAtLeastO();
17 }
18
19 /**
20 * Creates a notification channel for the given origin.
21 * @param origin The site origin to be used as the channel name.
22 * @param enabled True if the channel should be initially enabled, false if
23 * it should start off as blocked.
24 * @return true if the channel was successfully created, false otherwise.
25 */
26 @CalledByNative
27 static boolean createChannel(String origin, boolean enabled) {
28 // TODO(crbug.com/700377) Actually construct a channel.
29 return false;
30 }
31
32 @CalledByNative
33 static @NotificationChannelStatus int getChannelStatus(String origin) {
34 // TODO(crbug.com/700377) Actually check channel status.
35 return NotificationChannelStatus.UNAVAILABLE;
36 }
37
38 @CalledByNative
39 static void deleteChannel(String origin) {
40 // TODO(crbug.com/700377) Actually delete channel.
41 }
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698