| OLD | NEW |
| 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 Loading... |
| 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, ¶m)) | 868 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
| 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(std::get<1>(param)->metadata); |
| 872 if (input_handler_) | 872 if (input_handler_) |
| 873 input_handler_->OnSwapCompositorFrame(std::get<1>(param).metadata); | 873 input_handler_->OnSwapCompositorFrame(std::get<1>(param)->metadata); |
| 874 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { | 874 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { |
| 875 frame_trace_recorder_->OnSwapCompositorFrame( | 875 frame_trace_recorder_->OnSwapCompositorFrame( |
| 876 current_ ? current_->host() : nullptr, std::get<1>(param).metadata); | 876 current_ ? current_->host() : nullptr, std::get<1>(param)->metadata); |
| 877 } | 877 } |
| 878 } | 878 } |
| 879 | 879 |
| 880 void RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame( | 880 void RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame( |
| 881 const cc::CompositorFrameMetadata& frame_metadata) { | 881 const cc::CompositorFrameMetadata& frame_metadata) { |
| 882 if (page_handler_) | 882 if (page_handler_) |
| 883 page_handler_->OnSynchronousSwapCompositorFrame(frame_metadata); | 883 page_handler_->OnSynchronousSwapCompositorFrame(frame_metadata); |
| 884 if (input_handler_) | 884 if (input_handler_) |
| 885 input_handler_->OnSwapCompositorFrame(frame_metadata); | 885 input_handler_->OnSwapCompositorFrame(frame_metadata); |
| 886 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { | 886 if (frame_trace_recorder_ && tracing_handler_->did_initiate_recording()) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 RenderFrameHost* host) { | 921 RenderFrameHost* host) { |
| 922 return (current_ && current_->host() == host) || | 922 return (current_ && current_->host() == host) || |
| 923 (pending_ && pending_->host() == host); | 923 (pending_ && pending_->host() == host); |
| 924 } | 924 } |
| 925 | 925 |
| 926 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 926 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 927 return current_ && current_->host()->GetParent(); | 927 return current_ && current_->host()->GetParent(); |
| 928 } | 928 } |
| 929 | 929 |
| 930 } // namespace content | 930 } // namespace content |
| OLD | NEW |