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

Unified Diff: chrome/browser/media/chrome_midi_permission_context.h

Issue 156173002: [MIDI] Add a permission bubble client for MIDI system control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/chrome_midi_permission_context.h
diff --git a/chrome/browser/media/chrome_midi_permission_context.h b/chrome/browser/media/chrome_midi_permission_context.h
index 8b3b22affe966ac7fc7011b3fc194453c056c791..a868e453cdc7e713391936ba4c1032a0427e35d4 100644
--- a/chrome/browser/media/chrome_midi_permission_context.h
+++ b/chrome/browser/media/chrome_midi_permission_context.h
@@ -9,6 +9,10 @@
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/browser_context.h"
+namespace content {
+class WebContents;
+}
+
class GURL;
class PermissionQueueController;
class PermissionRequestID;
@@ -37,11 +41,21 @@ class ChromeMidiPermissionContext : public BrowserContextKeyedService {
int bridge_id,
const GURL& requesting_frame);
+ // Called when the permission decision is made. If a permissions prompt is
+ // shown to the user it will be called when the user selects an option
+ // from that prompt.
+ void NotifyPermissionSet(
+ const PermissionRequestID& id,
+ const GURL& requesting_frame,
+ const content::BrowserContext::MidiSysExPermissionCallback& callback,
+ bool allowed);
+
private:
// Decide whether the permission should be granted.
// Calls PermissionDecided if permission can be decided non-interactively,
// or NotifyPermissionSet if permission decided by presenting an infobar.
void DecidePermission(
+ content::WebContents* web_contents,
const PermissionRequestID& id,
const GURL& requesting_frame,
const GURL& embedder,
@@ -55,14 +69,6 @@ class ChromeMidiPermissionContext : public BrowserContextKeyedService {
const content::BrowserContext::MidiSysExPermissionCallback& callback,
bool allowed);
- // Called when the permission decision is made. It may be by the
- // InfoBarDelegate to notify permission has been set.
- void NotifyPermissionSet(
- const PermissionRequestID& id,
- const GURL& requesting_frame,
- const content::BrowserContext::MidiSysExPermissionCallback& callback,
- bool allowed);
-
// Return an instance of the infobar queue controller, creating it if needed.
PermissionQueueController* GetQueueController();

Powered by Google App Engine
This is Rietveld 408576698