| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_TOOLS_TEST_SHELL_TEST_SHELL_DEVTOOLS_AGENT_H_ | |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_DEVTOOLS_AGENT_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/memory/weak_ptr.h" | |
| 11 | |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien
t.h" | |
| 13 | |
| 14 namespace WebKit { | |
| 15 | |
| 16 class WebDevToolsAgent; | |
| 17 class WebView; | |
| 18 | |
| 19 } // namespace WebKit | |
| 20 | |
| 21 class TestShellDevToolsCallArgs; | |
| 22 class TestShellDevToolsClient; | |
| 23 | |
| 24 class TestShellDevToolsAgent : public WebKit::WebDevToolsAgentClient { | |
| 25 public: | |
| 26 TestShellDevToolsAgent(); | |
| 27 virtual ~TestShellDevToolsAgent(); | |
| 28 | |
| 29 void SetWebView(WebKit::WebView* web_view); | |
| 30 | |
| 31 // WebDevToolsAgentClient implementation. | |
| 32 virtual void sendMessageToInspectorFrontend( | |
| 33 const WebKit::WebString& data); | |
| 34 virtual int hostIdentifier(); | |
| 35 virtual void runtimePropertyChanged(const WebKit::WebString& name, | |
| 36 const WebKit::WebString& value); | |
| 37 | |
| 38 virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* | |
| 39 createClientMessageLoop(); | |
| 40 | |
| 41 void AsyncCall(const TestShellDevToolsCallArgs& args); | |
| 42 | |
| 43 void attach(TestShellDevToolsClient* client); | |
| 44 void detach(); | |
| 45 | |
| 46 bool evaluateInWebInspector(long call_id, const std::string& script); | |
| 47 | |
| 48 private: | |
| 49 void Call(const TestShellDevToolsCallArgs& args); | |
| 50 WebKit::WebDevToolsAgent* GetWebAgent(); | |
| 51 | |
| 52 base::WeakPtrFactory<TestShellDevToolsAgent> weak_factory_; | |
| 53 TestShellDevToolsClient* dev_tools_client_; | |
| 54 int routing_id_; | |
| 55 WebKit::WebDevToolsAgent* web_dev_tools_agent_; | |
| 56 WebKit::WebView* web_view_; | |
| 57 | |
| 58 DISALLOW_COPY_AND_ASSIGN(TestShellDevToolsAgent); | |
| 59 }; | |
| 60 | |
| 61 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_DEVTOOLS_AGENT_H_ | |
| OLD | NEW |