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

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 input_messages with the order in the enum. Created 3 years, 4 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 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 Send(new ViewHostMsg_FocusedNodeTouched( 2268 Send(new ViewHostMsg_FocusedNodeTouched(
2269 routing_id_, text_input_type != blink::kWebTextInputTypeNone)); 2269 routing_id_, text_input_type != blink::kWebTextInputTypeNone));
2270 #endif 2270 #endif
2271 #endif 2271 #endif
2272 } 2272 }
2273 2273
2274 void RenderWidget::DidOverscroll( 2274 void RenderWidget::DidOverscroll(
2275 const blink::WebFloatSize& overscrollDelta, 2275 const blink::WebFloatSize& overscrollDelta,
2276 const blink::WebFloatSize& accumulatedOverscroll, 2276 const blink::WebFloatSize& accumulatedOverscroll,
2277 const blink::WebFloatPoint& position, 2277 const blink::WebFloatPoint& position,
2278 const blink::WebFloatSize& velocity) { 2278 const blink::WebFloatSize& velocity,
2279 const blink::WebScrollBoundaryBehavior& behavior) {
2279 #if defined(OS_MACOSX) 2280 #if defined(OS_MACOSX)
2280 // On OSX the user can disable the elastic overscroll effect. If that's the 2281 // On OSX the user can disable the elastic overscroll effect. If that's the
2281 // case, don't forward the overscroll notification. 2282 // case, don't forward the overscroll notification.
2282 DCHECK(compositor_deps()); 2283 DCHECK(compositor_deps());
2283 if (!compositor_deps()->IsElasticOverscrollEnabled()) 2284 if (!compositor_deps()->IsElasticOverscrollEnabled())
2284 return; 2285 return;
2285 #endif 2286 #endif
2286 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll, 2287 input_handler_->DidOverscrollFromBlink(overscrollDelta, accumulatedOverscroll,
2287 position, velocity); 2288 position, velocity, behavior);
2288 } 2289 }
2289 2290
2290 void RenderWidget::StartCompositor() { 2291 void RenderWidget::StartCompositor() {
2291 if (!is_hidden()) 2292 if (!is_hidden())
2292 compositor_->SetVisible(true); 2293 compositor_->SetVisible(true);
2293 } 2294 }
2294 2295
2295 RenderWidgetCompositor* RenderWidget::compositor() const { 2296 RenderWidgetCompositor* RenderWidget::compositor() const {
2296 return compositor_.get(); 2297 return compositor_.get();
2297 } 2298 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 // browser side (https://crbug.com/669219). 2405 // browser side (https://crbug.com/669219).
2405 // If there is no WebFrameWidget, then there will be no 2406 // If there is no WebFrameWidget, then there will be no
2406 // InputMethodControllers for a WebLocalFrame. 2407 // InputMethodControllers for a WebLocalFrame.
2407 return nullptr; 2408 return nullptr;
2408 } 2409 }
2409 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2410 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2410 ->GetActiveWebInputMethodController(); 2411 ->GetActiveWebInputMethodController();
2411 } 2412 }
2412 2413
2413 } // namespace content 2414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698