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

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

Issue 1544283002: Clean up header files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/surface/transport_dib.cc ('k') | url/url_canon_path.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_targeter_delegate.h" 5 #include "ui/views/view_targeter_delegate.h"
6 6
7 #include <limits.h>
8
7 #include "ui/gfx/geometry/rect_conversions.h" 9 #include "ui/gfx/geometry/rect_conversions.h"
8 #include "ui/views/rect_based_targeting_utils.h" 10 #include "ui/views/rect_based_targeting_utils.h"
9 #include "ui/views/view.h" 11 #include "ui/views/view.h"
10 12
11 namespace { 13 namespace {
12 14
13 // The minimum percentage of a view's area that needs to be covered by a rect 15 // The minimum percentage of a view's area that needs to be covered by a rect
14 // representing a touch region in order for that view to be considered by the 16 // representing a touch region in order for that view to be considered by the
15 // rect-based targeting algorithm. 17 // rect-based targeting algorithm.
16 static const float kRectTargetOverlap = 0.6f; 18 static const float kRectTargetOverlap = 0.6f;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int cur_dist = views::DistanceSquaredFromCenterToPoint(touch_center, 97 int cur_dist = views::DistanceSquaredFromCenterToPoint(touch_center,
96 local_bounds); 98 local_bounds);
97 if (!rect_view || cur_dist < rect_view_distance) 99 if (!rect_view || cur_dist < rect_view_distance)
98 rect_view = root; 100 rect_view = root;
99 } 101 }
100 102
101 return rect_view ? rect_view : point_view; 103 return rect_view ? rect_view : point_view;
102 } 104 }
103 105
104 } // namespace views 106 } // namespace views
OLDNEW
« no previous file with comments | « ui/surface/transport_dib.cc ('k') | url/url_canon_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698