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

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 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/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 861 }
862 return false; 862 return false;
863 } 863 }
864 864
865 void RenderFrameDevToolsAgentHost::OnSwapCompositorFrame( 865 void RenderFrameDevToolsAgentHost::OnSwapCompositorFrame(
866 const IPC::Message& message) { 866 const IPC::Message& message) {
867 ViewHostMsg_SwapCompositorFrame::Param param; 867 ViewHostMsg_SwapCompositorFrame::Param param;
868 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 868 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
869 return; 869 return;
870 if (page_handler_) 870 if (page_handler_)
871 page_handler_->OnSwapCompositorFrame(std::get<1>(param).metadata); 871 page_handler_->OnSwapCompositorFrame(
872 std::move(std::get<1>(param).metadata));
872 if (input_handler_) 873 if (input_handler_)
873 input_handler_->OnSwapCompositorFrame(std::get<1>(param).metadata); 874 input_handler_->OnSwapCompositorFrame(std::get<1>(param).metadata);
874 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { 875 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) {
875 frame_trace_recorder_->OnSwapCompositorFrame( 876 frame_trace_recorder_->OnSwapCompositorFrame(
876 current_ ? current_->host() : nullptr, std::get<1>(param).metadata); 877 current_ ? current_->host() : nullptr, std::get<1>(param).metadata);
877 } 878 }
878 } 879 }
879 880
880 void RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame( 881 void RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame(
881 const cc::CompositorFrameMetadata& frame_metadata) { 882 cc::CompositorFrameMetadata frame_metadata) {
882 if (page_handler_) 883 if (page_handler_)
883 page_handler_->OnSynchronousSwapCompositorFrame(frame_metadata); 884 page_handler_->OnSynchronousSwapCompositorFrame(std::move(frame_metadata));
884 if (input_handler_) 885 if (input_handler_)
885 input_handler_->OnSwapCompositorFrame(frame_metadata); 886 input_handler_->OnSwapCompositorFrame(frame_metadata);
886 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { 887 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) {
887 frame_trace_recorder_->OnSynchronousSwapCompositorFrame( 888 frame_trace_recorder_->OnSynchronousSwapCompositorFrame(
888 current_ ? current_->host() : nullptr, 889 current_ ? current_->host() : nullptr,
889 frame_metadata); 890 frame_metadata);
890 } 891 }
891 } 892 }
892 893
893 void RenderFrameDevToolsAgentHost::OnDispatchOnInspectorFrontend( 894 void RenderFrameDevToolsAgentHost::OnDispatchOnInspectorFrontend(
(...skipping 27 matching lines...) Expand all
921 RenderFrameHost* host) { 922 RenderFrameHost* host) {
922 return (current_ && current_->host() == host) || 923 return (current_ && current_->host() == host) ||
923 (pending_ && pending_->host() == host); 924 (pending_ && pending_->host() == host);
924 } 925 }
925 926
926 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 927 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
927 return current_ && current_->host()->GetParent(); 928 return current_ && current_->host()->GetParent();
928 } 929 }
929 930
930 } // namespace content 931 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698