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

Side by Side Diff: Source/platform/scroll/ScrollAnimator.h

Issue 1161713004: Rename ScrollableArea::scroll to userScroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comment Created 5 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
« no previous file with comments | « Source/platform/mac/ScrollAnimatorMac.mm ('k') | Source/platform/scroll/ScrollAnimator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class FloatPoint; 43 class FloatPoint;
44 class ScrollableArea; 44 class ScrollableArea;
45 class Scrollbar; 45 class Scrollbar;
46 46
47 class PLATFORM_EXPORT ScrollAnimator : public RefCounted<ScrollAnimator> { 47 class PLATFORM_EXPORT ScrollAnimator : public RefCounted<ScrollAnimator> {
48 public: 48 public:
49 static PassRefPtr<ScrollAnimator> create(ScrollableArea*); 49 static PassRefPtr<ScrollAnimator> create(ScrollableArea*);
50 50
51 virtual ~ScrollAnimator(); 51 virtual ~ScrollAnimator();
52 52
53 // Computes a scroll destination for the given parameters. Returns false if 53 // Computes a scroll destination for the given parameters. The returned
54 // already at the destination. Otherwise, starts scrolling towards the 54 // ScrollResultOneDimensional will have didScroll set to false if already at
55 // destination and returns true. Scrolling may be immediate or animated. 55 // the destination. Otherwise, starts scrolling towards the destination and
56 // The base class implementation always scrolls immediately, never animates. 56 // didScroll is true. Scrolling may be immediate or animated. The base
57 virtual ScrollResultOneDimensional scroll(ScrollbarOrientation, ScrollGranul arity, float step, float delta); 57 // class implementation always scrolls immediately, never animates.
58 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta);
58 59
59 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); 60 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
60 61
61 ScrollableArea* scrollableArea() const { return m_scrollableArea; } 62 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
62 63
63 virtual void setIsActive() { } 64 virtual void setIsActive() { }
64 65
65 virtual ScrollResult handleWheelEvent(const PlatformWheelEvent&); 66 virtual ScrollResult handleWheelEvent(const PlatformWheelEvent&);
66 67
67 #if OS(MACOSX) 68 #if OS(MACOSX)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 float m_currentPosX; // We avoid using a FloatPoint in order to reduce 109 float m_currentPosX; // We avoid using a FloatPoint in order to reduce
109 float m_currentPosY; // subclass code complexity. 110 float m_currentPosY; // subclass code complexity.
110 111
111 private: 112 private:
112 float clampScrollPosition(ScrollbarOrientation, float); 113 float clampScrollPosition(ScrollbarOrientation, float);
113 }; 114 };
114 115
115 } // namespace blink 116 } // namespace blink
116 117
117 #endif // ScrollAnimator_h 118 #endif // ScrollAnimator_h
OLDNEW
« no previous file with comments | « Source/platform/mac/ScrollAnimatorMac.mm ('k') | Source/platform/scroll/ScrollAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698