OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 ChildViewportScrollCallback_h | |
6 #define ChildViewportScrollCallback_h | |
7 | |
8 #include "core/page/scrolling/ViewportScrollCallback.h" | |
9 #include "platform/heap/Handle.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class ScrollableArea; | |
14 class ScrollState; | |
15 | |
16 // The ViewportScrollCallback used by non-root Frames, i.e. iframes. This is | |
17 // essentially a no-op implementation that simply scrolls the frame since | |
18 // iframes don't have any additional scrolling actions, unlike the root frame | |
19 // which moves the top controls and provides overscroll glow. | |
20 class ChildViewportScrollCallback : public ViewportScrollCallback { | |
21 public: | |
22 static ChildViewportScrollCallback* create() | |
23 { | |
24 return new ChildViewportScrollCallback(); | |
25 } | |
26 | |
27 virtual ~ChildViewportScrollCallback(); | |
28 | |
29 void handleEvent(ScrollState*) override; | |
30 void setScroller(ScrollableArea*) override; | |
31 | |
32 DECLARE_VIRTUAL_TRACE(); | |
33 | |
34 private: | |
35 ChildViewportScrollCallback(); | |
36 | |
37 WeakMember<ScrollableArea> m_scroller; | |
38 }; | |
39 | |
40 } // namespace blink | |
41 | |
42 #endif // ChildViewportScrollCallback_h | |
OLD | NEW |