| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DEVTOOLS_AGENT_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
| 6 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 IPC::Sender* sender, | 37 IPC::Sender* sender, |
| 38 int routing_id, | 38 int routing_id, |
| 39 int call_id, | 39 int call_id, |
| 40 const std::string& message, | 40 const std::string& message, |
| 41 const std::string& post_state); | 41 const std::string& post_state); |
| 42 | 42 |
| 43 blink::WebDevToolsAgent* GetWebAgent(); | 43 blink::WebDevToolsAgent* GetWebAgent(); |
| 44 | 44 |
| 45 bool IsAttached(); | 45 bool IsAttached(); |
| 46 | 46 |
| 47 void AddMessageToConsole(ConsoleMessageLevel level, |
| 48 const std::string& message); |
| 49 |
| 47 private: | 50 private: |
| 48 friend class DevToolsAgentTest; | 51 friend class DevToolsAgentTest; |
| 49 | 52 |
| 50 // RenderFrameObserver implementation. | 53 // RenderFrameObserver implementation. |
| 51 bool OnMessageReceived(const IPC::Message& message) override; | 54 bool OnMessageReceived(const IPC::Message& message) override; |
| 52 void WidgetWillClose() override; | 55 void WidgetWillClose() override; |
| 53 | 56 |
| 54 // WebDevToolsAgentClient implementation. | 57 // WebDevToolsAgentClient implementation. |
| 55 void sendProtocolMessage(int call_id, | 58 void sendProtocolMessage(int call_id, |
| 56 const blink::WebString& response, | 59 const blink::WebString& response, |
| 57 const blink::WebString& state) override; | 60 const blink::WebString& state) override; |
| 58 blink::WebDevToolsAgentClient::WebKitClientMessageLoop* | 61 blink::WebDevToolsAgentClient::WebKitClientMessageLoop* |
| 59 createClientMessageLoop() override; | 62 createClientMessageLoop() override; |
| 60 void willEnterDebugLoop() override; | 63 void willEnterDebugLoop() override; |
| 61 void didExitDebugLoop() override; | 64 void didExitDebugLoop() override; |
| 62 | 65 |
| 63 void enableTracing(const blink::WebString& category_filter) override; | 66 void enableTracing(const blink::WebString& category_filter) override; |
| 64 void disableTracing() override; | 67 void disableTracing() override; |
| 65 | 68 |
| 66 void OnAttach(const std::string& host_id); | 69 void OnAttach(const std::string& host_id); |
| 67 void OnReattach(const std::string& host_id, | 70 void OnReattach(const std::string& host_id, |
| 68 const std::string& agent_state); | 71 const std::string& agent_state); |
| 69 void OnDetach(); | 72 void OnDetach(); |
| 70 void OnDispatchOnInspectorBackend(const std::string& message); | 73 void OnDispatchOnInspectorBackend(const std::string& message); |
| 71 void OnInspectElement(const std::string& host_id, int x, int y); | 74 void OnInspectElement(const std::string& host_id, int x, int y); |
| 72 void OnAddMessageToConsole(ConsoleMessageLevel level, | |
| 73 const std::string& message); | |
| 74 void ContinueProgram(); | 75 void ContinueProgram(); |
| 75 void OnSetupDevToolsClient(); | 76 void OnSetupDevToolsClient(); |
| 76 | 77 |
| 77 bool is_attached_; | 78 bool is_attached_; |
| 78 bool is_devtools_client_; | 79 bool is_devtools_client_; |
| 79 bool paused_in_mouse_move_; | 80 bool paused_in_mouse_move_; |
| 80 bool paused_; | 81 bool paused_; |
| 81 RenderFrameImpl* frame_; | 82 RenderFrameImpl* frame_; |
| 82 | 83 |
| 83 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 84 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace content | 87 } // namespace content |
| 87 | 88 |
| 88 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ | 89 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
| OLD | NEW |