| 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> | |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 13 #include "content/public/renderer/render_view_observer.h" | 12 #include "content/public/renderer/render_view_observer.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien
t.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien
t.h" |
| 15 | 14 |
| 16 class RenderViewImpl; | 15 class RenderViewImpl; |
| 17 struct DevToolsMessageData; | 16 struct DevToolsMessageData; |
| 18 | 17 |
| 19 namespace WebKit { | 18 namespace WebKit { |
| 20 class WebDevToolsAgent; | 19 class WebDevToolsAgent; |
| 21 } | 20 } |
| 22 | 21 |
| 23 typedef std::map<std::string, std::string> DevToolsRuntimeProperties; | |
| 24 | |
| 25 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's | 22 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's |
| 26 // agents with the communication capabilities. All messages from/to Glue's | 23 // agents with the communication capabilities. All messages from/to Glue's |
| 27 // agents infrastructure are flowing through this communication agent. | 24 // agents infrastructure are flowing through this communication agent. |
| 28 // There is a corresponding DevToolsClient object on the client side. | 25 // There is a corresponding DevToolsClient object on the client side. |
| 29 class DevToolsAgent : public content::RenderViewObserver, | 26 class DevToolsAgent : public content::RenderViewObserver, |
| 30 public WebKit::WebDevToolsAgentClient { | 27 public WebKit::WebDevToolsAgentClient { |
| 31 public: | 28 public: |
| 32 explicit DevToolsAgent(RenderViewImpl* render_view); | 29 explicit DevToolsAgent(RenderViewImpl* render_view); |
| 33 virtual ~DevToolsAgent(); | 30 virtual ~DevToolsAgent(); |
| 34 | 31 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 60 void OnAttach(); | 57 void OnAttach(); |
| 61 void OnReattach(const std::string& agent_state); | 58 void OnReattach(const std::string& agent_state); |
| 62 void OnDetach(); | 59 void OnDetach(); |
| 63 void OnFrontendLoaded(); | 60 void OnFrontendLoaded(); |
| 64 void OnDispatchOnInspectorBackend(const std::string& message); | 61 void OnDispatchOnInspectorBackend(const std::string& message); |
| 65 void OnInspectElement(int x, int y); | 62 void OnInspectElement(int x, int y); |
| 66 void OnSetApuAgentEnabled(bool enabled); | 63 void OnSetApuAgentEnabled(bool enabled); |
| 67 void OnNavigate(); | 64 void OnNavigate(); |
| 68 void OnSetupDevToolsClient(); | 65 void OnSetupDevToolsClient(); |
| 69 | 66 |
| 70 static std::map<int, DevToolsAgent*> agent_for_routing_id_; | |
| 71 | |
| 72 bool is_attached_; | 67 bool is_attached_; |
| 73 bool expose_v8_debugger_protocol_; | 68 bool expose_v8_debugger_protocol_; |
| 74 | 69 |
| 75 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 70 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
| 76 }; | 71 }; |
| 77 | 72 |
| 78 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_H_ | 73 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_H_ |
| OLD | NEW |