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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_client.h" | 10 #include "ui/aura/client/activation_client.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 | 722 |
723 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { | 723 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { |
724 delegate_->OnNativeWidgetPaint(canvas); | 724 delegate_->OnNativeWidgetPaint(canvas); |
725 } | 725 } |
726 | 726 |
727 void NativeWidgetAura::OnWindowDestroying() { | 727 void NativeWidgetAura::OnWindowDestroying() { |
728 delegate_->OnNativeWidgetDestroying(); | 728 delegate_->OnNativeWidgetDestroying(); |
729 | 729 |
730 // If the aura::Window is destroyed, we can no longer show tooltips. | 730 // If the aura::Window is destroyed, we can no longer show tooltips. |
731 tooltip_manager_.reset(); | 731 tooltip_manager_.reset(); |
| 732 |
| 733 // Cleanup properties associated with the window here. |
| 734 delete GetRestoreBounds(window_); |
732 } | 735 } |
733 | 736 |
734 void NativeWidgetAura::OnWindowDestroyed() { | 737 void NativeWidgetAura::OnWindowDestroyed() { |
735 window_ = NULL; | 738 window_ = NULL; |
736 tooltip_manager_.reset(); | 739 tooltip_manager_.reset(); |
737 delegate_->OnNativeWidgetDestroyed(); | 740 delegate_->OnNativeWidgetDestroyed(); |
738 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) | 741 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) |
739 delete this; | 742 delete this; |
740 } | 743 } |
741 | 744 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 } | 899 } |
897 } | 900 } |
898 | 901 |
899 // static | 902 // static |
900 bool NativeWidgetPrivate::IsMouseButtonDown() { | 903 bool NativeWidgetPrivate::IsMouseButtonDown() { |
901 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); | 904 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); |
902 } | 905 } |
903 | 906 |
904 } // namespace internal | 907 } // namespace internal |
905 } // namespace views | 908 } // namespace views |
OLD | NEW |