| Index: content/browser/web_contents/aura/overscroll_window_animation.h
|
| diff --git a/content/browser/web_contents/aura/overscroll_window_animation.h b/content/browser/web_contents/aura/overscroll_window_animation.h
|
| index f19e5f8bcc71a87ad29859f747024c1de51b3f2c..e41275511fd84e0bea3d9254aab6acad1d010274 100644
|
| --- a/content/browser/web_contents/aura/overscroll_window_animation.h
|
| +++ b/content/browser/web_contents/aura/overscroll_window_animation.h
|
| @@ -77,12 +77,19 @@ class CONTENT_EXPORT OverscrollWindowAnimation
|
| // Returns true if we are currently animating.
|
| bool is_active() const { return !!slide_window_; }
|
|
|
| + OverscrollSource overscroll_source() { return overscroll_source_; }
|
| +
|
| + void SetOverscrollSourceForTesting(OverscrollSource source) {
|
| + overscroll_source_ = source;
|
| + }
|
| +
|
| // OverscrollControllerDelegate:
|
| gfx::Rect GetVisibleBounds() const override;
|
| bool OnOverscrollUpdate(float delta_x, float delta_y) override;
|
| void OnOverscrollComplete(OverscrollMode overscroll_mode) override;
|
| void OnOverscrollModeChange(OverscrollMode old_mode,
|
| - OverscrollMode new_mode) override;
|
| + OverscrollMode new_mode,
|
| + OverscrollSource source) override;
|
|
|
| private:
|
| // Cancels the slide, animating the front and back window to their original
|
| @@ -119,6 +126,11 @@ class CONTENT_EXPORT OverscrollWindowAnimation
|
| // The current animation direction.
|
| Direction direction_;
|
|
|
| + // OverscrollSource of the current overscroll gesture. Updated when the new
|
| + // overscroll gesture starts, before CreateFront/BackWindow callback is called
|
| + // on the delegate.
|
| + OverscrollSource overscroll_source_ = OverscrollSource::NONE;
|
| +
|
| // Indicates if the current slide has been cancelled. True while the cancel
|
| // animation is in progress.
|
| bool overscroll_cancelled_;
|
|
|