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/strings/string_util.h" | 8 #include "base/strings/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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 void NativeWidgetAura::Show() { | 436 void NativeWidgetAura::Show() { |
437 ShowWithWindowState(ui::SHOW_STATE_INACTIVE); | 437 ShowWithWindowState(ui::SHOW_STATE_INACTIVE); |
438 } | 438 } |
439 | 439 |
440 void NativeWidgetAura::Hide() { | 440 void NativeWidgetAura::Hide() { |
441 window_->Hide(); | 441 window_->Hide(); |
442 } | 442 } |
443 | 443 |
444 void NativeWidgetAura::ShowMaximizedWithBounds( | 444 void NativeWidgetAura::ShowMaximizedWithBounds( |
445 const gfx::Rect& restored_bounds) { | 445 const gfx::Rect& restored_bounds) { |
| 446 SetRestoreBounds(window_, restored_bounds); |
446 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED); | 447 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED); |
447 SetRestoreBounds(window_, restored_bounds); | |
448 } | 448 } |
449 | 449 |
450 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { | 450 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { |
451 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN) | 451 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN) |
452 window_->SetProperty(aura::client::kShowStateKey, state); | 452 window_->SetProperty(aura::client::kShowStateKey, state); |
453 window_->Show(); | 453 window_->Show(); |
454 if (can_activate_) { | 454 if (can_activate_) { |
455 if (state != ui::SHOW_STATE_INACTIVE) | 455 if (state != ui::SHOW_STATE_INACTIVE) |
456 Activate(); | 456 Activate(); |
457 // SetInitialFocus() should be always be called, even for | 457 // SetInitialFocus() should be always be called, even for |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 return aura::Env::GetInstance()->is_mouse_button_down(); | 1069 return aura::Env::GetInstance()->is_mouse_button_down(); |
1070 } | 1070 } |
1071 | 1071 |
1072 // static | 1072 // static |
1073 bool NativeWidgetPrivate::IsTouchDown() { | 1073 bool NativeWidgetPrivate::IsTouchDown() { |
1074 return aura::Env::GetInstance()->is_touch_down(); | 1074 return aura::Env::GetInstance()->is_touch_down(); |
1075 } | 1075 } |
1076 | 1076 |
1077 } // namespace internal | 1077 } // namespace internal |
1078 } // namespace views | 1078 } // namespace views |
OLD | NEW |