| 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 "third_party/skia/include/core/SkPath.h" | 7 #include "third_party/skia/include/core/SkPath.h" |
| 8 #include "third_party/skia/include/core/SkRegion.h" | 8 #include "third_party/skia/include/core/SkRegion.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 if (compositor()) | 911 if (compositor()) |
| 912 compositor()->DisableSwapUntilResize(); | 912 compositor()->DisableSwapUntilResize(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { | 915 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { |
| 916 // A resize may not have occurred if the window size happened not to have | 916 // A resize may not have occurred if the window size happened not to have |
| 917 // changed (can occur on Windows 10 when snapping a window to the side of | 917 // changed (can occur on Windows 10 when snapping a window to the side of |
| 918 // the screen). In that case do a resize to the current size to reenable | 918 // the screen). In that case do a resize to the current size to reenable |
| 919 // swaps. | 919 // swaps. |
| 920 if (compositor()) { | 920 if (compositor()) { |
| 921 compositor()->SetScaleAndSize(compositor()->device_scale_factor(), | 921 compositor()->SetScaleAndSize( |
| 922 GetBounds().size()); | 922 compositor()->device_scale_factor(), |
| 923 message_handler_->GetClientAreaBounds().size()); |
| 923 } | 924 } |
| 924 } | 925 } |
| 925 | 926 |
| 926 //////////////////////////////////////////////////////////////////////////////// | 927 //////////////////////////////////////////////////////////////////////////////// |
| 927 // DesktopWindowTreeHostWin, private: | 928 // DesktopWindowTreeHostWin, private: |
| 928 | 929 |
| 929 Widget* DesktopWindowTreeHostWin::GetWidget() { | 930 Widget* DesktopWindowTreeHostWin::GetWidget() { |
| 930 return native_widget_delegate_->AsWidget(); | 931 return native_widget_delegate_->AsWidget(); |
| 931 } | 932 } |
| 932 | 933 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 | 968 |
| 968 // static | 969 // static |
| 969 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 970 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 970 internal::NativeWidgetDelegate* native_widget_delegate, | 971 internal::NativeWidgetDelegate* native_widget_delegate, |
| 971 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 972 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 972 return new DesktopWindowTreeHostWin(native_widget_delegate, | 973 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 973 desktop_native_widget_aura); | 974 desktop_native_widget_aura); |
| 974 } | 975 } |
| 975 | 976 |
| 976 } // namespace views | 977 } // namespace views |
| OLD | NEW |