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

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 internal::NativeWidgetPrivate::ReorderLayers(GetNativeView(), GetRootView());
890 CalculateOffsetToAncestorWithLayer(&layer);
891 if (layer)
892 root_view_->ReorderChildLayers(layer);
893 } 890 }
894 891
895 void Widget::UpdateRootLayers() { 892 void Widget::UpdateRootLayers() {
896 // Calculate the layers requires traversing the tree, and since nearly any 893 // Calculate the layers requires traversing the tree, and since nearly any
897 // mutation of the tree can trigger this call we delay until absolutely 894 // mutation of the tree can trigger this call we delay until absolutely
898 // necessary. 895 // necessary.
899 root_layers_dirty_ = true; 896 root_layers_dirty_ = true;
900 } 897 }
901 898
902 const NativeWidget* Widget::native_widget() const { 899 const NativeWidget* Widget::native_widget() const {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 1407
1411 //////////////////////////////////////////////////////////////////////////////// 1408 ////////////////////////////////////////////////////////////////////////////////
1412 // internal::NativeWidgetPrivate, NativeWidget implementation: 1409 // internal::NativeWidgetPrivate, NativeWidget implementation:
1413 1410
1414 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1411 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1415 return this; 1412 return this;
1416 } 1413 }
1417 1414
1418 } // namespace internal 1415 } // namespace internal
1419 } // namespace views 1416 } // namespace views
OLDNEW
« ui/views/widget/native_widget_aura.cc ('K') | « ui/views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698