| 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/media/capture/web_contents_video_capture_device.h" | 5 #include "content/browser/media/capture/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" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
| 13 #include "content/browser/browser_thread_impl.h" | 13 #include "content/browser/browser_thread_impl.h" |
| 14 #include "content/browser/media/capture/video_capture_oracle.h" | 14 #include "content/browser/media/capture/video_capture_oracle.h" |
| 15 #include "content/browser/media/capture/web_contents_capture_util.h" | 15 #include "content/browser/media/capture/web_contents_capture_util.h" |
| 16 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" | 16 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" |
| 17 #include "content/browser/renderer_host/render_view_host_factory.h" | 17 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 18 #include "content/browser/renderer_host/render_widget_host_impl.h" | 18 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/notification_types.h" | 20 #include "content/public/browser/notification_types.h" |
| 21 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 21 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
| 22 #include "content/public/test/mock_render_process_host.h" | 22 #include "content/public/test/mock_render_process_host.h" |
| 23 #include "content/public/test/test_browser_context.h" | 23 #include "content/public/test/test_browser_context.h" |
| 24 #include "content/public/test/test_browser_thread_bundle.h" | 24 #include "content/public/test/test_browser_thread_bundle.h" |
| 25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
| 26 #include "content/test/test_render_view_host.h" | 26 #include "content/test/test_render_view_host.h" |
| 27 #include "content/test/test_web_contents.h" | 27 #include "content/test/test_web_contents.h" |
| 28 #include "media/base/video_capture_types.h" |
| 28 #include "media/base/video_frame.h" | 29 #include "media/base/video_frame.h" |
| 29 #include "media/base/video_util.h" | 30 #include "media/base/video_util.h" |
| 30 #include "media/base/yuv_convert.h" | 31 #include "media/base/yuv_convert.h" |
| 31 #include "media/video/capture/video_capture_types.h" | |
| 32 #include "skia/ext/platform_canvas.h" | 32 #include "skia/ext/platform_canvas.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 #include "third_party/skia/include/core/SkColor.h" | 34 #include "third_party/skia/include/core/SkColor.h" |
| 35 #include "ui/gfx/display.h" | 35 #include "ui/gfx/display.h" |
| 36 #include "ui/gfx/screen.h" | 36 #include "ui/gfx/screen.h" |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 const int kTestWidth = 320; | 41 const int kTestWidth = 320; |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 source()->SetSolidColor(SK_ColorGREEN); | 842 source()->SetSolidColor(SK_ColorGREEN); |
| 843 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); | 843 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); |
| 844 source()->SetSolidColor(SK_ColorRED); | 844 source()->SetSolidColor(SK_ColorRED); |
| 845 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorRED)); | 845 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorRED)); |
| 846 | 846 |
| 847 device()->StopAndDeAllocate(); | 847 device()->StopAndDeAllocate(); |
| 848 } | 848 } |
| 849 | 849 |
| 850 } // namespace | 850 } // namespace |
| 851 } // namespace content | 851 } // namespace content |
| OLD | NEW |