| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_DEVTOOLS_AGENT_H_ | 5 #ifndef CHROME_RENDERER_DEVTOOLS_AGENT_H_ |
| 6 #define CHROME_RENDERER_DEVTOOLS_AGENT_H_ | 6 #define CHROME_RENDERER_DEVTOOLS_AGENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual ~DevToolsAgent(); | 32 virtual ~DevToolsAgent(); |
| 33 | 33 |
| 34 void OnNavigate(); | 34 void OnNavigate(); |
| 35 | 35 |
| 36 // IPC::Channel::Listener implementation. | 36 // IPC::Channel::Listener implementation. |
| 37 virtual bool OnMessageReceived(const IPC::Message& message); | 37 virtual bool OnMessageReceived(const IPC::Message& message); |
| 38 | 38 |
| 39 // WebDevToolsAgentClient implementation | 39 // WebDevToolsAgentClient implementation |
| 40 virtual void sendMessageToInspectorFrontend(const WebKit::WebString& data); | 40 virtual void sendMessageToInspectorFrontend(const WebKit::WebString& data); |
| 41 virtual void sendDebuggerOutput(const WebKit::WebString& data); | 41 virtual void sendDebuggerOutput(const WebKit::WebString& data); |
| 42 virtual void sendDispatchToAPU(const WebKit::WebString& data); | |
| 43 | 42 |
| 44 virtual int hostIdentifier(); | 43 virtual int hostIdentifier(); |
| 45 virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, | 44 virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, |
| 46 bool enabled); | 45 bool enabled); |
| 47 virtual void runtimePropertyChanged(const WebKit::WebString& name, | 46 virtual void runtimePropertyChanged(const WebKit::WebString& name, |
| 48 const WebKit::WebString& value); | 47 const WebKit::WebString& value); |
| 49 virtual WebKit::WebCString debuggerScriptSource(); | 48 virtual WebKit::WebCString debuggerScriptSource(); |
| 50 virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* | 49 virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* |
| 51 createClientMessageLoop(); | 50 createClientMessageLoop(); |
| 52 virtual bool exposeV8DebuggerProtocol(); | 51 virtual bool exposeV8DebuggerProtocol(); |
| 53 | 52 |
| 54 // Returns agent instance for its host id. | 53 // Returns agent instance for its host id. |
| 55 static DevToolsAgent* FromHostId(int host_id); | 54 static DevToolsAgent* FromHostId(int host_id); |
| 56 | 55 |
| 57 RenderView* render_view() { return render_view_; } | 56 RenderView* render_view() { return render_view_; } |
| 58 | 57 |
| 59 WebKit::WebDevToolsAgent* GetWebAgent(); | 58 WebKit::WebDevToolsAgent* GetWebAgent(); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 friend class DevToolsAgentFilter; | 61 friend class DevToolsAgentFilter; |
| 63 | 62 |
| 64 void OnAttach(const DevToolsRuntimeProperties& runtime_properties); | 63 void OnAttach(const DevToolsRuntimeProperties& runtime_properties); |
| 65 void OnDetach(); | 64 void OnDetach(); |
| 66 void OnFrontendLoaded(); | 65 void OnFrontendLoaded(); |
| 67 void OnDispatchOnInspectorBackend(const std::string& message); | 66 void OnDispatchOnInspectorBackend(const std::string& message); |
| 68 void OnInspectElement(int x, int y); | 67 void OnInspectElement(int x, int y); |
| 69 void OnSetApuAgentEnabled(bool enabled); | |
| 70 | 68 |
| 71 static std::map<int, DevToolsAgent*> agent_for_routing_id_; | 69 static std::map<int, DevToolsAgent*> agent_for_routing_id_; |
| 72 | 70 |
| 73 int routing_id_; // View routing id that we can access from IO thread. | 71 int routing_id_; // View routing id that we can access from IO thread. |
| 74 RenderView* render_view_; | 72 RenderView* render_view_; |
| 75 bool expose_v8_debugger_protocol_; | 73 bool expose_v8_debugger_protocol_; |
| 76 | 74 |
| 77 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 75 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
| 78 }; | 76 }; |
| 79 | 77 |
| 80 #endif // CHROME_RENDERER_DEVTOOLS_AGENT_H_ | 78 #endif // CHROME_RENDERER_DEVTOOLS_AGENT_H_ |
| OLD | NEW |