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

Side by Side Diff: content/browser/renderer_host/test_render_view_host.cc

Issue 12090109: Tab Capture: Backing store readbacks to YV12 VideoFrames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes suggested by wjia Created 7 years, 10 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 | Annotate | Revision Log
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/renderer_host/test_backing_store.h" 5 #include "content/browser/renderer_host/test_render_view_host.h"
6
6 #include "content/browser/dom_storage/dom_storage_context_impl.h" 7 #include "content/browser/dom_storage/dom_storage_context_impl.h"
7 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 8 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
8 #include "content/browser/renderer_host/test_render_view_host.h" 9 #include "content/browser/renderer_host/test_backing_store.h"
9 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
10 #include "content/browser/web_contents/navigation_controller_impl.h" 11 #include "content/browser/web_contents/navigation_controller_impl.h"
11 #include "content/browser/web_contents/test_web_contents.h" 12 #include "content/browser/web_contents/test_web_contents.h"
12 #include "content/common/view_messages.h" 13 #include "content/common/view_messages.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "content/public/browser/navigation_controller.h" 15 #include "content/public/browser/navigation_controller.h"
15 #include "content/public/browser/storage_partition.h" 16 #include "content/public/browser/storage_partition.h"
16 #include "content/public/common/content_client.h" 17 #include "content/public/common/content_client.h"
17 #include "content/public/common/password_form.h" 18 #include "content/public/common/password_form.h"
19 #include "media/base/video_frame.h"
18 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
19 #include "webkit/dom_storage/dom_storage_types.h" 21 #include "webkit/dom_storage/dom_storage_types.h"
20 #include "webkit/glue/glue_serialize.h" 22 #include "webkit/glue/glue_serialize.h"
21 #include "webkit/glue/webpreferences.h" 23 #include "webkit/glue/webpreferences.h"
22 24
23 namespace content { 25 namespace content {
24 26
25 namespace { 27 namespace {
26 // Normally this is done by the NavigationController, but we'll fake it out 28 // Normally this is done by the NavigationController, but we'll fake it out
27 // here for testing. 29 // here for testing.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return new TestBackingStore(rwh_, size); 117 return new TestBackingStore(rwh_, size);
116 } 118 }
117 119
118 void TestRenderWidgetHostView::CopyFromCompositingSurface( 120 void TestRenderWidgetHostView::CopyFromCompositingSurface(
119 const gfx::Rect& src_subrect, 121 const gfx::Rect& src_subrect,
120 const gfx::Size& dst_size, 122 const gfx::Size& dst_size,
121 const base::Callback<void(bool, const SkBitmap&)>& callback) { 123 const base::Callback<void(bool, const SkBitmap&)>& callback) {
122 callback.Run(false, SkBitmap()); 124 callback.Run(false, SkBitmap());
123 } 125 }
124 126
127 #if defined(OS_WIN)
128 void TestRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame(
129 const gfx::Rect& src_subrect,
130 const gfx::Size& dst_size,
131 const base::Callback<void(media::VideoFrame*)>& callback) {
132 callback.Run(media::VideoFrame::CreateEmptyFrame());
133 }
134 #endif
135
125 void TestRenderWidgetHostView::OnAcceleratedCompositingStateChange() { 136 void TestRenderWidgetHostView::OnAcceleratedCompositingStateChange() {
126 } 137 }
127 138
128 void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped( 139 void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped(
129 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 140 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
130 int gpu_host_id) { 141 int gpu_host_id) {
131 } 142 }
132 143
133 void TestRenderWidgetHostView::AcceleratedSurfacePostSubBuffer( 144 void TestRenderWidgetHostView::AcceleratedSurfacePostSubBuffer(
134 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 145 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 388
378 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { 389 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() {
379 return static_cast<TestRenderViewHost*>(active_rvh()); 390 return static_cast<TestRenderViewHost*>(active_rvh());
380 } 391 }
381 392
382 TestWebContents* RenderViewHostImplTestHarness::contents() { 393 TestWebContents* RenderViewHostImplTestHarness::contents() {
383 return static_cast<TestWebContents*>(web_contents()); 394 return static_cast<TestWebContents*>(web_contents());
384 } 395 }
385 396
386 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698