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

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

Issue 820843002: Flush the pending input ack when the RenderWidget is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 1753
1754 gfx::Vector2d RenderWidget::GetScrollOffset() { 1754 gfx::Vector2d RenderWidget::GetScrollOffset() {
1755 // Bare RenderWidgets don't support scroll offset. 1755 // Bare RenderWidgets don't support scroll offset.
1756 return gfx::Vector2d(); 1756 return gfx::Vector2d();
1757 } 1757 }
1758 1758
1759 void RenderWidget::SetHidden(bool hidden) { 1759 void RenderWidget::SetHidden(bool hidden) {
1760 if (is_hidden_ == hidden) 1760 if (is_hidden_ == hidden)
1761 return; 1761 return;
1762 1762
1763 // The status has changed. Tell the RenderThread about it. 1763 // The status has changed. Tell the RenderThread about it and ensure
1764 // throttled acks are released in case frame production ceases.
1764 is_hidden_ = hidden; 1765 is_hidden_ = hidden;
1766 FlushPendingInputEventAck();
1767
1765 if (is_hidden_) 1768 if (is_hidden_)
1766 RenderThreadImpl::current()->WidgetHidden(); 1769 RenderThreadImpl::current()->WidgetHidden();
1767 else 1770 else
1768 RenderThreadImpl::current()->WidgetRestored(); 1771 RenderThreadImpl::current()->WidgetRestored();
1769 } 1772 }
1770 1773
1771 void RenderWidget::WillToggleFullscreen() { 1774 void RenderWidget::WillToggleFullscreen() {
1772 if (!webwidget_) 1775 if (!webwidget_)
1773 return; 1776 return;
1774 1777
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2369 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2367 video_hole_frames_.AddObserver(frame); 2370 video_hole_frames_.AddObserver(frame);
2368 } 2371 }
2369 2372
2370 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2373 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2371 video_hole_frames_.RemoveObserver(frame); 2374 video_hole_frames_.RemoveObserver(frame);
2372 } 2375 }
2373 #endif // defined(VIDEO_HOLE) 2376 #endif // defined(VIDEO_HOLE)
2374 2377
2375 } // namespace content 2378 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698