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

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: Style fix per 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 void TestRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame(
128 const gfx::Rect& src_subrect,
129 const scoped_refptr<media::VideoFrame>& target,
130 const base::Callback<void(bool)>& callback) {
131 callback.Run(false);
132 }
133
134 bool TestRenderWidgetHostView::CanCopyToVideoFrame() const {
135 return false;
136 }
137
125 void TestRenderWidgetHostView::OnAcceleratedCompositingStateChange() { 138 void TestRenderWidgetHostView::OnAcceleratedCompositingStateChange() {
126 } 139 }
127 140
128 void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped( 141 void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped(
129 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 142 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
130 int gpu_host_id) { 143 int gpu_host_id) {
131 } 144 }
132 145
133 void TestRenderWidgetHostView::AcceleratedSurfacePostSubBuffer( 146 void TestRenderWidgetHostView::AcceleratedSurfacePostSubBuffer(
134 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 147 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 390
378 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { 391 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() {
379 return static_cast<TestRenderViewHost*>(active_rvh()); 392 return static_cast<TestRenderViewHost*>(active_rvh());
380 } 393 }
381 394
382 TestWebContents* RenderViewHostImplTestHarness::contents() { 395 TestWebContents* RenderViewHostImplTestHarness::contents() {
383 return static_cast<TestWebContents*>(web_contents()); 396 return static_cast<TestWebContents*>(web_contents());
384 } 397 }
385 398
386 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/test_render_view_host.h ('k') | content/port/browser/render_widget_host_view_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698