OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/input/input_handler_proxy.h" | 5 #include "content/renderer/input/input_handler_proxy.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/trees/swap_promise_monitor.h" | 9 #include "cc/trees/swap_promise_monitor.h" |
10 #include "content/common/input/did_overscroll_params.h" | 10 #include "content/common/input/did_overscroll_params.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 bool(const gfx::Point& point, | 131 bool(const gfx::Point& point, |
132 cc::InputHandler::ScrollInputType type)); | 132 cc::InputHandler::ScrollInputType type)); |
133 | 133 |
134 MOCK_METHOD1(HaveWheelEventHandlersAt, bool(const gfx::Point& point)); | 134 MOCK_METHOD1(HaveWheelEventHandlersAt, bool(const gfx::Point& point)); |
135 MOCK_METHOD1(DoTouchEventsBlockScrollAt, bool(const gfx::Point& point)); | 135 MOCK_METHOD1(DoTouchEventsBlockScrollAt, bool(const gfx::Point& point)); |
136 | 136 |
137 MOCK_METHOD0(RequestUpdateForSynchronousInputHandler, void()); | 137 MOCK_METHOD0(RequestUpdateForSynchronousInputHandler, void()); |
138 MOCK_METHOD1(SetSynchronousInputHandlerRootScrollOffset, | 138 MOCK_METHOD1(SetSynchronousInputHandlerRootScrollOffset, |
139 void(const gfx::ScrollOffset& root_offset)); | 139 void(const gfx::ScrollOffset& root_offset)); |
140 | 140 |
141 bool IsCurrentlyScrollingRoot() const override { return is_scrolling_root_; } | 141 bool IsCurrentlyScrollingInnerViewport() const override { |
| 142 return is_scrolling_root_; |
| 143 } |
142 void set_is_scrolling_root(bool is) { is_scrolling_root_ = is; } | 144 void set_is_scrolling_root(bool is) { is_scrolling_root_ = is; } |
143 | 145 |
144 private: | 146 private: |
145 bool is_scrolling_root_ = true; | 147 bool is_scrolling_root_ = true; |
146 DISALLOW_COPY_AND_ASSIGN(MockInputHandler); | 148 DISALLOW_COPY_AND_ASSIGN(MockInputHandler); |
147 }; | 149 }; |
148 | 150 |
149 class MockSynchronousInputHandler : public content::SynchronousInputHandler { | 151 class MockSynchronousInputHandler : public content::SynchronousInputHandler { |
150 public: | 152 public: |
151 MOCK_METHOD0(SetNeedsSynchronousAnimateInput, void()); | 153 MOCK_METHOD0(SetNeedsSynchronousAnimateInput, void()); |
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 testing::Mock::VerifyAndClearExpectations(&mock_client); | 2418 testing::Mock::VerifyAndClearExpectations(&mock_client); |
2417 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); | 2419 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); |
2418 } | 2420 } |
2419 | 2421 |
2420 INSTANTIATE_TEST_CASE_P(AnimateInput, | 2422 INSTANTIATE_TEST_CASE_P(AnimateInput, |
2421 InputHandlerProxyTest, | 2423 InputHandlerProxyTest, |
2422 testing::ValuesIn(test_types)); | 2424 testing::ValuesIn(test_types)); |
2423 | 2425 |
2424 } // namespace | 2426 } // namespace |
2425 } // namespace content | 2427 } // namespace content |
OLD | NEW |