| 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 "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 // changed (can occur on Windows 10 when snapping a window to the side of | 933 // changed (can occur on Windows 10 when snapping a window to the side of |
| 934 // the screen). In that case do a resize to the current size to reenable | 934 // the screen). In that case do a resize to the current size to reenable |
| 935 // swaps. | 935 // swaps. |
| 936 if (compositor()) { | 936 if (compositor()) { |
| 937 compositor()->SetScaleAndSize( | 937 compositor()->SetScaleAndSize( |
| 938 compositor()->device_scale_factor(), | 938 compositor()->device_scale_factor(), |
| 939 message_handler_->GetClientAreaBounds().size()); | 939 message_handler_->GetClientAreaBounds().size()); |
| 940 } | 940 } |
| 941 } | 941 } |
| 942 | 942 |
| 943 void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( |
| 944 float window_scale_factor) { |
| 945 if (compositor()) { |
| 946 compositor()->SetScaleAndSize( |
| 947 window_scale_factor, |
| 948 message_handler_->GetClientAreaBounds().size()); |
| 949 } |
| 950 } |
| 951 |
| 943 //////////////////////////////////////////////////////////////////////////////// | 952 //////////////////////////////////////////////////////////////////////////////// |
| 944 // DesktopWindowTreeHostWin, private: | 953 // DesktopWindowTreeHostWin, private: |
| 945 | 954 |
| 946 Widget* DesktopWindowTreeHostWin::GetWidget() { | 955 Widget* DesktopWindowTreeHostWin::GetWidget() { |
| 947 return native_widget_delegate_->AsWidget(); | 956 return native_widget_delegate_->AsWidget(); |
| 948 } | 957 } |
| 949 | 958 |
| 950 const Widget* DesktopWindowTreeHostWin::GetWidget() const { | 959 const Widget* DesktopWindowTreeHostWin::GetWidget() const { |
| 951 return native_widget_delegate_->AsWidget(); | 960 return native_widget_delegate_->AsWidget(); |
| 952 } | 961 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 993 |
| 985 // static | 994 // static |
| 986 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 995 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 987 internal::NativeWidgetDelegate* native_widget_delegate, | 996 internal::NativeWidgetDelegate* native_widget_delegate, |
| 988 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 997 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 989 return new DesktopWindowTreeHostWin(native_widget_delegate, | 998 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 990 desktop_native_widget_aura); | 999 desktop_native_widget_aura); |
| 991 } | 1000 } |
| 992 | 1001 |
| 993 } // namespace views | 1002 } // namespace views |
| OLD | NEW |