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

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: Update the test Created 3 years, 6 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 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 Send(new ViewHostMsg_FocusedNodeTouched( 2227 Send(new ViewHostMsg_FocusedNodeTouched(
2228 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); 2228 routing_id_, text_input_type != blink::kWebTextInputTypeNone));
2229 #endif 2229 #endif
2230 #endif 2230 #endif
2231 } 2231 }
2232 2232
2233 void RenderWidget::DidOverscroll( 2233 void RenderWidget::DidOverscroll(
2234 const blink::WebFloatSize& overscrollDelta, 2234 const blink::WebFloatSize& overscrollDelta,
2235 const blink::WebFloatSize& accumulatedOverscroll, 2235 const blink::WebFloatSize& accumulatedOverscroll,
2236 const blink::WebFloatPoint& position, 2236 const blink::WebFloatPoint& position,
2237 const blink::WebFloatSize& velocity) { 2237 const blink::WebFloatSize& velocity,
2238 const blink::WebScrollBoundaryBehavior& behavior) {
2238 #if defined(OS_MACOSX) 2239 #if defined(OS_MACOSX)
2239 // On OSX the user can disable the elastic overscroll effect. If that's the 2240 // On OSX the user can disable the elastic overscroll effect. If that's the
2240 // case, don't forward the overscroll notification. 2241 // case, don't forward the overscroll notification.
2241 DCHECK(compositor_deps()); 2242 DCHECK(compositor_deps());
2242 if (!compositor_deps()->IsElasticOverscrollEnabled()) 2243 if (!compositor_deps()->IsElasticOverscrollEnabled())
2243 return; 2244 return;
2244 #endif 2245 #endif
2245 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, 2246 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll,
2246 position, velocity); 2247 position, velocity, behavior);
2247 } 2248 }
2248 2249
2249 void RenderWidget::StartCompositor() { 2250 void RenderWidget::StartCompositor() {
2250 if (!is_hidden()) 2251 if (!is_hidden())
2251 compositor_->SetVisible(true); 2252 compositor_->SetVisible(true);
2252 } 2253 }
2253 2254
2254 RenderWidgetCompositor* RenderWidget::compositor() const { 2255 RenderWidgetCompositor* RenderWidget::compositor() const {
2255 return compositor_.get(); 2256 return compositor_.get();
2256 } 2257 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 // browser side (https://crbug.com/669219). 2364 // browser side (https://crbug.com/669219).
2364 // If there is no WebFrameWidget, then there will be no 2365 // If there is no WebFrameWidget, then there will be no
2365 // InputMethodControllers for a WebLocalFrame. 2366 // InputMethodControllers for a WebLocalFrame.
2366 return nullptr; 2367 return nullptr;
2367 } 2368 }
2368 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2369 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2369 ->GetActiveWebInputMethodController(); 2370 ->GetActiveWebInputMethodController();
2370 } 2371 }
2371 2372
2372 } // namespace content 2373 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698