Chromium Code Reviews| 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/widget.h" | 5 #include "ui/views/widget/widget.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 629 layer ? layer->name() : "none"); | 629 layer ? layer->name() : "none"); |
| 630 if (non_client_view_) { | 630 if (non_client_view_) { |
| 631 // While initializing, the kiosk mode will go to full screen before the | 631 // While initializing, the kiosk mode will go to full screen before the |
| 632 // widget gets shown. In that case we stay in full screen mode, regardless | 632 // widget gets shown. In that case we stay in full screen mode, regardless |
| 633 // of the |saved_show_state_| member. | 633 // of the |saved_show_state_| member. |
| 634 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && | 634 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && |
| 635 !initial_restored_bounds_.IsEmpty() && | 635 !initial_restored_bounds_.IsEmpty() && |
| 636 !IsFullscreen()) { | 636 !IsFullscreen()) { |
| 637 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); | 637 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); |
| 638 } else { | 638 } else { |
| 639 native_widget_->ShowWithWindowState( | 639 ui::WindowShowState show_state = |
| 640 IsFullscreen() ? ui::SHOW_STATE_FULLSCREEN : saved_show_state_); | 640 IsFullscreen() ? ui::SHOW_STATE_FULLSCREEN : |
| 641 (IsMinimized() ? ui::SHOW_STATE_MINIMIZED : saved_show_state_); | |
|
sadrul
2015/11/25 20:44:32
Don't need ()
joone
2015/11/26 15:50:38
Done.
| |
| 642 native_widget_->ShowWithWindowState(show_state); | |
| 641 } | 643 } |
| 642 // |saved_show_state_| only applies the first time the window is shown. | 644 // |saved_show_state_| only applies the first time the window is shown. |
| 643 // If we don't reset the value the window may be shown maximized every time | 645 // If we don't reset the value the window may be shown maximized every time |
| 644 // it is subsequently shown after being hidden. | 646 // it is subsequently shown after being hidden. |
| 645 saved_show_state_ = ui::SHOW_STATE_NORMAL; | 647 saved_show_state_ = ui::SHOW_STATE_NORMAL; |
| 646 } else { | 648 } else { |
| 647 CanActivate() | 649 CanActivate() |
| 648 ? native_widget_->Show() | 650 ? native_widget_->Show() |
| 649 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); | 651 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); |
| 650 } | 652 } |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1502 | 1504 |
| 1503 //////////////////////////////////////////////////////////////////////////////// | 1505 //////////////////////////////////////////////////////////////////////////////// |
| 1504 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1506 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1505 | 1507 |
| 1506 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1508 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1507 return this; | 1509 return this; |
| 1508 } | 1510 } |
| 1509 | 1511 |
| 1510 } // namespace internal | 1512 } // namespace internal |
| 1511 } // namespace views | 1513 } // namespace views |
| OLD | NEW |