| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 class CaptureTestRenderViewHost : public TestRenderViewHost { | 269 class CaptureTestRenderViewHost : public TestRenderViewHost { |
| 270 public: | 270 public: |
| 271 CaptureTestRenderViewHost(SiteInstance* instance, | 271 CaptureTestRenderViewHost(SiteInstance* instance, |
| 272 RenderViewHostDelegate* delegate, | 272 RenderViewHostDelegate* delegate, |
| 273 RenderWidgetHostDelegate* widget_delegate, | 273 RenderWidgetHostDelegate* widget_delegate, |
| 274 int32_t routing_id, | 274 int32_t routing_id, |
| 275 int32_t main_frame_routing_id, | 275 int32_t main_frame_routing_id, |
| 276 bool swapped_out, | 276 bool swapped_out, |
| 277 CaptureTestSourceController* controller) | 277 CaptureTestSourceController* controller) |
| 278 : TestRenderViewHost(instance, | 278 : TestRenderViewHost(instance, |
| 279 base::WrapUnique(new CaptureTestRenderWidgetHost( | 279 base::MakeUnique<CaptureTestRenderWidgetHost>( |
| 280 widget_delegate, | 280 widget_delegate, |
| 281 instance->GetProcess(), | 281 instance->GetProcess(), |
| 282 routing_id, | 282 routing_id, |
| 283 controller)), | 283 controller), |
| 284 delegate, | 284 delegate, |
| 285 main_frame_routing_id, | 285 main_frame_routing_id, |
| 286 swapped_out) { | 286 swapped_out) { |
| 287 // Override the default view installed by TestRenderViewHost; we need | 287 // Override the default view installed by TestRenderViewHost; we need |
| 288 // our special subclass which has mocked-out tab capture support. | 288 // our special subclass which has mocked-out tab capture support. |
| 289 RenderWidgetHostView* old_view = GetWidget()->GetView(); | 289 RenderWidgetHostView* old_view = GetWidget()->GetView(); |
| 290 GetWidget()->SetView(new CaptureTestView(GetWidget(), controller)); | 290 GetWidget()->SetView(new CaptureTestView(GetWidget(), controller)); |
| 291 delete old_view; | 291 delete old_view; |
| 292 } | 292 } |
| 293 | 293 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 for (int i = 0; i < 3; ++i) { | 1209 for (int i = 0; i < 3; ++i) { |
| 1210 SimulateRefreshFrameRequest(); | 1210 SimulateRefreshFrameRequest(); |
| 1211 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); | 1211 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 device()->StopAndDeAllocate(); | 1214 device()->StopAndDeAllocate(); |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 } // namespace | 1217 } // namespace |
| 1218 } // namespace content | 1218 } // namespace content |
| OLD | NEW |