| OLD | NEW |
| 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/shell/renderer/test_runner/TestCommon.h" | 9 #include "content/shell/renderer/test_runner/TestCommon.h" |
| 10 #include "content/shell/renderer/test_runner/WebTask.h" | 10 #include "content/shell/renderer/test_runner/WebTask.h" |
| 11 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" | 11 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 class WebMIDIAccessorClient; | 14 class WebMIDIAccessorClient; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace WebTestRunner { | 17 namespace WebTestRunner { |
| 18 class TestInterfaces; |
| 19 } |
| 18 | 20 |
| 19 class TestInterfaces; | 21 namespace content { |
| 20 | 22 |
| 21 class MockWebMIDIAccessor : public blink::WebMIDIAccessor { | 23 class MockWebMIDIAccessor : public blink::WebMIDIAccessor { |
| 22 public: | 24 public: |
| 23 explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient*, TestInterfaces*)
; | 25 explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient*, WebTestRunner::T
estInterfaces*); |
| 24 virtual ~MockWebMIDIAccessor(); | 26 virtual ~MockWebMIDIAccessor(); |
| 25 | 27 |
| 26 // blink::WebMIDIAccessor implementation. | 28 // blink::WebMIDIAccessor implementation. |
| 27 virtual void startSession() OVERRIDE; | 29 virtual void startSession() OVERRIDE; |
| 28 virtual void sendMIDIData( | 30 virtual void sendMIDIData(unsigned portIndex, |
| 29 unsigned portIndex, | 31 const unsigned char* data, |
| 30 const unsigned char* data, | 32 size_t length, |
| 31 size_t length, | 33 double timestamp) OVERRIDE {} |
| 32 double timestamp) OVERRIDE { } | |
| 33 | 34 |
| 34 // WebTask related methods | 35 // WebTask related methods |
| 35 WebTaskList* taskList() { return &m_taskList; } | 36 WebTestRunner::WebTaskList* taskList() { return &m_taskList; } |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 blink::WebMIDIAccessorClient* m_client; | 39 blink::WebMIDIAccessorClient* m_client; |
| 39 WebTaskList m_taskList; | 40 WebTestRunner::WebTaskList m_taskList; |
| 40 TestInterfaces* m_interfaces; | 41 WebTestRunner::TestInterfaces* m_interfaces; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor); | 43 DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace WebTestRunner | 46 } // namespace content |
| 46 | 47 |
| 47 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ | 48 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMIDIACCESSOR_H_ |
| OLD | NEW |