summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/devtools_agent.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/devtools_agent.h')
-rw-r--r--chrome/renderer/devtools_agent.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/renderer/devtools_agent.h b/chrome/renderer/devtools_agent.h
index 7d3c4a1..9f813a3 100644
--- a/chrome/renderer/devtools_agent.h
+++ b/chrome/renderer/devtools_agent.h
@@ -5,6 +5,7 @@
#ifndef CHROME_RENDERER_DEVTOOLS_AGENT_H_
#define CHROME_RENDERER_DEVTOOLS_AGENT_H_
+#include <map>
#include <string>
#include "webkit/glue/webdevtoolsagent_delegate.h"
@@ -30,15 +31,24 @@ class DevToolsAgent : public WebDevToolsAgentDelegate {
// WebDevToolsAgentDelegate implementation
virtual void SendMessageToClient(const std::string& raw_msg);
+ virtual int GetHostId();
+
+ // Returns agent instance for its host id.
+ static DevToolsAgent* FromHostId(int host_id);
+
+ RenderView* render_view() { return view_; }
- private:
WebDevToolsAgent* GetWebAgent();
- void OnAttach();
+ private:
+ friend class DevToolsAgentFilter;
+
void OnDetach();
void OnRpcMessage(const std::string& raw_msg);
void OnInspectElement(int x, int y);
+ static std::map<int, DevToolsAgent*> agent_for_routing_id_;
+
int routing_id_; // View routing id that we can access from IO thread.
RenderView* view_;