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

Side by Side Diff: content/browser/android/overscroll_glow.h

Issue 1115653002: Pass gfx structs by const ref(gfx::Vector2D/F) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing some build issue Created 5 years, 7 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 | « cc/resources/texture_uploader.cc ('k') | content/browser/android/overscroll_glow.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 #ifndef CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 29 matching lines...) Expand all
40 // The effect is enabled by default, but will remain dormant until the first 40 // The effect is enabled by default, but will remain dormant until the first
41 // overscroll event. 41 // overscroll event.
42 explicit OverscrollGlow(OverscrollGlowClient* client); 42 explicit OverscrollGlow(OverscrollGlowClient* client);
43 ~OverscrollGlow(); 43 ~OverscrollGlow();
44 44
45 // Called when the root content layer overscrolls. 45 // Called when the root content layer overscrolls.
46 // |accumulated_overscroll| and |overscroll_delta| are in device pixels, while 46 // |accumulated_overscroll| and |overscroll_delta| are in device pixels, while
47 // |velocity| is in device pixels / second. 47 // |velocity| is in device pixels / second.
48 // Returns true if the effect still needs animation ticks. 48 // Returns true if the effect still needs animation ticks.
49 bool OnOverscrolled(base::TimeTicks current_time, 49 bool OnOverscrolled(base::TimeTicks current_time,
50 gfx::Vector2dF accumulated_overscroll, 50 const gfx::Vector2dF& accumulated_overscroll,
51 gfx::Vector2dF overscroll_delta, 51 gfx::Vector2dF overscroll_delta,
52 gfx::Vector2dF velocity, 52 gfx::Vector2dF velocity,
53 gfx::Vector2dF overscroll_location); 53 const gfx::Vector2dF& overscroll_location);
54 54
55 // Returns true if the effect still needs animation ticks, with effect layers 55 // Returns true if the effect still needs animation ticks, with effect layers
56 // attached to |parent_layer| if necessary. 56 // attached to |parent_layer| if necessary.
57 // Note: The effect will detach itself when no further animation is required. 57 // Note: The effect will detach itself when no further animation is required.
58 bool Animate(base::TimeTicks current_time, cc::Layer* parent_layer); 58 bool Animate(base::TimeTicks current_time, cc::Layer* parent_layer);
59 59
60 // Update the effect according to the most recent display parameters, 60 // Update the effect according to the most recent display parameters,
61 // Note: All dimensions are in device pixels. 61 // Note: All dimensions are in device pixels.
62 void OnFrameUpdated(const gfx::SizeF& viewport_size, 62 void OnFrameUpdated(const gfx::SizeF& viewport_size,
63 const gfx::SizeF& content_size, 63 const gfx::SizeF& content_size,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool initialized_; 100 bool initialized_;
101 101
102 scoped_refptr<cc::Layer> root_layer_; 102 scoped_refptr<cc::Layer> root_layer_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(OverscrollGlow); 104 DISALLOW_COPY_AND_ASSIGN(OverscrollGlow);
105 }; 105 };
106 106
107 } // namespace content 107 } // namespace content
108 108
109 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 109 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
OLDNEW
« no previous file with comments | « cc/resources/texture_uploader.cc ('k') | content/browser/android/overscroll_glow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698