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

Side by Side Diff: content/renderer/media/renderer_webmidiaccessor_impl.cc

Issue 16025005: Web MIDI API back-end (work-in-progress) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add stub for non-OSX MIDIManagers Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
6
7 #include "base/logging.h"
8 #include "content/renderer/media/midi_message_filter.h"
9 #include "content/renderer/render_thread_impl.h"
10
11 namespace content {
12
13 RendererWebMIDIAccessorImpl::RendererWebMIDIAccessorImpl(
14 WebKit::WebMIDIAccessorClient* client)
15 : client_(client) {
16 DCHECK(client_);
17 }
18
19 RendererWebMIDIAccessorImpl::~RendererWebMIDIAccessorImpl() {
20 midi_message_filter()->RemoveClient(client_);
21 }
22
23 void RendererWebMIDIAccessorImpl::requestAccess(int access) {
24 midi_message_filter()->RequestAccess(client_, access);
25 }
26
27 void RendererWebMIDIAccessorImpl::sendMIDIData(
28 unsigned port_index,
29 const unsigned char* data,
palmer 2013/06/19 21:39:15 Same type name consistency thing
Chris Rogers 2013/06/20 17:41:33 API-boundary issue
30 size_t length,
31 double timestamp) {
32 midi_message_filter()->SendMIDIData(
33 port_index,
34 data,
35 length,
36 timestamp);
37 }
38
39 MIDIMessageFilter* RendererWebMIDIAccessorImpl::midi_message_filter() {
40 return RenderThreadImpl::current()->midi_message_filter();
41 }
42
43 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698