OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" | 10 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" |
11 #include "third_party/WebKit/public/platform/WebMIDIAccessorClient.h" | 11 #include "third_party/WebKit/public/platform/WebMIDIAccessorClient.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class MIDIMessageFilter; | 15 class MIDIMessageFilter; |
16 | 16 |
17 class RendererWebMIDIAccessorImpl | 17 class RendererWebMIDIAccessorImpl |
18 : public WebKit::WebMIDIAccessor { | 18 : public WebKit::WebMIDIAccessor { |
19 public: | 19 public: |
20 explicit RendererWebMIDIAccessorImpl( | 20 explicit RendererWebMIDIAccessorImpl( |
21 WebKit::WebMIDIAccessorClient* client); | 21 WebKit::WebMIDIAccessorClient* client); |
22 virtual ~RendererWebMIDIAccessorImpl(); | 22 virtual ~RendererWebMIDIAccessorImpl(); |
23 | 23 |
24 // WebKit::WebMIDIAccessor implementation. | 24 // WebKit::WebMIDIAccessor implementation. |
25 // TODO(toyoshim): Remove the single-argument version of requestAccess once | |
26 // Blink side API change is rolled. | |
27 virtual void requestAccess(bool access); | |
28 virtual void requestAccess(const WebKit::WebString& origin, | 25 virtual void requestAccess(const WebKit::WebString& origin, |
29 bool access); | 26 bool access); |
30 virtual void sendMIDIData(unsigned port_index, | 27 virtual void sendMIDIData(unsigned port_index, |
31 const unsigned char* data, | 28 const unsigned char* data, |
32 size_t length, | 29 size_t length, |
33 double timestamp) OVERRIDE; | 30 double timestamp) OVERRIDE; |
34 | 31 |
35 private: | 32 private: |
36 WebKit::WebMIDIAccessorClient* client_; | 33 WebKit::WebMIDIAccessorClient* client_; |
37 | 34 |
38 MIDIMessageFilter* midi_message_filter(); | 35 MIDIMessageFilter* midi_message_filter(); |
39 | 36 |
40 DISALLOW_COPY_AND_ASSIGN(RendererWebMIDIAccessorImpl); | 37 DISALLOW_COPY_AND_ASSIGN(RendererWebMIDIAccessorImpl); |
41 }; | 38 }; |
42 | 39 |
43 } // namespace content | 40 } // namespace content |
44 | 41 |
45 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ | 42 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESSOR_IMPL_H_ |
OLD | NEW |