summaryrefslogtreecommitdiffstats
path: root/content/browser/android/overscroll_refresh.cc
Commit message (Collapse)AuthorAgeFilesLines
* [Android] Use the platform SwipeRefreshLayoutjdduke2015-04-151-429/+19
| | | | | | | | | | | | | | Adopt the compat library's implementation of the pull-to-refresh effect, removing the old compositor-based approach. This depends directly on the SwipeRefreshLayout addition in https://codereview.chromium.org/897663003/. BUG=428429,444134 Review URL: https://codereview.chromium.org/894193005 Cr-Commit-Position: refs/heads/master@{#325172}
* [Android] Disable pull-to-refresh with overflow-y:hiddenjdduke2015-02-121-2/+5
| | | | | | | | | | | | | | | | | | Currently, the only way to disable the pull-to-refresh effect is to explictly preventDefault the causal touches or suppress their default actions with touch-action: none. However, the latter prevents any kind of accelerated scrolling, and the former can be to get right with composed or nested scrollable content. Use the overflow-y:hidden property on the root element as a signal to disable the effect. This dovetails with how this property both prevents hiding of the top controls and suppresses the overscroll glow effect. BUG=456515,456300 Review URL: https://codereview.chromium.org/910373002 Cr-Commit-Position: refs/heads/master@{#315938}
* [Android] Suppress pull-to-refresh when overscroll glow visiblejdduke2015-02-111-5/+1
| | | | | | | | | | | | | | | | | Avoid accidental refreshes by suppressing the effect when the overscroll glow animation is still visible. This naturally prevents the case where the user repeatedly flings/scrolls to the top, releasing before they realize that the scroll has turned into a pull-to-refresh. Note that suppression is only provided on L; the glow effect on previous platforms is both too long and too visually faint to provide a good feedback signal for when the user can start pulling to refresh. BUG=456300 Review URL: https://codereview.chromium.org/879273007 Cr-Commit-Position: refs/heads/master@{#315832}
* [Android] Mirror the pull-to-refresh effect for RTL layoutsjdduke2015-01-091-6/+13
| | | | | | | | | | | | Align the pull-to-refresh effect's appearance with the toolbar refresh icon when the device layout is RTL. Note that this affects both the refresh icon and its rotation. BUG=446684 Review URL: https://codereview.chromium.org/836863004 Cr-Commit-Position: refs/heads/master@{#310657}
* Make ResourceManager an interfacejdduke2014-12-191-0/+1
| | | | | | | | | | | | Simplify testing by making the ResourceManager a pure interface. Also add some basic trace coverage for resource loading. BUG=426939 Review URL: https://codereview.chromium.org/802013004 Cr-Commit-Position: refs/heads/master@{#309296}
* Replace SystemUIResourceManager with ResourceManagerjaekyun2014-12-111-13/+12
| | | | | | | | | | And move UIResourceClientAndroid and UIResourceProvider under ui/android. BUG=426939 Review URL: https://codereview.chromium.org/755643004 Cr-Commit-Position: refs/heads/master@{#307844}
* [Android] Use NavigationController for pull-to-refresh activationjdduke2014-12-101-2/+2
| | | | | | | | | | | | | | When pull-to-refresh is triggered, use the NavigationController to trigger the reload instead of WebContents::ReloadFocusedFrame. This is consistent with how toolbar-triggered reloads are performed. Also reduce the animation time for a single reload animation rotation. BUG=440406,428429 Review URL: https://codereview.chromium.org/792623003 Cr-Commit-Position: refs/heads/master@{#307610}
* [Android] Disable pull-to-refresh for fullscreen contentsjdduke2014-11-251-7/+6
| | | | | | | | | | | The default refresh action is often undesirable for fullscreen content like video. Disable it in such cases to prevent unexpected interactions. BUG=435732,428429 Review URL: https://codereview.chromium.org/762533003 Cr-Commit-Position: refs/heads/master@{#305715}
* [Android] Shrink the pull-to-refresh effect upon recessionjdduke2014-11-251-30/+82
| | | | | | | | | | | | | Match the native pull-to-refresh effect by shrinking the refresh icon after the activation animating has finished. Also adjust the activated animation by giving it a small constant velocity and changing its ease-out cruve to an ease-in-out curve. BUG=428429 Review URL: https://codereview.chromium.org/757083002 Cr-Commit-Position: refs/heads/master@{#305681}
* [Android] Prevent refresh activation when pinchingjdduke2014-11-211-0/+5
| | | | | | | | | | | Immediately dismiss the pull-to-refresh effect when a pinch is detected, preventing accidental activation. BUG=435417 Review URL: https://codereview.chromium.org/736313003 Cr-Commit-Position: refs/heads/master@{#305249}
* [Android] Isolate OverscrollRefresh from device densityjdduke2014-11-201-12/+5
| | | | | | | | | | | | Make the OverscrollRefresh effect take the target drag threshold as a parameter. This isolates it from direct dependencies on the device scale factor, making associated unit tests determnistics across all devices. BUG=435125 Review URL: https://codereview.chromium.org/748433002 Cr-Commit-Position: refs/heads/master@{#305026}
* [Android] Tweak the pull-to-refresh effect animationjdduke2014-11-191-56/+97
| | | | | | | | | | | | Modify pull-to-refresh drag movement, as well as the initial activation animation, to more closely align with the default Android platform effect. BUG=428429 Review URL: https://codereview.chromium.org/733273004 Cr-Commit-Position: refs/heads/master@{#304931}
* [Android] Add a native pull-to-refresh overscroll effectjdduke2014-11-151-0/+418
Add a restricted pull-to-refresh effect to Android. The effect is triggered only when 1) the scroll starts when the page has no vertical offset, 2) the scroll direction is upward and 3) the initial scroll is not consumed by the page. Page reloads are triggered only when the user pulls and releases beyond a certain threshold. BUG=428429 Review URL: https://codereview.chromium.org/679493002 Cr-Commit-Position: refs/heads/master@{#304320}