| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 if (root) | 1062 if (root) |
| 1063 root->PropagateVisibilityNotifications(root, visible); | 1063 root->PropagateVisibilityNotifications(root, visible); |
| 1064 for (WidgetObserver& observer : observers_) | 1064 for (WidgetObserver& observer : observers_) |
| 1065 observer.OnWidgetVisibilityChanged(this, visible); | 1065 observer.OnWidgetVisibilityChanged(this, visible); |
| 1066 if (GetCompositor() && root && root->layer()) | 1066 if (GetCompositor() && root && root->layer()) |
| 1067 root->layer()->SetVisible(visible); | 1067 root->layer()->SetVisible(visible); |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 void Widget::OnNativeWidgetCreated(bool desktop_widget) { | 1070 void Widget::OnNativeWidgetCreated(bool desktop_widget) { |
| 1071 if (is_top_level()) | 1071 if (is_top_level()) |
| 1072 focus_manager_.reset(FocusManagerFactory::Create(this, desktop_widget)); | 1072 focus_manager_ = FocusManagerFactory::Create(this, desktop_widget); |
| 1073 | 1073 |
| 1074 native_widget_->InitModalType(widget_delegate_->GetModalType()); | 1074 native_widget_->InitModalType(widget_delegate_->GetModalType()); |
| 1075 | 1075 |
| 1076 for (WidgetObserver& observer : observers_) | 1076 for (WidgetObserver& observer : observers_) |
| 1077 observer.OnWidgetCreated(this); | 1077 observer.OnWidgetCreated(this); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 void Widget::OnNativeWidgetDestroying() { | 1080 void Widget::OnNativeWidgetDestroying() { |
| 1081 // Tell the focus manager (if any) that root_view is being removed | 1081 // Tell the focus manager (if any) that root_view is being removed |
| 1082 // in case that the focused view is under this root view. | 1082 // in case that the focused view is under this root view. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 | 1565 |
| 1566 //////////////////////////////////////////////////////////////////////////////// | 1566 //////////////////////////////////////////////////////////////////////////////// |
| 1567 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1567 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1568 | 1568 |
| 1569 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1569 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1570 return this; | 1570 return this; |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 } // namespace internal | 1573 } // namespace internal |
| 1574 } // namespace views | 1574 } // namespace views |
| OLD | NEW |