OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.preferences.website; | 5 package org.chromium.chrome.browser.preferences.website; |
6 | 6 |
7 /** | 7 /** |
8 * Notification information for a given origin. | 8 * Notification information for a given origin. |
9 */ | 9 */ |
10 public class NotificationInfo extends PermissionInfo { | 10 public class NotificationInfo extends PermissionInfo { |
11 public NotificationInfo(String origin, String embedder, boolean isIncognito)
{ | 11 public NotificationInfo(String origin, String embedder, boolean isIncognito)
{ |
12 super(origin, embedder, isIncognito); | 12 super(origin, embedder, isIncognito); |
13 } | 13 } |
14 | 14 |
15 @Override | 15 @Override |
16 protected int getNativePreferenceValue(String origin, String embedder, boole
an isIncognito) { | 16 protected int getNativePreferenceValue(String origin, String embedder, boole
an isIncognito) { |
17 return WebsitePreferenceBridge.nativeGetNotificationSettingForOrigin( | 17 return WebsitePreferenceBridge.nativeGetNotificationSettingForOrigin( |
18 origin, embedder, isIncognito); | 18 origin, isIncognito); |
19 } | 19 } |
20 | 20 |
21 @Override | 21 @Override |
22 protected void setNativePreferenceValue( | 22 protected void setNativePreferenceValue( |
23 String origin, String embedder, ContentSetting value, boolean isInco
gnito) { | 23 String origin, String embedder, ContentSetting value, boolean isInco
gnito) { |
24 WebsitePreferenceBridge.nativeSetNotificationSettingForOrigin( | 24 WebsitePreferenceBridge.nativeSetNotificationSettingForOrigin( |
25 origin, embedder, value.toInt(), isIncognito); | 25 origin, embedder, value.toInt(), isIncognito); |
26 } | 26 } |
27 } | 27 } |
OLD | NEW |