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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1131 // i.e. during session restore. Avoid saving session state during these | 1131 // i.e. during session restore. Avoid saving session state during these |
1132 // startup procedures. | 1132 // startup procedures. |
1133 if (native_widget_initialized_) | 1133 if (native_widget_initialized_) |
1134 SaveWindowPlacement(); | 1134 SaveWindowPlacement(); |
1135 | 1135 |
1136 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged( | 1136 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged( |
1137 this, | 1137 this, |
1138 GetWindowBoundsInScreen())); | 1138 GetWindowBoundsInScreen())); |
1139 } | 1139 } |
1140 | 1140 |
1141 void Widget::OnNativeWidgetWindowShowStateChanged(ui::WindowShowState old) { | |
sky
2014/08/06 17:23:00
You don't use old, so nuke it.
jackhou1
2014/08/11 05:41:06
Done.
| |
1142 // Size changed notifications can fire prior to full initialization | |
1143 // i.e. during session restore. Avoid saving session state during these | |
1144 // startup procedures. | |
1145 if (native_widget_initialized_) | |
1146 SaveWindowPlacement(); | |
1147 } | |
1148 | |
1141 void Widget::OnNativeWidgetBeginUserBoundsChange() { | 1149 void Widget::OnNativeWidgetBeginUserBoundsChange() { |
1142 widget_delegate_->OnWindowBeginUserBoundsChange(); | 1150 widget_delegate_->OnWindowBeginUserBoundsChange(); |
1143 } | 1151 } |
1144 | 1152 |
1145 void Widget::OnNativeWidgetEndUserBoundsChange() { | 1153 void Widget::OnNativeWidgetEndUserBoundsChange() { |
1146 widget_delegate_->OnWindowEndUserBoundsChange(); | 1154 widget_delegate_->OnWindowEndUserBoundsChange(); |
1147 } | 1155 } |
1148 | 1156 |
1149 bool Widget::HasFocusManager() const { | 1157 bool Widget::HasFocusManager() const { |
1150 return !!focus_manager_.get(); | 1158 return !!focus_manager_.get(); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1511 | 1519 |
1512 //////////////////////////////////////////////////////////////////////////////// | 1520 //////////////////////////////////////////////////////////////////////////////// |
1513 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1521 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1514 | 1522 |
1515 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1523 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1516 return this; | 1524 return this; |
1517 } | 1525 } |
1518 | 1526 |
1519 } // namespace internal | 1527 } // namespace internal |
1520 } // namespace views | 1528 } // namespace views |
OLD | NEW |