| 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" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 CaptureTestSourceController* controller) | 255 CaptureTestSourceController* controller) |
| 256 : TestRenderViewHost(instance, | 256 : TestRenderViewHost(instance, |
| 257 delegate, | 257 delegate, |
| 258 widget_delegate, | 258 widget_delegate, |
| 259 routing_id, | 259 routing_id, |
| 260 main_frame_routing_id, | 260 main_frame_routing_id, |
| 261 swapped_out), | 261 swapped_out), |
| 262 controller_(controller) { | 262 controller_(controller) { |
| 263 // Override the default view installed by TestRenderViewHost; we need | 263 // Override the default view installed by TestRenderViewHost; we need |
| 264 // our special subclass which has mocked-out tab capture support. | 264 // our special subclass which has mocked-out tab capture support. |
| 265 RenderWidgetHostView* old_view = GetView(); | 265 RenderWidgetHostView* old_view = GetWidget()->GetView(); |
| 266 SetView(new CaptureTestView(this, controller)); | 266 GetWidget()->SetView(new CaptureTestView(GetWidget(), controller)); |
| 267 delete old_view; | 267 delete old_view; |
| 268 } | 268 } |
| 269 | 269 |
| 270 // TestRenderViewHost overrides. | 270 // TestRenderViewHost overrides. |
| 271 void CopyFromBackingStore(const gfx::Rect& src_rect, | 271 void CopyFromBackingStore(const gfx::Rect& src_rect, |
| 272 const gfx::Size& accelerated_dst_size, | 272 const gfx::Size& accelerated_dst_size, |
| 273 const ReadbackRequestCallback& callback, | 273 const ReadbackRequestCallback& callback, |
| 274 const SkColorType color_type) override { | 274 const SkColorType color_type) override { |
| 275 gfx::Size size = controller_->GetCopyResultSize(); | 275 gfx::Size size = controller_->GetCopyResultSize(); |
| 276 SkColor color = controller_->GetSolidColor(); | 276 SkColor color = controller_->GetSolidColor(); |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); | 1134 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); |
| 1135 RunTestForPreferredSize( | 1135 RunTestForPreferredSize( |
| 1136 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); | 1136 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); |
| 1137 RunTestForPreferredSize( | 1137 RunTestForPreferredSize( |
| 1138 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); | 1138 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); |
| 1139 } | 1139 } |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 } // namespace | 1142 } // namespace |
| 1143 } // namespace content | 1143 } // namespace content |
| OLD | NEW |