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

Unified Diff: extensions/renderer/user_script_scheduler.cc

Issue 284153006: Introduce ScriptInjection in extensions/renderer to inject UserScripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: extensions/renderer/user_script_scheduler.cc
diff --git a/extensions/renderer/user_script_scheduler.cc b/extensions/renderer/user_script_scheduler.cc
index 9c82fb7aaa411659c77c9857e0aaccb3369c75ea..e37ef91c4d58bb8da11b9e2408f33469f1385c36 100644
--- a/extensions/renderer/user_script_scheduler.cc
+++ b/extensions/renderer/user_script_scheduler.cc
@@ -24,6 +24,7 @@
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebScopedUserGesture.h"
+#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h"
@@ -210,7 +211,8 @@ void UserScriptScheduler::ExecuteCodeImpl(
}
if (params.is_javascript) {
- WebScriptSource source(WebString::fromUTF8(params.code), params.file_url);
+ blink::WebScriptSource source(
+ WebString::fromUTF8(params.code), params.file_url);
v8::HandleScope scope(v8::Isolate::GetCurrent());
scoped_ptr<content::V8ValueConverter> v8_converter(
@@ -223,7 +225,7 @@ void UserScriptScheduler::ExecuteCodeImpl(
script_value = child_frame->executeScriptAndReturnValue(source);
} else {
blink::WebVector<v8::Local<v8::Value> > results;
- std::vector<WebScriptSource> sources;
+ std::vector<blink::WebScriptSource> sources;
sources.push_back(source);
int isolated_world_id =
dispatcher_->user_script_slave()->GetIsolatedWorldIdForExtension(

Powered by Google App Engine
This is Rietveld 408576698