Index: chrome/browser/extensions/execute_code_in_tab_function.cc |
=================================================================== |
--- chrome/browser/extensions/execute_code_in_tab_function.cc (revision 66453) |
+++ chrome/browser/extensions/execute_code_in_tab_function.cc (working copy) |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/extensions/file_reader.h" |
#include "chrome/browser/profile.h" |
#include "chrome/browser/tab_contents/tab_contents.h" |
+#include "chrome/browser/tab_contents_wrapper.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/common/extensions/extension.h" |
#include "chrome/common/extensions/extension_constants.h" |
@@ -50,7 +51,7 @@ |
execute_tab_id_ = -1; |
Browser* browser = NULL; |
- TabContents* contents = NULL; |
+ TabContentsWrapper* contents = NULL; |
// If |tab_id| is specified, look for it. Otherwise default to selected tab |
// in the current window. |
@@ -82,7 +83,7 @@ |
const std::vector<URLPattern> host_permissions = |
extension->host_permissions(); |
if (!Extension::CanExecuteScriptOnPage( |
- contents->GetURL(), |
+ contents->tab_contents()->GetURL(), |
extension->CanExecuteScriptEverywhere(), |
&host_permissions, |
NULL, |
@@ -146,7 +147,7 @@ |
} |
bool ExecuteCodeInTabFunction::Execute(const std::string& code_string) { |
- TabContents* contents = NULL; |
+ TabContentsWrapper* contents = NULL; |
Browser* browser = NULL; |
bool success = ExtensionTabUtil::GetTabById( |
@@ -171,8 +172,8 @@ |
} else if (function_name != TabsExecuteScriptFunction::function_name()) { |
DCHECK(false); |
} |
- if (!contents->ExecuteCode(request_id(), extension->id(), |
- is_js_code, code_string, all_frames_)) { |
+ if (!contents->tab_contents()->ExecuteCode(request_id(), extension->id(), |
+ is_js_code, code_string, all_frames_)) { |
SendResponse(false); |
return false; |
} |