OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebDevToolsAgent_h | 31 #ifndef WebDevToolsAgent_h |
32 #define WebDevToolsAgent_h | 32 #define WebDevToolsAgent_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 | 35 |
36 namespace WebKit { | 36 namespace WebKit { |
| 37 class WebDevToolsAgentClient; |
37 class WebString; | 38 class WebString; |
| 39 class WebView; |
38 struct WebPoint; | 40 struct WebPoint; |
39 | 41 |
40 class WebDevToolsAgent { | 42 class WebDevToolsAgent { |
41 public: | 43 public: |
| 44 WEBKIT_API static WebDevToolsAgent* create(WebView*, WebDevToolsAgentClient*); |
| 45 |
| 46 virtual ~WebDevToolsAgent() {} |
| 47 |
42 virtual void attach() = 0; | 48 virtual void attach() = 0; |
43 virtual void detach() = 0; | 49 virtual void detach() = 0; |
44 | 50 |
45 virtual void didNavigate() = 0; | 51 virtual void didNavigate() = 0; |
46 | 52 |
47 virtual void dispatchMessageFromFrontend(const WebString& className, | 53 virtual void dispatchMessageFromFrontend(const WebString& className, |
48 const WebString& methodName, | 54 const WebString& methodName, |
49 const WebString& param1, | 55 const WebString& param1, |
50 const WebString& param2, | 56 const WebString& param2, |
51 const WebString& param3) = 0; | 57 const WebString& param3) = 0; |
52 | 58 |
53 virtual void inspectElementAt(const WebPoint&) = 0; | 59 virtual void inspectElementAt(const WebPoint&) = 0; |
54 | 60 |
55 virtual void setRuntimeFeatureEnabled(const WebString& feature, bool enabled) = 0; | 61 virtual void setRuntimeFeatureEnabled(const WebString& feature, bool enabled) = 0; |
56 | 62 |
57 // Asynchronously executes debugger command in the render thread. | 63 // Asynchronously executes debugger command in the render thread. |
58 // |callerIdentifier| will be used for sending response. | 64 // |callerIdentifier| will be used for sending response. |
59 WEBKIT_API static void executeDebuggerCommand( | 65 WEBKIT_API static void executeDebuggerCommand( |
60 const WebString& command, int callerIdentifier); | 66 const WebString& command, int callerIdentifier); |
61 | 67 |
62 typedef void (*MessageLoopDispatchHandler)(); | 68 typedef void (*MessageLoopDispatchHandler)(); |
63 | 69 |
64 // Installs dispatch handle that is going to be called periodically | 70 // Installs dispatch handle that is going to be called periodically |
65 // while on a breakpoint. | 71 // while on a breakpoint. |
66 static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler); | 72 WEBKIT_API static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler); |
67 | |
68 protected: | |
69 ~WebDevToolsAgent() {} | |
70 }; | 73 }; |
71 | 74 |
72 } // namespace WebKit | 75 } // namespace WebKit |
73 | 76 |
74 #endif | 77 #endif |
OLD | NEW |