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_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_
6 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/renderer/render_view_observer.h"
13 #include "third_party/WebKit/public/web/WebDevToolsFrontendClient.h"
16 class WebDevToolsFrontend
;
24 // Developer tools UI end of communication channel between the render process of
25 // the page being inspected and tools UI renderer process. All messages will
26 // go through browser process. On the side of the inspected page there's
27 // corresponding DevToolsAgent object.
28 // TODO(yurys): now the client is almost empty later it will delegate calls to
30 class CONTENT_EXPORT DevToolsClient
31 : public RenderViewObserver
,
32 NON_EXPORTED_BASE(public blink::WebDevToolsFrontendClient
) {
34 explicit DevToolsClient(RenderViewImpl
* render_view
);
35 virtual ~DevToolsClient();
38 // WebDevToolsFrontendClient implementation.
39 virtual void sendMessageToBackend(const blink::WebString
&) OVERRIDE
;
40 virtual void sendMessageToEmbedder(const blink::WebString
&) OVERRIDE
;
42 virtual bool isUnderTest() OVERRIDE
;
44 void OnDispatchOnInspectorFrontend(const std::string
& message
);
46 scoped_ptr
<blink::WebDevToolsFrontend
> web_tools_frontend_
;
48 DISALLOW_COPY_AND_ASSIGN(DevToolsClient
);
51 } // namespace content
53 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_