| 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/time.h" | 10 #include "base/time.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 UnregisterFactory(); | 248 UnregisterFactory(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 // RenderViewHostFactory implementation. | 251 // RenderViewHostFactory implementation. |
| 252 virtual RenderViewHost* CreateRenderViewHost( | 252 virtual RenderViewHost* CreateRenderViewHost( |
| 253 SiteInstance* instance, | 253 SiteInstance* instance, |
| 254 RenderViewHostDelegate* delegate, | 254 RenderViewHostDelegate* delegate, |
| 255 RenderWidgetHostDelegate* widget_delegate, | 255 RenderWidgetHostDelegate* widget_delegate, |
| 256 int routing_id, | 256 int routing_id, |
| 257 bool swapped_out, | 257 bool swapped_out, |
| 258 SessionStorageNamespace* session_storage_namespace) { | 258 SessionStorageNamespace* session_storage_namespace) OVERRIDE { |
| 259 return new CaptureTestRenderViewHost(instance, delegate, widget_delegate, | 259 return new CaptureTestRenderViewHost(instance, delegate, widget_delegate, |
| 260 routing_id, swapped_out, controller_); | 260 routing_id, swapped_out, controller_); |
| 261 } | 261 } |
| 262 private: | 262 private: |
| 263 CaptureTestSourceController* controller_; | 263 CaptureTestSourceController* controller_; |
| 264 | 264 |
| 265 DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureTestRenderViewHostFactory); | 265 DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureTestRenderViewHostFactory); |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 // A stub consumer of captured video frames, which checks the output of | 268 // A stub consumer of captured video frames, which checks the output of |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 source()->SetSolidColor(SK_ColorGREEN); | 538 source()->SetSolidColor(SK_ColorGREEN); |
| 539 ASSERT_NO_FATAL_FAILURE(consumer()->WaitForNextColor(SK_ColorGREEN)); | 539 ASSERT_NO_FATAL_FAILURE(consumer()->WaitForNextColor(SK_ColorGREEN)); |
| 540 source()->SetSolidColor(SK_ColorRED); | 540 source()->SetSolidColor(SK_ColorRED); |
| 541 ASSERT_NO_FATAL_FAILURE(consumer()->WaitForNextColor(SK_ColorRED)); | 541 ASSERT_NO_FATAL_FAILURE(consumer()->WaitForNextColor(SK_ColorRED)); |
| 542 | 542 |
| 543 device()->Stop(); | 543 device()->Stop(); |
| 544 device()->DeAllocate(); | 544 device()->DeAllocate(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 } // namespace content | 547 } // namespace content |
| OLD | NEW |