Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 1533883002: MacViews: Implement BridgedNativeWidget::OnDeviceScaleFactorChanged function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review remarks. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | ui/views/widget/widget_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | ui/views/widget/widget_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698