| 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 | 
| 443 //////////////////////////////////////////////////////////////////////////////// | 449 //////////////////////////////////////////////////////////////////////////////// | 
| 444 // AcceleratedWidgetMacNSView, public: | 450 // AcceleratedWidgetMacNSView, public: | 
| 445 | 451 | 
| 446 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { | 452 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { | 
| 447   return cocoa_view_; | 453   return cocoa_view_; | 
| 448 } | 454 } | 
| 449 | 455 | 
| 450 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() | 456 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() | 
| 451     const { | 457     const { | 
| 452   // If vsync is disabled, then always draw and ack frames immediately. | 458   // If vsync is disabled, then always draw and ack frames immediately. | 
| (...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3445 | 3451 | 
| 3446 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3452 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 
| 3447 // regions that are not draggable. (See ControlRegionView in | 3453 // regions that are not draggable. (See ControlRegionView in | 
| 3448 // native_app_window_cocoa.mm). This requires the render host view to be | 3454 // native_app_window_cocoa.mm). This requires the render host view to be | 
| 3449 // draggable by default. | 3455 // draggable by default. | 
| 3450 - (BOOL)mouseDownCanMoveWindow { | 3456 - (BOOL)mouseDownCanMoveWindow { | 
| 3451   return YES; | 3457   return YES; | 
| 3452 } | 3458 } | 
| 3453 | 3459 | 
| 3454 @end | 3460 @end | 
| OLD | NEW | 
|---|