| 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { | 909 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { |
| 910 // A resize may not have occurred if the window size happened not to have | 910 // A resize may not have occurred if the window size happened not to have |
| 911 // changed (can occur on Windows 10 when snapping a window to the side of | 911 // changed (can occur on Windows 10 when snapping a window to the side of |
| 912 // the screen). In that case do a resize to the current size to reenable | 912 // the screen). In that case do a resize to the current size to reenable |
| 913 // swaps. | 913 // swaps. |
| 914 if (compositor()) | 914 if (compositor()) |
| 915 compositor()->SetScaleAndSize(compositor()->device_scale_factor(), | 915 compositor()->SetScaleAndSize(compositor()->device_scale_factor(), |
| 916 compositor()->size()); | 916 compositor()->size()); |
| 917 } | 917 } |
| 918 | 918 |
| 919 void DesktopWindowTreeHostWin::AddStringLog(const char* log_string) { | |
| 920 GetInputMethod()->GetLogCollector()->AddString(log_string); | |
| 921 } | |
| 922 | |
| 923 void DesktopWindowTreeHostWin::AddBooleanLog(bool bool_val) { | |
| 924 GetInputMethod()->GetLogCollector()->AddBoolean(bool_val); | |
| 925 } | |
| 926 | |
| 927 //////////////////////////////////////////////////////////////////////////////// | 919 //////////////////////////////////////////////////////////////////////////////// |
| 928 // DesktopWindowTreeHostWin, private: | 920 // DesktopWindowTreeHostWin, private: |
| 929 | 921 |
| 930 Widget* DesktopWindowTreeHostWin::GetWidget() { | 922 Widget* DesktopWindowTreeHostWin::GetWidget() { |
| 931 return native_widget_delegate_->AsWidget(); | 923 return native_widget_delegate_->AsWidget(); |
| 932 } | 924 } |
| 933 | 925 |
| 934 const Widget* DesktopWindowTreeHostWin::GetWidget() const { | 926 const Widget* DesktopWindowTreeHostWin::GetWidget() const { |
| 935 return native_widget_delegate_->AsWidget(); | 927 return native_widget_delegate_->AsWidget(); |
| 936 } | 928 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 | 960 |
| 969 // static | 961 // static |
| 970 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 962 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 971 internal::NativeWidgetDelegate* native_widget_delegate, | 963 internal::NativeWidgetDelegate* native_widget_delegate, |
| 972 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 964 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 973 return new DesktopWindowTreeHostWin(native_widget_delegate, | 965 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 974 desktop_native_widget_aura); | 966 desktop_native_widget_aura); |
| 975 } | 967 } |
| 976 | 968 |
| 977 } // namespace views | 969 } // namespace views |
| OLD | NEW |