| 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 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() { | 910 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() { |
| 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(compositor()->device_scale_factor(), |
| 922 compositor()->size()); | 922 GetBounds().size()); |
| 923 } |
| 923 } | 924 } |
| 924 | 925 |
| 925 //////////////////////////////////////////////////////////////////////////////// | 926 //////////////////////////////////////////////////////////////////////////////// |
| 926 // DesktopWindowTreeHostWin, private: | 927 // DesktopWindowTreeHostWin, private: |
| 927 | 928 |
| 928 Widget* DesktopWindowTreeHostWin::GetWidget() { | 929 Widget* DesktopWindowTreeHostWin::GetWidget() { |
| 929 return native_widget_delegate_->AsWidget(); | 930 return native_widget_delegate_->AsWidget(); |
| 930 } | 931 } |
| 931 | 932 |
| 932 const Widget* DesktopWindowTreeHostWin::GetWidget() const { | 933 const Widget* DesktopWindowTreeHostWin::GetWidget() const { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 | 967 |
| 967 // static | 968 // static |
| 968 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 969 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 969 internal::NativeWidgetDelegate* native_widget_delegate, | 970 internal::NativeWidgetDelegate* native_widget_delegate, |
| 970 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 971 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 971 return new DesktopWindowTreeHostWin(native_widget_delegate, | 972 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 972 desktop_native_widget_aura); | 973 desktop_native_widget_aura); |
| 973 } | 974 } |
| 974 | 975 |
| 975 } // namespace views | 976 } // namespace views |
| OLD | NEW |