| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include <wtf/OwnPtr.h> | 10 #include <wtf/OwnPtr.h> |
| 11 | 11 |
| 12 #include "v8.h" | 12 #include "v8.h" |
| 13 #include "webkit/glue/devtools/devtools_rpc.h" | 13 #include "webkit/glue/devtools/devtools_rpc.h" |
| 14 #include "webkit/glue/devtools/dom_agent.h" | 14 #include "webkit/glue/devtools/dom_agent.h" |
| 15 #include "webkit/glue/devtools/tools_agent.h" | 15 #include "webkit/glue/devtools/tools_agent.h" |
| 16 #include "webkit/glue/webdevtoolsagent.h" | 16 #include "webkit/glue/webdevtoolsagent.h" |
| 17 | 17 |
| 18 namespace WebCore { | 18 namespace WebCore { |
| 19 class Document; | 19 class Document; |
| 20 class Node; | 20 class Node; |
| 21 class String; | 21 class String; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace WebKit { |
| 25 class WebFrame; |
| 26 } |
| 27 |
| 24 class BoundObject; | 28 class BoundObject; |
| 25 class DebuggerAgentDelegateStub; | 29 class DebuggerAgentDelegateStub; |
| 26 class DebuggerAgentImpl; | 30 class DebuggerAgentImpl; |
| 27 class DomAgentImpl; | 31 class DomAgentImpl; |
| 28 class NetAgentImpl; | 32 class NetAgentImpl; |
| 29 class Value; | 33 class Value; |
| 30 class WebDevToolsAgentDelegate; | 34 class WebDevToolsAgentDelegate; |
| 31 class WebFrame; | |
| 32 class WebFrameImpl; | 35 class WebFrameImpl; |
| 33 class WebViewImpl; | 36 class WebViewImpl; |
| 34 | 37 |
| 35 class WebDevToolsAgentImpl | 38 class WebDevToolsAgentImpl |
| 36 : public WebDevToolsAgent, | 39 : public WebDevToolsAgent, |
| 37 public ToolsAgent, | 40 public ToolsAgent, |
| 38 public DevToolsRpc::Delegate { | 41 public DevToolsRpc::Delegate { |
| 39 public: | 42 public: |
| 40 WebDevToolsAgentImpl(WebViewImpl* web_view_impl, | 43 WebDevToolsAgentImpl(WebViewImpl* web_view_impl, |
| 41 WebDevToolsAgentDelegate* delegate); | 44 WebDevToolsAgentDelegate* delegate); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 67 virtual void InspectElement(int x, int y); | 70 virtual void InspectElement(int x, int y); |
| 68 | 71 |
| 69 // DevToolsRpc::Delegate implementation. | 72 // DevToolsRpc::Delegate implementation. |
| 70 void SendRpcMessage(const std::string& class_name, | 73 void SendRpcMessage(const std::string& class_name, |
| 71 const std::string& method_name, | 74 const std::string& method_name, |
| 72 const std::string& raw_msg); | 75 const std::string& raw_msg); |
| 73 | 76 |
| 74 // Methods called by the glue. | 77 // Methods called by the glue. |
| 75 void SetMainFrameDocumentReady(bool ready); | 78 void SetMainFrameDocumentReady(bool ready); |
| 76 void DidCommitLoadForFrame(WebViewImpl* webview, | 79 void DidCommitLoadForFrame(WebViewImpl* webview, |
| 77 WebFrame* frame, | 80 WebKit::WebFrame* frame, |
| 78 bool is_new_navigation); | 81 bool is_new_navigation); |
| 79 | 82 |
| 80 void WindowObjectCleared(WebFrameImpl* webframe); | 83 void WindowObjectCleared(WebFrameImpl* webframe); |
| 81 | 84 |
| 82 void ForceRepaint(); | 85 void ForceRepaint(); |
| 83 | 86 |
| 84 int host_id() { return host_id_; } | 87 int host_id() { return host_id_; } |
| 85 | 88 |
| 86 private: | 89 private: |
| 87 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args); | 90 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 102 OwnPtr<DomAgentImpl> dom_agent_impl_; | 105 OwnPtr<DomAgentImpl> dom_agent_impl_; |
| 103 bool attached_; | 106 bool attached_; |
| 104 // TODO(pfeldman): This should not be needed once GC styles issue is fixed | 107 // TODO(pfeldman): This should not be needed once GC styles issue is fixed |
| 105 // for matching rules. | 108 // for matching rules. |
| 106 v8::Persistent<v8::Context> utility_context_; | 109 v8::Persistent<v8::Context> utility_context_; |
| 107 OwnPtr<BoundObject> devtools_agent_host_; | 110 OwnPtr<BoundObject> devtools_agent_host_; |
| 108 DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgentImpl); | 111 DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgentImpl); |
| 109 }; | 112 }; |
| 110 | 113 |
| 111 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ | 114 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ |
| OLD | NEW |