| 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/IOSurfaceAPI.h> | 9 #include <IOSurface/IOSurfaceAPI.h> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 // Update the scale factor for the backing store and for any CALayers. | 444 // Update the scale factor for the backing store and for any CALayers. |
| 445 void UpdateBackingStoreScaleFactor(); | 445 void UpdateBackingStoreScaleFactor(); |
| 446 | 446 |
| 447 // Ensure that the display link is associated with the correct display. | 447 // Ensure that the display link is associated with the correct display. |
| 448 void UpdateDisplayLink(); | 448 void UpdateDisplayLink(); |
| 449 | 449 |
| 450 void PauseForPendingResizeOrRepaintsAndDraw(); | 450 void PauseForPendingResizeOrRepaintsAndDraw(); |
| 451 | 451 |
| 452 // DelegatedFrameHostClient implementation. | 452 // DelegatedFrameHostClient implementation. |
| 453 ui::Layer* GetLayer() override; | 453 bool DelegatedFrameHostIsVisible() const override; |
| 454 RenderWidgetHostImpl* GetHost() override; | 454 gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override; |
| 455 bool IsVisible() override; | 455 bool DelegatedFrameCanCreateResizeLock() const override; |
| 456 scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) override; | 456 scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( |
| 457 gfx::Size DesiredFrameSize() override; | 457 bool defer_compositor_lock) override; |
| 458 float CurrentDeviceScaleFactor() override; | 458 void DelegatedFrameHostResizeLockWasReleased() override; |
| 459 gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override; | 459 void DelegatedFrameHostSendCompositorSwapAck( |
| 460 DelegatedFrameHost* GetDelegatedFrameHost() const override; | 460 int output_surface_id, |
| 461 const cc::CompositorFrameAck& ack) override; |
| 462 void DelegatedFrameHostSendReclaimCompositorResources( |
| 463 int output_surface_id, |
| 464 const cc::CompositorFrameAck& ack) override; |
| 465 void DelegatedFrameHostOnLostCompositorResources() override; |
| 466 void DelegatedFrameHostUpdateVSyncParameters( |
| 467 const base::TimeTicks& timebase, |
| 468 const base::TimeDelta& interval) override; |
| 461 | 469 |
| 462 // AcceleratedWidgetMacNSView implementation. | 470 // AcceleratedWidgetMacNSView implementation. |
| 463 NSView* AcceleratedWidgetGetNSView() const override; | 471 NSView* AcceleratedWidgetGetNSView() const override; |
| 464 bool AcceleratedWidgetShouldIgnoreBackpressure() const override; | 472 bool AcceleratedWidgetShouldIgnoreBackpressure() const override; |
| 465 void AcceleratedWidgetSwapCompleted( | 473 void AcceleratedWidgetSwapCompleted( |
| 466 const std::vector<ui::LatencyInfo>& latency_info) override; | 474 const std::vector<ui::LatencyInfo>& latency_info) override; |
| 467 void AcceleratedWidgetHitError() override; | 475 void AcceleratedWidgetHitError() override; |
| 468 | 476 |
| 469 // Transition from being in the Suspended state to being in the Destroyed | 477 // Transition from being in the Suspended state to being in the Destroyed |
| 470 // state, if appropriate (see BrowserCompositorViewState for details). | 478 // state, if appropriate (see BrowserCompositorViewState for details). |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 559 |
| 552 // Factory used to safely scope delayed calls to ShutdownHost(). | 560 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 553 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 561 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 554 | 562 |
| 555 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 556 }; | 564 }; |
| 557 | 565 |
| 558 } // namespace content | 566 } // namespace content |
| 559 | 567 |
| 560 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 568 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |