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 19 matching lines...) Expand all Loading... | |
30 private ContentSettingException mBackgroundSyncExceptionInfo; | 30 private ContentSettingException mBackgroundSyncExceptionInfo; |
31 private CameraInfo mCameraInfo; | 31 private CameraInfo mCameraInfo; |
32 private ContentSettingException mCookieException; | 32 private ContentSettingException mCookieException; |
33 private FullscreenInfo mFullscreenInfo; | 33 private FullscreenInfo mFullscreenInfo; |
34 private GeolocationInfo mGeolocationInfo; | 34 private GeolocationInfo mGeolocationInfo; |
35 private ContentSettingException mJavaScriptException; | 35 private ContentSettingException mJavaScriptException; |
36 private KeygenInfo mKeygenInfo; | 36 private KeygenInfo mKeygenInfo; |
37 private LocalStorageInfo mLocalStorageInfo; | 37 private LocalStorageInfo mLocalStorageInfo; |
38 private MicrophoneInfo mMicrophoneInfo; | 38 private MicrophoneInfo mMicrophoneInfo; |
39 private MidiInfo mMidiInfo; | 39 private MidiInfo mMidiInfo; |
40 private MidiInfo mSensorsInfo; | |
shalamov
2016/10/27 08:47:25
MidiInfo?
riju_
2016/11/09 10:30:34
Done.
| |
40 private NotificationInfo mNotificationInfo; | 41 private NotificationInfo mNotificationInfo; |
41 private ContentSettingException mPopupException; | 42 private ContentSettingException mPopupException; |
42 private ProtectedMediaIdentifierInfo mProtectedMediaIdentifierInfo; | 43 private ProtectedMediaIdentifierInfo mProtectedMediaIdentifierInfo; |
43 private final List<StorageInfo> mStorageInfo = new ArrayList<StorageInfo>(); | 44 private final List<StorageInfo> mStorageInfo = new ArrayList<StorageInfo>(); |
44 private int mStorageInfoCallbacksLeft; | 45 private int mStorageInfoCallbacksLeft; |
45 private final List<UsbInfo> mUsbInfo = new ArrayList<UsbInfo>(); | 46 private final List<UsbInfo> mUsbInfo = new ArrayList<UsbInfo>(); |
46 | 47 |
47 public Website(WebsiteAddress origin, WebsiteAddress embedder) { | 48 public Website(WebsiteAddress origin, WebsiteAddress embedder) { |
48 mOrigin = origin; | 49 mOrigin = origin; |
49 mEmbedder = embedder; | 50 mEmbedder = embedder; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
343 /** | 344 /** |
344 * Configure Midi usage access setting for this site. | 345 * Configure Midi usage access setting for this site. |
345 */ | 346 */ |
346 public void setMidiPermission(ContentSetting value) { | 347 public void setMidiPermission(ContentSetting value) { |
347 if (mMidiInfo != null) { | 348 if (mMidiInfo != null) { |
348 mMidiInfo.setContentSetting(value); | 349 mMidiInfo.setContentSetting(value); |
349 } | 350 } |
350 } | 351 } |
351 | 352 |
352 /** | 353 /** |
354 * Configure Sensors usage access setting for this site. | |
355 */ | |
356 public void setSensorsPermission(ContentSetting value) { | |
357 if (mSensorsInfo != null) { | |
358 mSensorsInfo.setContentSetting(value); | |
359 } | |
360 } | |
361 | |
362 /** | |
353 * Sets Notification access permission information class. | 363 * Sets Notification access permission information class. |
354 */ | 364 */ |
355 public void setNotificationInfo(NotificationInfo info) { | 365 public void setNotificationInfo(NotificationInfo info) { |
356 mNotificationInfo = info; | 366 mNotificationInfo = info; |
357 } | 367 } |
358 | 368 |
359 public NotificationInfo getNotificationInfo() { | 369 public NotificationInfo getNotificationInfo() { |
360 return mNotificationInfo; | 370 return mNotificationInfo; |
361 } | 371 } |
362 | 372 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 mUsbInfo.add(info); | 504 mUsbInfo.add(info); |
495 } | 505 } |
496 | 506 |
497 /** | 507 /** |
498 * Returns the set of USB devices this website has been granted permission t o access. | 508 * Returns the set of USB devices this website has been granted permission t o access. |
499 */ | 509 */ |
500 public List<UsbInfo> getUsbInfo() { | 510 public List<UsbInfo> getUsbInfo() { |
501 return new ArrayList<UsbInfo>(mUsbInfo); | 511 return new ArrayList<UsbInfo>(mUsbInfo); |
502 } | 512 } |
503 } | 513 } |
OLD | NEW |