mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
feat: redesign preload APIs (#45230)
* feat: redesign preload APIs * docs: remove service-worker mentions for now * fix lint * remove service-worker ipc code * add filename * fix: web preferences preload not included * fix: missing common init * fix: preload bundle script error
This commit is contained in:
@@ -57,6 +57,7 @@ class ProxyConfig;
|
||||
namespace electron {
|
||||
|
||||
class ElectronBrowserContext;
|
||||
struct PreloadScript;
|
||||
|
||||
namespace api {
|
||||
|
||||
@@ -138,8 +139,11 @@ class Session final : public gin::Wrappable<Session>,
|
||||
const std::string& uuid);
|
||||
void DownloadURL(const GURL& url, gin::Arguments* args);
|
||||
void CreateInterruptedDownload(const gin_helper::Dictionary& options);
|
||||
void SetPreloads(const std::vector<base::FilePath>& preloads);
|
||||
std::vector<base::FilePath> GetPreloads() const;
|
||||
std::string RegisterPreloadScript(gin_helper::ErrorThrower thrower,
|
||||
const PreloadScript& new_preload_script);
|
||||
void UnregisterPreloadScript(gin_helper::ErrorThrower thrower,
|
||||
const std::string& script_id);
|
||||
std::vector<PreloadScript> GetPreloadScripts() const;
|
||||
v8::Local<v8::Promise> GetSharedDictionaryInfo(
|
||||
const gin_helper::Dictionary& options);
|
||||
v8::Local<v8::Promise> GetSharedDictionaryUsageInfo();
|
||||
|
||||
Reference in New Issue
Block a user