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 20 matching lines...) Expand all Loading... |
31 class WebDevToolsClientImpl : public WebDevToolsClient, | 31 class WebDevToolsClientImpl : public WebDevToolsClient, |
32 public CppBoundClass, | 32 public CppBoundClass, |
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 virtual ~WebDevToolsClientImpl(); | 38 virtual ~WebDevToolsClientImpl(); |
39 | 39 |
40 // DevToolsRpc::Delegate implementation. | 40 // DevToolsRpc::Delegate implementation. |
41 virtual void SendRpcMessage(const std::string& raw_msg); | 41 virtual void SendRpcMessage(const std::string& class_name, |
| 42 const std::string& method_name, |
| 43 const std::string& raw_msg); |
42 | 44 |
43 // WebDevToolsClient implementation. | 45 // WebDevToolsClient implementation. |
44 virtual void DispatchMessageFromAgent(const std::string& raw_msg); | 46 virtual void DispatchMessageFromAgent(const std::string& class_name, |
| 47 const std::string& method_name, |
| 48 const std::string& raw_msg); |
45 | 49 |
46 private: | 50 private: |
| 51 void ExecuteScript(const std::string& expr); |
47 static v8::Handle<v8::Value> JsAddSourceToFrame(const v8::Arguments& args); | 52 static v8::Handle<v8::Value> JsAddSourceToFrame(const v8::Arguments& args); |
48 static v8::Handle<v8::Value> JsLoaded(const v8::Arguments& args); | 53 static v8::Handle<v8::Value> JsLoaded(const v8::Arguments& args); |
49 static v8::Handle<v8::Value> JsActivateWindow(const v8::Arguments& args); | 54 static v8::Handle<v8::Value> JsActivateWindow(const v8::Arguments& args); |
50 | 55 |
51 WebViewImpl* web_view_impl_; | 56 WebViewImpl* web_view_impl_; |
52 WebDevToolsClientDelegate* delegate_; | 57 WebDevToolsClientDelegate* delegate_; |
53 OwnPtr<CppBoundClass> debugger_command_executor_obj_; | 58 OwnPtr<CppBoundClass> debugger_command_executor_obj_; |
54 OwnPtr<JsDebuggerAgentBoundObj> debugger_agent_obj_; | 59 OwnPtr<JsDebuggerAgentBoundObj> debugger_agent_obj_; |
55 OwnPtr<JsDomAgentBoundObj> dom_agent_obj_; | 60 OwnPtr<JsDomAgentBoundObj> dom_agent_obj_; |
56 OwnPtr<JsToolsAgentBoundObj> tools_agent_obj_; | 61 OwnPtr<JsToolsAgentBoundObj> tools_agent_obj_; |
57 bool loaded_; | 62 bool loaded_; |
58 Vector<std::string> pending_incoming_messages_; | 63 Vector<std::string> pending_incoming_messages_; |
59 OwnPtr<BoundObject> dev_tools_host_; | 64 OwnPtr<BoundObject> dev_tools_host_; |
60 DISALLOW_COPY_AND_ASSIGN(WebDevToolsClientImpl); | 65 DISALLOW_COPY_AND_ASSIGN(WebDevToolsClientImpl); |
61 }; | 66 }; |
62 | 67 |
63 #endif // WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ | 68 #endif // WEBKIT_GLUE_WEBDEVTOOLSCLIENT_IMPL_H_ |
OLD | NEW |