OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/media/midi_dispatcher_host.h" | 5 #include "content/browser/renderer_host/media/midi_dispatcher_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/browser/child_process_security_policy_impl.h" | 8 #include "content/browser/child_process_security_policy_impl.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/common/media/midi_messages.h" | 10 #include "content/common/media/midi_messages.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 int bridge_id, | 65 int bridge_id, |
66 const GURL& requesting_frame) { | 66 const GURL& requesting_frame) { |
67 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 67 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
68 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" << render_view_id | 68 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" << render_view_id |
69 << ":" << bridge_id; | 69 << ":" << bridge_id; |
70 browser_context_->CancelMidiSysExPermissionRequest( | 70 browser_context_->CancelMidiSysExPermissionRequest( |
71 render_process_id_, render_view_id, bridge_id, requesting_frame); | 71 render_process_id_, render_view_id, bridge_id, requesting_frame); |
72 } | 72 } |
73 void MidiDispatcherHost::WasSysExPermissionGranted(int render_view_id, | 73 void MidiDispatcherHost::WasSysExPermissionGranted(int render_view_id, |
74 int bridge_id, | 74 int bridge_id, |
75 bool success) { | 75 bool is_allowed) { |
76 ChildProcessSecurityPolicyImpl::GetInstance()->GrantSendMidiSysExMessage( | 76 if (is_allowed) |
77 render_process_id_); | 77 ChildProcessSecurityPolicyImpl::GetInstance()->GrantSendMidiSysExMessage( |
78 Send(new MidiMsg_SysExPermissionApproved(render_view_id, bridge_id, success)); | 78 render_process_id_); |
| 79 Send(new MidiMsg_SysExPermissionApproved( |
| 80 render_view_id, bridge_id, is_allowed)); |
79 } | 81 } |
80 | 82 |
81 } // namespace content | 83 } // namespace content |
OLD | NEW |