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

Side by Side Diff: Source/platform/mac/ScrollElasticityController.h

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define ScrollElasticityController_h 27 #define ScrollElasticityController_h
28 28
29 #if USE(RUBBER_BANDING) 29 #if USE(RUBBER_BANDING)
30 30
31 #include "platform/PlatformExport.h" 31 #include "platform/PlatformExport.h"
32 #include "platform/geometry/FloatPoint.h" 32 #include "platform/geometry/FloatPoint.h"
33 #include "platform/geometry/FloatSize.h" 33 #include "platform/geometry/FloatSize.h"
34 #include "platform/scroll/ScrollTypes.h" 34 #include "platform/scroll/ScrollTypes.h"
35 #include "wtf/Noncopyable.h" 35 #include "wtf/Noncopyable.h"
36 36
37 namespace WebCore { 37 namespace blink {
38 38
39 class PlatformWheelEvent; 39 class PlatformWheelEvent;
40 40
41 class ScrollElasticityControllerClient { 41 class ScrollElasticityControllerClient {
42 protected: 42 protected:
43 virtual ~ScrollElasticityControllerClient() { } 43 virtual ~ScrollElasticityControllerClient() { }
44 44
45 public: 45 public:
46 virtual bool allowsHorizontalStretching() = 0; 46 virtual bool allowsHorizontalStretching() = 0;
47 virtual bool allowsVerticalStretching() = 0; 47 virtual bool allowsVerticalStretching() = 0;
48 // The amount that the view is stretched past the normal allowable bounds. 48 // The amount that the view is stretched past the normal allowable bounds.
49 // The "overhang" amount. 49 // The "overhang" amount.
50 virtual IntSize stretchAmount() = 0; 50 virtual IntSize stretchAmount() = 0;
51 virtual bool pinnedInDirection(const FloatSize&) = 0; 51 virtual bool pinnedInDirection(const FloatSize&) = 0;
52 virtual bool canScrollHorizontally() = 0; 52 virtual bool canScrollHorizontally() = 0;
53 virtual bool canScrollVertically() = 0; 53 virtual bool canScrollVertically() = 0;
54 54
55 // Return the absolute scroll position, not relative to the scroll origin. 55 // Return the absolute scroll position, not relative to the scroll origin.
56 virtual WebCore::IntPoint absoluteScrollPosition() = 0; 56 virtual blink::IntPoint absoluteScrollPosition() = 0;
57 57
58 virtual void immediateScrollBy(const FloatSize&) = 0; 58 virtual void immediateScrollBy(const FloatSize&) = 0;
59 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize& ) = 0; 59 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize& ) = 0;
60 virtual void startSnapRubberbandTimer() = 0; 60 virtual void startSnapRubberbandTimer() = 0;
61 virtual void stopSnapRubberbandTimer() = 0; 61 virtual void stopSnapRubberbandTimer() = 0;
62 62
63 // If the current scroll position is within the overhang area, this function will cause 63 // If the current scroll position is within the overhang area, this function will cause
64 // the page to scroll to the nearest boundary point. 64 // the page to scroll to the nearest boundary point.
65 virtual void adjustScrollPositionToBoundsIfNecessary() = 0; 65 virtual void adjustScrollPositionToBoundsIfNecessary() = 0;
66 }; 66 };
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 // Rubber band state. 128 // Rubber band state.
129 CFTimeInterval m_startTime; 129 CFTimeInterval m_startTime;
130 FloatSize m_startStretch; 130 FloatSize m_startStretch;
131 FloatPoint m_origOrigin; 131 FloatPoint m_origOrigin;
132 FloatSize m_origVelocity; 132 FloatSize m_origVelocity;
133 133
134 bool m_snapRubberbandTimerIsActive; 134 bool m_snapRubberbandTimerIsActive;
135 }; 135 };
136 136
137 } // namespace WebCore 137 } // namespace blink
138 138
139 #endif // USE(RUBBER_BANDING) 139 #endif // USE(RUBBER_BANDING)
140 140
141 #endif // ScrollElasticityController_h 141 #endif // ScrollElasticityController_h
OLDNEW
« no previous file with comments | « Source/platform/mac/ScrollAnimatorMac.mm ('k') | Source/platform/mac/ScrollElasticityController.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698