| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/shell/renderer/test_runner/web_task.h" | 9 #include "content/shell/renderer/test_runner/web_task.h" |
| 10 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" | 10 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 class WebMIDIAccessorClient; | 13 class WebMIDIAccessorClient; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class TestInterfaces; | 18 class TestInterfaces; |
| 19 | 19 |
| 20 class MockWebMIDIAccessor : public blink::WebMIDIAccessor { | 20 class MockWebMIDIAccessor : public blink::WebMIDIAccessor { |
| 21 public: | 21 public: |
| 22 explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient* client, | 22 explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient* client, |
| 23 TestInterfaces* interfaces); | 23 TestInterfaces* interfaces); |
| 24 virtual ~MockWebMIDIAccessor(); | 24 virtual ~MockWebMIDIAccessor(); |
| 25 | 25 |
| 26 // blink::WebMIDIAccessor implementation. | 26 // blink::WebMIDIAccessor implementation. |
| 27 virtual void startSession() OVERRIDE; | 27 virtual void startSession() override; |
| 28 virtual void sendMIDIData(unsigned port_index, | 28 virtual void sendMIDIData(unsigned port_index, |
| 29 const unsigned char* data, | 29 const unsigned char* data, |
| 30 size_t length, | 30 size_t length, |
| 31 double timestamp) OVERRIDE {} | 31 double timestamp) override {} |
| 32 | 32 |
| 33 // WebTask related methods | 33 // WebTask related methods |
| 34 WebTaskList* mutable_task_list() { return &task_list_; } | 34 WebTaskList* mutable_task_list() { return &task_list_; } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 blink::WebMIDIAccessorClient* client_; | 37 blink::WebMIDIAccessorClient* client_; |
| 38 WebTaskList task_list_; | 38 WebTaskList task_list_; |
| 39 TestInterfaces* interfaces_; | 39 TestInterfaces* interfaces_; |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor); | 41 DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace content | 44 } // namespace content |
| 45 | 45 |
| 46 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ | 46 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_ |
| OLD | NEW |