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

Unified Diff: content/browser/renderer_host/media/midi_dispatcher_host.h

Issue 38043004: Cancel MIDI permission request infobar on MIDIAccess stop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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: content/browser/renderer_host/media/midi_dispatcher_host.h
diff --git a/content/browser/renderer_host/media/midi_dispatcher_host.h b/content/browser/renderer_host/media/midi_dispatcher_host.h
index ee861551b44045689cf6f6d2c7bfd13053d4507c..7214154b56c006cf6112d9b88eb49b72b75ab1aa 100644
--- a/content/browser/renderer_host/media/midi_dispatcher_host.h
+++ b/content/browser/renderer_host/media/midi_dispatcher_host.h
@@ -6,19 +6,19 @@
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
#include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/midi_permission_context.h"
class GURL;
namespace content {
-class BrowserContext;
-
// MIDIDispatcherHost handles permissions for using system exclusive messages.
// It works as BrowserMessageFilter to handle IPC messages between
// MIDIDispatcher running as a RenderViewObserver.
class MIDIDispatcherHost : public BrowserMessageFilter {
public:
- MIDIDispatcherHost(int render_process_id, BrowserContext* browser_context);
+ MIDIDispatcherHost(int render_process_id,
+ MidiPermissionContext* midi_permission_context_);
// BrowserMessageFilter implementation.
virtual bool OnMessageReceived(const IPC::Message& message,
@@ -31,14 +31,17 @@ class MIDIDispatcherHost : public BrowserMessageFilter {
private:
void OnRequestSysExPermission(int render_view_id,
- int client_id,
+ int bridge_id,
const GURL& origin);
+ void OnCancelSysExPermissionRequest(int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame);
void WasSysExPermissionGranted(int render_view_id,
- int client_id,
+ int bridge_id,
bool success);
int render_process_id_;
- BrowserContext* browser_context_;
+ scoped_refptr<MidiPermissionContext> midi_permission_context_;
DISALLOW_COPY_AND_ASSIGN(MIDIDispatcherHost);
};

Powered by Google App Engine
This is Rietveld 408576698