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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |