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

Side by Side Diff: content/browser/renderer_host/media/midi_dispatcher_host.cc

Issue 22391002: Web MIDI: Use Send() directly for MIDIMsg_SysExPermissionApproved (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698