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

Side by Side Diff: ui/android/edge_effect_base.cc

Issue 1419123002: android: move overscroll effects to ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix exports for component build Created 5 years, 1 month 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/android/edge_effect_base.h ('k') | ui/android/edge_effect_l.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/browser/android/edge_effect_base.h" 5 #include "ui/android/edge_effect_base.h"
6 6
7 namespace content { 7 namespace ui {
8 8
9 // static 9 // static
10 gfx::Transform EdgeEffectBase::ComputeTransform(Edge edge, 10 gfx::Transform EdgeEffectBase::ComputeTransform(Edge edge,
11 const gfx::SizeF& viewport_size, 11 const gfx::SizeF& viewport_size,
12 float offset) { 12 float offset) {
13 // Transforms assume the edge layers are anchored to their *top center point*. 13 // Transforms assume the edge layers are anchored to their *top center point*.
14 switch (edge) { 14 switch (edge) {
15 case EDGE_TOP: 15 case EDGE_TOP:
16 return gfx::Transform(1, 0, 0, 1, 0, offset); 16 return gfx::Transform(1, 0, 0, 1, 0, offset);
17 case EDGE_LEFT: 17 case EDGE_LEFT:
(...skipping 21 matching lines...) Expand all
39 return viewport_size; 39 return viewport_size;
40 case EDGE_LEFT: 40 case EDGE_LEFT:
41 case EDGE_RIGHT: 41 case EDGE_RIGHT:
42 return gfx::SizeF(viewport_size.height(), viewport_size.width()); 42 return gfx::SizeF(viewport_size.height(), viewport_size.width());
43 default: 43 default:
44 NOTREACHED() << "Invalid edge: " << edge; 44 NOTREACHED() << "Invalid edge: " << edge;
45 return gfx::SizeF(); 45 return gfx::SizeF();
46 }; 46 };
47 } 47 }
48 48
49 } // namespace content 49 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/edge_effect_base.h ('k') | ui/android/edge_effect_l.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698