Index: chrome/renderer/render_view.cc |
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc |
index 4fe474d0ddf34a48a147bec9a62adc0d98cd32ce..c04b7d91d4eb6f3b72e36b58e6ebe39727249b32 100644 |
--- a/chrome/renderer/render_view.cc |
+++ b/chrome/renderer/render_view.cc |
@@ -8,6 +8,8 @@ |
#include <string> |
#include <vector> |
+#include "v8/include/v8.h" |
M-A Ruel
2008/10/06 17:30:44
You need this?
|
+ |
#include "base/command_line.h" |
#include "base/gfx/bitmap_header.h" |
#include "base/gfx/bitmap_platform_device_win.h" |
@@ -2228,19 +2230,20 @@ 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, |
+ const std::wstring& filename) { |
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(script, filename); |
} |
void RenderView::OnScriptEvalRequest(const std::wstring& frame_xpath, |
- const std::wstring& jscript) { |
- EvaluateScriptUrl(frame_xpath, jscript); |
+ const std::wstring& jscript, |
+ const std::wstring& filename) { |
+ EvaluateScript(frame_xpath, jscript, filename); |
} |
void RenderView::OnAddMessageToConsole(const std::wstring& frame_xpath, |