diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 11:44:19 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 11:44:19 +0000 |
commit | 70019150e9f7f53074cacb335de0d238bbc37380 (patch) | |
tree | 444eddb81717f95b38585bfedde240d9643ba6a2 /content/browser/devtools/devtools_frontend_host.h | |
parent | 08b035b9918342155f54549486d6108807c3bfad (diff) | |
download | chromium_src-70019150e9f7f53074cacb335de0d238bbc37380.zip chromium_src-70019150e9f7f53074cacb335de0d238bbc37380.tar.gz chromium_src-70019150e9f7f53074cacb335de0d238bbc37380.tar.bz2 |
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@173903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/devtools/devtools_frontend_host.h')
-rw-r--r-- | content/browser/devtools/devtools_frontend_host.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/content/browser/devtools/devtools_frontend_host.h b/content/browser/devtools/devtools_frontend_host.h new file mode 100644 index 0000000..6168692 --- /dev/null +++ b/content/browser/devtools/devtools_frontend_host.h @@ -0,0 +1,59 @@ +// 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_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_ +#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_ + +#include <string> + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "content/public/browser/devtools_client_host.h" +#include "content/public/browser/render_view_host_observer.h" + +namespace content { + +class DevToolsFrontendHostDelegate; +class WebContentsImpl; + +// This class handles messages from DevToolsClient and calls corresponding +// methods on DevToolsFrontendHostDelegate which is implemented by the +// embedder. This allows us to avoid exposing DevTools client messages through +// the content public API. +class DevToolsFrontendHost : public DevToolsClientHost, + public RenderViewHostObserver { + public: + DevToolsFrontendHost(WebContentsImpl* web_contents, + DevToolsFrontendHostDelegate* delegate); + + private: + virtual ~DevToolsFrontendHost(); + + // DevToolsClientHost implementation. + virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE; + virtual void InspectedContentsClosing() OVERRIDE; + virtual void FrameNavigating(const std::string& url) OVERRIDE; + virtual void ContentsReplaced(WebContents* new_contents) OVERRIDE; + virtual void ReplacedWithAnotherClient() OVERRIDE; + + // RenderViewHostObserver overrides. + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + + void OnDispatchOnInspectorBackend(const std::string& message); + void OnActivateWindow(); + void OnCloseWindow(); + void OnMoveWindow(int x, int y); + void OnRequestSetDockSide(const std::string& side); + void OnOpenInNewTab(const std::string& url); + void OnSave(const std::string& url, const std::string& content, bool save_as); + void OnAppend(const std::string& url, const std::string& content); + + WebContentsImpl* web_contents_; + DevToolsFrontendHostDelegate* delegate_; + DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendHost); +}; + +} // namespace content + +#endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_ |