Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: content/browser/renderer_host/overscroll_controller_delegate.h

Issue 30683003: Remove final RenderWidgetHostImpl dependency from OverscrollController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/browser/renderer_host/overscroll_controller.h" 10 #include "content/browser/renderer_host/overscroll_controller.h"
11 #include "ui/gfx/rect.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 // The delegate receives overscroll gesture updates from the controller and 15 // The delegate receives overscroll gesture updates from the controller and
15 // should perform appropriate actions. 16 // should perform appropriate actions.
16 class OverscrollControllerDelegate { 17 class OverscrollControllerDelegate {
17 public: 18 public:
18 OverscrollControllerDelegate() {} 19 OverscrollControllerDelegate() {}
19 virtual ~OverscrollControllerDelegate() {} 20 virtual ~OverscrollControllerDelegate() {}
20 21
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;
25
21 // This is called for each update in the overscroll amount. 26 // This is called for each update in the overscroll amount.
22 virtual void OnOverscrollUpdate(float delta_x, float delta_y) = 0; 27 virtual void OnOverscrollUpdate(float delta_x, float delta_y) = 0;
23 28
24 // This is called when the overscroll completes. 29 // This is called when the overscroll completes.
25 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) = 0; 30 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) = 0;
26 31
27 // This is called when the direction of the overscroll changes. 32 // This is called when the direction of the overscroll changes.
28 virtual void OnOverscrollModeChange(OverscrollMode old_mode, 33 virtual void OnOverscrollModeChange(OverscrollMode old_mode,
29 OverscrollMode new_mode) = 0; 34 OverscrollMode new_mode) = 0;
30 35
31 private: 36 private:
32 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerDelegate); 37 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerDelegate);
33 }; 38 };
34 39
35 } // namespace content 40 } // namespace content
36 41
37 #endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_ 42 #endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/overscroll_controller.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698