OLD | NEW |
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 #include "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 Send(new ViewHostMsg_FocusedNodeTouched( | 2248 Send(new ViewHostMsg_FocusedNodeTouched( |
2249 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2249 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
2250 #endif | 2250 #endif |
2251 #endif | 2251 #endif |
2252 } | 2252 } |
2253 | 2253 |
2254 void RenderWidget::DidOverscroll( | 2254 void RenderWidget::DidOverscroll( |
2255 const blink::WebFloatSize& overscrollDelta, | 2255 const blink::WebFloatSize& overscrollDelta, |
2256 const blink::WebFloatSize& accumulatedOverscroll, | 2256 const blink::WebFloatSize& accumulatedOverscroll, |
2257 const blink::WebFloatPoint& position, | 2257 const blink::WebFloatPoint& position, |
2258 const blink::WebFloatSize& velocity) { | 2258 const blink::WebFloatSize& velocity, |
| 2259 const blink::WebScrollBoundaryBehavior& behavior) { |
2259 #if defined(OS_MACOSX) | 2260 #if defined(OS_MACOSX) |
2260 // On OSX the user can disable the elastic overscroll effect. If that's the | 2261 // On OSX the user can disable the elastic overscroll effect. If that's the |
2261 // case, don't forward the overscroll notification. | 2262 // case, don't forward the overscroll notification. |
2262 DCHECK(compositor_deps()); | 2263 DCHECK(compositor_deps()); |
2263 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2264 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
2264 return; | 2265 return; |
2265 #endif | 2266 #endif |
2266 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2267 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
2267 position, velocity); | 2268 position, velocity, behavior); |
2268 } | 2269 } |
2269 | 2270 |
2270 void RenderWidget::StartCompositor() { | 2271 void RenderWidget::StartCompositor() { |
2271 if (!is_hidden()) | 2272 if (!is_hidden()) |
2272 compositor_->SetVisible(true); | 2273 compositor_->SetVisible(true); |
2273 } | 2274 } |
2274 | 2275 |
2275 RenderWidgetCompositor* RenderWidget::compositor() const { | 2276 RenderWidgetCompositor* RenderWidget::compositor() const { |
2276 return compositor_.get(); | 2277 return compositor_.get(); |
2277 } | 2278 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 // browser side (https://crbug.com/669219). | 2385 // browser side (https://crbug.com/669219). |
2385 // If there is no WebFrameWidget, then there will be no | 2386 // If there is no WebFrameWidget, then there will be no |
2386 // InputMethodControllers for a WebLocalFrame. | 2387 // InputMethodControllers for a WebLocalFrame. |
2387 return nullptr; | 2388 return nullptr; |
2388 } | 2389 } |
2389 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2390 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2390 ->GetActiveWebInputMethodController(); | 2391 ->GetActiveWebInputMethodController(); |
2391 } | 2392 } |
2392 | 2393 |
2393 } // namespace content | 2394 } // namespace content |
OLD | NEW |