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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.h

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void RegisterFrameSwappedCallback(std::unique_ptr<base::Closure> callback); 71 void RegisterFrameSwappedCallback(std::unique_ptr<base::Closure> callback);
72 72
73 // RenderWidgetHostView implementation. 73 // RenderWidgetHostView implementation.
74 void InitAsChild(gfx::NativeView parent_view) override; 74 void InitAsChild(gfx::NativeView parent_view) override;
75 RenderWidgetHost* GetRenderWidgetHost() const override; 75 RenderWidgetHost* GetRenderWidgetHost() const override;
76 void SetSize(const gfx::Size& size) override; 76 void SetSize(const gfx::Size& size) override;
77 void SetBounds(const gfx::Rect& rect) override; 77 void SetBounds(const gfx::Rect& rect) override;
78 void Focus() override; 78 void Focus() override;
79 bool HasFocus() const override; 79 bool HasFocus() const override;
80 bool IsSurfaceAvailableForCopy() const override; 80 bool IsSurfaceAvailableForCopy() const override;
81 void CopyFromSurface(const gfx::Rect& src_rect,
82 const gfx::Size& output_size,
83 const ReadbackRequestCallback& callback,
84 const SkColorType color_type) override;
81 void Show() override; 85 void Show() override;
82 void Hide() override; 86 void Hide() override;
83 bool IsShowing() override; 87 bool IsShowing() override;
84 gfx::Rect GetViewBounds() const override; 88 gfx::Rect GetViewBounds() const override;
85 gfx::Size GetVisibleViewportSize() const override; 89 gfx::Size GetVisibleViewportSize() const override;
86 gfx::Vector2dF GetLastScrollOffset() const override; 90 gfx::Vector2dF GetLastScrollOffset() const override;
87 gfx::NativeView GetNativeView() const override; 91 gfx::NativeView GetNativeView() const override;
88 gfx::NativeViewAccessible GetNativeViewAccessible() override; 92 gfx::NativeViewAccessible GetNativeViewAccessible() override;
89 void SetBackgroundColor(SkColor color) override; 93 void SetBackgroundColor(SkColor color) override;
90 gfx::Size GetPhysicalBackingSize() const override; 94 gfx::Size GetPhysicalBackingSize() const override;
91 bool IsMouseLocked() override; 95 bool IsMouseLocked() override;
92 void SetNeedsBeginFrames(bool needs_begin_frames) override; 96 void SetNeedsBeginFrames(bool needs_begin_frames) override;
93 97
94 // RenderWidgetHostViewBase implementation. 98 // RenderWidgetHostViewBase implementation.
95 void InitAsPopup(RenderWidgetHostView* parent_host_view, 99 void InitAsPopup(RenderWidgetHostView* parent_host_view,
96 const gfx::Rect& bounds) override; 100 const gfx::Rect& bounds) override;
97 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 101 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
98 void UpdateCursor(const WebCursor& cursor) override; 102 void UpdateCursor(const WebCursor& cursor) override;
99 void SetIsLoading(bool is_loading) override; 103 void SetIsLoading(bool is_loading) override;
100 void RenderProcessGone(base::TerminationStatus status, 104 void RenderProcessGone(base::TerminationStatus status,
101 int error_code) override; 105 int error_code) override;
102 void Destroy() override; 106 void Destroy() override;
103 void SetTooltipText(const base::string16& tooltip_text) override; 107 void SetTooltipText(const base::string16& tooltip_text) override;
104 void CopyFromCompositingSurface(
105 const gfx::Rect& src_subrect,
106 const gfx::Size& dst_size,
107 const ReadbackRequestCallback& callback,
108 const SkColorType preferred_color_type) override;
109 void CopyFromCompositingSurfaceToVideoFrame(
110 const gfx::Rect& src_subrect,
111 const scoped_refptr<media::VideoFrame>& target,
112 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
113 bool CanCopyToVideoFrame() const override;
114 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 108 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
115 void GestureEventAck(const blink::WebGestureEvent& event, 109 void GestureEventAck(const blink::WebGestureEvent& event,
116 InputEventAckState ack_result) override; 110 InputEventAckState ack_result) override;
117 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, 111 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id,
118 cc::CompositorFrame frame) override; 112 cc::CompositorFrame frame) override;
119 // Since the URL of content rendered by this class is not displayed in 113 // Since the URL of content rendered by this class is not displayed in
120 // the URL bar, this method does not need an implementation. 114 // the URL bar, this method does not need an implementation.
121 void ClearCompositorFrame() override {} 115 void ClearCompositorFrame() override {}
122 gfx::Rect GetBoundsInRootWindow() override; 116 gfx::Rect GetBoundsInRootWindow() override;
123 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 117 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // The surface client ID of the parent RenderWidgetHostView. 0 if none. 260 // The surface client ID of the parent RenderWidgetHostView. 0 if none.
267 cc::FrameSinkId parent_frame_sink_id_; 261 cc::FrameSinkId parent_frame_sink_id_;
268 262
269 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; 263 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_;
270 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); 264 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame);
271 }; 265 };
272 266
273 } // namespace content 267 } // namespace content
274 268
275 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 269 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698