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

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
« no previous file with comments | « extensions/renderer/script_injection.cc ('k') | extensions/renderer/user_script_slave.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_scheduler.cc
diff --git a/extensions/renderer/user_script_scheduler.cc b/extensions/renderer/user_script_scheduler.cc
index 92918d028095f93a1587f02f106a18884b8839b8..cc0d84bfe83b1b86005c03fa4e73d4cacda8cc27 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(
« no previous file with comments | « extensions/renderer/script_injection.cc ('k') | extensions/renderer/user_script_slave.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698