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

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

Issue 139623002: Tweaks to get views compiling with mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mismatch Created 6 years, 11 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
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 } 1555 }
1556 1556
1557 void View::ReorderChildLayers(ui::Layer* parent_layer) { 1557 void View::ReorderChildLayers(ui::Layer* parent_layer) {
1558 if (layer() && layer() != parent_layer) { 1558 if (layer() && layer() != parent_layer) {
1559 DCHECK_EQ(parent_layer, layer()->parent()); 1559 DCHECK_EQ(parent_layer, layer()->parent());
1560 parent_layer->StackAtBottom(layer()); 1560 parent_layer->StackAtBottom(layer());
1561 } else { 1561 } else {
1562 // Iterate backwards through the children so that a child with a layer 1562 // Iterate backwards through the children so that a child with a layer
1563 // which is further to the back is stacked above one which is further to 1563 // which is further to the back is stacked above one which is further to
1564 // the front. 1564 // the front.
1565 for (Views::const_reverse_iterator it(children_.rbegin()); 1565 for (Views::reverse_iterator it(children_.rbegin());
1566 it != children_.rend(); ++it) { 1566 it != children_.rend(); ++it) {
1567 (*it)->ReorderChildLayers(parent_layer); 1567 (*it)->ReorderChildLayers(parent_layer);
1568 } 1568 }
1569 } 1569 }
1570 } 1570 }
1571 1571
1572 // Input ----------------------------------------------------------------------- 1572 // Input -----------------------------------------------------------------------
1573 1573
1574 bool View::HasHitTestMask() const { 1574 bool View::HasHitTestMask() const {
1575 return false; 1575 return false;
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 // Message the RootView to do the drag and drop. That way if we're removed 2387 // Message the RootView to do the drag and drop. That way if we're removed
2388 // the RootView can detect it and avoid calling us back. 2388 // the RootView can detect it and avoid calling us back.
2389 gfx::Point widget_location(event.location()); 2389 gfx::Point widget_location(event.location());
2390 ConvertPointToWidget(this, &widget_location); 2390 ConvertPointToWidget(this, &widget_location);
2391 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2391 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2392 // WARNING: we may have been deleted. 2392 // WARNING: we may have been deleted.
2393 return true; 2393 return true;
2394 } 2394 }
2395 2395
2396 } // namespace views 2396 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698