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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 layer ? layer->name() : "none"); | 618 layer ? layer->name() : "none"); |
619 if (non_client_view_) { | 619 if (non_client_view_) { |
620 // While initializing, the kiosk mode will go to full screen before the | 620 // While initializing, the kiosk mode will go to full screen before the |
621 // widget gets shown. In that case we stay in full screen mode, regardless | 621 // widget gets shown. In that case we stay in full screen mode, regardless |
622 // of the |saved_show_state_| member. | 622 // of the |saved_show_state_| member. |
623 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && | 623 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && |
624 !initial_restored_bounds_.IsEmpty() && | 624 !initial_restored_bounds_.IsEmpty() && |
625 !IsFullscreen()) { | 625 !IsFullscreen()) { |
626 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); | 626 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); |
627 } else { | 627 } else { |
628 native_widget_->ShowWithWindowState( | 628 if (IsFullscreen()) |
sadrul
2015/09/30 04:03:51
braces here too
joone
2015/10/07 15:59:46
Done.
| |
629 IsFullscreen() ? ui::SHOW_STATE_FULLSCREEN : saved_show_state_); | 629 native_widget_->ShowWithWindowState(ui::SHOW_STATE_FULLSCREEN); |
630 else { | |
631 native_widget_->ShowWithWindowState( | |
632 IsMinimized() ? ui::SHOW_STATE_MINIMIZED : saved_show_state_); | |
633 } | |
630 } | 634 } |
631 // |saved_show_state_| only applies the first time the window is shown. | 635 // |saved_show_state_| only applies the first time the window is shown. |
632 // If we don't reset the value the window may be shown maximized every time | 636 // If we don't reset the value the window may be shown maximized every time |
633 // it is subsequently shown after being hidden. | 637 // it is subsequently shown after being hidden. |
634 saved_show_state_ = ui::SHOW_STATE_NORMAL; | 638 saved_show_state_ = ui::SHOW_STATE_NORMAL; |
635 } else { | 639 } else { |
636 CanActivate() | 640 CanActivate() |
637 ? native_widget_->Show() | 641 ? native_widget_->Show() |
638 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); | 642 : native_widget_->ShowWithWindowState(ui::SHOW_STATE_INACTIVE); |
639 } | 643 } |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1491 | 1495 |
1492 //////////////////////////////////////////////////////////////////////////////// | 1496 //////////////////////////////////////////////////////////////////////////////// |
1493 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1497 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1494 | 1498 |
1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1499 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1496 return this; | 1500 return this; |
1497 } | 1501 } |
1498 | 1502 |
1499 } // namespace internal | 1503 } // namespace internal |
1500 } // namespace views | 1504 } // namespace views |
OLD | NEW |