mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: service worker preload scripts for improved extensions support (#44411)
* feat: preload scripts for service workers * feat: service worker IPC * test: service worker preload scripts and ipc
This commit is contained in:
27
shell/renderer/preload_utils.h
Normal file
27
shell/renderer/preload_utils.h
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2016 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_RENDERER_PRELOAD_UTILS_H_
|
||||
#define ELECTRON_SHELL_RENDERER_PRELOAD_UTILS_H_
|
||||
|
||||
#include "v8/include/v8-forward.h"
|
||||
|
||||
namespace gin_helper {
|
||||
class Arguments;
|
||||
}
|
||||
|
||||
namespace electron::preload_utils {
|
||||
|
||||
v8::Local<v8::Value> GetBinding(v8::Isolate* isolate,
|
||||
v8::Local<v8::String> key,
|
||||
gin_helper::Arguments* margs);
|
||||
|
||||
v8::Local<v8::Value> CreatePreloadScript(v8::Isolate* isolate,
|
||||
v8::Local<v8::String> source);
|
||||
|
||||
double Uptime();
|
||||
|
||||
} // namespace electron::preload_utils
|
||||
|
||||
#endif // ELECTRON_SHELL_RENDERER_PRELOAD_UTILS_H_
|
||||
Reference in New Issue
Block a user