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

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

Issue 10447066: views: Sort header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm duplicated include Created 8 years, 6 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
« no previous file with comments | « ui/views/focus/focus_manager.h ('k') | ui/views/widget/desktop_native_widget_helper_aura.cc » ('j') | 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 #include "ui/views/view_model_utils.h" 5 #include "ui/views/view_model_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/views/view.h"
9 #include "ui/views/view_model.h" 10 #include "ui/views/view_model.h"
10 #include "ui/views/view.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 namespace { 14 namespace {
15 15
16 // Used in calculating ideal bounds. 16 // Used in calculating ideal bounds.
17 int primary_axis_coordinate(ViewModelUtils::Alignment alignment, 17 int primary_axis_coordinate(ViewModelUtils::Alignment alignment,
18 int x, 18 int x,
19 int y) { 19 int y) {
20 return alignment == ViewModelUtils::HORIZONTAL ? x : y; 20 return alignment == ViewModelUtils::HORIZONTAL ? x : y;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 alignment, 73 alignment,
74 bounds.x() + bounds.width() / 2 - delta, 74 bounds.x() + bounds.width() / 2 - delta,
75 bounds.y() + bounds.height() / 2 - delta); 75 bounds.y() + bounds.height() / 2 - delta);
76 if (value < mid_point) 76 if (value < mid_point)
77 return i - 1; 77 return i - 1;
78 } 78 }
79 return model.view_size() - 1; 79 return model.view_size() - 1;
80 } 80 }
81 81
82 } // namespace views 82 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager.h ('k') | ui/views/widget/desktop_native_widget_helper_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698