| 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/widget.h" | 5 #include "ui/views/widget/widget.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 void Widget::OnNativeWidgetDestroyed() { | 961 void Widget::OnNativeWidgetDestroyed() { |
| 962 widget_delegate_->DeleteDelegate(); | 962 widget_delegate_->DeleteDelegate(); |
| 963 widget_delegate_ = NULL; | 963 widget_delegate_ = NULL; |
| 964 native_widget_destroyed_ = true; | 964 native_widget_destroyed_ = true; |
| 965 } | 965 } |
| 966 | 966 |
| 967 gfx::Size Widget::GetMinimumSize() { | 967 gfx::Size Widget::GetMinimumSize() { |
| 968 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); | 968 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); |
| 969 } | 969 } |
| 970 | 970 |
| 971 gfx::Size Widget::GetMaximumSize() { |
| 972 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); |
| 973 } |
| 974 |
| 971 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { | 975 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { |
| 972 root_view_->SetSize(new_size); | 976 root_view_->SetSize(new_size); |
| 973 | 977 |
| 974 // Size changed notifications can fire prior to full initialization | 978 // Size changed notifications can fire prior to full initialization |
| 975 // i.e. during session restore. Avoid saving session state during these | 979 // i.e. during session restore. Avoid saving session state during these |
| 976 // startup procedures. | 980 // startup procedures. |
| 977 if (native_widget_initialized_) | 981 if (native_widget_initialized_) |
| 978 SaveWindowPlacement(); | 982 SaveWindowPlacement(); |
| 979 } | 983 } |
| 980 | 984 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 | 1283 |
| 1280 //////////////////////////////////////////////////////////////////////////////// | 1284 //////////////////////////////////////////////////////////////////////////////// |
| 1281 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1285 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1282 | 1286 |
| 1283 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1287 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1284 return this; | 1288 return this; |
| 1285 } | 1289 } |
| 1286 | 1290 |
| 1287 } // namespace internal | 1291 } // namespace internal |
| 1288 } // namespace views | 1292 } // namespace views |
| OLD | NEW |