Index: content/renderer/media/renderer_webmidiaccessor_impl.cc |
diff --git a/content/renderer/media/renderer_webmidiaccessor_impl.cc b/content/renderer/media/renderer_webmidiaccessor_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2aa778829a4b67e564aa920a8200c8d70a735dc1 |
--- /dev/null |
+++ b/content/renderer/media/renderer_webmidiaccessor_impl.cc |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
+ |
+#include "base/logging.h" |
+#include "content/renderer/media/midi_message_filter.h" |
+#include "content/renderer/render_thread_impl.h" |
+ |
+namespace content { |
+ |
+RendererWebMIDIAccessorImpl::RendererWebMIDIAccessorImpl( |
+ WebKit::WebMIDIAccessorClient* client) |
+ : client_(client) { |
+ DCHECK(client_); |
+} |
+ |
+RendererWebMIDIAccessorImpl::~RendererWebMIDIAccessorImpl() { |
+ midi_message_filter()->RemoveClient(client_); |
+} |
+ |
+void RendererWebMIDIAccessorImpl::requestAccess(int access) { |
+ midi_message_filter()->RequestAccess(client_, access); |
+} |
+ |
+void RendererWebMIDIAccessorImpl::sendMIDIData( |
+ unsigned port_index, |
+ 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
|
+ size_t length, |
+ double timestamp) { |
+ midi_message_filter()->SendMIDIData( |
+ port_index, |
+ data, |
+ length, |
+ timestamp); |
+} |
+ |
+MIDIMessageFilter* RendererWebMIDIAccessorImpl::midi_message_filter() { |
+ return RenderThreadImpl::current()->midi_message_filter(); |
+} |
+ |
+} // namespace content |