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 #include "webkit/tools/test_shell/test_shell_devtools_agent.h" | 5 #include "webkit/tools/test_shell/test_shell_devtools_agent.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "grit/webkit_chromium_resources.h" | 8 #include "grit/webkit_chromium_resources.h" |
9 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS); | 65 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS); |
66 return WebCString(injectjsWebkit.as_string().c_str()); | 66 return WebCString(injectjsWebkit.as_string().c_str()); |
67 } | 67 } |
68 | 68 |
69 WebCString TestShellDevToolsAgent::injectedScriptDispatcherSource() { | 69 WebCString TestShellDevToolsAgent::injectedScriptDispatcherSource() { |
70 base::StringPiece injectDispatchjs = | 70 base::StringPiece injectDispatchjs = |
71 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_DISPATCH_JS); | 71 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_DISPATCH_JS); |
72 return WebCString(injectDispatchjs.as_string().c_str()); | 72 return WebCString(injectDispatchjs.as_string().c_str()); |
73 } | 73 } |
74 | 74 |
| 75 WebCString TestShellDevToolsAgent::debuggerScriptSource() { |
| 76 base::StringPiece debuggerScriptjs = |
| 77 webkit_glue::GetDataResource(IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); |
| 78 return WebCString(debuggerScriptjs.as_string().c_str()); |
| 79 } |
| 80 |
75 void TestShellDevToolsAgent::AsyncCall(const TestShellDevToolsCallArgs &args) { | 81 void TestShellDevToolsAgent::AsyncCall(const TestShellDevToolsCallArgs &args) { |
76 MessageLoop::current()->PostDelayedTask( | 82 MessageLoop::current()->PostDelayedTask( |
77 FROM_HERE, | 83 FROM_HERE, |
78 call_method_factory_.NewRunnableMethod(&TestShellDevToolsAgent::Call, | 84 call_method_factory_.NewRunnableMethod(&TestShellDevToolsAgent::Call, |
79 args), | 85 args), |
80 0); | 86 0); |
81 } | 87 } |
82 | 88 |
83 void TestShellDevToolsAgent::Call(const TestShellDevToolsCallArgs &args) { | 89 void TestShellDevToolsAgent::Call(const TestShellDevToolsCallArgs &args) { |
84 WebDevToolsAgent* web_agent = GetWebAgent(); | 90 WebDevToolsAgent* web_agent = GetWebAgent(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return false; | 132 return false; |
127 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); | 133 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); |
128 return true; | 134 return true; |
129 } | 135 } |
130 | 136 |
131 // static | 137 // static |
132 void WebKit::WebDevToolsAgentClient::sendMessageToFrontendOnIOThread( | 138 void WebKit::WebDevToolsAgentClient::sendMessageToFrontendOnIOThread( |
133 WebKit::WebDevToolsMessageData const &) { | 139 WebKit::WebDevToolsMessageData const &) { |
134 NOTIMPLEMENTED(); | 140 NOTIMPLEMENTED(); |
135 } | 141 } |
OLD | NEW |