Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: ui/views/widget/widget.cc

Issue 13699002: add HideAndClose in preference to having Close sometimes magically defer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: non aura Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698