| 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_view_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_view_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 void RenderViewDevToolsAgentHost::RenderViewCrashed() { | 474 void RenderViewDevToolsAgentHost::RenderViewCrashed() { |
| 475 inspector_handler_->TargetCrashed(); | 475 inspector_handler_->TargetCrashed(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void RenderViewDevToolsAgentHost::OnSwapCompositorFrame( | 478 void RenderViewDevToolsAgentHost::OnSwapCompositorFrame( |
| 479 const IPC::Message& message) { | 479 const IPC::Message& message) { |
| 480 ViewHostMsg_SwapCompositorFrame::Param param; | 480 ViewHostMsg_SwapCompositorFrame::Param param; |
| 481 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 481 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
| 482 return; | 482 return; |
| 483 page_handler_->OnSwapCompositorFrame(param.b.metadata); | 483 page_handler_->OnSwapCompositorFrame(get<1>(param).metadata); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void RenderViewDevToolsAgentHost::SynchronousSwapCompositorFrame( | 486 void RenderViewDevToolsAgentHost::SynchronousSwapCompositorFrame( |
| 487 const cc::CompositorFrameMetadata& frame_metadata) { | 487 const cc::CompositorFrameMetadata& frame_metadata) { |
| 488 if (!render_view_host_) | 488 if (!render_view_host_) |
| 489 return; | 489 return; |
| 490 page_handler_->OnSwapCompositorFrame(frame_metadata); | 490 page_handler_->OnSwapCompositorFrame(frame_metadata); |
| 491 } | 491 } |
| 492 | 492 |
| 493 void RenderViewDevToolsAgentHost::OnSaveAgentRuntimeState( | 493 void RenderViewDevToolsAgentHost::OnSaveAgentRuntimeState( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 506 } | 506 } |
| 507 | 507 |
| 508 void RenderViewDevToolsAgentHost::DispatchOnInspectorFrontend( | 508 void RenderViewDevToolsAgentHost::DispatchOnInspectorFrontend( |
| 509 const std::string& message) { | 509 const std::string& message) { |
| 510 if (!IsAttached() || !render_view_host_) | 510 if (!IsAttached() || !render_view_host_) |
| 511 return; | 511 return; |
| 512 SendMessageToClient(message); | 512 SendMessageToClient(message); |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace content | 515 } // namespace content |
| OLD | NEW |