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 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2266 Send(new ViewHostMsg_FocusedNodeTouched( | 2266 Send(new ViewHostMsg_FocusedNodeTouched( |
2267 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2267 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
2268 #endif | 2268 #endif |
2269 #endif | 2269 #endif |
2270 } | 2270 } |
2271 | 2271 |
2272 void RenderWidget::DidOverscroll( | 2272 void RenderWidget::DidOverscroll( |
2273 const blink::WebFloatSize& overscrollDelta, | 2273 const blink::WebFloatSize& overscrollDelta, |
2274 const blink::WebFloatSize& accumulatedOverscroll, | 2274 const blink::WebFloatSize& accumulatedOverscroll, |
2275 const blink::WebFloatPoint& position, | 2275 const blink::WebFloatPoint& position, |
2276 const blink::WebFloatSize& velocity) { | 2276 const blink::WebFloatSize& velocity, |
| 2277 const blink::WebScrollBoundaryBehavior& behavior) { |
2277 #if defined(OS_MACOSX) | 2278 #if defined(OS_MACOSX) |
2278 // On OSX the user can disable the elastic overscroll effect. If that's the | 2279 // On OSX the user can disable the elastic overscroll effect. If that's the |
2279 // case, don't forward the overscroll notification. | 2280 // case, don't forward the overscroll notification. |
2280 DCHECK(compositor_deps()); | 2281 DCHECK(compositor_deps()); |
2281 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2282 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
2282 return; | 2283 return; |
2283 #endif | 2284 #endif |
2284 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2285 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
2285 position, velocity); | 2286 position, velocity, behavior); |
2286 } | 2287 } |
2287 | 2288 |
2288 void RenderWidget::StartCompositor() { | 2289 void RenderWidget::StartCompositor() { |
2289 if (!is_hidden()) | 2290 if (!is_hidden()) |
2290 compositor_->SetVisible(true); | 2291 compositor_->SetVisible(true); |
2291 } | 2292 } |
2292 | 2293 |
2293 RenderWidgetCompositor* RenderWidget::compositor() const { | 2294 RenderWidgetCompositor* RenderWidget::compositor() const { |
2294 return compositor_.get(); | 2295 return compositor_.get(); |
2295 } | 2296 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 // browser side (https://crbug.com/669219). | 2403 // browser side (https://crbug.com/669219). |
2403 // If there is no WebFrameWidget, then there will be no | 2404 // If there is no WebFrameWidget, then there will be no |
2404 // InputMethodControllers for a WebLocalFrame. | 2405 // InputMethodControllers for a WebLocalFrame. |
2405 return nullptr; | 2406 return nullptr; |
2406 } | 2407 } |
2407 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2408 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2408 ->GetActiveWebInputMethodController(); | 2409 ->GetActiveWebInputMethodController(); |
2409 } | 2410 } |
2410 | 2411 |
2411 } // namespace content | 2412 } // namespace content |
OLD | NEW |