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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 } | 1165 } |
1166 | 1166 |
1167 void Widget::OnNativeWidgetEndUserBoundsChange() { | 1167 void Widget::OnNativeWidgetEndUserBoundsChange() { |
1168 widget_delegate_->OnWindowEndUserBoundsChange(); | 1168 widget_delegate_->OnWindowEndUserBoundsChange(); |
1169 } | 1169 } |
1170 | 1170 |
1171 bool Widget::HasFocusManager() const { | 1171 bool Widget::HasFocusManager() const { |
1172 return !!focus_manager_.get(); | 1172 return !!focus_manager_.get(); |
1173 } | 1173 } |
1174 | 1174 |
1175 bool Widget::OnNativeWidgetPaintAccelerated(const gfx::Rect& dirty_region) { | |
1176 ui::Compositor* compositor = GetCompositor(); | |
1177 if (!compositor) | |
1178 return false; | |
1179 | |
1180 compositor->ScheduleRedrawRect(dirty_region); | |
1181 return true; | |
1182 } | |
1183 | |
1184 void Widget::OnNativeWidgetPaint(const ui::PaintContext& context) { | 1175 void Widget::OnNativeWidgetPaint(const ui::PaintContext& context) { |
1185 // On Linux Aura, we can get here during Init() because of the | 1176 // On Linux Aura, we can get here during Init() because of the |
1186 // SetInitialBounds call. | 1177 // SetInitialBounds call. |
1187 if (!native_widget_initialized_) | 1178 if (!native_widget_initialized_) |
1188 return; | 1179 return; |
1189 GetRootView()->Paint(context); | 1180 GetRootView()->Paint(context); |
1190 } | 1181 } |
1191 | 1182 |
1192 int Widget::GetNonClientComponent(const gfx::Point& point) { | 1183 int Widget::GetNonClientComponent(const gfx::Point& point) { |
1193 int component = non_client_view_ ? | 1184 int component = non_client_view_ ? |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 | 1530 |
1540 //////////////////////////////////////////////////////////////////////////////// | 1531 //////////////////////////////////////////////////////////////////////////////// |
1541 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1532 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1542 | 1533 |
1543 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1534 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1544 return this; | 1535 return this; |
1545 } | 1536 } |
1546 | 1537 |
1547 } // namespace internal | 1538 } // namespace internal |
1548 } // namespace views | 1539 } // namespace views |
OLD | NEW |