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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 335993002: Convert MIDI permission requests to use WebContents in preparation for switching the code to using … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c9edb552ce80079361bc4a3a87e28c4c00ca7968..0926f303690f3ae48ee48b24fe8021634abe8ad4 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -46,6 +46,8 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/media/cast_transport_host_filter.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
+#include "chrome/browser/media/midi_permission_context.h"
+#include "chrome/browser/media/midi_permission_context_factory.h"
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
#include "chrome/browser/net/chrome_net_log.h"
@@ -2158,6 +2160,21 @@ void ChromeContentBrowserClient::RequestGeolocationPermission(
result_callback, cancel_callback);
}
+void ChromeContentBrowserClient::RequestMidiSysExPermission(
+ content::WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ MidiPermissionContext* context =
+ MidiPermissionContextFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()));
+ context->RequestMidiSysExPermission(web_contents, bridge_id, requesting_frame,
+ user_gesture, result_callback,
+ cancel_callback);
+}
+
bool ChromeContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/media/chrome_midi_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698