1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/devtools/protocol/inspector_handler.h"
7 #include "content/browser/frame_host/render_frame_host_impl.h"
13 using Response
= DevToolsProtocolClient::Response
;
15 InspectorHandler::InspectorHandler()
19 InspectorHandler::~InspectorHandler() {
22 void InspectorHandler::SetClient(scoped_ptr
<Client
> client
) {
26 void InspectorHandler::SetRenderFrameHost(RenderFrameHostImpl
* host
) {
30 void InspectorHandler::TargetCrashed() {
31 client_
->TargetCrashed(TargetCrashedParams::Create());
34 Response
InspectorHandler::Enable() {
35 if (host_
&& !host_
->IsRenderFrameLive())
36 client_
->TargetCrashed(TargetCrashedParams::Create());
37 return Response::FallThrough();
41 } // namespace inspector
42 } // namespace devtools
43 } // namespace content