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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 layer ? layer->name() : "none"); | 625 layer ? layer->name() : "none"); |
| 626 if (non_client_view_) { | 626 if (non_client_view_) { |
| 627 // While initializing, the kiosk mode will go to full screen before the | 627 // While initializing, the kiosk mode will go to full screen before the |
| 628 // widget gets shown. In that case we stay in full screen mode, regardless | 628 // widget gets shown. In that case we stay in full screen mode, regardless |
| 629 // of the |saved_show_state_| member. | 629 // of the |saved_show_state_| member. |
| 630 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && | 630 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && |
| 631 !initial_restored_bounds_.IsEmpty() && | 631 !initial_restored_bounds_.IsEmpty() && |
| 632 !IsFullscreen()) { | 632 !IsFullscreen()) { |
| 633 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); | 633 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); |
| 634 } else { | 634 } else { |
| 635 native_widget_->ShowWithWindowState( | 635 if (IsFullscreen()) { |
|
oshima
2015/11/18 19:07:16
how about
ui::ShowState show_state =
IsFullscr
joone
2015/11/19 06:32:01
This code looks better so I applied this change to
| |
| 636 IsFullscreen() ? ui::SHOW_STATE_FULLSCREEN : saved_show_state_); | 636 native_widget_->ShowWithWindowState(ui::SHOW_STATE_FULLSCREEN); |
| 637 } else { | |
| 638 native_widget_->ShowWithWindowState( | |
| 639 IsMinimized() ? ui::SHOW_STATE_MINIMIZED : saved_show_state_); | |
| 640 } | |
| 637 } | 641 } |
| 638 // |saved_show_state_| only applies the first time the window is shown. | 642 // |saved_show_state_| only applies the first time the window is shown. |
| 639 // If we don't reset the value the window may be shown maximized every time | 643 // If we don't reset the value the window may be shown maximized every time |
| 640 // it is subsequently shown after being hidden. | 644 // it is subsequently shown after being hidden. |
| 641 saved_show_state_ = ui::SHOW_STATE_NORMAL; | 645 saved_show_state_ = ui::SHOW_STATE_NORMAL; |
| 642 } else { | 646 } else { |
| 643 CanActivate() | 647 CanActivate() |
| 644 ? native_widget_->Show() | 648 ? native_widget_->Show() |
| 645 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); | 649 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); |
| 646 } | 650 } |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1498 | 1502 |
| 1499 //////////////////////////////////////////////////////////////////////////////// | 1503 //////////////////////////////////////////////////////////////////////////////// |
| 1500 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1504 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1501 | 1505 |
| 1502 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1506 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1503 return this; | 1507 return this; |
| 1504 } | 1508 } |
| 1505 | 1509 |
| 1506 } // namespace internal | 1510 } // namespace internal |
| 1507 } // namespace views | 1511 } // namespace views |
| OLD | NEW |