Commit 7ac9d81a authored by toyoshim@chromium.org's avatar toyoshim@chromium.org

Web MIDI: allow to show an infobar for permission requests from local files

BUG=331223

Review URL: https://codereview.chromium.org/122803002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243814 0039d316-1c4b-4281-b951-d872f2087c98
parent 7f030348
......@@ -53,7 +53,11 @@ void ChromeMIDIPermissionContext::RequestMIDISysExPermission(
const PermissionRequestID id(render_process_id, render_view_id, bridge_id, 0);
GURL embedder = web_contents->GetURL();
if (!requesting_frame.is_valid() || !embedder.is_valid()) {
// |requesting_frame| can be empty and invalid when the frame is a local
// file. Here local files should be granted to show an infobar.
// Any user's action will not be stored to content settings data base.
if ((!requesting_frame.is_valid() && !requesting_frame.is_empty()) ||
!embedder.is_valid()) {
LOG(WARNING) << "Attempt to use MIDI sysex from an invalid URL: "
<< requesting_frame << "," << embedder
<< " (Web MIDI is not supported in popups)";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment