#include "extensions/renderer/extensions_renderer_client.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDocument.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScopedUserGesture.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
// |frame|. If no isolated world has been created for that extension,
// one will be created and initialized.
int GetIsolatedWorldIdForExtension(const Extension* extension,
- blink::WebFrame* frame) {
+ blink::WebLocalFrame* frame) {
static int g_next_isolated_world_id =
ExtensionsRendererClient::Get()->GetLowestIsolatedWorldId();
frame->setIsolatedWorldContentSecurityPolicy(
id,
blink::WebString::fromUTF8(CSPInfo::GetContentSecurityPolicy(extension)));
+ frame->setIsolatedWorldHumanReadableName(
+ id,
+ blink::WebString::fromUTF8(extension->name()));
return id;
}
ScriptInjection::ScriptInjection(
scoped_ptr<ScriptInjector> injector,
- blink::WebFrame* web_frame,
+ blink::WebLocalFrame* web_frame,
const std::string& extension_id,
UserScript::RunLocation run_location,
int tab_id)
for (std::vector<blink::WebFrame*>::iterator iter = frame_vector.begin();
iter != frame_vector.end();
++iter) {
- blink::WebFrame* frame = *iter;
+ // TODO(dcheng): Unfortunately, the code as written won't work in an OOPI
+ // world. This is just a temporary hack to make things compile.
+ blink::WebLocalFrame* frame = (*iter)->toWebLocalFrame();
// We recheck access here in the renderer for extra safety against races
// with navigation, but different frames can have different URLs, and the
}
void ScriptInjection::InjectJs(const Extension* extension,
- blink::WebFrame* frame,
+ blink::WebLocalFrame* frame,
base::ListValue* execution_results) {
std::vector<blink::WebScriptSource> sources =
injector_->GetJsSources(run_location_);
}
}
-void ScriptInjection::InjectCss(blink::WebFrame* frame) {
+void ScriptInjection::InjectCss(blink::WebLocalFrame* frame) {
std::vector<std::string> css_sources =
injector_->GetCssSources(run_location_);
for (std::vector<std::string>::const_iterator iter = css_sources.begin();