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

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

Issue 8549022: Define DevTools content API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years 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) 2011 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_DEBUGGER_DEVTOOLS_FRONTEND_HOST_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_FRONTEND_HOST_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "content/public/browser/devtools_client_host.h"
13 #include "content/public/browser/render_view_host_observer.h"
14
15 class TabContents;
16
17 namespace content {
18
19 class DevToolsFrontendHostDelegate;
20
21 // This class handles messages from DevToolsClient and calls corresponding
22 // methods on DevToolsFrontendHostDelegate which is implemented by the
23 // embedder. This allows us to avoid exposing DevTools client messages through
24 // the content public API.
25 class DevToolsFrontendHost : public DevToolsClientHost,
26 public RenderViewHostObserver {
27 public:
28 DevToolsFrontendHost(TabContents* tab_contents,
29 DevToolsFrontendHostDelegate* delegate);
30
31 private:
32 virtual ~DevToolsFrontendHost();
33
34 // DevToolsFrontendHost implementation.
35 virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE;
36 virtual void InspectedTabClosing() OVERRIDE;
37 virtual void FrameNavigating(const std::string& url) OVERRIDE;
38 virtual void TabReplaced(TabContents* new_tab) OVERRIDE;
39
40 // content::RenderViewHostObserver overrides.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42
43 void OnDispatchOnInspectorBackend(const std::string& message);
44 void OnActivateWindow();
45 void OnCloseWindow();
46 void OnMoveWindow(int x, int y);
47 void OnRequestDockWindow();
48 void OnRequestUndockWindow();
49 void OnSaveAs(const std::string& file_name,
50 const std::string& content);
51
52 TabContents* tab_contents_;
53 DevToolsFrontendHostDelegate* delegate_;
54 DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendHost);
55 };
56
57 } // namespace content
58
59 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_FRONTEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698