Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: ui/views/widget/widget.cc

Issue 15114002: Reorder the NativeViews attached to a view via kViewHostKey according to the position of the view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 gfx::Vector2d Widget::CalculateOffsetToAncestorWithLayer(
884 ui::Layer** layer_parent) { 884 ui::Layer** layer_parent) {
885 return native_widget_->CalculateOffsetToAncestorWithLayer(layer_parent); 885 return native_widget_->CalculateOffsetToAncestorWithLayer(layer_parent);
886 } 886 }
887 887
888 void Widget::ReorderLayers() { 888 void Widget::ReorderLayers() {
889 ui::Layer* layer = NULL; 889 native_widget_->ReorderLayers();
890 CalculateOffsetToAncestorWithLayer(&layer); 890 }
891 if (layer) 891
892 root_view_->ReorderChildLayers(layer); 892 bool Widget::HasNativeViewAttachedToViewTree() const {
893 return native_widget_->HasNativeViewAttachedToViewTree();
893 } 894 }
894 895
895 void Widget::UpdateRootLayers() { 896 void Widget::UpdateRootLayers() {
896 // Calculate the layers requires traversing the tree, and since nearly any 897 // Calculate the layers requires traversing the tree, and since nearly any
897 // mutation of the tree can trigger this call we delay until absolutely 898 // mutation of the tree can trigger this call we delay until absolutely
898 // necessary. 899 // necessary.
899 root_layers_dirty_ = true; 900 root_layers_dirty_ = true;
900 } 901 }
901 902
902 const NativeWidget* Widget::native_widget() const { 903 const NativeWidget* Widget::native_widget() const {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 1411
1411 //////////////////////////////////////////////////////////////////////////////// 1412 ////////////////////////////////////////////////////////////////////////////////
1412 // internal::NativeWidgetPrivate, NativeWidget implementation: 1413 // internal::NativeWidgetPrivate, NativeWidget implementation:
1413 1414
1414 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1415 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1415 return this; 1416 return this;
1416 } 1417 }
1417 1418
1418 } // namespace internal 1419 } // namespace internal
1419 } // namespace views 1420 } // namespace views
OLDNEW
« ui/views/widget/native_widget_layer_reorderer_aura.cc ('K') | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698