Add long running gmail memory benchmark for background tab.
[chromium-blink-merge.git] / content / browser / devtools / protocol / inspector_handler.cc
blob01b58ad2ab2a3c09019bf44148dd63a56a9c1aaa
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"
9 namespace content {
10 namespace devtools {
11 namespace inspector {
13 using Response = DevToolsProtocolClient::Response;
15 InspectorHandler::InspectorHandler()
16 : host_(nullptr) {
19 InspectorHandler::~InspectorHandler() {
22 void InspectorHandler::SetClient(scoped_ptr<Client> client) {
23 client_.swap(client);
26 void InspectorHandler::SetRenderFrameHost(RenderFrameHostImpl* host) {
27 host_ = 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