OLD | NEW |
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 void CopyFromSurfaceToVideoFrame( | 299 void CopyFromSurfaceToVideoFrame( |
300 const gfx::Rect& src_rect, | 300 const gfx::Rect& src_rect, |
301 scoped_refptr<media::VideoFrame> target, | 301 scoped_refptr<media::VideoFrame> target, |
302 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; | 302 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; |
303 void BeginFrameSubscription( | 303 void BeginFrameSubscription( |
304 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; | 304 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; |
305 void EndFrameSubscription() override; | 305 void EndFrameSubscription() override; |
306 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; | 306 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; |
307 void FocusedNodeChanged(bool is_editable_node, | 307 void FocusedNodeChanged(bool is_editable_node, |
308 const gfx::Rect& node_bounds_in_screen) override; | 308 const gfx::Rect& node_bounds_in_screen) override; |
309 void DidCreateNewRendererCompositorFrameSink( | 309 void DidCreateNewRendererCompositorFrameSink() override; |
310 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink) | |
311 override; | |
312 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, | 310 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, |
313 cc::CompositorFrame frame) override; | 311 cc::CompositorFrame frame) override; |
314 void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) override; | 312 void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) override; |
315 void ClearCompositorFrame() override; | 313 void ClearCompositorFrame() override; |
316 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( | 314 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
317 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override; | 315 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override; |
318 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override; | 316 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override; |
319 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; | 317 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; |
320 | 318 |
321 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 319 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 void UpdateBackingStoreProperties(); | 444 void UpdateBackingStoreProperties(); |
447 | 445 |
448 // Ensure that the display link is associated with the correct display. | 446 // Ensure that the display link is associated with the correct display. |
449 void UpdateDisplayLink(); | 447 void UpdateDisplayLink(); |
450 | 448 |
451 void PauseForPendingResizeOrRepaintsAndDraw(); | 449 void PauseForPendingResizeOrRepaintsAndDraw(); |
452 | 450 |
453 // BrowserCompositorMacClient implementation. | 451 // BrowserCompositorMacClient implementation. |
454 NSView* BrowserCompositorMacGetNSView() const override; | 452 NSView* BrowserCompositorMacGetNSView() const override; |
455 SkColor BrowserCompositorMacGetGutterColor(SkColor color) const override; | 453 SkColor BrowserCompositorMacGetGutterColor(SkColor color) const override; |
| 454 void BrowserCompositorMacSendReclaimCompositorResources( |
| 455 bool is_swap_ack, |
| 456 const cc::ReturnedResourceArray& resources) override; |
456 void BrowserCompositorMacSendBeginFrame( | 457 void BrowserCompositorMacSendBeginFrame( |
457 const cc::BeginFrameArgs& args) override; | 458 const cc::BeginFrameArgs& args) override; |
458 | 459 |
459 // AcceleratedWidgetMacNSView implementation. | 460 // AcceleratedWidgetMacNSView implementation. |
460 NSView* AcceleratedWidgetGetNSView() const override; | 461 NSView* AcceleratedWidgetGetNSView() const override; |
461 void AcceleratedWidgetGetVSyncParameters( | 462 void AcceleratedWidgetGetVSyncParameters( |
462 base::TimeTicks* timebase, base::TimeDelta* interval) const override; | 463 base::TimeTicks* timebase, base::TimeDelta* interval) const override; |
463 void AcceleratedWidgetSwapCompleted() override; | 464 void AcceleratedWidgetSwapCompleted() override; |
464 | 465 |
465 // Exposed for testing. | 466 // Exposed for testing. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 560 |
560 // Factory used to safely scope delayed calls to ShutdownHost(). | 561 // Factory used to safely scope delayed calls to ShutdownHost(). |
561 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 562 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
562 | 563 |
563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 564 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
564 }; | 565 }; |
565 | 566 |
566 } // namespace content | 567 } // namespace content |
567 | 568 |
568 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 569 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |