From 806d2c7ba4071ba14a19c9b7cae54dd85c995d33 Mon Sep 17 00:00:00 2001 From: "pfeldman@chromium.org" Date: Wed, 19 Dec 2012 10:12:13 +0000 Subject: DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools. Review URL: https://codereview.chromium.org/11630004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173891 0039d316-1c4b-4281-b951-d872f2087c98 --- content/renderer/devtools/devtools_client.h | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 content/renderer/devtools/devtools_client.h (limited to 'content/renderer/devtools/devtools_client.h') diff --git a/content/renderer/devtools/devtools_client.h b/content/renderer/devtools/devtools_client.h new file mode 100644 index 0000000..f5fa8f0 --- /dev/null +++ b/content/renderer/devtools/devtools_client.h @@ -0,0 +1,63 @@ +// Copyright (c) 2012 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. + +#ifndef CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_ +#define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_ + +#include + +#include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" +#include "content/public/renderer/render_view_observer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h" + +namespace WebKit { +class WebDevToolsFrontend; +class WebString; +} + +namespace content { + +class RenderViewImpl; + +// Developer tools UI end of communication channel between the render process of +// the page being inspected and tools UI renderer process. All messages will +// go through browser process. On the side of the inspected page there's +// corresponding DevToolsAgent object. +// TODO(yurys): now the client is almost empty later it will delegate calls to +// code in glue +class DevToolsClient : public RenderViewObserver, + public WebKit::WebDevToolsFrontendClient { + public: + explicit DevToolsClient(RenderViewImpl* render_view); + virtual ~DevToolsClient(); + + private: + // RenderView::Observer implementation. + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + + // WebDevToolsFrontendClient implementation. + virtual void sendMessageToBackend(const WebKit::WebString&) OVERRIDE; + + virtual void activateWindow() OVERRIDE; + virtual void closeWindow() OVERRIDE; + virtual void moveWindowBy(const WebKit::WebFloatPoint& offset) OVERRIDE; + virtual void requestSetDockSide(const WebKit::WebString& side) OVERRIDE; + virtual void openInNewTab(const WebKit::WebString& side) OVERRIDE; + virtual void save(const WebKit::WebString& url, + const WebKit::WebString& content, + bool save_as) OVERRIDE; + virtual void append(const WebKit::WebString& url, + const WebKit::WebString& content) OVERRIDE; + + void OnDispatchOnInspectorFrontend(const std::string& message); + + scoped_ptr web_tools_frontend_; + + DISALLOW_COPY_AND_ASSIGN(DevToolsClient); +}; + +} // namespace content + +#endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CLIENT_H_ -- cgit v1.1