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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 20990005: Web MIDI: implement permission infobar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review #2 and #10 Created 7 years, 5 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/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 56b0f96eed8a446128720aa3efab72166c4ead7d..7f42c5d3d19ff5dc6aae4feddc243c4658442f24 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -28,6 +28,8 @@
#include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
#include "chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h"
#include "chrome/browser/io_thread.h"
+#include "chrome/browser/media/chrome_midi_permission_context.h"
+#include "chrome/browser/media/chrome_midi_permission_context_factory.h"
#include "chrome/browser/net/pref_proxy_config_tracker.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
@@ -291,8 +293,12 @@ void OffTheRecordProfileImpl::RequestMIDISysExPermission(
int render_view_id,
const GURL& requesting_frame,
const MIDISysExPermissionCallback& callback) {
- // TODO(toyoshim): Implement. http://crbug.com/257618 .
- callback.Run(false);
+ ChromeMIDIPermissionContext* context =
+ ChromeMIDIPermissionContextFactory::GetForProfile(this);
+ context->RequestMIDISysExPermission(render_process_id,
+ render_view_id,
+ requesting_frame,
+ callback);
}
net::URLRequestContextGetter*

Powered by Google App Engine
This is Rietveld 408576698