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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_CLIENT_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_CLIENT_HOST_H_
10 #include "base/basictypes.h"
11 #include "content/common/content_export.h"
22 class DevToolsFrontendHostDelegate
;
24 // Describes interface for managing devtools clients from browser process. There
25 // are currently two types of clients: devtools windows and TCP socket
27 class CONTENT_EXPORT DevToolsClientHost
{
29 virtual ~DevToolsClientHost() {}
31 // Dispatches given message on the front-end.
32 virtual void DispatchOnInspectorFrontend(const std::string
& message
) = 0;
34 // This method is called when the contents inspected by this devtools client
36 virtual void InspectedContentsClosing() = 0;
38 // Called to notify client that it has been kicked out by some other client
39 // with greater priority.
40 virtual void ReplacedWithAnotherClient() = 0;
42 // Creates a DevToolsClientHost for a WebContents containing the default
43 // DevTools frontend implementation.
44 static DevToolsClientHost
* CreateDevToolsFrontendHost(
45 WebContents
* client_web_contents
,
46 DevToolsFrontendHostDelegate
* delegate
);
48 // Sets up DevToolsClient on the corresponding RenderView.
49 static void SetupDevToolsFrontendClient(RenderViewHost
* frontend_rvh
);
52 } // namespace content
54 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_CLIENT_HOST_H_