Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / execute_code_function.cc
index 9a7ec7d..f06c91c 100644 (file)
@@ -8,12 +8,12 @@
 #include "chrome/browser/extensions/image_loader.h"
 #include "chrome/browser/extensions/script_executor.h"
 #include "chrome/common/extensions/api/i18n/default_locale_handler.h"
-#include "chrome/common/extensions/extension_file_util.h"
-#include "chrome/common/extensions/message_bundle.h"
 #include "extensions/browser/file_reader.h"
 #include "extensions/common/error_utils.h"
 #include "extensions/common/extension_messages.h"
-#include "net/base/net_util.h"
+#include "extensions/common/file_util.h"
+#include "extensions/common/message_bundle.h"
+#include "net/base/filename_util.h"
 #include "ui/base/resource/resource_bundle.h"
 
 namespace extensions {
@@ -71,7 +71,7 @@ void ExecuteCodeFunction::GetFileURLAndLocalizeCSS(
       !extension_id.empty() &&
       (data.find(MessageBundle::kMessageBegin) != std::string::npos)) {
     scoped_ptr<SubstitutionMap> localization_messages(
-        extension_file_util::LoadMessageBundleSubstitutionMap(
+        file_util::LoadMessageBundleSubstitutionMap(
             extension_path, extension_id, extension_default_locale));
 
     // We need to do message replacement on the data, so it has to be mutable.
@@ -149,6 +149,7 @@ bool ExecuteCodeFunction::Execute(const std::string& code_string) {
       ScriptExecutor::ISOLATED_WORLD,
       IsWebView() ? ScriptExecutor::WEB_VIEW_PROCESS
                   : ScriptExecutor::DEFAULT_PROCESS,
+      GetWebViewSrc(),
       file_url_,
       user_gesture_,
       has_callback() ? ScriptExecutor::JSON_SERIALIZED_RESULT
@@ -161,7 +162,7 @@ bool ExecuteCodeFunction::HasPermission() {
   return true;
 }
 
-bool ExecuteCodeFunction::RunImpl() {
+bool ExecuteCodeFunction::RunAsync() {
   EXTENSION_FUNCTION_VALIDATE(Init());
 
   if (!details_->code.get() && !details_->file.get()) {