| OLD | NEW |
| 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_RENDERER_DEVTOOLS_AGENT_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_AGENT_H_ |
| 6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien
t.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien
t.h" |
| 15 | 15 |
| 16 class RenderViewImpl; |
| 17 struct DevToolsMessageData; |
| 18 |
| 16 namespace WebKit { | 19 namespace WebKit { |
| 17 class WebDevToolsAgent; | 20 class WebDevToolsAgent; |
| 18 } | 21 } |
| 19 | 22 |
| 20 struct DevToolsMessageData; | |
| 21 | |
| 22 typedef std::map<std::string, std::string> DevToolsRuntimeProperties; | 23 typedef std::map<std::string, std::string> DevToolsRuntimeProperties; |
| 23 | 24 |
| 24 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's | 25 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's |
| 25 // agents with the communication capabilities. All messages from/to Glue's | 26 // agents with the communication capabilities. All messages from/to Glue's |
| 26 // agents infrastructure are flowing through this communication agent. | 27 // agents infrastructure are flowing through this communication agent. |
| 27 // There is a corresponding DevToolsClient object on the client side. | 28 // There is a corresponding DevToolsClient object on the client side. |
| 28 class DevToolsAgent : public content::RenderViewObserver, | 29 class DevToolsAgent : public content::RenderViewObserver, |
| 29 public WebKit::WebDevToolsAgentClient { | 30 public WebKit::WebDevToolsAgentClient { |
| 30 public: | 31 public: |
| 31 explicit DevToolsAgent(RenderView* render_view); | 32 explicit DevToolsAgent(RenderViewImpl* render_view); |
| 32 virtual ~DevToolsAgent(); | 33 virtual ~DevToolsAgent(); |
| 33 | 34 |
| 34 // Returns agent instance for its host id. | 35 // Returns agent instance for its host id. |
| 35 static DevToolsAgent* FromHostId(int host_id); | 36 static DevToolsAgent* FromHostId(int host_id); |
| 36 | 37 |
| 37 WebKit::WebDevToolsAgent* GetWebAgent(); | 38 WebKit::WebDevToolsAgent* GetWebAgent(); |
| 38 | 39 |
| 39 bool IsAttached(); | 40 bool IsAttached(); |
| 40 | 41 |
| 41 private: | 42 private: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 68 | 69 |
| 69 static std::map<int, DevToolsAgent*> agent_for_routing_id_; | 70 static std::map<int, DevToolsAgent*> agent_for_routing_id_; |
| 70 | 71 |
| 71 bool is_attached_; | 72 bool is_attached_; |
| 72 bool expose_v8_debugger_protocol_; | 73 bool expose_v8_debugger_protocol_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 75 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_H_ | 78 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_H_ |
| OLD | NEW |