| 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 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" | 5 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" |
| 6 | 6 |
| 7 #include "content/shell/renderer/test_runner/TestInterfaces.h" | |
| 8 #include "content/shell/renderer/test_runner/mock_web_audio_device.h" | 7 #include "content/shell/renderer/test_runner/mock_web_audio_device.h" |
| 9 #include "content/shell/renderer/test_runner/mock_web_media_stream_center.h" | 8 #include "content/shell/renderer/test_runner/mock_web_media_stream_center.h" |
| 10 #include "content/shell/renderer/test_runner/mock_web_midi_accessor.h" | 9 #include "content/shell/renderer/test_runner/mock_web_midi_accessor.h" |
| 11 #include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler
.h" | 10 #include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler
.h" |
| 11 #include "content/shell/renderer/test_runner/test_interfaces.h" |
| 12 #include "content/shell/renderer/test_runner/test_runner.h" | 12 #include "content/shell/renderer/test_runner/test_runner.h" |
| 13 | 13 |
| 14 using namespace blink; | 14 using namespace blink; |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 WebTestInterfaces::WebTestInterfaces() | 18 WebTestInterfaces::WebTestInterfaces() |
| 19 : m_interfaces(new TestInterfaces()) | 19 : m_interfaces(new TestInterfaces()) |
| 20 { | 20 { |
| 21 } | 21 } |
| 22 | 22 |
| 23 WebTestInterfaces::~WebTestInterfaces() | 23 WebTestInterfaces::~WebTestInterfaces() |
| 24 { | 24 { |
| 25 } | 25 } |
| 26 | 26 |
| 27 void WebTestInterfaces::setWebView(WebView* webView, WebTestProxyBase* proxy) | 27 void WebTestInterfaces::setWebView(WebView* webView, WebTestProxyBase* proxy) |
| 28 { | 28 { |
| 29 m_interfaces->setWebView(webView, proxy); | 29 m_interfaces->SetWebView(webView, proxy); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void WebTestInterfaces::setDelegate(WebTestDelegate* delegate) | 32 void WebTestInterfaces::setDelegate(WebTestDelegate* delegate) |
| 33 { | 33 { |
| 34 m_interfaces->setDelegate(delegate); | 34 m_interfaces->SetDelegate(delegate); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void WebTestInterfaces::bindTo(WebFrame* frame) | 37 void WebTestInterfaces::bindTo(WebFrame* frame) |
| 38 { | 38 { |
| 39 m_interfaces->bindTo(frame); | 39 m_interfaces->BindTo(frame); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void WebTestInterfaces::resetAll() | 42 void WebTestInterfaces::resetAll() |
| 43 { | 43 { |
| 44 m_interfaces->resetAll(); | 44 m_interfaces->ResetAll(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void WebTestInterfaces::setTestIsRunning(bool running) | 47 void WebTestInterfaces::setTestIsRunning(bool running) |
| 48 { | 48 { |
| 49 m_interfaces->setTestIsRunning(running); | 49 m_interfaces->SetTestIsRunning(running); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WebTestInterfaces::configureForTestWithURL(const WebURL& testURL, bool gene
ratePixels) | 52 void WebTestInterfaces::configureForTestWithURL(const WebURL& testURL, bool gene
ratePixels) |
| 53 { | 53 { |
| 54 m_interfaces->configureForTestWithURL(testURL, generatePixels); | 54 m_interfaces->ConfigureForTestWithURL(testURL, generatePixels); |
| 55 } | 55 } |
| 56 | 56 |
| 57 WebTestRunner* WebTestInterfaces::testRunner() | 57 WebTestRunner* WebTestInterfaces::testRunner() |
| 58 { | 58 { |
| 59 return m_interfaces->testRunner(); | 59 return m_interfaces->GetTestRunner(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 WebThemeEngine* WebTestInterfaces::themeEngine() | 62 WebThemeEngine* WebTestInterfaces::themeEngine() |
| 63 { | 63 { |
| 64 return m_interfaces->themeEngine(); | 64 return m_interfaces->ThemeEngine(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 TestInterfaces* WebTestInterfaces::testInterfaces() | 67 TestInterfaces* WebTestInterfaces::testInterfaces() |
| 68 { | 68 { |
| 69 return m_interfaces.get(); | 69 return m_interfaces.get(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 WebMediaStreamCenter* WebTestInterfaces::createMediaStreamCenter(WebMediaStreamC
enterClient* client) | 72 WebMediaStreamCenter* WebTestInterfaces::createMediaStreamCenter(WebMediaStreamC
enterClient* client) |
| 73 { | 73 { |
| 74 return new MockWebMediaStreamCenter(client, m_interfaces.get()); | 74 return new MockWebMediaStreamCenter(client, m_interfaces.get()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 WebRTCPeerConnectionHandler* WebTestInterfaces::createWebRTCPeerConnectionHandle
r(WebRTCPeerConnectionHandlerClient* client) | 77 WebRTCPeerConnectionHandler* WebTestInterfaces::createWebRTCPeerConnectionHandle
r(WebRTCPeerConnectionHandlerClient* client) |
| 78 { | 78 { |
| 79 return new MockWebRTCPeerConnectionHandler(client, m_interfaces.get()); | 79 return new MockWebRTCPeerConnectionHandler(client, m_interfaces.get()); |
| 80 } | 80 } |
| 81 | 81 |
| 82 WebMIDIAccessor* WebTestInterfaces::createMIDIAccessor(WebMIDIAccessorClient* cl
ient) | 82 WebMIDIAccessor* WebTestInterfaces::createMIDIAccessor(WebMIDIAccessorClient* cl
ient) |
| 83 { | 83 { |
| 84 return new MockWebMIDIAccessor(client, m_interfaces.get()); | 84 return new MockWebMIDIAccessor(client, m_interfaces.get()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 WebAudioDevice* WebTestInterfaces::createAudioDevice(double sampleRate) | 87 WebAudioDevice* WebTestInterfaces::createAudioDevice(double sampleRate) |
| 88 { | 88 { |
| 89 return new MockWebAudioDevice(sampleRate); | 89 return new MockWebAudioDevice(sampleRate); |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace content | 92 } // namespace content |
| OLD | NEW |