| 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/win/metro.h" | 7 #include "base/win/metro.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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { | 907 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { |
| 908 // A resize may not have occurred if the window size happened not to have | 908 // A resize may not have occurred if the window size happened not to have |
| 909 // changed (can occur on Windows 10 when snapping a window to the side of | 909 // changed (can occur on Windows 10 when snapping a window to the side of |
| 910 // the screen). In that case do a resize to the current size to reenable | 910 // the screen). In that case do a resize to the current size to reenable |
| 911 // swaps. | 911 // swaps. |
| 912 if (compositor()) | 912 if (compositor()) |
| 913 compositor()->SetScaleAndSize(compositor()->device_scale_factor(), | 913 compositor()->SetScaleAndSize(compositor()->device_scale_factor(), |
| 914 compositor()->size()); | 914 compositor()->size()); |
| 915 } | 915 } |
| 916 | 916 |
| 917 void DesktopWindowTreeHostWin::AddLog(const std::string& log_string) { |
| 918 GetInputMethod()->GetLogCollector()->AddLog(log_string); |
| 919 } |
| 920 |
| 917 //////////////////////////////////////////////////////////////////////////////// | 921 //////////////////////////////////////////////////////////////////////////////// |
| 918 // DesktopWindowTreeHostWin, private: | 922 // DesktopWindowTreeHostWin, private: |
| 919 | 923 |
| 920 Widget* DesktopWindowTreeHostWin::GetWidget() { | 924 Widget* DesktopWindowTreeHostWin::GetWidget() { |
| 921 return native_widget_delegate_->AsWidget(); | 925 return native_widget_delegate_->AsWidget(); |
| 922 } | 926 } |
| 923 | 927 |
| 924 const Widget* DesktopWindowTreeHostWin::GetWidget() const { | 928 const Widget* DesktopWindowTreeHostWin::GetWidget() const { |
| 925 return native_widget_delegate_->AsWidget(); | 929 return native_widget_delegate_->AsWidget(); |
| 926 } | 930 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 | 962 |
| 959 // static | 963 // static |
| 960 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 964 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 961 internal::NativeWidgetDelegate* native_widget_delegate, | 965 internal::NativeWidgetDelegate* native_widget_delegate, |
| 962 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 966 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 963 return new DesktopWindowTreeHostWin(native_widget_delegate, | 967 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 964 desktop_native_widget_aura); | 968 desktop_native_widget_aura); |
| 965 } | 969 } |
| 966 | 970 |
| 967 } // namespace views | 971 } // namespace views |
| OLD | NEW |