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 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2295 Send(new ViewHostMsg_FocusedNodeTouched( | 2295 Send(new ViewHostMsg_FocusedNodeTouched( |
2296 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2296 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
2297 #endif | 2297 #endif |
2298 #endif | 2298 #endif |
2299 } | 2299 } |
2300 | 2300 |
2301 void RenderWidget::DidOverscroll( | 2301 void RenderWidget::DidOverscroll( |
2302 const blink::WebFloatSize& overscrollDelta, | 2302 const blink::WebFloatSize& overscrollDelta, |
2303 const blink::WebFloatSize& accumulatedOverscroll, | 2303 const blink::WebFloatSize& accumulatedOverscroll, |
2304 const blink::WebFloatPoint& position, | 2304 const blink::WebFloatPoint& position, |
2305 const blink::WebFloatSize& velocity) { | 2305 const blink::WebFloatSize& velocity, |
| 2306 const blink::WebScrollBoundaryBehavior& behavior) { |
2306 #if defined(OS_MACOSX) | 2307 #if defined(OS_MACOSX) |
2307 // On OSX the user can disable the elastic overscroll effect. If that's the | 2308 // On OSX the user can disable the elastic overscroll effect. If that's the |
2308 // case, don't forward the overscroll notification. | 2309 // case, don't forward the overscroll notification. |
2309 DCHECK(compositor_deps()); | 2310 DCHECK(compositor_deps()); |
2310 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2311 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
2311 return; | 2312 return; |
2312 #endif | 2313 #endif |
2313 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2314 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
2314 position, velocity); | 2315 position, velocity, behavior); |
2315 } | 2316 } |
2316 | 2317 |
2317 void RenderWidget::StartCompositor() { | 2318 void RenderWidget::StartCompositor() { |
2318 if (!is_hidden()) | 2319 if (!is_hidden()) |
2319 compositor_->SetVisible(true); | 2320 compositor_->SetVisible(true); |
2320 } | 2321 } |
2321 | 2322 |
2322 RenderWidgetCompositor* RenderWidget::compositor() const { | 2323 RenderWidgetCompositor* RenderWidget::compositor() const { |
2323 return compositor_.get(); | 2324 return compositor_.get(); |
2324 } | 2325 } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2471 : nullptr; | 2472 : nullptr; |
2472 if (render_frame && render_frame->focused_pepper_plugin()) | 2473 if (render_frame && render_frame->focused_pepper_plugin()) |
2473 return render_frame->focused_pepper_plugin(); | 2474 return render_frame->focused_pepper_plugin(); |
2474 current_frame = current_frame->TraverseNext(); | 2475 current_frame = current_frame->TraverseNext(); |
2475 } | 2476 } |
2476 return nullptr; | 2477 return nullptr; |
2477 } | 2478 } |
2478 #endif | 2479 #endif |
2479 | 2480 |
2480 } // namespace content | 2481 } // namespace content |
OLD | NEW |