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_WEBDEVTOOLSCLIENT_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBDEVTOOLSFRONTEND_IMPL_H_ |
6 #define WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBDEVTOOLSFRONTEND_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include <wtf/HashMap.h> | 10 #include <wtf/HashMap.h> |
11 #include <wtf/OwnPtr.h> | 11 #include <wtf/OwnPtr.h> |
12 #include <wtf/RefPtr.h> | 12 #include <wtf/RefPtr.h> |
13 | 13 |
14 #include "v8.h" | 14 #include "v8.h" |
| 15 #include "webkit/api/public/WebDevToolsFrontend.h" |
15 #include "webkit/glue/devtools/devtools_rpc.h" | 16 #include "webkit/glue/devtools/devtools_rpc.h" |
16 #include "webkit/glue/webdevtoolsclient.h" | |
17 | 17 |
18 namespace WebCore { | 18 namespace WebCore { |
19 class Node; | 19 class Node; |
20 class Page; | 20 class Page; |
21 class String; | 21 class String; |
22 } | 22 } |
23 | 23 |
24 class BoundObject; | 24 class BoundObject; |
25 class JsDebuggerAgentBoundObj; | 25 class JsDebuggerAgentBoundObj; |
26 class JsNetAgentBoundObj; | 26 class JsNetAgentBoundObj; |
27 class JsToolsAgentBoundObj; | 27 class JsToolsAgentBoundObj; |
28 class ToolsAgentNativeDelegateImpl; | 28 class ToolsAgentNativeDelegateImpl; |
29 class WebDevToolsClientDelegate; | 29 class WebDevToolsClientDelegate; |
30 class WebViewImpl; | 30 class WebViewImpl; |
31 | 31 |
32 class WebDevToolsClientImpl : public WebDevToolsClient, | 32 class WebDevToolsFrontendImpl : public WebKit::WebDevToolsFrontend, |
33 public DevToolsRpc::Delegate { | 33 public DevToolsRpc::Delegate { |
34 public: | 34 public: |
35 WebDevToolsClientImpl( | 35 WebDevToolsFrontendImpl( |
36 WebViewImpl* web_view_impl, | 36 WebViewImpl* web_view_impl, |
37 WebDevToolsClientDelegate* delegate, | 37 WebKit::WebDevToolsFrontendClient* client, |
38 const String& application_locale); | 38 const String& application_locale); |
39 virtual ~WebDevToolsClientImpl(); | 39 virtual ~WebDevToolsFrontendImpl(); |
40 | 40 |
41 // DevToolsRpc::Delegate implementation. | 41 // DevToolsRpc::Delegate implementation. |
42 virtual void SendRpcMessage(const String& class_name, | 42 virtual void SendRpcMessage(const String& class_name, |
43 const String& method_name, | 43 const String& method_name, |
44 const String& param1, | 44 const String& param1, |
45 const String& param2, | 45 const String& param2, |
46 const String& param3); | 46 const String& param3); |
47 | 47 |
48 // WebDevToolsClient implementation. | 48 // WebDevToolsFrontend implementation. |
49 virtual void DispatchMessageFromAgent(const WebKit::WebString& class_name, | 49 virtual void dispatchMessageFromAgent(const WebKit::WebString& class_name, |
50 const WebKit::WebString& method_name, | 50 const WebKit::WebString& method_name, |
51 const WebKit::WebString& param1, | 51 const WebKit::WebString& param1, |
52 const WebKit::WebString& param2, | 52 const WebKit::WebString& param2, |
53 const WebKit::WebString& param3); | 53 const WebKit::WebString& param3); |
54 | 54 |
55 private: | 55 private: |
56 void AddResourceSourceToFrame(int resource_id, | 56 void AddResourceSourceToFrame(int resource_id, |
57 String mime_type, | 57 String mime_type, |
58 WebCore::Node* frame); | 58 WebCore::Node* frame); |
59 | 59 |
(...skipping 12 matching lines...) Expand all Loading... |
72 static v8::Handle<v8::Value> JsToggleInspectElementMode( | 72 static v8::Handle<v8::Value> JsToggleInspectElementMode( |
73 const v8::Arguments& args); | 73 const v8::Arguments& args); |
74 static v8::Handle<v8::Value> JsGetApplicationLocale( | 74 static v8::Handle<v8::Value> JsGetApplicationLocale( |
75 const v8::Arguments& args); | 75 const v8::Arguments& args); |
76 static v8::Handle<v8::Value> JsHiddenPanels( | 76 static v8::Handle<v8::Value> JsHiddenPanels( |
77 const v8::Arguments& args); | 77 const v8::Arguments& args); |
78 static v8::Handle<v8::Value> JsDebuggerCommand( | 78 static v8::Handle<v8::Value> JsDebuggerCommand( |
79 const v8::Arguments& args); | 79 const v8::Arguments& args); |
80 | 80 |
81 WebViewImpl* web_view_impl_; | 81 WebViewImpl* web_view_impl_; |
82 WebDevToolsClientDelegate* delegate_; | 82 WebKit::WebDevToolsFrontendClient* client_; |
83 String application_locale_; | 83 String application_locale_; |
84 OwnPtr<BoundObject> debugger_command_executor_obj_; | 84 OwnPtr<BoundObject> debugger_command_executor_obj_; |
85 OwnPtr<JsDebuggerAgentBoundObj> debugger_agent_obj_; | 85 OwnPtr<JsDebuggerAgentBoundObj> debugger_agent_obj_; |
86 OwnPtr<JsToolsAgentBoundObj> tools_agent_obj_; | 86 OwnPtr<JsToolsAgentBoundObj> tools_agent_obj_; |
87 bool loaded_; | 87 bool loaded_; |
88 Vector<Vector<String> > pending_incoming_messages_; | 88 Vector<Vector<String> > pending_incoming_messages_; |
89 OwnPtr<BoundObject> dev_tools_host_; | 89 OwnPtr<BoundObject> dev_tools_host_; |
90 OwnPtr<ToolsAgentNativeDelegateImpl> tools_agent_native_delegate_impl_; | 90 OwnPtr<ToolsAgentNativeDelegateImpl> tools_agent_native_delegate_impl_; |
91 DISALLOW_COPY_AND_ASSIGN(WebDevToolsClientImpl); | |
92 }; | 91 }; |
93 | 92 |
94 #endif // WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ | 93 #endif // WEBKIT_GLUE_WEBDEVTOOLSFRONTEND_IMPL_H_ |
OLD | NEW |