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

Side by Side Diff: chrome/browser/media/midi_permission_context.h

Issue 1153873003: Add way for PermissionContext to be automatically restricted to secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@midi_permission_sysex
Patch Set: typo Created 5 years, 6 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_
6 #define CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_ 6 #define CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_
7 7
8 #include "chrome/browser/content_settings/permission_context_base.h" 8 #include "chrome/browser/content_settings/permission_context_base.h"
9 9
10 class GURL; 10 class GURL;
11 class PermissionRequestID; 11 class PermissionRequestID;
12 12
13 class MidiPermissionContext : public PermissionContextBase { 13 class MidiPermissionContext : public PermissionContextBase {
14 public: 14 public:
15 explicit MidiPermissionContext(Profile* profile); 15 explicit MidiPermissionContext(Profile* profile);
16 ~MidiPermissionContext() override; 16 ~MidiPermissionContext() override;
17 17
18 // PermissionContextBase:
19 ContentSetting GetPermissionStatus(
20 const GURL& requesting_origin,
21 const GURL& embedding_origin) const override;
22
23 private: 18 private:
24 // PermissionContextBase: 19 // PermissionContextBase:
25 void UpdateTabContext(const PermissionRequestID& id, 20 void UpdateTabContext(const PermissionRequestID& id,
26 const GURL& requesting_frame, 21 const GURL& requesting_frame,
27 bool allowed) override; 22 bool allowed) override;
28 void DecidePermission(content::WebContents* web_contents, 23 bool IsRestrictedToSecureOrigins() const override;
29 const PermissionRequestID& id,
30 const GURL& requesting_origin,
31 const GURL& embedding_origin,
32 bool user_gesture,
33 const BrowserPermissionCallback& callback) override;
34 24
35 DISALLOW_COPY_AND_ASSIGN(MidiPermissionContext); 25 DISALLOW_COPY_AND_ASSIGN(MidiPermissionContext);
36 }; 26 };
37 27
38 #endif // CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_ 28 #endif // CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_permission_context.cc ('k') | chrome/browser/media/midi_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698