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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SensorInfo.java

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 years, 8 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 2016 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.preferences.website;
6
7 /**
8 * Sensors information for a given origin.
9 */
10 public class SensorInfo extends PermissionInfo {
11 public SensorInfo(String origin, String embedder, boolean isIncognito) {
12 super(origin, embedder, isIncognito);
13 }
14
15 protected int getNativePreferenceValue(String origin, String embedder, boole an isIncognito) {
16 return WebsitePreferenceBridge.nativeGetSensorSettingForOrigin(
17 origin, embedder, isIncognito);
18 }
19
20 protected void setNativePreferenceValue(
21 String origin, String embedder, ContentSetting value, boolean isInco gnito) {
22 WebsitePreferenceBridge.nativeSetSensorSettingForOrigin(
23 origin, embedder, value.toInt(), isIncognito);
24 }
25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698