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 TEST_SHELL_DEVTOOLS_AGENT_H_ | 5 #ifndef TEST_SHELL_DEVTOOLS_AGENT_H_ |
6 #define TEST_SHELL_DEVTOOLS_AGENT_H_ | 6 #define TEST_SHELL_DEVTOOLS_AGENT_H_ |
7 | 7 |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 | 9 |
10 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h" |
11 | 11 |
12 namespace WebKit { | 12 namespace WebKit { |
13 | 13 |
14 class WebDevToolsAgent; | 14 class WebDevToolsAgent; |
15 class WebView; | 15 class WebView; |
16 struct WebDevToolsMessageData; | 16 struct WebDevToolsMessageData; |
17 | 17 |
18 } // namespace WebKit | 18 } // namespace WebKit |
19 | 19 |
20 class TestShellDevToolsCallArgs; | 20 class TestShellDevToolsCallArgs; |
21 class TestShellDevToolsClient; | 21 class TestShellDevToolsClient; |
22 | 22 |
23 class TestShellDevToolsAgent : public WebKit::WebDevToolsAgentClient { | 23 class TestShellDevToolsAgent : public WebKit::WebDevToolsAgentClient { |
24 | 24 |
25 public: | 25 public: |
26 TestShellDevToolsAgent(WebKit::WebView* web_view); | 26 TestShellDevToolsAgent(); |
27 virtual ~TestShellDevToolsAgent() {} | 27 virtual ~TestShellDevToolsAgent() {} |
28 | 28 |
| 29 void SetWebView(WebKit::WebView* web_view); |
| 30 |
29 // WebDevToolsAgentClient implementation. | 31 // WebDevToolsAgentClient implementation. |
30 virtual void sendMessageToFrontend( | 32 virtual void sendMessageToFrontend( |
31 const WebKit::WebDevToolsMessageData& data); | 33 const WebKit::WebDevToolsMessageData& data); |
32 virtual int hostIdentifier() { return routing_id_; } | 34 virtual int hostIdentifier() { return routing_id_; } |
33 virtual void forceRepaint(); | 35 virtual void forceRepaint(); |
34 virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, | 36 virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, |
35 bool enabled); | 37 bool enabled); |
36 virtual WebKit::WebCString injectedScriptSource(); | 38 virtual WebKit::WebCString injectedScriptSource(); |
37 virtual WebKit::WebCString injectedScriptDispatcherSource(); | 39 virtual WebKit::WebCString injectedScriptDispatcherSource(); |
38 virtual WebKit::WebCString debuggerScriptSource(); | 40 virtual WebKit::WebCString debuggerScriptSource(); |
(...skipping 17 matching lines...) Loading... |
56 ScopedRunnableMethodFactory<TestShellDevToolsAgent> call_method_factory_; | 58 ScopedRunnableMethodFactory<TestShellDevToolsAgent> call_method_factory_; |
57 TestShellDevToolsClient* dev_tools_client_; | 59 TestShellDevToolsClient* dev_tools_client_; |
58 int routing_id_; | 60 int routing_id_; |
59 WebKit::WebDevToolsAgent* web_dev_tools_agent_; | 61 WebKit::WebDevToolsAgent* web_dev_tools_agent_; |
60 WebKit::WebView* web_view_; | 62 WebKit::WebView* web_view_; |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(TestShellDevToolsAgent); | 64 DISALLOW_COPY_AND_ASSIGN(TestShellDevToolsAgent); |
63 }; | 65 }; |
64 | 66 |
65 #endif // TEST_SHELL_DEVTOOLS_AGENT_H_ | 67 #endif // TEST_SHELL_DEVTOOLS_AGENT_H_ |
OLD | NEW |