| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_WEBDEVTOOLSAGENT_H_ | |
| 6 #define WEBKIT_GLUE_WEBDEVTOOLSAGENT_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 | |
| 10 namespace WebKit { | |
| 11 class WebString; | |
| 12 } | |
| 13 | |
| 14 // WebDevToolsAgent represents DevTools agent sitting in the Glue. It provides | |
| 15 // direct and delegate Apis to the host. | |
| 16 class WebDevToolsAgent { | |
| 17 public: | |
| 18 class Message { | |
| 19 public: | |
| 20 Message() {} | |
| 21 virtual ~Message() {} | |
| 22 virtual void Dispatch() = 0; | |
| 23 private: | |
| 24 DISALLOW_COPY_AND_ASSIGN(Message); | |
| 25 }; | |
| 26 | |
| 27 WebDevToolsAgent() {} | |
| 28 virtual ~WebDevToolsAgent() {} | |
| 29 | |
| 30 virtual void Attach() = 0; | |
| 31 | |
| 32 virtual void Detach() = 0; | |
| 33 | |
| 34 virtual void OnNavigate() = 0; | |
| 35 | |
| 36 virtual void DispatchMessageFromClient(const WebKit::WebString& class_name, | |
| 37 const WebKit::WebString& method_name, | |
| 38 const WebKit::WebString& param1, | |
| 39 const WebKit::WebString& param2, | |
| 40 const WebKit::WebString& param3) = 0; | |
| 41 | |
| 42 virtual void InspectElement(int x, int y) = 0; | |
| 43 | |
| 44 virtual void SetApuAgentEnabled(bool enabled) = 0; | |
| 45 | |
| 46 // Asynchronously executes debugger command in the render thread. | |
| 47 // |caller_id| will be used for sending response. | |
| 48 static void ExecuteDebuggerCommand(const WebKit::WebString& command, | |
| 49 int caller_id); | |
| 50 | |
| 51 typedef void (*MessageLoopDispatchHandler)(); | |
| 52 | |
| 53 // Installs dispatch handle that is going to be called periodically | |
| 54 // while on a breakpoint. | |
| 55 static void SetMessageLoopDispatchHandler( | |
| 56 MessageLoopDispatchHandler handler); | |
| 57 | |
| 58 private: | |
| 59 DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgent); | |
| 60 }; | |
| 61 | |
| 62 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_H_ | |
| OLD | NEW |