summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index e283499..5c0ab5a 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2337,19 +2337,18 @@ WebFrame* RenderView::GetChildFrame(const std::wstring& frame_xpath) const {
return web_frame;
}
-void RenderView::EvaluateScriptUrl(const std::wstring& frame_xpath,
- const std::wstring& js_url) {
+void RenderView::EvaluateScript(const std::wstring& frame_xpath,
+ const std::wstring& script) {
WebFrame* web_frame = GetChildFrame(frame_xpath);
if (!web_frame)
return;
- scoped_ptr<WebRequest> request(WebRequest::Create(GURL(js_url)));
- web_frame->LoadRequest(request.get());
+ web_frame->ExecuteJavaScript(WideToUTF8(script), "");
}
void RenderView::OnScriptEvalRequest(const std::wstring& frame_xpath,
const std::wstring& jscript) {
- EvaluateScriptUrl(frame_xpath, jscript);
+ EvaluateScript(frame_xpath, jscript);
}
void RenderView::OnAddMessageToConsole(const std::wstring& frame_xpath,