| 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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 void Widget::CloseNow() { | 592 void Widget::CloseNow() { |
| 593 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetClosing(this)); | 593 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetClosing(this)); |
| 594 native_widget_->CloseNow(); | 594 native_widget_->CloseNow(); |
| 595 } | 595 } |
| 596 | 596 |
| 597 bool Widget::IsClosed() const { | 597 bool Widget::IsClosed() const { |
| 598 return widget_closed_; | 598 return widget_closed_; |
| 599 } | 599 } |
| 600 | 600 |
| 601 void Widget::Show() { | 601 void Widget::Show() { |
| 602 TRACE_EVENT0("views", "Widget::Show"); | 602 const ui::Layer* layer = GetLayer(); |
| 603 TRACE_EVENT1("views", "Widget::Show", "layer", |
| 604 layer ? layer->name() : "none"); |
| 603 if (non_client_view_) { | 605 if (non_client_view_) { |
| 604 // While initializing, the kiosk mode will go to full screen before the | 606 // While initializing, the kiosk mode will go to full screen before the |
| 605 // widget gets shown. In that case we stay in full screen mode, regardless | 607 // widget gets shown. In that case we stay in full screen mode, regardless |
| 606 // of the |saved_show_state_| member. | 608 // of the |saved_show_state_| member. |
| 607 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && | 609 if (saved_show_state_ == ui::SHOW_STATE_MAXIMIZED && |
| 608 !initial_restored_bounds_.IsEmpty() && | 610 !initial_restored_bounds_.IsEmpty() && |
| 609 !IsFullscreen()) { | 611 !IsFullscreen()) { |
| 610 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); | 612 native_widget_->ShowMaximizedWithBounds(initial_restored_bounds_); |
| 611 } else { | 613 } else { |
| 612 native_widget_->ShowWithWindowState( | 614 native_widget_->ShowWithWindowState( |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 | 1530 |
| 1529 //////////////////////////////////////////////////////////////////////////////// | 1531 //////////////////////////////////////////////////////////////////////////////// |
| 1530 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1532 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1531 | 1533 |
| 1532 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1534 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1533 return this; | 1535 return this; |
| 1534 } | 1536 } |
| 1535 | 1537 |
| 1536 } // namespace internal | 1538 } // namespace internal |
| 1537 } // namespace views | 1539 } // namespace views |
| OLD | NEW |