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 import org.chromium.chrome.browser.util.MathUtils; | 7 import org.chromium.chrome.browser.util.MathUtils; |
8 | 8 |
9 import java.io.Serializable; | 9 import java.io.Serializable; |
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 private final WebsiteAddress mAddress; | 26 private final WebsiteAddress mAddress; |
27 private final String mTitle; | 27 private final String mTitle; |
28 private String mSummary; | 28 private String mSummary; |
29 private CameraInfo mCameraInfo; | 29 private CameraInfo mCameraInfo; |
30 private CookieInfo mCookieInfo; | 30 private CookieInfo mCookieInfo; |
31 private GeolocationInfo mGeolocationInfo; | 31 private GeolocationInfo mGeolocationInfo; |
32 private MicrophoneInfo mMicrophoneInfo; | 32 private MicrophoneInfo mMicrophoneInfo; |
33 private MidiInfo mMidiInfo; | 33 private MidiInfo mMidiInfo; |
34 private ContentSettingException mJavaScriptException; | 34 private ContentSettingException mJavaScriptException; |
| 35 private ContentSettingException mKeygenException; |
35 private ContentSettingException mPopupException; | 36 private ContentSettingException mPopupException; |
36 private ProtectedMediaIdentifierInfo mProtectedMediaIdentifierInfo; | 37 private ProtectedMediaIdentifierInfo mProtectedMediaIdentifierInfo; |
37 private PushNotificationInfo mPushNotificationInfo; | 38 private PushNotificationInfo mPushNotificationInfo; |
38 private LocalStorageInfo mLocalStorageInfo; | 39 private LocalStorageInfo mLocalStorageInfo; |
39 private final List<StorageInfo> mStorageInfo = new ArrayList<StorageInfo>(); | 40 private final List<StorageInfo> mStorageInfo = new ArrayList<StorageInfo>(); |
40 private int mStorageInfoCallbacksLeft; | 41 private int mStorageInfoCallbacksLeft; |
41 private FullscreenInfo mFullscreenInfo; | 42 private FullscreenInfo mFullscreenInfo; |
42 | 43 |
43 public Website(WebsiteAddress address) { | 44 public Website(WebsiteAddress address) { |
44 mAddress = address; | 45 mAddress = address; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 182 } |
182 | 183 |
183 /** | 184 /** |
184 * Sets the JavaScript exception info for this Website. | 185 * Sets the JavaScript exception info for this Website. |
185 */ | 186 */ |
186 public void setJavaScriptException(ContentSettingException exception) { | 187 public void setJavaScriptException(ContentSettingException exception) { |
187 mJavaScriptException = exception; | 188 mJavaScriptException = exception; |
188 } | 189 } |
189 | 190 |
190 /** | 191 /** |
| 192 * Returns what permission governs Keygen access. |
| 193 */ |
| 194 public ContentSetting getKeygenPermission() { |
| 195 return mKeygenException != null ? mKeygenException.getContentSetting() :
null; |
| 196 } |
| 197 |
| 198 /** |
| 199 * Configure Keygen permission access setting for this site. |
| 200 */ |
| 201 public void setKeygenPermission(ContentSetting value) { |
| 202 if (mKeygenException != null) { |
| 203 mKeygenException.setContentSetting(value); |
| 204 } |
| 205 } |
| 206 |
| 207 /** |
| 208 * Sets the Keygen exception info for this Website. |
| 209 */ |
| 210 public void setKeygenException(ContentSettingException exception) { |
| 211 mKeygenException = exception; |
| 212 } |
| 213 |
| 214 /** |
191 * Sets the Popup exception info for this Website. | 215 * Sets the Popup exception info for this Website. |
192 */ | 216 */ |
193 public void setPopupException(ContentSettingException exception) { | 217 public void setPopupException(ContentSettingException exception) { |
194 mPopupException = exception; | 218 mPopupException = exception; |
195 } | 219 } |
196 | 220 |
197 public ContentSettingException getPopupException() { | 221 public ContentSettingException getPopupException() { |
198 return mPopupException; | 222 return mPopupException; |
199 } | 223 } |
200 | 224 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 * Configure fullscreen setting for this site. | 442 * Configure fullscreen setting for this site. |
419 * | 443 * |
420 * @param value Content setting for fullscreen permission. | 444 * @param value Content setting for fullscreen permission. |
421 */ | 445 */ |
422 public void setFullscreenPermission(ContentSetting value) { | 446 public void setFullscreenPermission(ContentSetting value) { |
423 if (mFullscreenInfo != null) { | 447 if (mFullscreenInfo != null) { |
424 mFullscreenInfo.setContentSetting(value); | 448 mFullscreenInfo.setContentSetting(value); |
425 } | 449 } |
426 } | 450 } |
427 } | 451 } |
OLD | NEW |