| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 std::unique_ptr<test_runner::GamepadController> controller_; | 175 std::unique_ptr<test_runner::GamepadController> controller_; |
| 176 | 176 |
| 177 DISALLOW_COPY_AND_ASSIGN(MockGamepadProvider); | 177 DISALLOW_COPY_AND_ASSIGN(MockGamepadProvider); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 class MockVideoCapturerSource : public media::VideoCapturerSource { | 180 class MockVideoCapturerSource : public media::VideoCapturerSource { |
| 181 public: | 181 public: |
| 182 MockVideoCapturerSource() = default; | 182 MockVideoCapturerSource() = default; |
| 183 ~MockVideoCapturerSource() override {} | 183 ~MockVideoCapturerSource() override {} |
| 184 | 184 |
| 185 void GetCurrentSupportedFormats( | 185 media::VideoCaptureFormats GetPreferredFormats() override { |
| 186 int max_requested_width, | |
| 187 int max_requested_height, | |
| 188 double max_requested_frame_rate, | |
| 189 const VideoCaptureDeviceFormatsCB& callback) override { | |
| 190 const int supported_width = 640; | 186 const int supported_width = 640; |
| 191 const int supported_height = 480; | 187 const int supported_height = 480; |
| 192 const float supported_framerate = 60.0; | 188 const float supported_framerate = 60.0; |
| 193 callback.Run(media::VideoCaptureFormats( | 189 return media::VideoCaptureFormats( |
| 194 1, media::VideoCaptureFormat( | 190 1, media::VideoCaptureFormat( |
| 195 gfx::Size(supported_width, supported_height), | 191 gfx::Size(supported_width, supported_height), |
| 196 supported_framerate, media::PIXEL_FORMAT_I420))); | 192 supported_framerate, media::PIXEL_FORMAT_I420)); |
| 197 } | 193 } |
| 198 void StartCapture(const media::VideoCaptureParams& params, | 194 void StartCapture(const media::VideoCaptureParams& params, |
| 199 const VideoCaptureDeliverFrameCB& new_frame_callback, | 195 const VideoCaptureDeliverFrameCB& new_frame_callback, |
| 200 const RunningCallback& running_callback) override { | 196 const RunningCallback& running_callback) override { |
| 201 running_callback.Run(true); | 197 running_callback.Run(true); |
| 202 } | 198 } |
| 203 void StopCapture() override {} | 199 void StopCapture() override {} |
| 204 }; | 200 }; |
| 205 | 201 |
| 206 class MockAudioCapturerSource : public media::AudioCapturerSource { | 202 class MockAudioCapturerSource : public media::AudioCapturerSource { |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 void BlinkTestRunner::ReportLeakDetectionResult( | 1047 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1052 const LeakDetectionResult& report) { | 1048 const LeakDetectionResult& report) { |
| 1053 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1049 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1054 } | 1050 } |
| 1055 | 1051 |
| 1056 void BlinkTestRunner::OnDestruct() { | 1052 void BlinkTestRunner::OnDestruct() { |
| 1057 delete this; | 1053 delete this; |
| 1058 } | 1054 } |
| 1059 | 1055 |
| 1060 } // namespace content | 1056 } // namespace content |
| OLD | NEW |