summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/script_injection_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/renderer/script_injection_manager.cc')
-rw-r--r--extensions/renderer/script_injection_manager.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/extensions/renderer/script_injection_manager.cc b/extensions/renderer/script_injection_manager.cc
index 14f2767..abd7d80 100644
--- a/extensions/renderer/script_injection_manager.cc
+++ b/extensions/renderer/script_injection_manager.cc
@@ -321,7 +321,11 @@ void ScriptInjectionManager::InjectScripts(
void ScriptInjectionManager::HandleExecuteCode(
const ExtensionMsg_ExecuteCode_Params& params,
content::RenderView* render_view) {
- blink::WebFrame* main_frame = render_view->GetWebView()->mainFrame();
+ // TODO(dcheng): Not sure how this can happen today. In an OOPI world, it
+ // would indicate a logic error--the browser must direct this request to the
+ // right renderer process to begin with.
+ blink::WebLocalFrame* main_frame =
+ render_view->GetWebView()->mainFrame()->toWebLocalFrame();
if (!main_frame) {
render_view->Send(
new ExtensionHostMsg_ExecuteCodeFinished(render_view->GetRoutingID(),
@@ -357,10 +361,12 @@ void ScriptInjectionManager::HandleExecuteDeclarativeScript(
int script_id,
const GURL& url) {
const Extension* extension = extensions_->GetByID(extension_id);
+ // TODO(dcheng): This function signature should really be a WebLocalFrame,
+ // rather than trying to coerce it here.
scoped_ptr<ScriptInjection> injection =
user_script_set_manager_->GetInjectionForDeclarativeScript(
script_id,
- web_frame,
+ web_frame->toWebLocalFrame(),
tab_id,
url,
extension);