IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / renderer_host / overscroll_controller_delegate.h
blob59295ce41277247a8ef7896087e2408f5c0f523c
1 // 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.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/browser/renderer_host/overscroll_controller.h"
11 #include "ui/gfx/rect.h"
13 namespace content {
15 // The delegate receives overscroll gesture updates from the controller and
16 // should perform appropriate actions.
17 class OverscrollControllerDelegate {
18 public:
19 OverscrollControllerDelegate() {}
20 virtual ~OverscrollControllerDelegate() {}
22 // Get the bounds of the view corresponding to the delegate. Overscroll-ending
23 // events will only be processed if the visible bounds are non-empty.
24 virtual gfx::Rect GetVisibleBounds() const = 0;
26 // This is called for each update in the overscroll amount.
27 virtual void OnOverscrollUpdate(float delta_x, float delta_y) = 0;
29 // This is called when the overscroll completes.
30 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) = 0;
32 // This is called when the direction of the overscroll changes.
33 virtual void OnOverscrollModeChange(OverscrollMode old_mode,
34 OverscrollMode new_mode) = 0;
36 private:
37 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerDelegate);
40 } // namespace content
42 #endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_