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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 208793005: Remove JavaScript execution from RenderViewHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index cad97888b0bc07d8698cddab5fbc559efd663faf..092dc5e7fc890f9e97a5c58455d8b884f7d0a9d1 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -852,24 +852,6 @@ void RenderViewHostImpl::DesktopNotificationPostClick(int notification_id) {
Send(new DesktopNotificationMsg_PostClick(GetRoutingID(), notification_id));
}
-void RenderViewHostImpl::ExecuteJavascriptInWebFrame(
- const base::string16& frame_xpath,
- const base::string16& jscript) {
- Send(new ViewMsg_ScriptEvalRequest(GetRoutingID(), frame_xpath, jscript,
- 0, false));
-}
-
-void RenderViewHostImpl::ExecuteJavascriptInWebFrameCallbackResult(
- const base::string16& frame_xpath,
- const base::string16& jscript,
- const JavascriptResultCallback& callback) {
- static int next_id = 1;
- int key = next_id++;
- Send(new ViewMsg_ScriptEvalRequest(GetRoutingID(), frame_xpath, jscript,
- key, true));
- javascript_callbacks_.insert(std::make_pair(key, callback));
-}
-
void RenderViewHostImpl::JavaScriptDialogClosed(
IPC::Message* reply_msg,
bool success,
@@ -1126,7 +1108,6 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged,
OnSelectionRootBoundsChanged)
#endif
- IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
OnRequestDesktopNotificationPermission)
@@ -1794,26 +1775,6 @@ void RenderViewHostImpl::OnAccessibilityLocationChanges(
}
}
-void RenderViewHostImpl::OnScriptEvalResponse(int id,
- const base::ListValue& result) {
- const base::Value* result_value;
- if (!result.Get(0, &result_value)) {
- // Programming error or rogue renderer.
- NOTREACHED() << "Got bad arguments for OnScriptEvalResponse";
- return;
- }
-
- std::map<int, JavascriptResultCallback>::iterator it =
- javascript_callbacks_.find(id);
- if (it != javascript_callbacks_.end()) {
- // ExecuteJavascriptInWebFrameCallbackResult was used; do callback.
- it->second.Run(result_value);
- javascript_callbacks_.erase(it);
- } else {
- NOTREACHED() << "Received script response for unknown request";
- }
-}
-
void RenderViewHostImpl::OnDidZoomURL(double zoom_level,
bool remember,
const GURL& url) {
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698