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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.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
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/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/activation_client.h" 8 #include "ui/aura/client/activation_client.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/stacking_client.h" 10 #include "ui/aura/client/stacking_client.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 desktop_root_window_host_->AsRootWindowHost()->Show(); 435 desktop_root_window_host_->AsRootWindowHost()->Show();
436 window_->Show(); 436 window_->Show();
437 } 437 }
438 438
439 void DesktopNativeWidgetAura::Hide() { 439 void DesktopNativeWidgetAura::Hide() {
440 desktop_root_window_host_->AsRootWindowHost()->Hide(); 440 desktop_root_window_host_->AsRootWindowHost()->Hide();
441 if (window_) 441 if (window_)
442 window_->Hide(); 442 window_->Hide();
443 } 443 }
444 444
445 void DesktopNativeWidgetAura::HideAndClose() {
446 if (desktop_root_window_host_->SetCloseOnHideCompletion())
447 Hide();
448 else
449 Close();
450 }
451
445 void DesktopNativeWidgetAura::ShowMaximizedWithBounds( 452 void DesktopNativeWidgetAura::ShowMaximizedWithBounds(
446 const gfx::Rect& restored_bounds) { 453 const gfx::Rect& restored_bounds) {
447 desktop_root_window_host_->ShowMaximizedWithBounds(restored_bounds); 454 desktop_root_window_host_->ShowMaximizedWithBounds(restored_bounds);
448 } 455 }
449 456
450 void DesktopNativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { 457 void DesktopNativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
451 desktop_root_window_host_->ShowWindowWithState(state); 458 desktop_root_window_host_->ShowWindowWithState(state);
452 } 459 }
453 460
454 bool DesktopNativeWidgetAura::IsVisible() const { 461 bool DesktopNativeWidgetAura::IsVisible() const {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 drop_helper_->OnDragExit(); 825 drop_helper_->OnDragExit();
819 } 826 }
820 827
821 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { 828 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
822 DCHECK(drop_helper_.get() != NULL); 829 DCHECK(drop_helper_.get() != NULL);
823 return drop_helper_->OnDrop(event.data(), event.location(), 830 return drop_helper_->OnDrop(event.data(), event.location(),
824 last_drop_operation_); 831 last_drop_operation_);
825 } 832 }
826 833
827 } // namespace views 834 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698