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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 462173002: Fix set_area sizes for RequestCopyOfOutput, and related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RWHVBrowserTest changes, per danakj's comments. Disabled tests on Windows. Created 6 years, 4 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #if defined(OS_MACOSX) 8 #if defined(OS_MACOSX)
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 #endif 10 #endif
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // |start_rect| and |end_rect| are the bounds end of the selection in the 237 // |start_rect| and |end_rect| are the bounds end of the selection in the
238 // coordinate system of the render view. |start_direction| and |end_direction| 238 // coordinate system of the render view. |start_direction| and |end_direction|
239 // indicates the direction at which the selection was made on touch devices. 239 // indicates the direction at which the selection was made on touch devices.
240 virtual void SelectionBoundsChanged( 240 virtual void SelectionBoundsChanged(
241 const ViewHostMsg_SelectionBounds_Params& params) = 0; 241 const ViewHostMsg_SelectionBounds_Params& params) = 0;
242 242
243 // Notifies the view that the scroll offset has changed. 243 // Notifies the view that the scroll offset has changed.
244 virtual void ScrollOffsetChanged() = 0; 244 virtual void ScrollOffsetChanged() = 0;
245 245
246 // Copies the contents of the compositing surface into the given 246 // Copies the contents of the compositing surface into the given
247 // (uninitialized) PlatformCanvas if any. 247 // (uninitialized) PlatformCanvas if any. |src_subrect| specified in DIP
248 // The rectangle region specified with |src_subrect| is copied from the 248 // coordinates, is the region copied from the contents, scaled to |dst_size|
249 // contents, scaled to |dst_size|, and written to |output|. 249 // (in physical pixels), and written to |output|. |callback| is invoked with
250 // |callback| is invoked with true on success, false otherwise. |output| can 250 // true on success, false otherwise. |output| can be initialized even on
251 // be initialized even on failure. 251 // failure. A smaller region than |src_subrect| may be copied if the
252 // A smaller region than |src_subrect| may be copied if the underlying surface 252 // underlying surface is smaller than |src_subrect|.
253 // is smaller than |src_subrect|.
254 // NOTE: |callback| is called asynchronously. 253 // NOTE: |callback| is called asynchronously.
255 virtual void CopyFromCompositingSurface( 254 virtual void CopyFromCompositingSurface(
256 const gfx::Rect& src_subrect, 255 const gfx::Rect& src_subrect,
257 const gfx::Size& dst_size, 256 const gfx::Size& dst_size,
258 const base::Callback<void(bool, const SkBitmap&)>& callback, 257 const base::Callback<void(bool, const SkBitmap&)>& callback,
259 const SkColorType color_type) = 0; 258 const SkColorType color_type) = 0;
260 259
261 // Copies a given subset of the compositing surface's content into a YV12 260 // Copies the given rectangular region, specified with |src_subrect| in DIP
262 // VideoFrame, and invokes a callback with a success/fail parameter. |target| 261 // coordinates, of the compositing surface's content into a YV12 VideoFrame,
263 // must contain an allocated, YV12 video frame of the intended size. If the 262 // and invokes a callback with a success/fail parameter. |target| must contain
264 // copy rectangle does not match |target|'s size, the copied content will be 263 // an allocated, YV12 video frame of the intended size. If the copy rectangle
265 // scaled and letterboxed with black borders. The copy will happen 264 // does not match |target|'s size, the copied content will be scaled and
266 // asynchronously. This operation will fail if there is no available 265 // letterboxed with black borders. The copy will happen asynchronously. This
267 // compositing surface. 266 // operation will fail if there is no available compositing surface.
268 virtual void CopyFromCompositingSurfaceToVideoFrame( 267 virtual void CopyFromCompositingSurfaceToVideoFrame(
269 const gfx::Rect& src_subrect, 268 const gfx::Rect& src_subrect,
270 const scoped_refptr<media::VideoFrame>& target, 269 const scoped_refptr<media::VideoFrame>& target,
271 const base::Callback<void(bool)>& callback) = 0; 270 const base::Callback<void(bool)>& callback) = 0;
272 271
273 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to 272 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to
274 // succeed. 273 // succeed.
275 // 274 //
276 // TODO(nick): When VideoFrame copies are broadly implemented, this method 275 // TODO(nick): When VideoFrame copies are broadly implemented, this method
277 // should be renamed to HasCompositingSurface(), or unified with 276 // should be renamed to HasCompositingSurface(), or unified with
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 uint32 renderer_frame_number_; 426 uint32 renderer_frame_number_;
428 427
429 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; 428 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_;
430 429
431 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 430 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
432 }; 431 };
433 432
434 } // namespace content 433 } // namespace content
435 434
436 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 435 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698