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_WEBDEVTOOLSCLIENT_IMPL_H_ |
6 #define WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include <wtf/HashMap.h> | 10 #include <wtf/HashMap.h> |
(...skipping 17 matching lines...) Expand all Loading... |
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 WebDevToolsClientImpl : public WebDevToolsClient, |
33 public DevToolsRpc::Delegate { | 33 public DevToolsRpc::Delegate { |
34 public: | 34 public: |
35 WebDevToolsClientImpl( | 35 WebDevToolsClientImpl( |
36 WebViewImpl* web_view_impl, | 36 WebViewImpl* web_view_impl, |
37 WebDevToolsClientDelegate* delegate, | 37 WebDevToolsClientDelegate* delegate, |
38 const std::string& application_locale); | 38 const String& application_locale); |
39 virtual ~WebDevToolsClientImpl(); | 39 virtual ~WebDevToolsClientImpl(); |
40 | 40 |
41 // DevToolsRpc::Delegate implementation. | 41 // DevToolsRpc::Delegate implementation. |
42 virtual void SendRpcMessage(const std::string& class_name, | 42 virtual void SendRpcMessage(const String& class_name, |
43 const std::string& method_name, | 43 const String& method_name, |
44 const std::string& param1, | 44 const String& param1, |
45 const std::string& param2, | 45 const String& param2, |
46 const std::string& param3); | 46 const String& param3); |
47 | 47 |
48 // WebDevToolsClient implementation. | 48 // WebDevToolsClient implementation. |
49 virtual void DispatchMessageFromAgent(const std::string& class_name, | 49 virtual void DispatchMessageFromAgent(const WebKit::WebString& class_name, |
50 const std::string& method_name, | 50 const WebKit::WebString& method_name, |
51 const std::string& param1, | 51 const WebKit::WebString& param1, |
52 const std::string& param2, | 52 const WebKit::WebString& param2, |
53 const std::string& 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 |
60 void ExecuteScript(const Vector<std::string>& v); | 60 void ExecuteScript(const Vector<String>& v); |
61 static v8::Handle<v8::Value> JsReset(const v8::Arguments& args); | 61 static v8::Handle<v8::Value> JsReset(const v8::Arguments& args); |
62 static v8::Handle<v8::Value> JsAddSourceToFrame(const v8::Arguments& args); | 62 static v8::Handle<v8::Value> JsAddSourceToFrame(const v8::Arguments& args); |
63 static v8::Handle<v8::Value> JsAddResourceSourceToFrame( | 63 static v8::Handle<v8::Value> JsAddResourceSourceToFrame( |
64 const v8::Arguments& args); | 64 const v8::Arguments& args); |
65 static v8::Handle<v8::Value> JsLoaded(const v8::Arguments& args); | 65 static v8::Handle<v8::Value> JsLoaded(const v8::Arguments& args); |
66 static v8::Handle<v8::Value> JsGetPlatform(const v8::Arguments& args); | 66 static v8::Handle<v8::Value> JsGetPlatform(const v8::Arguments& args); |
67 | 67 |
68 static v8::Handle<v8::Value> JsActivateWindow(const v8::Arguments& args); | 68 static v8::Handle<v8::Value> JsActivateWindow(const v8::Arguments& args); |
69 static v8::Handle<v8::Value> JsCloseWindow(const v8::Arguments& args); | 69 static v8::Handle<v8::Value> JsCloseWindow(const v8::Arguments& args); |
70 static v8::Handle<v8::Value> JsDockWindow(const v8::Arguments& args); | 70 static v8::Handle<v8::Value> JsDockWindow(const v8::Arguments& args); |
71 static v8::Handle<v8::Value> JsUndockWindow(const v8::Arguments& args); | 71 static v8::Handle<v8::Value> JsUndockWindow(const v8::Arguments& args); |
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 WebDevToolsClientDelegate* delegate_; |
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<std::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); | 91 DISALLOW_COPY_AND_ASSIGN(WebDevToolsClientImpl); |
92 }; | 92 }; |
93 | 93 |
94 #endif // WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ | 94 #endif // WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ |
OLD | NEW |