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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.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 (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_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurface.h> 9 #include <IOSurface/IOSurface.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // RenderWidgetHostView implementation. 255 // RenderWidgetHostView implementation.
256 bool OnMessageReceived(const IPC::Message& msg) override; 256 bool OnMessageReceived(const IPC::Message& msg) override;
257 void InitAsChild(gfx::NativeView parent_view) override; 257 void InitAsChild(gfx::NativeView parent_view) override;
258 RenderWidgetHost* GetRenderWidgetHost() const override; 258 RenderWidgetHost* GetRenderWidgetHost() const override;
259 void SetSize(const gfx::Size& size) override; 259 void SetSize(const gfx::Size& size) override;
260 void SetBounds(const gfx::Rect& rect) override; 260 void SetBounds(const gfx::Rect& rect) override;
261 gfx::Vector2dF GetLastScrollOffset() const override; 261 gfx::Vector2dF GetLastScrollOffset() const override;
262 gfx::NativeView GetNativeView() const override; 262 gfx::NativeView GetNativeView() const override;
263 gfx::NativeViewAccessible GetNativeViewAccessible() override; 263 gfx::NativeViewAccessible GetNativeViewAccessible() override;
264 bool HasFocus() const override; 264 bool HasFocus() const override;
265 bool IsSurfaceAvailableForCopy() const override;
266 void Show() override; 265 void Show() override;
267 void Hide() override; 266 void Hide() override;
268 bool IsShowing() override; 267 bool IsShowing() override;
269 void WasUnOccluded() override; 268 void WasUnOccluded() override;
270 void WasOccluded() override; 269 void WasOccluded() override;
271 gfx::Rect GetViewBounds() const override; 270 gfx::Rect GetViewBounds() const override;
272 void SetShowingContextMenu(bool showing) override; 271 void SetShowingContextMenu(bool showing) override;
273 void SetActive(bool active) override; 272 void SetActive(bool active) override;
274 void ShowDefinitionForSelection() override; 273 void ShowDefinitionForSelection() override;
275 bool SupportsSpeech() const override; 274 bool SupportsSpeech() const override;
276 void SpeakSelection() override; 275 void SpeakSelection() override;
277 bool IsSpeaking() const override; 276 bool IsSpeaking() const override;
278 void StopSpeaking() override; 277 void StopSpeaking() override;
279 void SetBackgroundColor(SkColor color) override; 278 void SetBackgroundColor(SkColor color) override;
280 void SetNeedsBeginFrames(bool needs_begin_frames) override; 279 void SetNeedsBeginFrames(bool needs_begin_frames) override;
281 280
282 // Implementation of RenderWidgetHostViewBase. 281 // Implementation of RenderWidgetHostViewBase.
283 void InitAsPopup(RenderWidgetHostView* parent_host_view, 282 void InitAsPopup(RenderWidgetHostView* parent_host_view,
284 const gfx::Rect& pos) override; 283 const gfx::Rect& pos) override;
285 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 284 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
286 void Focus() override; 285 void Focus() override;
287 void UpdateCursor(const WebCursor& cursor) override; 286 void UpdateCursor(const WebCursor& cursor) override;
288 void SetIsLoading(bool is_loading) override; 287 void SetIsLoading(bool is_loading) override;
289 void RenderProcessGone(base::TerminationStatus status, 288 void RenderProcessGone(base::TerminationStatus status,
290 int error_code) override; 289 int error_code) override;
291 void Destroy() override; 290 void Destroy() override;
292 void SetTooltipText(const base::string16& tooltip_text) override; 291 void SetTooltipText(const base::string16& tooltip_text) override;
293 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, 292 bool IsSurfaceAvailableForCopy() const override;
294 const gfx::Size& dst_size, 293 void CopyFromSurface(const gfx::Rect& src_rect,
295 const ReadbackRequestCallback& callback, 294 const gfx::Size& output_size,
296 SkColorType preferred_color_type) override; 295 const ReadbackRequestCallback& callback,
297 void CopyFromCompositingSurfaceToVideoFrame( 296 const SkColorType color_type) override;
298 const gfx::Rect& src_subrect, 297 void CopyFromSurfaceToVideoFrame(
299 const scoped_refptr<media::VideoFrame>& target, 298 const gfx::Rect& src_rect,
299 scoped_refptr<media::VideoFrame> target,
300 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; 300 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
301 bool CanCopyToVideoFrame() const override;
302 void BeginFrameSubscription( 301 void BeginFrameSubscription(
303 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; 302 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
304 void EndFrameSubscription() override; 303 void EndFrameSubscription() override;
305 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; 304 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
306 void FocusedNodeChanged(bool is_editable_node, 305 void FocusedNodeChanged(bool is_editable_node,
307 const gfx::Rect& node_bounds_in_screen) override; 306 const gfx::Rect& node_bounds_in_screen) override;
308 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, 307 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id,
309 cc::CompositorFrame frame) override; 308 cc::CompositorFrame frame) override;
310 void ClearCompositorFrame() override; 309 void ClearCompositorFrame() override;
311 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 310 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 566
568 // Factory used to safely scope delayed calls to ShutdownHost(). 567 // Factory used to safely scope delayed calls to ShutdownHost().
569 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 568 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
570 569
571 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 570 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
572 }; 571 };
573 572
574 } // namespace content 573 } // namespace content
575 574
576 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 575 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698