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/events/event.h" | 10 #include "ui/base/events/event.h" |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 } | 1021 } |
1022 | 1022 |
1023 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { | 1023 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { |
1024 root_view_->SetSize(new_size); | 1024 root_view_->SetSize(new_size); |
1025 | 1025 |
1026 // Size changed notifications can fire prior to full initialization | 1026 // Size changed notifications can fire prior to full initialization |
1027 // i.e. during session restore. Avoid saving session state during these | 1027 // i.e. during session restore. Avoid saving session state during these |
1028 // startup procedures. | 1028 // startup procedures. |
1029 if (native_widget_initialized_) | 1029 if (native_widget_initialized_) |
1030 SaveWindowPlacement(); | 1030 SaveWindowPlacement(); |
| 1031 |
| 1032 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetSizeChanged(this, |
| 1033 new_size)); |
1031 } | 1034 } |
1032 | 1035 |
1033 void Widget::OnNativeWidgetBeginUserBoundsChange() { | 1036 void Widget::OnNativeWidgetBeginUserBoundsChange() { |
1034 widget_delegate_->OnWindowBeginUserBoundsChange(); | 1037 widget_delegate_->OnWindowBeginUserBoundsChange(); |
1035 } | 1038 } |
1036 | 1039 |
1037 void Widget::OnNativeWidgetEndUserBoundsChange() { | 1040 void Widget::OnNativeWidgetEndUserBoundsChange() { |
1038 widget_delegate_->OnWindowEndUserBoundsChange(); | 1041 widget_delegate_->OnWindowEndUserBoundsChange(); |
1039 } | 1042 } |
1040 | 1043 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 | 1369 |
1367 //////////////////////////////////////////////////////////////////////////////// | 1370 //////////////////////////////////////////////////////////////////////////////// |
1368 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1371 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1369 | 1372 |
1370 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1373 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1371 return this; | 1374 return this; |
1372 } | 1375 } |
1373 | 1376 |
1374 } // namespace internal | 1377 } // namespace internal |
1375 } // namespace views | 1378 } // namespace views |
OLD | NEW |