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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_
6 #define COMPONENTS_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_
8 #include "base/basictypes.h"
9 #include "components/test_runner/web_task.h"
10 #include "third_party/WebKit/public/platform/WebMIDIAccessor.h"
13 class WebMIDIAccessorClient
;
16 namespace test_runner
{
20 class MockWebMIDIAccessor
: public blink::WebMIDIAccessor
{
22 explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient
* client
,
23 TestInterfaces
* interfaces
);
24 virtual ~MockWebMIDIAccessor();
26 // blink::WebMIDIAccessor implementation.
27 virtual void startSession() override
;
28 virtual void sendMIDIData(unsigned port_index
,
29 const unsigned char* data
,
31 double timestamp
) override
{}
33 // WebTask related methods
34 WebTaskList
* mutable_task_list() { return &task_list_
; }
37 blink::WebMIDIAccessorClient
* client_
;
38 WebTaskList task_list_
;
39 TestInterfaces
* interfaces_
;
41 DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor
);
44 } // namespace test_runner
46 #endif // COMPONENTS_TEST_RUNNER_MOCK_WEB_MIDI_ACCESSOR_H_