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_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 | 758 |
759 native_widget_delegate_->OnNativeWidgetCreated(true); | 759 native_widget_delegate_->OnNativeWidgetCreated(true); |
760 | 760 |
761 // 1. Window property association | 761 // 1. Window property association |
762 // 2. MouseWheel. | 762 // 2. MouseWheel. |
763 } | 763 } |
764 | 764 |
765 void DesktopWindowTreeHostWin::HandleDestroying() { | 765 void DesktopWindowTreeHostWin::HandleDestroying() { |
766 drag_drop_client_->OnNativeWidgetDestroying(GetHWND()); | 766 drag_drop_client_->OnNativeWidgetDestroying(GetHWND()); |
767 native_widget_delegate_->OnNativeWidgetDestroying(); | 767 native_widget_delegate_->OnNativeWidgetDestroying(); |
| 768 |
| 769 // Destroy the compositor before destroying the HWND since shutdown |
| 770 // may try to swap to the window. |
| 771 DestroyCompositor(); |
768 } | 772 } |
769 | 773 |
770 void DesktopWindowTreeHostWin::HandleDestroyed() { | 774 void DesktopWindowTreeHostWin::HandleDestroyed() { |
771 desktop_native_widget_aura_->OnHostClosed(); | 775 desktop_native_widget_aura_->OnHostClosed(); |
772 } | 776 } |
773 | 777 |
774 bool DesktopWindowTreeHostWin::HandleInitialFocus() { | 778 bool DesktopWindowTreeHostWin::HandleInitialFocus() { |
775 return GetWidget()->SetInitialFocus(); | 779 return GetWidget()->SetInitialFocus(); |
776 } | 780 } |
777 | 781 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 | 989 |
986 // static | 990 // static |
987 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 991 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
988 internal::NativeWidgetDelegate* native_widget_delegate, | 992 internal::NativeWidgetDelegate* native_widget_delegate, |
989 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 993 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
990 return new DesktopWindowTreeHostWin(native_widget_delegate, | 994 return new DesktopWindowTreeHostWin(native_widget_delegate, |
991 desktop_native_widget_aura); | 995 desktop_native_widget_aura); |
992 } | 996 } |
993 | 997 |
994 } // namespace views | 998 } // namespace views |
OLD | NEW |