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:
parent
26d228ccfe
commit
e09577b123
19 changed files with 459 additions and 149 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "shell/browser/event_emitter_mixin.h"
|
||||
#include "shell/browser/extended_web_contents_observer.h"
|
||||
#include "shell/browser/osr/osr_paint_event.h"
|
||||
#include "shell/browser/preload_script.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_delegate.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_view_delegate.h"
|
||||
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
|
||||
|
@ -341,8 +342,8 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
const std::string& features,
|
||||
const scoped_refptr<network::ResourceRequestBody>& body);
|
||||
|
||||
// Returns the preload script path of current WebContents.
|
||||
std::vector<base::FilePath> GetPreloadPaths() const;
|
||||
// Returns the preload script of current WebContents.
|
||||
std::optional<PreloadScript> GetPreloadScript() const;
|
||||
|
||||
// Returns the web preferences of current WebContents.
|
||||
v8::Local<v8::Value> GetLastWebPreferences(v8::Isolate* isolate) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue