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

Side by Side Diff: ui/base/touch/selection_bound.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 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/base/ime/win/imm32_manager.h ('k') | ui/base/touch/selection_bound_unittest.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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/output/viewport_selection_bound.h" 8 #include "cc/output/viewport_selection_bound.h"
9 #include "ui/base/touch/selection_bound.h" 9 #include "ui/base/touch/selection_bound.h"
10 #include "ui/gfx/geometry/point_conversions.h" 10 #include "ui/gfx/geometry/point_conversions.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 namespace { 15 namespace {
16 16
17 SelectionBound::Type ConvertToSelectionBoundType(cc::SelectionBoundType type) { 17 SelectionBound::Type ConvertToSelectionBoundType(cc::SelectionBoundType type) {
18 switch (type) { 18 switch (type) {
19 case cc::SELECTION_BOUND_LEFT: 19 case cc::SELECTION_BOUND_LEFT:
20 return SelectionBound::LEFT; 20 return SelectionBound::LEFT;
21 case cc::SELECTION_BOUND_RIGHT: 21 case cc::SELECTION_BOUND_RIGHT:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 gfx::Point bottom_right(b1.edge_top_rounded()); 84 gfx::Point bottom_right(b1.edge_top_rounded());
85 bottom_right.SetToMax(b1.edge_bottom_rounded()); 85 bottom_right.SetToMax(b1.edge_bottom_rounded());
86 bottom_right.SetToMax(b2.edge_top_rounded()); 86 bottom_right.SetToMax(b2.edge_top_rounded());
87 bottom_right.SetToMax(b2.edge_bottom_rounded()); 87 bottom_right.SetToMax(b2.edge_bottom_rounded());
88 88
89 gfx::Vector2d diff = bottom_right - top_left; 89 gfx::Vector2d diff = bottom_right - top_left;
90 return gfx::Rect(top_left, gfx::Size(diff.x(), diff.y())); 90 return gfx::Rect(top_left, gfx::Size(diff.x(), diff.y()));
91 } 91 }
92 92
93 } // namespace ui 93 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/win/imm32_manager.h ('k') | ui/base/touch/selection_bound_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698