OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ui/views/cocoa/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #import "base/mac/foundation_util.h" | 10 #import "base/mac/foundation_util.h" |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 native_widget_mac_->GetWidget()->OnNativeWidgetPaint(context); | 866 native_widget_mac_->GetWidget()->OnNativeWidgetPaint(context); |
867 } | 867 } |
868 | 868 |
869 void BridgedNativeWidget::OnDelegatedFrameDamage( | 869 void BridgedNativeWidget::OnDelegatedFrameDamage( |
870 const gfx::Rect& damage_rect_in_dip) { | 870 const gfx::Rect& damage_rect_in_dip) { |
871 NOTIMPLEMENTED(); | 871 NOTIMPLEMENTED(); |
872 } | 872 } |
873 | 873 |
874 void BridgedNativeWidget::OnDeviceScaleFactorChanged( | 874 void BridgedNativeWidget::OnDeviceScaleFactorChanged( |
875 float device_scale_factor) { | 875 float device_scale_factor) { |
876 NOTIMPLEMENTED(); | 876 native_widget_mac_->GetWidget()->DeviceScaleFactorChanged( |
| 877 device_scale_factor); |
877 } | 878 } |
878 | 879 |
879 base::Closure BridgedNativeWidget::PrepareForLayerBoundsChange() { | 880 base::Closure BridgedNativeWidget::PrepareForLayerBoundsChange() { |
880 NOTIMPLEMENTED(); | 881 NOTIMPLEMENTED(); |
881 return base::Closure(); | 882 return base::Closure(); |
882 } | 883 } |
883 | 884 |
884 //////////////////////////////////////////////////////////////////////////////// | 885 //////////////////////////////////////////////////////////////////////////////// |
885 // BridgedNativeWidget, AcceleratedWidgetMac: | 886 // BridgedNativeWidget, AcceleratedWidgetMac: |
886 | 887 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 [bridged_view_ setMouseDownCanMoveWindow:draggable]; | 1171 [bridged_view_ setMouseDownCanMoveWindow:draggable]; |
1171 // AppKit will not update its cache of mouseDownCanMoveWindow unless something | 1172 // AppKit will not update its cache of mouseDownCanMoveWindow unless something |
1172 // changes. Previously we tried adding an NSView and removing it, but for some | 1173 // changes. Previously we tried adding an NSView and removing it, but for some |
1173 // reason it required reposting the mouse-down event, and didn't always work. | 1174 // reason it required reposting the mouse-down event, and didn't always work. |
1174 // Calling the below seems to be an effective solution. | 1175 // Calling the below seems to be an effective solution. |
1175 [window_ setMovableByWindowBackground:NO]; | 1176 [window_ setMovableByWindowBackground:NO]; |
1176 [window_ setMovableByWindowBackground:YES]; | 1177 [window_ setMovableByWindowBackground:YES]; |
1177 } | 1178 } |
1178 | 1179 |
1179 } // namespace views | 1180 } // namespace views |
OLD | NEW |