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

Side by Side Diff: ui/views/widget/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
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_private.h » ('j') | 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/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 void NativeWidgetAura::Show() { 425 void NativeWidgetAura::Show() {
426 ShowWithWindowState(ui::SHOW_STATE_INACTIVE); 426 ShowWithWindowState(ui::SHOW_STATE_INACTIVE);
427 } 427 }
428 428
429 void NativeWidgetAura::Hide() { 429 void NativeWidgetAura::Hide() {
430 window_->Hide(); 430 window_->Hide();
431 } 431 }
432 432
433 void NativeWidgetAura::HideAndClose() {
434 Close();
435 }
436
433 void NativeWidgetAura::ShowMaximizedWithBounds( 437 void NativeWidgetAura::ShowMaximizedWithBounds(
434 const gfx::Rect& restored_bounds) { 438 const gfx::Rect& restored_bounds) {
435 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED); 439 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED);
436 SetRestoreBounds(window_, restored_bounds); 440 SetRestoreBounds(window_, restored_bounds);
437 } 441 }
438 442
439 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { 443 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
440 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN) 444 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN)
441 window_->SetProperty(aura::client::kShowStateKey, state); 445 window_->SetProperty(aura::client::kShowStateKey, state);
442 window_->Show(); 446 window_->Show();
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 return aura::Env::GetInstance()->is_mouse_button_down(); 1035 return aura::Env::GetInstance()->is_mouse_button_down();
1032 } 1036 }
1033 1037
1034 // static 1038 // static
1035 bool NativeWidgetPrivate::IsTouchDown() { 1039 bool NativeWidgetPrivate::IsTouchDown() {
1036 return aura::Env::GetInstance()->is_touch_down(); 1040 return aura::Env::GetInstance()->is_touch_down();
1037 } 1041 }
1038 1042
1039 } // namespace internal 1043 } // namespace internal
1040 } // namespace views 1044 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698