Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: content/renderer/render_widget.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: format Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 Send(new ViewHostMsg_FocusedNodeTouched( 2249 Send(new ViewHostMsg_FocusedNodeTouched(
2250 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); 2250 routing_id_, text_input_type != blink::kWebTextInputTypeNone));
2251 #endif 2251 #endif
2252 #endif 2252 #endif
2253 } 2253 }
2254 2254
2255 void RenderWidget::DidOverscroll( 2255 void RenderWidget::DidOverscroll(
2256 const blink::WebFloatSize& overscrollDelta, 2256 const blink::WebFloatSize& overscrollDelta,
2257 const blink::WebFloatSize& accumulatedOverscroll, 2257 const blink::WebFloatSize& accumulatedOverscroll,
2258 const blink::WebFloatPoint& position, 2258 const blink::WebFloatPoint& position,
2259 const blink::WebFloatSize& velocity) { 2259 const blink::WebFloatSize& velocity,
2260 const blink::WebScrollBoundaryBehavior& behavior) {
2260 #if defined(OS_MACOSX) 2261 #if defined(OS_MACOSX)
2261 // On OSX the user can disable the elastic overscroll effect. If that's the 2262 // On OSX the user can disable the elastic overscroll effect. If that's the
2262 // case, don't forward the overscroll notification. 2263 // case, don't forward the overscroll notification.
2263 DCHECK(compositor_deps()); 2264 DCHECK(compositor_deps());
2264 if (!compositor_deps()->IsElasticOverscrollEnabled()) 2265 if (!compositor_deps()->IsElasticOverscrollEnabled())
2265 return; 2266 return;
2266 #endif 2267 #endif
2267 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, 2268 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll,
2268 position, velocity); 2269 position, velocity, behavior);
2269 } 2270 }
2270 2271
2271 void RenderWidget::StartCompositor() { 2272 void RenderWidget::StartCompositor() {
2272 if (!is_hidden()) 2273 if (!is_hidden())
2273 compositor_->SetVisible(true); 2274 compositor_->SetVisible(true);
2274 } 2275 }
2275 2276
2276 RenderWidgetCompositor* RenderWidget::compositor() const { 2277 RenderWidgetCompositor* RenderWidget::compositor() const {
2277 return compositor_.get(); 2278 return compositor_.get();
2278 } 2279 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 // browser side (https://crbug.com/669219). 2386 // browser side (https://crbug.com/669219).
2386 // If there is no WebFrameWidget, then there will be no 2387 // If there is no WebFrameWidget, then there will be no
2387 // InputMethodControllers for a WebLocalFrame. 2388 // InputMethodControllers for a WebLocalFrame.
2388 return nullptr; 2389 return nullptr;
2389 } 2390 }
2390 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2391 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2391 ->GetActiveWebInputMethodController(); 2392 ->GetActiveWebInputMethodController();
2392 } 2393 }
2393 2394
2394 } // namespace content 2395 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698