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 <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
8 #import <objc/runtime.h> | 8 #import <objc/runtime.h> |
9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
10 #include <QuartzCore/QuartzCore.h> | 10 #include <QuartzCore/QuartzCore.h> |
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 last_frame_root_background_color_ = frame.metadata.root_background_color; | 1439 last_frame_root_background_color_ = frame.metadata.root_background_color; |
1440 last_scroll_offset_ = frame.metadata.root_scroll_offset; | 1440 last_scroll_offset_ = frame.metadata.root_scroll_offset; |
1441 | 1441 |
1442 page_at_minimum_scale_ = | 1442 page_at_minimum_scale_ = |
1443 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor; | 1443 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor; |
1444 browser_compositor_->SubmitCompositorFrame(local_surface_id, | 1444 browser_compositor_->SubmitCompositorFrame(local_surface_id, |
1445 std::move(frame)); | 1445 std::move(frame)); |
1446 UpdateDisplayVSyncParameters(); | 1446 UpdateDisplayVSyncParameters(); |
1447 } | 1447 } |
1448 | 1448 |
1449 void RenderWidgetHostViewMac::OnBeginFrameDidNotSwap( | 1449 void RenderWidgetHostViewMac::OnBeginFrameDidNotProduceFrame( |
1450 const cc::BeginFrameAck& ack) { | 1450 const cc::BeginFrameAck& ack) { |
1451 browser_compositor_->OnBeginFrameDidNotSwap(ack); | 1451 browser_compositor_->OnBeginFrameDidNotProduceFrame(ack); |
1452 } | 1452 } |
1453 | 1453 |
1454 void RenderWidgetHostViewMac::ClearCompositorFrame() { | 1454 void RenderWidgetHostViewMac::ClearCompositorFrame() { |
1455 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame(); | 1455 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame(); |
1456 } | 1456 } |
1457 | 1457 |
1458 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() { | 1458 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() { |
1459 // TODO(shess): In case of !window, the view has been removed from | 1459 // TODO(shess): In case of !window, the view has been removed from |
1460 // the view hierarchy because the tab isn't main. Could retrieve | 1460 // the view hierarchy because the tab isn't main. Could retrieve |
1461 // the information from the main tab for our window. | 1461 // the information from the main tab for our window. |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3524 | 3524 |
3525 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3525 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3526 // regions that are not draggable. (See ControlRegionView in | 3526 // regions that are not draggable. (See ControlRegionView in |
3527 // native_app_window_cocoa.mm). This requires the render host view to be | 3527 // native_app_window_cocoa.mm). This requires the render host view to be |
3528 // draggable by default. | 3528 // draggable by default. |
3529 - (BOOL)mouseDownCanMoveWindow { | 3529 - (BOOL)mouseDownCanMoveWindow { |
3530 return YES; | 3530 return YES; |
3531 } | 3531 } |
3532 | 3532 |
3533 @end | 3533 @end |
OLD | NEW |