diff options
author | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:08:33 +0000 |
---|---|---|
committer | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 20:08:33 +0000 |
commit | f29acf538815f1d71638ac9db8798998a113955f (patch) | |
tree | 9f06b1775d4b4fa81a81482b7f95640eeb17177d /chrome/renderer/render_view.cc | |
parent | 7ca2af2c8cb95ea08207b53076f183408e18f2ee (diff) | |
download | chromium_src-f29acf538815f1d71638ac9db8798998a113955f.zip chromium_src-f29acf538815f1d71638ac9db8798998a113955f.tar.gz chromium_src-f29acf538815f1d71638ac9db8798998a113955f.tar.bz2 |
Change some places where we were using javascript: URLs to use
WebFrame::ExecuteJavaScript() instead.
Review URL: http://codereview.chromium.org/8826
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 9 |
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, |