| 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.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 saved_show_state_ = ui::SHOW_STATE_NORMAL; | 608 saved_show_state_ = ui::SHOW_STATE_NORMAL; |
| 609 } else { | 609 } else { |
| 610 native_widget_->Show(); | 610 native_widget_->Show(); |
| 611 } | 611 } |
| 612 } | 612 } |
| 613 | 613 |
| 614 void Widget::Hide() { | 614 void Widget::Hide() { |
| 615 native_widget_->Hide(); | 615 native_widget_->Hide(); |
| 616 } | 616 } |
| 617 | 617 |
| 618 void Widget::HideAndClose() { |
| 619 native_widget_->HideAndClose(); |
| 620 } |
| 621 |
| 618 void Widget::ShowInactive() { | 622 void Widget::ShowInactive() { |
| 619 // If this gets called with saved_show_state_ == ui::SHOW_STATE_MAXIMIZED, | 623 // If this gets called with saved_show_state_ == ui::SHOW_STATE_MAXIMIZED, |
| 620 // call SetBounds()with the restored bounds to set the correct size. This | 624 // call SetBounds()with the restored bounds to set the correct size. This |
| 621 // normally should not happen, but if it does we should avoid showing unsized | 625 // normally should not happen, but if it does we should avoid showing unsized |
| 622 // windows. | 626 // windows. |
| 623 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && | 627 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && |
| 624 !initial_restored_bounds_.IsEmpty()) { | 628 !initial_restored_bounds_.IsEmpty()) { |
| 625 SetBounds(initial_restored_bounds_); | 629 SetBounds(initial_restored_bounds_); |
| 626 saved_show_state_ = ui::SHOW_STATE_NORMAL; | 630 saved_show_state_ = ui::SHOW_STATE_NORMAL; |
| 627 } | 631 } |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 | 1433 |
| 1430 //////////////////////////////////////////////////////////////////////////////// | 1434 //////////////////////////////////////////////////////////////////////////////// |
| 1431 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1435 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1432 | 1436 |
| 1433 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1437 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1434 return this; | 1438 return this; |
| 1435 } | 1439 } |
| 1436 | 1440 |
| 1437 } // namespace internal | 1441 } // namespace internal |
| 1438 } // namespace views | 1442 } // namespace views |
| OLD | NEW |