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/browser/renderer_host/media/web_contents_video_capture_device.
h" | 5 #include "content/browser/renderer_host/media/web_contents_video_capture_device.
h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 506 |
507 private: | 507 private: |
508 // The consumer is the ultimate recipient of captured pixel data. | 508 // The consumer is the ultimate recipient of captured pixel data. |
509 StubConsumer consumer_; | 509 StubConsumer consumer_; |
510 | 510 |
511 // The controller controls which pixel patterns to produce. | 511 // The controller controls which pixel patterns to produce. |
512 CaptureTestSourceController controller_; | 512 CaptureTestSourceController controller_; |
513 | 513 |
514 // We run the UI message loop on the main thread. The capture device | 514 // We run the UI message loop on the main thread. The capture device |
515 // will also spin up its own threads. | 515 // will also spin up its own threads. |
516 MessageLoopForUI message_loop_; | 516 base::MessageLoopForUI message_loop_; |
517 scoped_ptr<TestBrowserThread> ui_thread_; | 517 scoped_ptr<TestBrowserThread> ui_thread_; |
518 | 518 |
519 // Self-registering RenderProcessHostFactory. | 519 // Self-registering RenderProcessHostFactory. |
520 scoped_ptr<MockRenderProcessHostFactory> render_process_host_factory_; | 520 scoped_ptr<MockRenderProcessHostFactory> render_process_host_factory_; |
521 | 521 |
522 // Creates capture-capable RenderViewHosts whose pixel content production is | 522 // Creates capture-capable RenderViewHosts whose pixel content production is |
523 // under the control of |controller_|. | 523 // under the control of |controller_|. |
524 scoped_ptr<CaptureTestRenderViewHostFactory> render_view_host_factory_; | 524 scoped_ptr<CaptureTestRenderViewHostFactory> render_view_host_factory_; |
525 | 525 |
526 // A mocked-out browser and tab. | 526 // A mocked-out browser and tab. |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 { false, 0 }, { true, 16.72 }, { true, 33.44 }, { false, 0 }, | 1181 { false, 0 }, { true, 16.72 }, { true, 33.44 }, { false, 0 }, |
1182 { true, 33.441 }, { false, 16.72 }, { true, 16.72 }, { true, 50.16 } | 1182 { true, 33.441 }, { false, 16.72 }, { true, 16.72 }, { true, 50.16 } |
1183 }; | 1183 }; |
1184 | 1184 |
1185 SmoothEventSampler sampler(base::TimeDelta::FromSeconds(1) / 30, true, 3); | 1185 SmoothEventSampler sampler(base::TimeDelta::FromSeconds(1) / 30, true, 3); |
1186 ReplayCheckingSamplerDecisions(data_points, arraysize(data_points), &sampler); | 1186 ReplayCheckingSamplerDecisions(data_points, arraysize(data_points), &sampler); |
1187 } | 1187 } |
1188 | 1188 |
1189 } // namespace | 1189 } // namespace |
1190 } // namespace content | 1190 } // namespace content |
OLD | NEW |