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 #include "core/page/scrolling/ChildViewportScrollCallback.h" | |
6 | |
7 #include "core/page/scrolling/ScrollState.h" | |
8 #include "platform/geometry/FloatSize.h" | |
9 #include "platform/scroll/ScrollTypes.h" | |
10 #include "platform/scroll/ScrollableArea.h" | |
11 | |
12 namespace blink { | |
13 | |
14 ChildViewportScrollCallback::ChildViewportScrollCallback() | |
15 { | |
16 } | |
17 | |
18 ChildViewportScrollCallback::~ChildViewportScrollCallback() | |
19 { | |
20 } | |
21 | |
22 DEFINE_TRACE(ChildViewportScrollCallback) | |
23 { | |
24 visitor->trace(m_scroller); | |
25 ViewportScrollCallback::trace(visitor); | |
26 } | |
27 | |
28 | |
29 void ChildViewportScrollCallback::handleEvent(ScrollState* state) | |
30 { | |
31 DCHECK(state); | |
32 | |
33 if (!m_scroller) | |
34 return; | |
35 | |
36 performNativeScroll(*state, *m_scroller); | |
37 } | |
38 | |
39 void ChildViewportScrollCallback::setScroller(ScrollableArea* scroller) | |
40 { | |
41 m_scroller = scroller; | |
42 } | |
43 | |
44 } // namespace blink | |
OLD | NEW |