blob: 6d40ed1209534a423daab48b557f97d5277c9243 [file] [log] [blame]
[email protected]b4df9df2012-11-16 01:58:581// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
6#define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
7
8#include "base/basictypes.h"
9#include "base/compiler_specific.h"
10#include "content/browser/renderer_host/overscroll_controller.h"
11
12namespace content {
13
14// The delegate receives overscroll gesture updates from the controller and
15// should perform appropriate actions.
16class OverscrollControllerDelegate {
17 public:
[email protected]e42b1f82012-11-16 21:18:4618 OverscrollControllerDelegate() {}
[email protected]b4df9df2012-11-16 01:58:5819 virtual ~OverscrollControllerDelegate() {}
20
21 // This is called for each update in the overscroll amount.
22 virtual void OnOverscrollUpdate(float delta_x, float delta_y) = 0;
23
24 // This is called when the overscroll completes.
25 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) = 0;
26
27 // This is called when the direction of the overscroll changes.
28 virtual void OnOverscrollModeChange(OverscrollMode old_mode,
29 OverscrollMode new_mode) = 0;
30
31 private:
32 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerDelegate);
33};
34
35} // namespace content
36
37#endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_