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

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

Issue 8549022: Define DevTools content API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jam's comments addressed 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
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/debugger/devtools_agent_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 namespace IPC { 13 namespace IPC {
14 class Message; 14 class Message;
15 } 15 }
16 16
17 namespace content {
18
17 // Describes interface for managing devtools agents from the browser process. 19 // Describes interface for managing devtools agents from the browser process.
18 class CONTENT_EXPORT DevToolsAgentHost { 20 class CONTENT_EXPORT DevToolsAgentHost {
19 public: 21 public:
20 class CONTENT_EXPORT CloseListener { 22 class CONTENT_EXPORT CloseListener {
21 public: 23 public:
22 virtual void AgentHostClosing(DevToolsAgentHost*) = 0; 24 virtual void AgentHostClosing(DevToolsAgentHost*) = 0;
23 protected: 25 protected:
24 virtual ~CloseListener() {} 26 virtual ~CloseListener() {}
25 }; 27 };
26 28
27 // Sends the message to the devtools agent hosted by this object. 29 // Sends the message to the devtools agent hosted by this object.
28 virtual void SendMessageToAgent(IPC::Message* msg) = 0; 30 void Attach();
29 virtual void Attach(); 31 void Reattach(const std::string& saved_agent_state);
30 virtual void Reattach(const std::string& saved_agent_state); 32 void Detach();
31 virtual void Detach(); 33 void DipatchOnInspectorBackend(const std::string& message);
34 void InspectElement(int x, int y);
32 35
33 // TODO(yurys): get rid of this method 36 // TODO(yurys): get rid of this method
34 virtual void NotifyClientClosing() = 0; 37 virtual void NotifyClientClosing() = 0;
35 38
36 virtual int GetRenderProcessId() = 0; 39 virtual int GetRenderProcessId() = 0;
37 40
38 void set_close_listener(CloseListener* listener) { 41 void set_close_listener(CloseListener* listener) {
39 close_listener_ = listener; 42 close_listener_ = listener;
40 } 43 }
41 44
42 protected: 45 protected:
43 DevToolsAgentHost(); 46 DevToolsAgentHost();
44 virtual ~DevToolsAgentHost() {} 47 virtual ~DevToolsAgentHost() {}
45 48
49 virtual void SendMessageToAgent(IPC::Message* msg) = 0;
46 void NotifyCloseListener(); 50 void NotifyCloseListener();
47 51
48 CloseListener* close_listener_; 52 CloseListener* close_listener_;
49 }; 53 };
50 54
55 } // namespace content
56
51 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ 57 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/debugger/devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698