summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/script_executor_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/script_executor_impl.cc')
-rw-r--r--chrome/browser/extensions/script_executor_impl.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/extensions/script_executor_impl.cc b/chrome/browser/extensions/script_executor_impl.cc
index e8f6199..ae8c251 100644
--- a/chrome/browser/extensions/script_executor_impl.cc
+++ b/chrome/browser/extensions/script_executor_impl.cc
@@ -14,6 +14,10 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
+namespace base {
+class ListValue;
+} // namespace base
+
namespace extensions {
namespace {
@@ -58,7 +62,8 @@ class Handler : public content::WebContentsObserver {
}
virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE {
- callback_.Run(false, -1, kRendererDestroyed);
+ base::ListValue val;
+ callback_.Run(false, -1, kRendererDestroyed, val);
delete this;
}
@@ -66,8 +71,9 @@ class Handler : public content::WebContentsObserver {
void OnExecuteCodeFinished(int request_id,
bool success,
int32 page_id,
- const std::string& error) {
- callback_.Run(success, page_id, error);
+ const std::string& error,
+ const base::ListValue& script_result) {
+ callback_.Run(success, page_id, error, script_result);
delete this;
}
@@ -98,7 +104,7 @@ void ScriptExecutorImpl::ExecuteScript(
params.is_javascript = (script_type == JAVASCRIPT);
params.code = code;
params.all_frames = (frame_scope == ALL_FRAMES);
- params.run_at = (int) run_at;
+ params.run_at = static_cast<int>(run_at);
params.in_main_world = (world_type == MAIN_WORLD);
// Handler handles IPCs and deletes itself on completion.