Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: webkit/tools/test_shell/test_shell_devtools_agent.cc

Issue 3180017: DevTools: remove injected script from resources. (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 void TestShellDevToolsAgent::forceRepaint() { 80 void TestShellDevToolsAgent::forceRepaint() {
81 } 81 }
82 82
83 void TestShellDevToolsAgent::runtimeFeatureStateChanged( 83 void TestShellDevToolsAgent::runtimeFeatureStateChanged(
84 const WebKit::WebString& feature, bool enabled) { 84 const WebKit::WebString& feature, bool enabled) {
85 // TODO(loislo): implement this. 85 // TODO(loislo): implement this.
86 } 86 }
87 87
88 WebCString TestShellDevToolsAgent::injectedScriptSource() {
89 base::StringPiece injectjsWebkit =
90 webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS);
91 return WebCString(injectjsWebkit.data(), injectjsWebkit.length());
92 }
93
94 WebCString TestShellDevToolsAgent::debuggerScriptSource() { 88 WebCString TestShellDevToolsAgent::debuggerScriptSource() {
95 base::StringPiece debuggerScriptjs = 89 base::StringPiece debuggerScriptjs =
96 webkit_glue::GetDataResource(IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); 90 webkit_glue::GetDataResource(IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS);
97 return WebCString(debuggerScriptjs.data(), debuggerScriptjs.length()); 91 return WebCString(debuggerScriptjs.data(), debuggerScriptjs.length());
98 } 92 }
99 93
100 WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* 94 WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
101 TestShellDevToolsAgent::createClientMessageLoop() { 95 TestShellDevToolsAgent::createClientMessageLoop() {
102 return new WebKitClientMessageLoopImpl(); 96 return new WebKitClientMessageLoopImpl();
103 } 97 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 150
157 bool TestShellDevToolsAgent::evaluateInWebInspector( 151 bool TestShellDevToolsAgent::evaluateInWebInspector(
158 long call_id, 152 long call_id,
159 const std::string& script) { 153 const std::string& script) {
160 WebDevToolsAgent* agent = GetWebAgent(); 154 WebDevToolsAgent* agent = GetWebAgent();
161 if (!agent) 155 if (!agent)
162 return false; 156 return false;
163 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); 157 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script));
164 return true; 158 return true;
165 } 159 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_devtools_agent.h ('k') | webkit/tools/test_shell/test_shell_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698