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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2856423002: input: Change how synthesized events are dispatched in telemetry tests. (Closed)
Patch Set: . Created 3 years, 7 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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 651 }
652 652
653 void RenderWidgetHostViewAura::OnSetNeedsFlushInput() { 653 void RenderWidgetHostViewAura::OnSetNeedsFlushInput() {
654 needs_flush_input_ = true; 654 needs_flush_input_ = true;
655 UpdateNeedsBeginFramesInternal(); 655 UpdateNeedsBeginFramesInternal();
656 } 656 }
657 657
658 void RenderWidgetHostViewAura::OnBeginFrame( 658 void RenderWidgetHostViewAura::OnBeginFrame(
659 const cc::BeginFrameArgs& args) { 659 const cc::BeginFrameArgs& args) {
660 needs_flush_input_ = false; 660 needs_flush_input_ = false;
661 host_->FlushInput(); 661 host_->OnBeginFrame();
662 UpdateNeedsBeginFramesInternal(); 662 UpdateNeedsBeginFramesInternal();
663 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); 663 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args));
664 } 664 }
665 665
666 RenderFrameHostImpl* RenderWidgetHostViewAura::GetFocusedFrame() { 666 RenderFrameHostImpl* RenderWidgetHostViewAura::GetFocusedFrame() {
667 RenderViewHost* rvh = RenderViewHost::From(host_); 667 RenderViewHost* rvh = RenderViewHost::From(host_);
668 if (!rvh) 668 if (!rvh)
669 return nullptr; 669 return nullptr;
670 FrameTreeNode* focused_frame = 670 FrameTreeNode* focused_frame =
671 rvh->GetDelegate()->GetFrameTree()->GetFocusedFrame(); 671 rvh->GetDelegate()->GetFrameTree()->GetFocusedFrame();
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 } 2406 }
2407 2407
2408 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { 2408 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() {
2409 if (!delegated_frame_host_) 2409 if (!delegated_frame_host_)
2410 return; 2410 return;
2411 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || 2411 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ ||
2412 needs_flush_input_); 2412 needs_flush_input_);
2413 } 2413 }
2414 2414
2415 } // namespace content 2415 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698