Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 1413643002: Separate RenderViewHost from RenderWidgetHost, part 2: public implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/loader/resource_scheduler_unittest.cc ('k') | content/browser/renderer_host/input/touch_input_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698