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
3// found in the LICENSE file.
4
5#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_INTERFACES_H_
6#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_INTERFACES_H_
7
8#include "base/memory/scoped_ptr.h"
9
10namespace blink {
11class WebAudioDevice;
12class WebFrame;
13class WebMediaStreamCenter;
14class WebMediaStreamCenterClient;
15class WebMIDIAccessor;
16class WebMIDIAccessorClient;
17class WebRTCPeerConnectionHandler;
18class WebRTCPeerConnectionHandlerClient;
19class WebThemeEngine;
20class WebURL;
21class WebView;
22}
23
24namespace content {
25
26class TestInterfaces;
27class WebTestDelegate;
28class WebTestProxyBase;
29class WebTestRunner;
30
31class WebTestInterfaces {
32 public:
33  WebTestInterfaces();
34  ~WebTestInterfaces();
35
36  void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy);
37  void SetDelegate(WebTestDelegate* delegate);
38  void BindTo(blink::WebFrame* frame);
39  void ResetAll();
40  void SetTestIsRunning(bool running);
41  void ConfigureForTestWithURL(const blink::WebURL& test_url,
42                               bool generate_pixels);
43
44  WebTestRunner* TestRunner();
45  blink::WebThemeEngine* ThemeEngine();
46
47  blink::WebMediaStreamCenter* CreateMediaStreamCenter(
48      blink::WebMediaStreamCenterClient* client);
49  blink::WebRTCPeerConnectionHandler* CreateWebRTCPeerConnectionHandler(
50      blink::WebRTCPeerConnectionHandlerClient* client);
51
52  blink::WebMIDIAccessor* CreateMIDIAccessor(
53      blink::WebMIDIAccessorClient* client);
54
55  blink::WebAudioDevice* CreateAudioDevice(double sample_rate);
56
57  TestInterfaces* GetTestInterfaces();
58
59 private:
60  scoped_ptr<TestInterfaces> interfaces_;
61
62  DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces);
63};
64
65}  // namespace content
66
67#endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_INTERFACES_H_
68