| 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 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 Send(new ViewHostMsg_FocusedNodeTouched( | 2289 Send(new ViewHostMsg_FocusedNodeTouched( |
| 2290 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2290 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
| 2291 #endif | 2291 #endif |
| 2292 #endif | 2292 #endif |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 void RenderWidget::DidOverscroll( | 2295 void RenderWidget::DidOverscroll( |
| 2296 const blink::WebFloatSize& overscrollDelta, | 2296 const blink::WebFloatSize& overscrollDelta, |
| 2297 const blink::WebFloatSize& accumulatedOverscroll, | 2297 const blink::WebFloatSize& accumulatedOverscroll, |
| 2298 const blink::WebFloatPoint& position, | 2298 const blink::WebFloatPoint& position, |
| 2299 const blink::WebFloatSize& velocity) { | 2299 const blink::WebFloatSize& velocity, |
| 2300 const blink::WebScrollBoundaryBehavior& behavior) { |
| 2300 #if defined(OS_MACOSX) | 2301 #if defined(OS_MACOSX) |
| 2301 // On OSX the user can disable the elastic overscroll effect. If that's the | 2302 // On OSX the user can disable the elastic overscroll effect. If that's the |
| 2302 // case, don't forward the overscroll notification. | 2303 // case, don't forward the overscroll notification. |
| 2303 DCHECK(compositor_deps()); | 2304 DCHECK(compositor_deps()); |
| 2304 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2305 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
| 2305 return; | 2306 return; |
| 2306 #endif | 2307 #endif |
| 2307 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2308 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
| 2308 position, velocity); | 2309 position, velocity, behavior); |
| 2309 } | 2310 } |
| 2310 | 2311 |
| 2311 void RenderWidget::StartCompositor() { | 2312 void RenderWidget::StartCompositor() { |
| 2312 if (!is_hidden()) | 2313 if (!is_hidden()) |
| 2313 compositor_->SetVisible(true); | 2314 compositor_->SetVisible(true); |
| 2314 } | 2315 } |
| 2315 | 2316 |
| 2316 RenderWidgetCompositor* RenderWidget::compositor() const { | 2317 RenderWidgetCompositor* RenderWidget::compositor() const { |
| 2317 return compositor_.get(); | 2318 return compositor_.get(); |
| 2318 } | 2319 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2432 } | 2433 } |
| 2433 | 2434 |
| 2434 void RenderWidget::SetWidgetBinding(mojom::WidgetRequest request) { | 2435 void RenderWidget::SetWidgetBinding(mojom::WidgetRequest request) { |
| 2435 // Close the old binding if there was one. | 2436 // Close the old binding if there was one. |
| 2436 // A RenderWidgetHost should not need more than one channel. | 2437 // A RenderWidgetHost should not need more than one channel. |
| 2437 widget_binding_.Close(); | 2438 widget_binding_.Close(); |
| 2438 widget_binding_.Bind(std::move(request)); | 2439 widget_binding_.Bind(std::move(request)); |
| 2439 } | 2440 } |
| 2440 | 2441 |
| 2441 } // namespace content | 2442 } // namespace content |
| OLD | NEW |