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 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2273 Send(new ViewHostMsg_FocusedNodeTouched( | 2273 Send(new ViewHostMsg_FocusedNodeTouched( |
2274 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2274 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
2275 #endif | 2275 #endif |
2276 #endif | 2276 #endif |
2277 } | 2277 } |
2278 | 2278 |
2279 void RenderWidget::DidOverscroll( | 2279 void RenderWidget::DidOverscroll( |
2280 const blink::WebFloatSize& overscrollDelta, | 2280 const blink::WebFloatSize& overscrollDelta, |
2281 const blink::WebFloatSize& accumulatedOverscroll, | 2281 const blink::WebFloatSize& accumulatedOverscroll, |
2282 const blink::WebFloatPoint& position, | 2282 const blink::WebFloatPoint& position, |
2283 const blink::WebFloatSize& velocity) { | 2283 const blink::WebFloatSize& velocity, |
| 2284 const blink::WebScrollBoundaryBehavior& behavior) { |
2284 #if defined(OS_MACOSX) | 2285 #if defined(OS_MACOSX) |
2285 // On OSX the user can disable the elastic overscroll effect. If that's the | 2286 // On OSX the user can disable the elastic overscroll effect. If that's the |
2286 // case, don't forward the overscroll notification. | 2287 // case, don't forward the overscroll notification. |
2287 DCHECK(compositor_deps()); | 2288 DCHECK(compositor_deps()); |
2288 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2289 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
2289 return; | 2290 return; |
2290 #endif | 2291 #endif |
2291 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2292 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
2292 position, velocity); | 2293 position, velocity, behavior); |
2293 } | 2294 } |
2294 | 2295 |
2295 void RenderWidget::StartCompositor() { | 2296 void RenderWidget::StartCompositor() { |
2296 if (!is_hidden()) | 2297 if (!is_hidden()) |
2297 compositor_->SetVisible(true); | 2298 compositor_->SetVisible(true); |
2298 } | 2299 } |
2299 | 2300 |
2300 RenderWidgetCompositor* RenderWidget::compositor() const { | 2301 RenderWidgetCompositor* RenderWidget::compositor() const { |
2301 return compositor_.get(); | 2302 return compositor_.get(); |
2302 } | 2303 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2447 : nullptr; | 2448 : nullptr; |
2448 if (render_frame && render_frame->focused_pepper_plugin()) | 2449 if (render_frame && render_frame->focused_pepper_plugin()) |
2449 return render_frame->focused_pepper_plugin(); | 2450 return render_frame->focused_pepper_plugin(); |
2450 current_frame = current_frame->TraverseNext(); | 2451 current_frame = current_frame->TraverseNext(); |
2451 } | 2452 } |
2452 return nullptr; | 2453 return nullptr; |
2453 } | 2454 } |
2454 #endif | 2455 #endif |
2455 | 2456 |
2456 } // namespace content | 2457 } // namespace content |
OLD | NEW |