| Index: extensions/browser/api/execute_code_function.h
|
| diff --git a/extensions/browser/api/execute_code_function.h b/extensions/browser/api/execute_code_function.h
|
| index db0f441c8149baa5391e216057478f1b77181a7b..53b200d1a651d2a7199f3a4b0ba355c5769fcbe7 100644
|
| --- a/extensions/browser/api/execute_code_function.h
|
| +++ b/extensions/browser/api/execute_code_function.h
|
| @@ -17,6 +17,7 @@ namespace extensions {
|
| // chrome.tabs.executeScript.
|
| class ExecuteCodeFunction : public AsyncExtensionFunction {
|
| public:
|
| + using WebUILoadFileCallback = base::Callback<void(bool, const std::string&)>;
|
| ExecuteCodeFunction();
|
|
|
| protected:
|
| @@ -36,6 +37,8 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
|
| virtual void OnExecuteCodeFinished(const std::string& error,
|
| const GURL& on_url,
|
| const base::ListValue& result);
|
| + virtual bool LoadFileForWebUI(const std::string& file_src,
|
| + const WebUILoadFileCallback& callback);
|
|
|
| // The injection details.
|
| scoped_ptr<core_api::extension_types::InjectDetails> details_;
|
| @@ -50,6 +53,9 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
|
| // arguments has been loaded.
|
| void DidLoadFile(bool success, const std::string& data);
|
|
|
| + // Called when the file is loaded for WebUI.
|
| + void DidLoadFileForWebUI(bool success, const std::string& data);
|
| +
|
| // Runs on FILE thread. Loads message bundles for the extension and
|
| // localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread.
|
| void GetFileURLAndLocalizeCSS(ScriptExecutor::ScriptType script_type,
|
|
|