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 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2209 Send(new ViewHostMsg_FocusedNodeTouched( | 2209 Send(new ViewHostMsg_FocusedNodeTouched( |
2210 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); | 2210 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); |
2211 #endif | 2211 #endif |
2212 #endif | 2212 #endif |
2213 } | 2213 } |
2214 | 2214 |
2215 void RenderWidget::DidOverscroll( | 2215 void RenderWidget::DidOverscroll( |
2216 const blink::WebFloatSize& overscrollDelta, | 2216 const blink::WebFloatSize& overscrollDelta, |
2217 const blink::WebFloatSize& accumulatedOverscroll, | 2217 const blink::WebFloatSize& accumulatedOverscroll, |
2218 const blink::WebFloatPoint& position, | 2218 const blink::WebFloatPoint& position, |
2219 const blink::WebFloatSize& velocity) { | 2219 const blink::WebFloatSize& velocity, |
| 2220 const blink::WebScrollBoundaryBehavior& behavior) { |
2220 #if defined(OS_MACOSX) | 2221 #if defined(OS_MACOSX) |
2221 // On OSX the user can disable the elastic overscroll effect. If that's the | 2222 // On OSX the user can disable the elastic overscroll effect. If that's the |
2222 // case, don't forward the overscroll notification. | 2223 // case, don't forward the overscroll notification. |
2223 DCHECK(compositor_deps()); | 2224 DCHECK(compositor_deps()); |
2224 if (!compositor_deps()->IsElasticOverscrollEnabled()) | 2225 if (!compositor_deps()->IsElasticOverscrollEnabled()) |
2225 return; | 2226 return; |
2226 #endif | 2227 #endif |
2227 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, | 2228 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, |
2228 position, velocity); | 2229 position, velocity, behavior); |
2229 } | 2230 } |
2230 | 2231 |
2231 void RenderWidget::StartCompositor() { | 2232 void RenderWidget::StartCompositor() { |
2232 if (!is_hidden()) | 2233 if (!is_hidden()) |
2233 compositor_->SetVisible(true); | 2234 compositor_->SetVisible(true); |
2234 } | 2235 } |
2235 | 2236 |
2236 RenderWidgetCompositor* RenderWidget::compositor() const { | 2237 RenderWidgetCompositor* RenderWidget::compositor() const { |
2237 return compositor_.get(); | 2238 return compositor_.get(); |
2238 } | 2239 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2340 // browser side (https://crbug.com/669219). | 2341 // browser side (https://crbug.com/669219). |
2341 // If there is no WebFrameWidget, then there will be no | 2342 // If there is no WebFrameWidget, then there will be no |
2342 // InputMethodControllers for a WebLocalFrame. | 2343 // InputMethodControllers for a WebLocalFrame. |
2343 return nullptr; | 2344 return nullptr; |
2344 } | 2345 } |
2345 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2346 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2346 ->GetActiveWebInputMethodController(); | 2347 ->GetActiveWebInputMethodController(); |
2347 } | 2348 } |
2348 | 2349 |
2349 } // namespace content | 2350 } // namespace content |
OLD | NEW |