| 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 "components/test_runner/web_test_interfaces.h" | 5 #include "components/test_runner/web_test_interfaces.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "components/test_runner/app_banner_client.h" | 9 #include "components/test_runner/app_banner_client.h" |
| 10 #include "components/test_runner/event_sender.h" | 10 #include "components/test_runner/event_sender.h" |
| 11 #include "components/test_runner/mock_web_audio_device.h" | 11 #include "components/test_runner/mock_web_audio_device.h" |
| 12 #include "components/test_runner/mock_web_media_stream_center.h" | 12 #include "components/test_runner/mock_web_media_stream_center.h" |
| 13 #include "components/test_runner/mock_web_midi_accessor.h" | 13 #include "components/test_runner/mock_web_midi_accessor.h" |
| 14 #include "components/test_runner/mock_webrtc_peer_connection_handler.h" | 14 #include "components/test_runner/mock_webrtc_peer_connection_handler.h" |
| 15 #include "components/test_runner/test_interfaces.h" | 15 #include "components/test_runner/test_interfaces.h" |
| 16 #include "components/test_runner/test_runner.h" | 16 #include "components/test_runner/test_runner.h" |
| 17 #include "components/test_runner/web_frame_test_client.h" | |
| 18 | 17 |
| 19 using namespace blink; | 18 using namespace blink; |
| 20 | 19 |
| 21 namespace test_runner { | 20 namespace test_runner { |
| 22 | 21 |
| 23 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { | 22 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { |
| 24 } | 23 } |
| 25 | 24 |
| 26 WebTestInterfaces::~WebTestInterfaces() { | 25 WebTestInterfaces::~WebTestInterfaces() { |
| 27 } | 26 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 WebTestInterfaces::CreateAppBannerClient() { | 90 WebTestInterfaces::CreateAppBannerClient() { |
| 92 scoped_ptr<AppBannerClient> client(new AppBannerClient); | 91 scoped_ptr<AppBannerClient> client(new AppBannerClient); |
| 93 interfaces_->SetAppBannerClient(client.get()); | 92 interfaces_->SetAppBannerClient(client.get()); |
| 94 return std::move(client); | 93 return std::move(client); |
| 95 } | 94 } |
| 96 | 95 |
| 97 AppBannerClient* WebTestInterfaces::GetAppBannerClient() { | 96 AppBannerClient* WebTestInterfaces::GetAppBannerClient() { |
| 98 return interfaces_->GetAppBannerClient(); | 97 return interfaces_->GetAppBannerClient(); |
| 99 } | 98 } |
| 100 | 99 |
| 101 blink::WebFrameClient* WebTestInterfaces::GetWebFrameTestClient() { | |
| 102 if (!web_frame_test_client_) { | |
| 103 web_frame_test_client_.reset(new WebFrameTestClient( | |
| 104 interfaces_->GetTestRunner(), | |
| 105 interfaces_->GetDelegate(), | |
| 106 interfaces_->GetAccessibilityController(), | |
| 107 interfaces_->GetEventSender())); | |
| 108 } | |
| 109 return web_frame_test_client_.get(); | |
| 110 } | |
| 111 | |
| 112 } // namespace test_runner | 100 } // namespace test_runner |
| OLD | NEW |