| OLD | NEW |
| (Empty) |
| 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 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | |
| 6 | |
| 7 #include "content/shell/renderer/test_runner/app_banner_client.h" | |
| 8 #include "content/shell/renderer/test_runner/mock_web_audio_device.h" | |
| 9 #include "content/shell/renderer/test_runner/mock_web_media_stream_center.h" | |
| 10 #include "content/shell/renderer/test_runner/mock_web_midi_accessor.h" | |
| 11 #include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler
.h" | |
| 12 #include "content/shell/renderer/test_runner/test_interfaces.h" | |
| 13 #include "content/shell/renderer/test_runner/test_runner.h" | |
| 14 | |
| 15 using namespace blink; | |
| 16 | |
| 17 namespace content { | |
| 18 | |
| 19 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { | |
| 20 } | |
| 21 | |
| 22 WebTestInterfaces::~WebTestInterfaces() { | |
| 23 } | |
| 24 | |
| 25 void WebTestInterfaces::SetWebView(WebView* web_view, WebTestProxyBase* proxy) { | |
| 26 interfaces_->SetWebView(web_view, proxy); | |
| 27 } | |
| 28 | |
| 29 void WebTestInterfaces::SetDelegate(WebTestDelegate* delegate) { | |
| 30 interfaces_->SetDelegate(delegate); | |
| 31 } | |
| 32 | |
| 33 void WebTestInterfaces::BindTo(WebFrame* frame) { | |
| 34 interfaces_->BindTo(frame); | |
| 35 } | |
| 36 | |
| 37 void WebTestInterfaces::ResetAll() { | |
| 38 interfaces_->ResetAll(); | |
| 39 } | |
| 40 | |
| 41 void WebTestInterfaces::SetTestIsRunning(bool running) { | |
| 42 interfaces_->SetTestIsRunning(running); | |
| 43 } | |
| 44 | |
| 45 void WebTestInterfaces::ConfigureForTestWithURL(const WebURL& test_url, | |
| 46 bool generate_pixels) { | |
| 47 interfaces_->ConfigureForTestWithURL(test_url, generate_pixels); | |
| 48 } | |
| 49 | |
| 50 WebTestRunner* WebTestInterfaces::TestRunner() { | |
| 51 return interfaces_->GetTestRunner(); | |
| 52 } | |
| 53 | |
| 54 WebThemeEngine* WebTestInterfaces::ThemeEngine() { | |
| 55 return interfaces_->GetThemeEngine(); | |
| 56 } | |
| 57 | |
| 58 TestInterfaces* WebTestInterfaces::GetTestInterfaces() { | |
| 59 return interfaces_.get(); | |
| 60 } | |
| 61 | |
| 62 WebMediaStreamCenter* WebTestInterfaces::CreateMediaStreamCenter( | |
| 63 WebMediaStreamCenterClient* client) { | |
| 64 return new MockWebMediaStreamCenter(client, interfaces_.get()); | |
| 65 } | |
| 66 | |
| 67 WebRTCPeerConnectionHandler* | |
| 68 WebTestInterfaces::CreateWebRTCPeerConnectionHandler( | |
| 69 WebRTCPeerConnectionHandlerClient* client) { | |
| 70 return new MockWebRTCPeerConnectionHandler(client, interfaces_.get()); | |
| 71 } | |
| 72 | |
| 73 WebMIDIAccessor* WebTestInterfaces::CreateMIDIAccessor( | |
| 74 WebMIDIAccessorClient* client) { | |
| 75 return new MockWebMIDIAccessor(client, interfaces_.get()); | |
| 76 } | |
| 77 | |
| 78 WebAudioDevice* WebTestInterfaces::CreateAudioDevice(double sample_rate) { | |
| 79 return new MockWebAudioDevice(sample_rate); | |
| 80 } | |
| 81 | |
| 82 scoped_ptr<blink::WebAppBannerClient> | |
| 83 WebTestInterfaces::CreateAppBannerClient() { | |
| 84 scoped_ptr<AppBannerClient> client(new AppBannerClient); | |
| 85 interfaces_->SetAppBannerClient(client.get()); | |
| 86 return client.Pass(); | |
| 87 } | |
| 88 | |
| 89 } // namespace content | |
| OLD | NEW |