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

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

Issue 2890063002: Send BeginFrames for the renderer using Mojo (Closed)
Patch Set: c 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/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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 void RenderWidgetHostViewAura::SetNeedsBeginFrames(bool needs_begin_frames) { 648 void RenderWidgetHostViewAura::SetNeedsBeginFrames(bool needs_begin_frames) {
649 needs_begin_frames_ = needs_begin_frames; 649 needs_begin_frames_ = needs_begin_frames;
650 UpdateNeedsBeginFramesInternal(); 650 UpdateNeedsBeginFramesInternal();
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) {
660 needs_flush_input_ = false; 659 needs_flush_input_ = false;
661 host_->OnBeginFrame(); 660 host_->OnBeginFrame();
662 UpdateNeedsBeginFramesInternal(); 661 UpdateNeedsBeginFramesInternal();
663 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args));
664 } 662 }
665 663
666 RenderFrameHostImpl* RenderWidgetHostViewAura::GetFocusedFrame() { 664 RenderFrameHostImpl* RenderWidgetHostViewAura::GetFocusedFrame() {
667 RenderViewHost* rvh = RenderViewHost::From(host_); 665 RenderViewHost* rvh = RenderViewHost::From(host_);
668 if (!rvh) 666 if (!rvh)
669 return nullptr; 667 return nullptr;
670 FrameTreeNode* focused_frame = 668 FrameTreeNode* focused_frame =
671 rvh->GetDelegate()->GetFrameTree()->GetFocusedFrame(); 669 rvh->GetDelegate()->GetFrameTree()->GetFocusedFrame();
672 if (!focused_frame) 670 if (!focused_frame)
673 return nullptr; 671 return nullptr;
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 } 2405 }
2408 2406
2409 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { 2407 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() {
2410 if (!delegated_frame_host_) 2408 if (!delegated_frame_host_)
2411 return; 2409 return;
2412 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || 2410 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ ||
2413 needs_flush_input_); 2411 needs_flush_input_);
2414 } 2412 }
2415 2413
2416 } // namespace content 2414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698