OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/view.h" | 5 #include "views/view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 for (Views::const_iterator i(v->children_.begin()); | 1185 for (Views::const_iterator i(v->children_.begin()); |
1186 i != v->children_.end(); | 1186 i != v->children_.end(); |
1187 ++i) | 1187 ++i) |
1188 (*i)->ReorderChildLayers(v->layer()); | 1188 (*i)->ReorderChildLayers(v->layer()); |
1189 } | 1189 } |
1190 } | 1190 } |
1191 | 1191 |
1192 void View::ReorderChildLayers(ui::Layer* parent_layer) { | 1192 void View::ReorderChildLayers(ui::Layer* parent_layer) { |
1193 if (layer()) { | 1193 if (layer()) { |
1194 DCHECK_EQ(parent_layer, layer()->parent()); | 1194 DCHECK_EQ(parent_layer, layer()->parent()); |
1195 parent_layer->MoveToFront(layer()); | 1195 parent_layer->StackAtTop(layer()); |
1196 } else { | 1196 } else { |
1197 for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) | 1197 for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) |
1198 (*i)->ReorderChildLayers(parent_layer); | 1198 (*i)->ReorderChildLayers(parent_layer); |
1199 } | 1199 } |
1200 } | 1200 } |
1201 | 1201 |
1202 // Input ----------------------------------------------------------------------- | 1202 // Input ----------------------------------------------------------------------- |
1203 | 1203 |
1204 bool View::HasHitTestMask() const { | 1204 bool View::HasHitTestMask() const { |
1205 return false; | 1205 return false; |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 | 2069 |
2070 OSExchangeData data; | 2070 OSExchangeData data; |
2071 WriteDragData(press_pt, &data); | 2071 WriteDragData(press_pt, &data); |
2072 | 2072 |
2073 // Message the RootView to do the drag and drop. That way if we're removed | 2073 // Message the RootView to do the drag and drop. That way if we're removed |
2074 // the RootView can detect it and avoid calling us back. | 2074 // the RootView can detect it and avoid calling us back. |
2075 GetWidget()->RunShellDrag(this, data, drag_operations); | 2075 GetWidget()->RunShellDrag(this, data, drag_operations); |
2076 } | 2076 } |
2077 | 2077 |
2078 } // namespace views | 2078 } // namespace views |
OLD | NEW |