summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.h
blob: f2a81b5ecdceb87a26734634fe0eb86fa2fb3169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_SCROLL_GESTURE_
#define CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_SCROLL_GESTURE_

#include "base/time.h"
#include "content/browser/renderer_host/smooth_scroll_calculator.h"
#include "content/port/browser/smooth_scroll_gesture.h"
#include "ui/gfx/point.h"

namespace content {

class TouchSmoothScrollGestureAura : public SmoothScrollGesture {
 public:
  TouchSmoothScrollGestureAura(bool scroll_down,
                               int pixels_to_scroll,
                               int mouse_event_x,
                               int mouse_event_y);
 private:
  virtual ~TouchSmoothScrollGestureAura();

  // Overridden from SmoothScrollGesture.
  virtual bool ForwardInputEvents(base::TimeTicks now,
                                  RenderWidgetHost* host) OVERRIDE;

  bool scroll_down_;
  int pixels_to_scroll_;
  int pixels_scrolled_;
  gfx::Point location_;
  SmoothScrollCalculator smooth_scroll_calculator_;

  DISALLOW_COPY_AND_ASSIGN(TouchSmoothScrollGestureAura);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_TOUCH_SMOOTH_SCROLL_GESTURE_