feat: redesign preload APIs (#45329)
* feat: redesign preload APIs Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * docs: remove service-worker mentions for now Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fix lint Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * remove service-worker ipc code Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * add filename Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fix: web preferences preload not included Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fix: missing common init Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> * fix: preload bundle script error Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
This commit is contained in:
parent
e9b3e4cc91
commit
9d696ceffe
19 changed files with 459 additions and 149 deletions
|
@ -57,6 +57,7 @@ class ProxyConfig;
|
|||
namespace electron {
|
||||
|
||||
class ElectronBrowserContext;
|
||||
struct PreloadScript;
|
||||
|
||||
namespace api {
|
||||
|
||||
|
@ -141,8 +142,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue