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

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

Issue 1102743002: OverscrollGlow for mainThread-{CHROMIUM CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to latest Created 5 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 } else if (event.type == WebInputEvent::GestureLongPress) { 2209 } else if (event.type == WebInputEvent::GestureLongPress) {
2210 DCHECK(webwidget_); 2210 DCHECK(webwidget_);
2211 if (webwidget_->textInputInfo().value.isEmpty()) 2211 if (webwidget_->textInputInfo().value.isEmpty())
2212 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); 2212 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
2213 else 2213 else
2214 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME); 2214 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
2215 } 2215 }
2216 #endif 2216 #endif
2217 } 2217 }
2218 2218
2219 void RenderWidget::didOverscroll(
2220 const blink::WebFloatSize& unusedDelta,
2221 const blink::WebFloatSize& accumulatedRootOverScroll,
2222 const blink::WebFloatPoint& position,
2223 const blink::WebFloatSize& velocity) {
2224 DidOverscrollParams params;
2225 // TODO(jdduke): Consider bundling the overscroll with the input event ack to
2226 // save an IPC.
2227 params.accumulated_overscroll = gfx::Vector2dF(
2228 accumulatedRootOverScroll.width, accumulatedRootOverScroll.height);
2229 params.latest_overscroll_delta =
2230 gfx::Vector2dF(unusedDelta.width, unusedDelta.height);
2231 params.current_fling_velocity =
2232 gfx::Vector2dF(velocity.width, velocity.height);
2233 params.causal_event_viewport_point = gfx::PointF(position.x, position.y);
2234 Send(new InputHostMsg_DidOverscroll(routing_id_, params));
2235 }
2236
2219 void RenderWidget::StartCompositor() { 2237 void RenderWidget::StartCompositor() {
2220 // For widgets that are never visible, we don't need the compositor to run 2238 // For widgets that are never visible, we don't need the compositor to run
2221 // at all. 2239 // at all.
2222 if (never_visible_) 2240 if (never_visible_)
2223 return; 2241 return;
2224 // In tests without a RenderThreadImpl, don't set ready as this kicks 2242 // In tests without a RenderThreadImpl, don't set ready as this kicks
2225 // off creating output surfaces that the test can't create. 2243 // off creating output surfaces that the test can't create.
2226 if (!RenderThreadImpl::current()) 2244 if (!RenderThreadImpl::current())
2227 return; 2245 return;
2228 compositor_->StartCompositor(); 2246 compositor_->StartCompositor();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2454 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2437 video_hole_frames_.AddObserver(frame); 2455 video_hole_frames_.AddObserver(frame);
2438 } 2456 }
2439 2457
2440 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2458 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2441 video_hole_frames_.RemoveObserver(frame); 2459 video_hole_frames_.RemoveObserver(frame);
2442 } 2460 }
2443 #endif // defined(VIDEO_HOLE) 2461 #endif // defined(VIDEO_HOLE)
2444 2462
2445 } // namespace content 2463 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698