OLD | NEW |
(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 #include "chrome/browser/generic_sensor/sensor_permission_context.h" |
| 6 |
| 7 SensorPermissionContext::SensorPermissionContext(Profile* profile) |
| 8 : PermissionContextBase(profile, |
| 9 CONTENT_SETTINGS_TYPE_SENSORS, |
| 10 blink::WebFeaturePolicyFeature::kNotFound) {} |
| 11 |
| 12 SensorPermissionContext::~SensorPermissionContext() {} |
| 13 |
| 14 ContentSetting SensorPermissionContext::GetPermissionStatusInternal( |
| 15 content::RenderFrameHost* render_frame_host, |
| 16 const GURL& requesting_origin, |
| 17 const GURL& embedding_origin) const { |
| 18 if (requesting_origin != embedding_origin) |
| 19 return CONTENT_SETTING_BLOCK; |
| 20 |
| 21 return CONTENT_SETTING_ALLOW; |
| 22 } |
| 23 |
| 24 bool SensorPermissionContext::IsRestrictedToSecureOrigins() const { |
| 25 return true; |
| 26 } |
OLD | NEW |