Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Side by Side Diff: content/browser/devtools/devtools_frontend_host.h

Issue 427143003: [DevTools] Move DevToolsClientHost functionality out of DevToolsFrontendHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "content/public/browser/devtools_client_host.h"
13 #include "content/public/browser/web_contents_observer.h"
14
15 namespace content {
16
17 class DevToolsFrontendHostDelegate;
18 class WebContentsImpl;
19
20 // This class handles messages from DevToolsClient and calls corresponding
21 // methods on DevToolsFrontendHostDelegate which is implemented by the
22 // embedder. This allows us to avoid exposing DevTools client messages through
23 // the content public API.
24 class DevToolsFrontendHost : public DevToolsClientHost,
25 public WebContentsObserver {
26 public:
27 DevToolsFrontendHost(WebContentsImpl* web_contents,
28 DevToolsFrontendHostDelegate* delegate);
29
30 private:
31 virtual ~DevToolsFrontendHost();
32
33 // DevToolsClientHost implementation.
34 virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE;
35 virtual void InspectedContentsClosing() OVERRIDE;
36 virtual void ReplacedWithAnotherClient() OVERRIDE;
37
38 // WebContentsObserver overrides.
39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
40 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
41
42 void OnDispatchOnInspectorBackend(const std::string& message);
43 void OnDispatchOnEmbedder(const std::string& message);
44
45 DevToolsFrontendHostDelegate* delegate_;
46 DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendHost);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698