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

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: 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
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 virtual void SendMessageToAgent(IPC::Message* msg) = 0;
pfeldman 2011/11/30 16:43:26 This method should be protected.
yurys 2011/11/30 17:08:28 Done.
29 virtual void Attach(); 31 virtual void Attach();
30 virtual void Reattach(const std::string& saved_agent_state); 32 virtual void Reattach(const std::string& saved_agent_state);
31 virtual void Detach(); 33 virtual void Detach();
34 virtual void DipatchOnInspectorBackend(const std::string& message);
35 virtual void InspectElement(int x, int y);
32 36
33 // TODO(yurys): get rid of this method 37 // TODO(yurys): get rid of this method
34 virtual void NotifyClientClosing() = 0; 38 virtual void NotifyClientClosing() = 0;
35 39
36 virtual int GetRenderProcessId() = 0; 40 virtual int GetRenderProcessId() = 0;
37 41
38 void set_close_listener(CloseListener* listener) { 42 void set_close_listener(CloseListener* listener) {
39 close_listener_ = listener; 43 close_listener_ = listener;
40 } 44 }
41 45
42 protected: 46 protected:
43 DevToolsAgentHost(); 47 DevToolsAgentHost();
44 virtual ~DevToolsAgentHost() {} 48 virtual ~DevToolsAgentHost() {}
45 49
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

Powered by Google App Engine
This is Rietveld 408576698