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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 | 1146 |
1147 bool Widget::HasFocusManager() const { | 1147 bool Widget::HasFocusManager() const { |
1148 return !!focus_manager_.get(); | 1148 return !!focus_manager_.get(); |
1149 } | 1149 } |
1150 | 1150 |
1151 void Widget::OnNativeWidgetPaint(const ui::PaintContext& context) { | 1151 void Widget::OnNativeWidgetPaint(const ui::PaintContext& context) { |
1152 // On Linux Aura, we can get here during Init() because of the | 1152 // On Linux Aura, we can get here during Init() because of the |
1153 // SetInitialBounds call. | 1153 // SetInitialBounds call. |
1154 if (!native_widget_initialized_) | 1154 if (!native_widget_initialized_) |
1155 return; | 1155 return; |
1156 GetRootView()->Paint(context); | 1156 GetRootView()->PaintFromPaintRoot(context); |
1157 } | 1157 } |
1158 | 1158 |
1159 int Widget::GetNonClientComponent(const gfx::Point& point) { | 1159 int Widget::GetNonClientComponent(const gfx::Point& point) { |
1160 int component = non_client_view_ ? | 1160 int component = non_client_view_ ? |
1161 non_client_view_->NonClientHitTest(point) : | 1161 non_client_view_->NonClientHitTest(point) : |
1162 HTNOWHERE; | 1162 HTNOWHERE; |
1163 | 1163 |
1164 if (movement_disabled_ && (component == HTCAPTION || component == HTSYSMENU)) | 1164 if (movement_disabled_ && (component == HTCAPTION || component == HTSYSMENU)) |
1165 return HTNOWHERE; | 1165 return HTNOWHERE; |
1166 | 1166 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 | 1574 |
1575 //////////////////////////////////////////////////////////////////////////////// | 1575 //////////////////////////////////////////////////////////////////////////////// |
1576 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1576 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1577 | 1577 |
1578 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1578 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1579 return this; | 1579 return this; |
1580 } | 1580 } |
1581 | 1581 |
1582 } // namespace internal | 1582 } // namespace internal |
1583 } // namespace views | 1583 } // namespace views |
OLD | NEW |