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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 widget_delegate_->WindowClosing(); | 1089 widget_delegate_->WindowClosing(); |
1090 } | 1090 } |
1091 | 1091 |
1092 void Widget::OnNativeWidgetDestroyed() { | 1092 void Widget::OnNativeWidgetDestroyed() { |
1093 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetDestroyed(this)); | 1093 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetDestroyed(this)); |
1094 widget_delegate_->DeleteDelegate(); | 1094 widget_delegate_->DeleteDelegate(); |
1095 widget_delegate_ = NULL; | 1095 widget_delegate_ = NULL; |
1096 native_widget_destroyed_ = true; | 1096 native_widget_destroyed_ = true; |
1097 } | 1097 } |
1098 | 1098 |
1099 gfx::Size Widget::GetMinimumSize() { | 1099 gfx::Size Widget::GetMinimumSize() const { |
1100 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); | 1100 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); |
1101 } | 1101 } |
1102 | 1102 |
1103 gfx::Size Widget::GetMaximumSize() { | 1103 gfx::Size Widget::GetMaximumSize() const { |
1104 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); | 1104 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); |
1105 } | 1105 } |
1106 | 1106 |
1107 void Widget::OnNativeWidgetMove() { | 1107 void Widget::OnNativeWidgetMove() { |
1108 widget_delegate_->OnWidgetMove(); | 1108 widget_delegate_->OnWidgetMove(); |
1109 if (GetRootView()->GetFocusManager()) { | 1109 if (GetRootView()->GetFocusManager()) { |
1110 View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView(); | 1110 View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView(); |
1111 if (focused_view && focused_view->GetInputMethod()) | 1111 if (focused_view && focused_view->GetInputMethod()) |
1112 focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view); | 1112 focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view); |
1113 } | 1113 } |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 | 1514 |
1515 //////////////////////////////////////////////////////////////////////////////// | 1515 //////////////////////////////////////////////////////////////////////////////// |
1516 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1516 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1517 | 1517 |
1518 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1518 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1519 return this; | 1519 return this; |
1520 } | 1520 } |
1521 | 1521 |
1522 } // namespace internal | 1522 } // namespace internal |
1523 } // namespace views | 1523 } // namespace views |
OLD | NEW |