[email protected] | 44ecb83 | 2013-08-02 09:06:45 | [diff] [blame] | 1 | // Copyright 2013 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 | |||||
[email protected] | 29998f9 | 2014-06-15 03:12:14 | [diff] [blame] | 5 | #include "chrome/browser/media/midi_permission_context.h" |
Charlie Hu | e010cf2 | 2021-03-03 23:09:51 | [diff] [blame] | 6 | #include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom.h" |
[email protected] | 44ecb83 | 2013-08-02 09:06:45 | [diff] [blame] | 7 | |
Clark DuVall | a11361ad3 | 2020-02-20 22:14:27 | [diff] [blame] | 8 | MidiPermissionContext::MidiPermissionContext( |
9 | content::BrowserContext* browser_context) | ||||
Charlie Hu | 1b9da2c | 2021-03-04 18:51:30 | [diff] [blame^] | 10 | : PermissionContextBase( |
11 | browser_context, | ||||
12 | ContentSettingsType::MIDI, | ||||
13 | blink::mojom::PermissionsPolicyFeature::kMidiFeature) {} | ||||
[email protected] | 44ecb83 | 2013-08-02 09:06:45 | [diff] [blame] | 14 | |
[email protected] | 29998f9 | 2014-06-15 03:12:14 | [diff] [blame] | 15 | MidiPermissionContext::~MidiPermissionContext() { |
[email protected] | 44ecb83 | 2013-08-02 09:06:45 | [diff] [blame] | 16 | } |
17 | |||||
raymes | c2cf640f | 2017-05-29 01:35:27 | [diff] [blame] | 18 | ContentSetting MidiPermissionContext::GetPermissionStatusInternal( |
19 | content::RenderFrameHost* render_frame_host, | ||||
20 | const GURL& requesting_origin, | ||||
21 | const GURL& embedding_origin) const { | ||||
22 | return CONTENT_SETTING_ALLOW; | ||||
[email protected] | 00880a0 | 2013-10-30 03:18:30 | [diff] [blame] | 23 | } |
mlamouri | a31c6ff1 | 2015-06-01 15:40:52 | [diff] [blame] | 24 | |
25 | bool MidiPermissionContext::IsRestrictedToSecureOrigins() const { | ||||
Takashi Toyoshima | c64a4ab | 2019-06-26 05:34:04 | [diff] [blame] | 26 | return true; |
mlamouri | a31c6ff1 | 2015-06-01 15:40:52 | [diff] [blame] | 27 | } |