summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/execute_code_function.h
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 23:09:30 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 23:09:30 +0000
commita7074d1c5c07670813eefdbf286c23416e528123 (patch)
tree5b56c2dcaeb2aa005fb45ec4da3f588e11b8a797 /chrome/browser/extensions/api/execute_code_function.h
parentc2abefb3f1b537f3c1f15c894496184f9d5a56da (diff)
downloadchromium_src-a7074d1c5c07670813eefdbf286c23416e528123.zip
chromium_src-a7074d1c5c07670813eefdbf286c23416e528123.tar.gz
chromium_src-a7074d1c5c07670813eefdbf286c23416e528123.tar.bz2
<webview>: Support showing injected scripts in DevTools
This CL plumbs the file URL of the injected script via executeScript so that DevTools can allow debugging of the script. BUG=293638 Test=manually, inject a script file via executeScript, open the guest's inspector, go to Sources, click Content scripts, and the script will show up there. Review URL: https://codereview.chromium.org/23484062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/execute_code_function.h')
-rw-r--r--chrome/browser/extensions/api/execute_code_function.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/extensions/api/execute_code_function.h b/chrome/browser/extensions/api/execute_code_function.h
index b3de979..6d2d420 100644
--- a/chrome/browser/extensions/api/execute_code_function.h
+++ b/chrome/browser/extensions/api/execute_code_function.h
@@ -6,12 +6,11 @@
#define CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_
#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/browser/extensions/script_executor.h"
#include "chrome/common/extensions/api/tabs.h"
namespace extensions {
-class ScriptExecutor;
-
// Base class for javascript code injection.
// This is used by both chrome.webview.executeScript and
// chrome.tabs.executeScript.
@@ -48,7 +47,8 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
// Runs on FILE thread. Loads message bundles for the extension and
// localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread.
- void LocalizeCSS(
+ void GetFileURLAndLocalizeCSS(
+ ScriptExecutor::ScriptType script_type,
const std::string& data,
const std::string& extension_id,
const base::FilePath& extension_path,
@@ -64,6 +64,9 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
// Contains extension resource built from path of file which is
// specified in JSON arguments.
ExtensionResource resource_;
+
+ // The URL of the file being injected into the page.
+ GURL file_url_;
};
} // namespace extensions