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.h" | 9 #include "base/message_loop.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 } | 873 } |
874 | 874 |
875 const ui::Compositor* Widget::GetCompositor() const { | 875 const ui::Compositor* Widget::GetCompositor() const { |
876 return native_widget_->GetCompositor(); | 876 return native_widget_->GetCompositor(); |
877 } | 877 } |
878 | 878 |
879 ui::Compositor* Widget::GetCompositor() { | 879 ui::Compositor* Widget::GetCompositor() { |
880 return native_widget_->GetCompositor(); | 880 return native_widget_->GetCompositor(); |
881 } | 881 } |
882 | 882 |
883 gfx::Vector2d Widget::CalculateOffsetToAncestorWithLayer( | 883 ui::Layer* Widget::GetLayer() { |
884 ui::Layer** layer_parent) { | 884 return native_widget_->GetLayer(); |
885 return native_widget_->CalculateOffsetToAncestorWithLayer(layer_parent); | |
886 } | |
887 | |
888 void Widget::ReorderLayers() { | |
889 ui::Layer* layer = NULL; | |
890 CalculateOffsetToAncestorWithLayer(&layer); | |
891 if (layer) | |
892 root_view_->ReorderChildLayers(layer); | |
893 } | 885 } |
894 | 886 |
895 void Widget::UpdateRootLayers() { | 887 void Widget::UpdateRootLayers() { |
896 // Calculate the layers requires traversing the tree, and since nearly any | 888 // Calculate the layers requires traversing the tree, and since nearly any |
897 // mutation of the tree can trigger this call we delay until absolutely | 889 // mutation of the tree can trigger this call we delay until absolutely |
898 // necessary. | 890 // necessary. |
899 root_layers_dirty_ = true; | 891 root_layers_dirty_ = true; |
900 } | 892 } |
901 | 893 |
902 const NativeWidget* Widget::native_widget() const { | 894 const NativeWidget* Widget::native_widget() const { |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 | 1402 |
1411 //////////////////////////////////////////////////////////////////////////////// | 1403 //////////////////////////////////////////////////////////////////////////////// |
1412 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1404 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1413 | 1405 |
1414 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1406 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1415 return this; | 1407 return this; |
1416 } | 1408 } |
1417 | 1409 |
1418 } // namespace internal | 1410 } // namespace internal |
1419 } // namespace views | 1411 } // namespace views |
OLD | NEW |