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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 #include <OpenGL/gl.h> | 8 #include <OpenGL/gl.h> |
9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
10 | 10 |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 int output_surface_id, | 433 int output_surface_id, |
434 const cc::CompositorFrameAck& ack) { | 434 const cc::CompositorFrameAck& ack) { |
435 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( | 435 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( |
436 render_widget_host_->GetRoutingID(), output_surface_id, ack)); | 436 render_widget_host_->GetRoutingID(), output_surface_id, ack)); |
437 } | 437 } |
438 | 438 |
439 void RenderWidgetHostViewMac::DelegatedFrameHostOnLostCompositorResources() { | 439 void RenderWidgetHostViewMac::DelegatedFrameHostOnLostCompositorResources() { |
440 render_widget_host_->ScheduleComposite(); | 440 render_widget_host_->ScheduleComposite(); |
441 } | 441 } |
442 | 442 |
443 void RenderWidgetHostViewMac::DelegatedFrameHostUpdateVSyncParameters( | |
444 const base::TimeTicks& timebase, | |
445 const base::TimeDelta& interval) { | |
446 render_widget_host_->UpdateVSyncParameters(timebase, interval); | |
447 } | |
448 | |
449 //////////////////////////////////////////////////////////////////////////////// | 443 //////////////////////////////////////////////////////////////////////////////// |
450 // AcceleratedWidgetMacNSView, public: | 444 // AcceleratedWidgetMacNSView, public: |
451 | 445 |
452 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { | 446 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { |
453 return cocoa_view_; | 447 return cocoa_view_; |
454 } | 448 } |
455 | 449 |
456 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() | 450 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() |
457 const { | 451 const { |
458 // If vsync is disabled, then always draw and ack frames immediately. | 452 // If vsync is disabled, then always draw and ack frames immediately. |
(...skipping 2990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3449 | 3443 |
3450 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3444 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3451 // regions that are not draggable. (See ControlRegionView in | 3445 // regions that are not draggable. (See ControlRegionView in |
3452 // native_app_window_cocoa.mm). This requires the render host view to be | 3446 // native_app_window_cocoa.mm). This requires the render host view to be |
3453 // draggable by default. | 3447 // draggable by default. |
3454 - (BOOL)mouseDownCanMoveWindow { | 3448 - (BOOL)mouseDownCanMoveWindow { |
3455 return YES; | 3449 return YES; |
3456 } | 3450 } |
3457 | 3451 |
3458 @end | 3452 @end |
OLD | NEW |