blob: bda18aa8cec0ec390ab9c066c51f758e646fd42e [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "content/common/content_export.h"
namespace content {
class DevToolsAgentHost;
class RenderFrameHost;
// DevToolsAgentHostClient can attach to a DevToolsAgentHost and start
// debugging it.
class CONTENT_EXPORT DevToolsAgentHostClient {
virtual ~DevToolsAgentHostClient() {}
// Dispatches given protocol message on the client.
virtual void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
const std::string& message) = 0;
// This method is called when attached agent host is closed.
virtual void AgentHostClosed(DevToolsAgentHost* agent_host) = 0;
// Returns true if the client is allowed to attach to the given renderer.
// Note: this method may be called before navigation commits.
virtual bool MayAttachToRenderer(content::RenderFrameHost* render_frame_host,
bool is_webui);
// Returns true if the client is allowed to attach to the browser agent host.
// Browser client is allowed to discover other DevTools targets and generally
// manipulate browser altogether.
virtual bool MayAttachToBrowser();
// Returns true if the client is allowed to affect local files over the
// protocol. Example would be manipulating a deault downloads path.
virtual bool MayAffectLocalFiles();
} // namespace content