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/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/common/media/midi_messages.h" | 9 #include "content/common/media/midi_messages.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 origin, | 50 origin, |
51 base::Bind(&MIDIDispatcherHost::WasSysExPermissionGranted, | 51 base::Bind(&MIDIDispatcherHost::WasSysExPermissionGranted, |
52 base::Unretained(this), | 52 base::Unretained(this), |
53 render_view_id, | 53 render_view_id, |
54 client_id)); | 54 client_id)); |
55 } | 55 } |
56 | 56 |
57 void MIDIDispatcherHost::WasSysExPermissionGranted(int render_view_id, | 57 void MIDIDispatcherHost::WasSysExPermissionGranted(int render_view_id, |
58 int client_id, | 58 int client_id, |
59 bool success) { | 59 bool success) { |
60 RenderViewHostImpl* r = | 60 Send(new MIDIMsg_SysExPermissionApproved(render_view_id, client_id, success)); |
61 RenderViewHostImpl::FromID(render_process_id_, render_view_id); | |
62 if (!r) | |
63 return; | |
64 r->Send( | |
65 new MIDIMsg_SysExPermissionApproved(render_view_id, client_id, success)); | |
66 } | 61 } |
67 | 62 |
68 } // namespace content | 63 } // namespace content |
OLD | NEW |