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 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 | 1709 |
1710 void RenderWidgetHostViewMac::OnDisplayAdded(const display::Display& display) {} | 1710 void RenderWidgetHostViewMac::OnDisplayAdded(const display::Display& display) {} |
1711 | 1711 |
1712 void RenderWidgetHostViewMac::OnDisplayRemoved( | 1712 void RenderWidgetHostViewMac::OnDisplayRemoved( |
1713 const display::Display& display) {} | 1713 const display::Display& display) {} |
1714 | 1714 |
1715 void RenderWidgetHostViewMac::OnDisplayMetricsChanged( | 1715 void RenderWidgetHostViewMac::OnDisplayMetricsChanged( |
1716 const display::Display& display, | 1716 const display::Display& display, |
1717 uint32_t changed_metrics) { | 1717 uint32_t changed_metrics) { |
1718 display::Screen* screen = display::Screen::GetScreen(); | 1718 display::Screen* screen = display::Screen::GetScreen(); |
1719 if (display.id() != screen->GetDisplayNearestWindow(cocoa_view_).id()) | 1719 if (display.id() != screen->GetDisplayNearestView(cocoa_view_).id()) |
1720 return; | 1720 return; |
1721 | 1721 |
1722 if (changed_metrics & DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR) { | 1722 if (changed_metrics & DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR) { |
1723 RenderWidgetHostImpl* host = | 1723 RenderWidgetHostImpl* host = |
1724 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 1724 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
1725 if (host && host->delegate()) | 1725 if (host && host->delegate()) |
1726 host->delegate()->UpdateDeviceScaleFactor(display.device_scale_factor()); | 1726 host->delegate()->UpdateDeviceScaleFactor(display.device_scale_factor()); |
1727 } | 1727 } |
1728 | 1728 |
1729 UpdateScreenInfo(cocoa_view_); | 1729 UpdateScreenInfo(cocoa_view_); |
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3481 | 3481 |
3482 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3482 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3483 // regions that are not draggable. (See ControlRegionView in | 3483 // regions that are not draggable. (See ControlRegionView in |
3484 // native_app_window_cocoa.mm). This requires the render host view to be | 3484 // native_app_window_cocoa.mm). This requires the render host view to be |
3485 // draggable by default. | 3485 // draggable by default. |
3486 - (BOOL)mouseDownCanMoveWindow { | 3486 - (BOOL)mouseDownCanMoveWindow { |
3487 return YES; | 3487 return YES; |
3488 } | 3488 } |
3489 | 3489 |
3490 @end | 3490 @end |
OLD | NEW |