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

Unified Diff: content/renderer/media/midi_dispatcher.cc

Issue 185863003: [Media] Add user gesture reporting for API calls to midi and media streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test merge Created 6 years, 9 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
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/shell/browser/shell_browser_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/midi_dispatcher.cc
diff --git a/content/renderer/media/midi_dispatcher.cc b/content/renderer/media/midi_dispatcher.cc
index 7d81cd92be467b09732b46fc58dcec7cd7cdc804..eaf89deadd8d85cb5f908945c86ae151f9ad88d6 100644
--- a/content/renderer/media/midi_dispatcher.cc
+++ b/content/renderer/media/midi_dispatcher.cc
@@ -10,6 +10,7 @@
#include "content/renderer/render_view_impl.h"
#include "third_party/WebKit/public/web/WebMIDIPermissionRequest.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
+#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
using blink::WebMIDIPermissionRequest;
using blink::WebSecurityOrigin;
@@ -38,7 +39,8 @@ void MidiDispatcher::requestSysexPermission(
WebSecurityOrigin security_origin = request.securityOrigin();
std::string origin = security_origin.toString().utf8();
GURL url(origin);
- Send(new MidiHostMsg_RequestSysExPermission(routing_id(), bridge_id, url));
+ Send(new MidiHostMsg_RequestSysExPermission(routing_id(), bridge_id, url,
+ blink::WebUserGestureIndicator::isProcessingUserGesture()));
}
void MidiDispatcher::cancelSysexPermissionRequest(
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/shell/browser/shell_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698