mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
12 Commits
v21.0.0-ni
...
v21.0.0-ni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1edf9d2ada | ||
|
|
d359736e65 | ||
|
|
c885f9063b | ||
|
|
c3920c5c02 | ||
|
|
5d120359f6 | ||
|
|
0d4e417594 | ||
|
|
4ddd03b1b3 | ||
|
|
7c12baccab | ||
|
|
461561c19c | ||
|
|
1f814eacb2 | ||
|
|
ad2b1fee59 | ||
|
|
35ff95d3c7 |
@@ -10,7 +10,7 @@ env:
|
||||
jobs:
|
||||
check_tag:
|
||||
runs-on: ubuntu-latest
|
||||
id: check_tag
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check Tag
|
||||
run: |
|
||||
|
||||
@@ -1 +1 @@
|
||||
21.0.0-nightly.20220628
|
||||
21.0.0-nightly.20220704
|
||||
10
appveyor.yml
10
appveyor.yml
@@ -34,16 +34,6 @@ environment:
|
||||
MOCHA_REPORTER: mocha-multi-reporters
|
||||
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
|
||||
GOMA_FALLBACK_ON_AUTH_FAILURE: true
|
||||
notifications:
|
||||
- provider: Webhook
|
||||
url: https://electron-mission-control.herokuapp.com/rest/appveyor-hook
|
||||
method: POST
|
||||
headers:
|
||||
x-mission-control-secret:
|
||||
secure: 90BLVPcqhJPG7d24v0q/RRray6W3wDQ8uVQlQjOHaBWkw1i8FoA1lsjr2C/v1dVok+tS2Pi6KxDctPUkwIb4T27u4RhvmcPzQhVpfwVJAG9oNtq+yKN7vzHfg7k/pojEzVdJpQLzeJGcSrZu7VY39Q==
|
||||
on_build_success: false
|
||||
on_build_failure: true
|
||||
on_build_status_changed: false
|
||||
build_script:
|
||||
- ps: >-
|
||||
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
|
||||
|
||||
@@ -19,17 +19,13 @@ TEMPLATE_H = """
|
||||
#define FUSE_EXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace fuses {
|
||||
namespace electron::fuses {
|
||||
|
||||
extern const volatile char kFuseWire[];
|
||||
|
||||
{getters}
|
||||
|
||||
} // namespace fuses
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::fuses
|
||||
|
||||
#endif // ELECTRON_FUSES_H_
|
||||
"""
|
||||
@@ -37,17 +33,13 @@ extern const volatile char kFuseWire[];
|
||||
TEMPLATE_CC = """
|
||||
#include "electron/fuses.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace fuses {
|
||||
namespace electron::fuses {
|
||||
|
||||
const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version */ {fuse_version}, /* fuse_wire_length */ {fuse_wire_length}, /* fuse_wire */ {initial_config}};
|
||||
|
||||
{getters}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace electron:fuses
|
||||
"""
|
||||
|
||||
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
|
||||
|
||||
@@ -8,9 +8,7 @@ TEMPLATE = """
|
||||
#include "node_native_module.h"
|
||||
#include "node_internals.h"
|
||||
|
||||
namespace node {{
|
||||
|
||||
namespace native_module {{
|
||||
namespace node::native_module {{
|
||||
|
||||
{definitions}
|
||||
|
||||
@@ -18,9 +16,7 @@ void NativeModuleLoader::LoadEmbedderJavaScriptSource() {{
|
||||
{initializers}
|
||||
}}
|
||||
|
||||
}} // namespace native_module
|
||||
|
||||
}} // namespace node
|
||||
}} // namespace node::native_module
|
||||
"""
|
||||
|
||||
def main():
|
||||
|
||||
@@ -98,7 +98,10 @@ is the origin that is checking for device permission.
|
||||
|
||||
## Planned Breaking API Changes (19.0)
|
||||
|
||||
None
|
||||
### Removed: IA32 Linux binaries
|
||||
|
||||
This is a result of Chromium 102.0.4999.0 dropping support for IA32 Linux.
|
||||
This concludes the [removal of support for IA32 Linux](#removed-ia32-linux-support).
|
||||
|
||||
## Planned Breaking API Changes (18.0)
|
||||
|
||||
@@ -1265,6 +1268,10 @@ not present, then the native module will fail to load on Windows, with an error
|
||||
message like `Cannot find module`. See the [native module
|
||||
guide](/docs/tutorial/using-native-node-modules.md) for more.
|
||||
|
||||
### Removed: IA32 Linux support
|
||||
|
||||
Electron 18 will no longer run on 32-bit Linux systems. See [discontinuing support for 32-bit Linux](https://www.electronjs.org/blog/linux-32bit-support) for more information.
|
||||
|
||||
## Breaking API Changes (3.0)
|
||||
|
||||
The following list includes the breaking API changes in Electron 3.0.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "21.0.0-nightly.20220628",
|
||||
"version": "21.0.0-nightly.20220704",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -537,6 +537,19 @@ index af2146982c7a3bf7bd7527f44e4b17a3b605026e..f6b91f675cfea367c608892dee078b56
|
||||
|
||||
// Non-XOF hash functions should accept valid outputLength options as well.
|
||||
assert.strictEqual(crypto.createHash('sha224', { outputLength: 28 })
|
||||
diff --git a/test/parallel/test-crypto-hkdf.js b/test/parallel/test-crypto-hkdf.js
|
||||
index 16744201a935dcd25af4e0f446701b08fe08dd64..e7ef0b78a19fb755456d038fc676eedb2f71ff07 100644
|
||||
--- a/test/parallel/test-crypto-hkdf.js
|
||||
+++ b/test/parallel/test-crypto-hkdf.js
|
||||
@@ -117,8 +117,6 @@ const algorithms = [
|
||||
['sha256', 'secret', 'salt', 'info', 10],
|
||||
['sha512', 'secret', 'salt', '', 15],
|
||||
];
|
||||
-if (!common.hasOpenSSL3)
|
||||
- algorithms.push(['whirlpool', 'secret', '', 'info', 20]);
|
||||
|
||||
algorithms.forEach(([ hash, secret, salt, info, length ]) => {
|
||||
{
|
||||
diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js
|
||||
index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ceed84e6f7 100644
|
||||
--- a/test/parallel/test-crypto-padding.js
|
||||
|
||||
@@ -188,28 +188,6 @@ index c7894baf00ee9ce4684f4c752f1c7c9b98163741..655895dbff8b88daa53c7b40a5feca42
|
||||
if (EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0)
|
||||
return EVPKeyCtxPointer();
|
||||
|
||||
diff --git a/src/crypto/crypto_hkdf.cc b/src/crypto/crypto_hkdf.cc
|
||||
index 0aa96ada47abe4b66fb616c665101278bbe0afb6..1e9a4863c5faea5f6b275483ca16f3a6e8dac25b 100644
|
||||
--- a/src/crypto/crypto_hkdf.cc
|
||||
+++ b/src/crypto/crypto_hkdf.cc
|
||||
@@ -101,6 +101,7 @@ bool HKDFTraits::DeriveBits(
|
||||
Environment* env,
|
||||
const HKDFConfig& params,
|
||||
ByteSource* out) {
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
EVPKeyCtxPointer ctx =
|
||||
EVPKeyCtxPointer(EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, nullptr));
|
||||
if (!ctx ||
|
||||
@@ -132,6 +133,9 @@ bool HKDFTraits::DeriveBits(
|
||||
|
||||
*out = std::move(buf);
|
||||
return true;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void HKDFConfig::MemoryInfo(MemoryTracker* tracker) const {
|
||||
diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc
|
||||
index fc88deb460314c2620d842ec30141bcd13109d60..c097ccfcffb1158317ba09e7c4beb725ccbab74f 100644
|
||||
--- a/src/crypto/crypto_random.cc
|
||||
@@ -244,10 +222,10 @@ index ae4550e9fde8120c35409e495d5b763a95546509..188a7efe76df2a1aa2eb2746f4d74836
|
||||
|
||||
if (target
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba1e76ce0a 100644
|
||||
index e1ef170a9f17634d218492a2ce888c3a4365e097..f55e292fbbc75448b15dc9be0327ad2dedef49e0 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -508,24 +508,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
|
||||
@@ -508,24 +508,15 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
|
||||
V(BIO) \
|
||||
V(PKCS7) \
|
||||
V(X509V3) \
|
||||
@@ -269,10 +247,11 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba
|
||||
- V(ASYNC) \
|
||||
- V(KDF) \
|
||||
- V(SM2) \
|
||||
+ V(HKDF) \
|
||||
V(USER) \
|
||||
|
||||
#define V(name) case ERR_LIB_##name: lib = #name "_"; break;
|
||||
@@ -684,7 +674,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -684,7 +675,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
CHECK(args[0]->IsUint32());
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
uint32_t len = args[0].As<Uint32>()->Value();
|
||||
@@ -281,7 +260,7 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba
|
||||
if (data == nullptr) {
|
||||
// There's no memory available for the allocation.
|
||||
// Return nothing.
|
||||
@@ -696,7 +686,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -696,7 +687,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
data,
|
||||
len,
|
||||
[](void* data, size_t len, void* deleter_data) {
|
||||
@@ -290,7 +269,7 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba
|
||||
},
|
||||
data);
|
||||
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
|
||||
@@ -704,10 +694,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -704,10 +695,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
|
||||
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -303,20 +282,6 @@ index e1ef170a9f17634d218492a2ce888c3a4365e097..8dffad89c80e0906780d1b26ba9a65ba
|
||||
}
|
||||
} // namespace
|
||||
|
||||
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
|
||||
index c431159e6f77f8c86844bcadb86012b056d03372..0ce3a8f219a2952f660ff72a6ce36ee109add649 100644
|
||||
--- a/src/crypto/crypto_util.h
|
||||
+++ b/src/crypto/crypto_util.h
|
||||
@@ -16,7 +16,9 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/ec.h>
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
#include <openssl/kdf.h>
|
||||
+#endif
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/ssl.h>
|
||||
diff --git a/src/node_metadata.h b/src/node_metadata.h
|
||||
index 4486d5af2c1622c7c8f44401dc3ebb986d8e3c2e..db1769f1b3f1617ed8dbbea57b5e324183b42be2 100644
|
||||
--- a/src/node_metadata.h
|
||||
|
||||
@@ -118,7 +118,7 @@ index 2abf5994405e8da2a04d1b23b75ccd3658398474..024d612a04d83583b397549589d994e3
|
||||
|
||||
DebuggingArrayBufferAllocator::~DebuggingArrayBufferAllocator() {
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c28152e2bfd0 100644
|
||||
index f55e292fbbc75448b15dc9be0327ad2dedef49e0..7719574859637aecc98f8a4b00ba6ebca8280631 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -318,10 +318,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept {
|
||||
@@ -171,7 +171,7 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281
|
||||
return ArrayBuffer::New(env->isolate(), std::move(store));
|
||||
}
|
||||
|
||||
@@ -665,6 +691,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local<v8::Value> args) {
|
||||
@@ -666,6 +692,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local<v8::Value> args) {
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -188,7 +188,7 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281
|
||||
// SecureBuffer uses openssl to allocate a Uint8Array using
|
||||
// OPENSSL_secure_malloc. Because we do not yet actually
|
||||
// make use of secure heap, this has the same semantics as
|
||||
@@ -692,6 +728,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -693,6 +729,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
|
||||
args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len));
|
||||
}
|
||||
@@ -197,10 +197,10 @@ index 8dffad89c80e0906780d1b26ba9a65ba1e76ce0a..45bc99ce75248794e95b2dcb0101c281
|
||||
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
|
||||
#ifndef OPENSSL_IS_BORINGSSL
|
||||
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
|
||||
index 0ce3a8f219a2952f660ff72a6ce36ee109add649..06e9eb72e4ea60db4c63d08b24b80a1e6c4f3eaf 100644
|
||||
index c431159e6f77f8c86844bcadb86012b056d03372..9f57ac58d826cb0aae422ddca54e2136618c4bfe 100644
|
||||
--- a/src/crypto/crypto_util.h
|
||||
+++ b/src/crypto/crypto_util.h
|
||||
@@ -257,7 +257,7 @@ class ByteSource {
|
||||
@@ -255,7 +255,7 @@ class ByteSource {
|
||||
// Creates a v8::BackingStore that takes over responsibility for
|
||||
// any allocated data. The ByteSource will be reset with size = 0
|
||||
// after being called.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
"parallel/test-crypto-ecb",
|
||||
"parallel/test-crypto-engine",
|
||||
"parallel/test-crypto-fips",
|
||||
"parallel/test-crypto-hkdf.js",
|
||||
"parallel/test-crypto-keygen",
|
||||
"parallel/test-crypto-keygen-deprecation",
|
||||
"parallel/test-crypto-key-objects",
|
||||
@@ -104,7 +103,6 @@
|
||||
"parallel/test-trace-events-vm",
|
||||
"parallel/test-trace-events-worker-metadata",
|
||||
"parallel/test-v8-untrusted-code-mitigations",
|
||||
"parallel/test-webcrypto-derivebits-hkdf",
|
||||
"parallel/test-webcrypto-derivebits-node-dh",
|
||||
"parallel/test-webcrypto-ed25519-ed448",
|
||||
"parallel/test-webcrypto-encrypt-decrypt",
|
||||
|
||||
@@ -453,9 +453,7 @@ struct Converter<net::SecureDnsMode> {
|
||||
};
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo App::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -1822,9 +1820,7 @@ const char* App::GetTypeName() {
|
||||
return "App";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <sys/sysctl.h>
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
void App::SetAppLogsPath(gin_helper::ErrorThrower thrower,
|
||||
absl::optional<base::FilePath> custom_path) {
|
||||
@@ -82,6 +80,4 @@ bool App::IsRunningUnderARM64Translation() const {
|
||||
return proc_translated == 1;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
// Callback passed to js which will stop accessing the given bookmark.
|
||||
void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
|
||||
@@ -64,6 +62,4 @@ base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
|
||||
bookmarkUrl);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo AutoUpdater::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -134,9 +132,7 @@ const char* AutoUpdater::GetTypeName() {
|
||||
return "AutoUpdater";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "shell/browser/event_emitter_mixin.h"
|
||||
#include "shell/browser/window_list_observer.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class AutoUpdater : public gin::Wrappable<AutoUpdater>,
|
||||
public gin_helper::EventEmitterMixin<AutoUpdater>,
|
||||
@@ -60,8 +58,6 @@ class AutoUpdater : public gin::Wrappable<AutoUpdater>,
|
||||
void QuitAndInstall();
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
||||
|
||||
@@ -58,9 +58,7 @@ struct Converter<electron::TaskbarHost::ThumbarButton> {
|
||||
} // namespace gin
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -1323,9 +1321,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
|
||||
.SetProperty("id", &BaseWindow::GetID);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class View;
|
||||
|
||||
@@ -282,8 +280,6 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
base::WeakPtrFactory<BaseWindow> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_
|
||||
|
||||
@@ -67,9 +67,7 @@ int32_t GetNextId() {
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo BrowserView::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -200,9 +198,7 @@ v8::Local<v8::ObjectTemplate> BrowserView::FillObjectTemplate(
|
||||
.Build();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -28,9 +28,7 @@ namespace gin_helper {
|
||||
class Dictionary;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class WebContents;
|
||||
|
||||
@@ -90,8 +88,6 @@ class BrowserView : public gin::Wrappable<BrowserView>,
|
||||
int32_t id_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
#include "shell/browser/ui/views/win_frame_view.h"
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
BrowserWindow::BrowserWindow(gin::Arguments* args,
|
||||
const gin_helper::Dictionary& options)
|
||||
@@ -607,9 +605,7 @@ v8::Local<v8::Value> BrowserWindow::From(v8::Isolate* isolate,
|
||||
return v8::Null(isolate);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "shell/browser/ui/drag_util.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class BrowserWindow : public BaseWindow,
|
||||
public content::RenderWidgetHost::InputEventObserver,
|
||||
@@ -133,8 +131,6 @@ class BrowserWindow : public BaseWindow,
|
||||
base::WeakPtrFactory<BrowserWindow> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_view.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
void BrowserWindow::OverrideNSWindowContentView(
|
||||
InspectableWebContentsView* view) {
|
||||
@@ -102,6 +100,4 @@ void BrowserWindow::UpdateDraggableRegions(
|
||||
[[webView window] setMovableByWindowBackground:YES];
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
#include "shell/browser/native_window_views.h"
|
||||
#include "ui/aura/window.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
void BrowserWindow::UpdateDraggableRegions(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) {
|
||||
@@ -36,6 +34,4 @@ void BrowserWindow::UpdateDraggableRegions(
|
||||
->UpdateDraggableRegions(draggable_regions_);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -91,9 +91,7 @@ struct Converter<net::CookieChangeCause> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -397,6 +395,4 @@ const char* Cookies::GetTypeName() {
|
||||
return "Cookies";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -64,11 +64,7 @@ bool g_crash_reporter_initialized = false;
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
|
||||
namespace crash_reporter {
|
||||
namespace electron::api::crash_reporter {
|
||||
|
||||
#if defined(MAS_BUILD)
|
||||
namespace {
|
||||
@@ -196,11 +192,7 @@ void Start(const std::string& submit_url,
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace crash_reporter
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api::crash_reporter
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -9,11 +9,7 @@
|
||||
#include <string>
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
|
||||
namespace crash_reporter {
|
||||
namespace electron::api::crash_reporter {
|
||||
|
||||
bool IsCrashReporterEnabled();
|
||||
|
||||
@@ -32,10 +28,6 @@ void Start(const std::string& submit_url,
|
||||
const std::map<std::string, std::string>& extra,
|
||||
bool is_node_process);
|
||||
|
||||
} // namespace crash_reporter
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api::crash_reporter
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -181,6 +179,4 @@ gin::Handle<DataPipeHolder> DataPipeHolder::From(v8::Isolate* isolate,
|
||||
return gin::Handle<DataPipeHolder>();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "services/network/public/cpp/data_element.h"
|
||||
#include "services/network/public/mojom/data_pipe_getter.mojom.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
// Retains reference to the data pipe.
|
||||
class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
||||
@@ -49,8 +47,6 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
||||
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
using content::DevToolsAgentHost;
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Debugger::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -206,6 +204,4 @@ const char* Debugger::GetTypeName() {
|
||||
return "Debugger";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -22,9 +22,7 @@ class DevToolsAgentHost;
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class Debugger : public gin::Wrappable<Debugger>,
|
||||
public gin_helper::EventEmitterMixin<Debugger>,
|
||||
@@ -74,8 +72,6 @@ class Debugger : public gin::Wrappable<Debugger>,
|
||||
int previous_request_id_ = 0;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
||||
|
||||
@@ -59,9 +59,7 @@ struct Converter<electron::api::DesktopCapturer::Source> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo DesktopCapturer::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -217,9 +215,7 @@ const char* DesktopCapturer::GetTypeName() {
|
||||
return "DesktopCapturer";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "gin/wrappable.h"
|
||||
#include "shell/common/gin_helper/pinnable.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
|
||||
public gin_helper::Pinnable<DesktopCapturer>,
|
||||
@@ -77,8 +75,6 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
|
||||
base::WeakPtrFactory<DesktopCapturer> weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
||||
|
||||
@@ -48,9 +48,7 @@ struct Converter<download::DownloadItem::DownloadState> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -301,6 +299,4 @@ gin::Handle<DownloadItem> DownloadItem::FromOrCreate(
|
||||
return handle;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class DownloadItem : public gin::Wrappable<DownloadItem>,
|
||||
public gin_helper::Pinnable<DownloadItem>,
|
||||
@@ -87,8 +85,6 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
|
||||
base::WeakPtrFactory<DownloadItem> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
||||
|
||||
@@ -51,9 +51,7 @@ bool MapHasMediaKeys(
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo GlobalShortcut::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -182,9 +180,7 @@ const char* GlobalShortcut::GetTypeName() {
|
||||
return "GlobalShortcut";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "gin/wrappable.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
||||
public gin::Wrappable<GlobalShortcut> {
|
||||
@@ -56,8 +54,6 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
||||
AcceleratorCallbackMap accelerator_callback_map_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
||||
|
||||
@@ -135,9 +135,7 @@ struct Converter<in_app_purchase::Product> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo InAppPurchase::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -211,9 +209,7 @@ void InAppPurchase::OnTransactionsUpdated(
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "shell/browser/mac/in_app_purchase_product.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class InAppPurchase : public gin::Wrappable<InAppPurchase>,
|
||||
public gin_helper::EventEmitterMixin<InAppPurchase>,
|
||||
@@ -51,8 +49,6 @@ class InAppPurchase : public gin::Wrappable<InAppPurchase>,
|
||||
const std::vector<in_app_purchase::Transaction>& transactions) override;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
||||
|
||||
@@ -44,9 +44,7 @@ struct Converter<SharingItem> {
|
||||
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Menu::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -301,9 +299,7 @@ v8::Local<v8::ObjectTemplate> Menu::FillObjectTemplate(
|
||||
.Build();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "shell/common/gin_helper/constructible.h"
|
||||
#include "shell/common/gin_helper/pinnable.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class Menu : public gin::Wrappable<Menu>,
|
||||
public gin_helper::EventEmitterMixin<Menu>,
|
||||
@@ -123,9 +121,7 @@ class Menu : public gin::Wrappable<Menu>,
|
||||
bool WorksWhenHiddenAt(int index) const;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace gin {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
|
||||
using base::scoped_nsobject;
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class MenuMac : public Menu {
|
||||
protected:
|
||||
@@ -50,8 +48,6 @@ class MenuMac : public Menu {
|
||||
base::WeakPtrFactory<MenuMac> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
|
||||
|
||||
@@ -42,9 +42,7 @@ ui::Accelerator GetAcceleratorFromKeyEquivalentAndModifierMask(
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
MenuMac::MenuMac(gin::Arguments* args) : Menu(args) {}
|
||||
|
||||
@@ -262,6 +260,4 @@ gin::Handle<Menu> Menu::New(gin::Arguments* args) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
|
||||
using views::MenuRunner;
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
MenuViews::MenuViews(gin::Arguments* args) : Menu(args) {}
|
||||
|
||||
@@ -91,6 +89,4 @@ gin::Handle<Menu> Menu::New(gin::Arguments* args) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/views/controls/menu/menu_runner.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class MenuViews : public Menu {
|
||||
public:
|
||||
@@ -39,8 +37,6 @@ class MenuViews : public Menu {
|
||||
base::WeakPtrFactory<MenuViews> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo NativeTheme::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -117,9 +115,7 @@ const char* NativeTheme::GetTypeName() {
|
||||
return "NativeTheme";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
#include "ui/native_theme/native_theme_observer.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class NativeTheme : public gin::Wrappable<NativeTheme>,
|
||||
public gin_helper::EventEmitterMixin<NativeTheme>,
|
||||
@@ -57,9 +55,7 @@ class NativeTheme : public gin::Wrappable<NativeTheme>,
|
||||
ui::NativeTheme* web_theme_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace gin {
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "base/mac/sdk_forward_declarations.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
void NativeTheme::UpdateMacOSAppearanceForOverrideValue(
|
||||
ui::NativeTheme::ThemeSource override) {
|
||||
@@ -32,6 +30,4 @@ void NativeTheme::UpdateMacOSAppearanceForOverrideValue(
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -45,9 +45,7 @@ struct Converter<electron::NotificationAction> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Notification::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -284,9 +282,7 @@ v8::Local<v8::ObjectTemplate> Notification::FillObjectTemplate(
|
||||
.Build();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -25,9 +25,7 @@ template <typename T>
|
||||
class Handle;
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class Notification : public gin::Wrappable<Notification>,
|
||||
public gin_helper::EventEmitterMixin<Notification>,
|
||||
@@ -117,8 +115,6 @@ class Notification : public gin::Wrappable<Notification>,
|
||||
base::WeakPtr<electron::Notification> notification_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
||||
|
||||
@@ -35,9 +35,7 @@ struct Converter<ui::IdleState> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo PowerMonitor::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -116,9 +114,7 @@ const char* PowerMonitor::GetTypeName() {
|
||||
return "PowerMonitor";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "shell/browser/lib/power_observer_linux.h"
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
||||
public gin_helper::EventEmitterMixin<PowerMonitor>,
|
||||
@@ -86,8 +84,6 @@ class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
||||
|
||||
@@ -108,9 +108,7 @@
|
||||
|
||||
@end
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
static MacLockMonitor* g_lock_monitor = nil;
|
||||
|
||||
@@ -120,6 +118,4 @@ void PowerMonitor::InitPlatformSpecificMonitors() {
|
||||
[g_lock_monitor addEmitter:this];
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -37,9 +37,7 @@ struct Converter<device::mojom::WakeLockType> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo PowerSaveBlocker::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -126,9 +124,7 @@ gin::ObjectTemplateBuilder PowerSaveBlocker::GetObjectTemplateBuilder(
|
||||
.SetMethod("isStarted", &PowerSaveBlocker::IsStarted);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/device/public/mojom/wake_lock.mojom.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
||||
public:
|
||||
@@ -56,8 +54,6 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
||||
mojo::Remote<device::mojom::WakeLock> wake_lock_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
||||
|
||||
@@ -38,9 +38,7 @@ struct Converter<printing::PrinterBasicInfo> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
printing::PrinterList GetPrinterList(v8::Isolate* isolate) {
|
||||
@@ -89,9 +87,7 @@ v8::Local<v8::Promise> GetPrinterListAsync(v8::Isolate* isolate) {
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -78,8 +78,7 @@ struct Converter<CustomScheme> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Protocol::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -312,8 +311,7 @@ const char* Protocol::GetTypeName() {
|
||||
return "Protocol";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/platform_util.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace safestorage {
|
||||
namespace electron::safestorage {
|
||||
|
||||
static const char* kEncryptionVersionPrefixV10 = "v10";
|
||||
static const char* kEncryptionVersionPrefixV11 = "v11";
|
||||
@@ -119,9 +117,7 @@ std::string DecryptString(v8::Isolate* isolate, v8::Local<v8::Value> buffer) {
|
||||
return plaintext;
|
||||
}
|
||||
|
||||
} // namespace safestorage
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::safestorage
|
||||
|
||||
void Initialize(v8::Local<v8::Object> exports,
|
||||
v8::Local<v8::Value> unused,
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
#include "base/dcheck_is_on.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace safestorage {
|
||||
namespace electron::safestorage {
|
||||
|
||||
// Used in a DCHECK to validate that our assumption that the network context
|
||||
// manager has initialized before app ready holds true. Only used in the
|
||||
@@ -18,8 +16,6 @@ namespace safestorage {
|
||||
void SetElectronCryptoReady(bool ready);
|
||||
#endif
|
||||
|
||||
} // namespace safestorage
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::safestorage
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
#include "ui/display/win/screen_win.h"
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Screen::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -166,9 +164,7 @@ const char* Screen::GetTypeName() {
|
||||
return "Screen";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ class Rect;
|
||||
class Screen;
|
||||
} // namespace gfx
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class Screen : public gin::Wrappable<Screen>,
|
||||
public gin_helper::EventEmitterMixin<Screen>,
|
||||
@@ -58,8 +56,6 @@ class Screen : public gin::Wrappable<Screen>,
|
||||
display::Screen* screen_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#include "shell/common/gin_helper/function_template_extensions.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -162,6 +160,4 @@ const char* ServiceWorkerContext::GetTypeName() {
|
||||
return "ServiceWorkerContext";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -242,9 +242,7 @@ struct Converter<network::mojom::SSLConfigPtr> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -1255,9 +1253,7 @@ const char* Session::GetTypeName() {
|
||||
return "Session";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo SystemPreferences::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -117,9 +115,7 @@ const char* SystemPreferences::GetTypeName() {
|
||||
return "SystemPreferences";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#include "ui/gfx/sys_color_change_listener.h"
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
enum class NotificationCenterKind {
|
||||
@@ -168,8 +166,6 @@ class SystemPreferences
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
||||
|
||||
@@ -86,9 +86,7 @@ struct Converter<NSAppearance*> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -657,6 +655,4 @@ void SystemPreferences::SetAppLevelAppearance(gin::Arguments* args) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -56,9 +56,7 @@ struct Converter<electron::TrayIcon::IconType> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -422,9 +420,7 @@ v8::Local<v8::ObjectTemplate> Tray::FillObjectTemplate(
|
||||
.Build();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -29,9 +29,7 @@ namespace gin_helper {
|
||||
class Dictionary;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class Menu;
|
||||
|
||||
@@ -113,8 +111,6 @@ class Tray : public gin::Wrappable<Tray>,
|
||||
std::unique_ptr<TrayIcon> tray_icon_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
||||
|
||||
@@ -70,9 +70,7 @@ struct Converter<network::mojom::CredentialsMode> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -614,6 +612,4 @@ const char* SimpleURLLoaderWrapper::GetTypeName() {
|
||||
return "SimpleURLLoaderWrapper";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -33,9 +33,7 @@ class SimpleURLLoader;
|
||||
struct ResourceRequest;
|
||||
} // namespace network
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
/** Wraps a SimpleURLLoader to make it usable from JavaScript */
|
||||
class SimpleURLLoaderWrapper
|
||||
@@ -123,8 +121,6 @@ class SimpleURLLoaderWrapper
|
||||
base::WeakPtrFactory<SimpleURLLoaderWrapper> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
View::View(views::View* view) : view_(view) {
|
||||
view_->set_owned_by_client();
|
||||
@@ -55,9 +53,7 @@ void View::BuildPrototype(v8::Isolate* isolate,
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
#include "ui/views/view.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class View : public gin_helper::Wrappable<View> {
|
||||
public:
|
||||
@@ -49,8 +47,6 @@ class View : public gin_helper::Wrappable<View> {
|
||||
views::View* view_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
||||
|
||||
@@ -372,9 +372,7 @@ struct Converter<scoped_refptr<content::DevToolsAgentHost>> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -547,14 +545,13 @@ FileSystem CreateFileSystemStruct(content::WebContents* web_contents,
|
||||
return FileSystem(type, file_system_name, root_url, file_system_path);
|
||||
}
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> CreateFileSystemValue(
|
||||
const FileSystem& file_system) {
|
||||
auto file_system_value = std::make_unique<base::DictionaryValue>();
|
||||
file_system_value->SetString("type", file_system.type);
|
||||
file_system_value->SetString("fileSystemName", file_system.file_system_name);
|
||||
file_system_value->SetString("rootURL", file_system.root_url);
|
||||
file_system_value->SetString("fileSystemPath", file_system.file_system_path);
|
||||
return file_system_value;
|
||||
base::Value::Dict CreateFileSystemValue(const FileSystem& file_system) {
|
||||
base::Value::Dict value;
|
||||
value.Set("type", file_system.type);
|
||||
value.Set("fileSystemName", file_system.file_system_name);
|
||||
value.Set("rootURL", file_system.root_url);
|
||||
value.Set("fileSystemPath", file_system.file_system_path);
|
||||
return value;
|
||||
}
|
||||
|
||||
void WriteToFile(const base::FilePath& path, const std::string& content) {
|
||||
@@ -1986,9 +1983,8 @@ void WebContents::DevToolsOpened() {
|
||||
devtools_web_contents_.Reset(isolate, handle.ToV8());
|
||||
|
||||
// Set inspected tabID.
|
||||
base::Value tab_id(ID());
|
||||
inspectable_web_contents_->CallClientFunction("DevToolsAPI.setInspectedTabId",
|
||||
&tab_id, nullptr, nullptr);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI", "setInspectedTabId", base::Value(ID()));
|
||||
|
||||
// Inherit owner window in devtools when it doesn't have one.
|
||||
auto* devtools = inspectable_web_contents_->GetDevToolsWebContents();
|
||||
@@ -3595,19 +3591,17 @@ void WebContents::DevToolsSaveToFile(const std::string& url,
|
||||
settings.title = url;
|
||||
settings.default_path = base::FilePath::FromUTF8Unsafe(url);
|
||||
if (!file_dialog::ShowSaveDialogSync(settings, &path)) {
|
||||
base::Value url_value(url);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.canceledSaveURL", &url_value, nullptr, nullptr);
|
||||
"DevToolsAPI", "canceledSaveURL", base::Value(url));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
saved_files_[url] = path;
|
||||
// Notify DevTools.
|
||||
base::Value url_value(url);
|
||||
base::Value file_system_path_value(path.AsUTF8Unsafe());
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.savedURL", &url_value, &file_system_path_value, nullptr);
|
||||
"DevToolsAPI", "savedURL", base::Value(url),
|
||||
base::Value(path.AsUTF8Unsafe()));
|
||||
file_task_runner_->PostTask(FROM_HERE,
|
||||
base::BindOnce(&WriteToFile, path, content));
|
||||
}
|
||||
@@ -3619,9 +3613,8 @@ void WebContents::DevToolsAppendToFile(const std::string& url,
|
||||
return;
|
||||
|
||||
// Notify DevTools.
|
||||
base::Value url_value(url);
|
||||
inspectable_web_contents_->CallClientFunction("DevToolsAPI.appendedToURL",
|
||||
&url_value, nullptr, nullptr);
|
||||
inspectable_web_contents_->CallClientFunction("DevToolsAPI", "appendedToURL",
|
||||
base::Value(url));
|
||||
file_task_runner_->PostTask(
|
||||
FROM_HERE, base::BindOnce(&AppendToFile, it->second, content));
|
||||
}
|
||||
@@ -3629,10 +3622,8 @@ void WebContents::DevToolsAppendToFile(const std::string& url,
|
||||
void WebContents::DevToolsRequestFileSystems() {
|
||||
auto file_system_paths = GetAddedFileSystemPaths(GetDevToolsWebContents());
|
||||
if (file_system_paths.empty()) {
|
||||
base::ListValue empty_file_system_value;
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.fileSystemsLoaded", &empty_file_system_value, nullptr,
|
||||
nullptr);
|
||||
"DevToolsAPI", "fileSystemsLoaded", base::Value(base::Value::List()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3648,12 +3639,12 @@ void WebContents::DevToolsRequestFileSystems() {
|
||||
file_systems.push_back(file_system);
|
||||
}
|
||||
|
||||
base::ListValue file_system_value;
|
||||
base::Value::List file_system_value;
|
||||
for (const auto& file_system : file_systems)
|
||||
file_system_value.Append(
|
||||
base::Value::FromUniquePtrValue(CreateFileSystemValue(file_system)));
|
||||
file_system_value.Append(CreateFileSystemValue(file_system));
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.fileSystemsLoaded", &file_system_value, nullptr, nullptr);
|
||||
"DevToolsAPI", "fileSystemsLoaded",
|
||||
base::Value(std::move(file_system_value)));
|
||||
}
|
||||
|
||||
void WebContents::DevToolsAddFileSystem(
|
||||
@@ -3679,14 +3670,15 @@ void WebContents::DevToolsAddFileSystem(
|
||||
|
||||
FileSystem file_system = CreateFileSystemStruct(
|
||||
GetDevToolsWebContents(), file_system_id, path.AsUTF8Unsafe(), type);
|
||||
std::unique_ptr<base::DictionaryValue> file_system_value(
|
||||
CreateFileSystemValue(file_system));
|
||||
base::Value::Dict file_system_value = CreateFileSystemValue(file_system);
|
||||
|
||||
auto* pref_service = GetPrefService(GetDevToolsWebContents());
|
||||
DictionaryPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths);
|
||||
update.Get()->SetKey(path.AsUTF8Unsafe(), base::Value(type));
|
||||
std::string error = ""; // No error
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.fileSystemAdded", nullptr, file_system_value.get(), nullptr);
|
||||
"DevToolsAPI", "fileSystemAdded", base::Value(error),
|
||||
base::Value(std::move(file_system_value)));
|
||||
}
|
||||
|
||||
void WebContents::DevToolsRemoveFileSystem(
|
||||
@@ -3702,10 +3694,8 @@ void WebContents::DevToolsRemoveFileSystem(
|
||||
DictionaryPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths);
|
||||
update.Get()->RemoveKey(path);
|
||||
|
||||
base::Value file_system_path_value(path);
|
||||
inspectable_web_contents_->CallClientFunction("DevToolsAPI.fileSystemRemoved",
|
||||
&file_system_path_value,
|
||||
nullptr, nullptr);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI", "fileSystemRemoved", base::Value(path));
|
||||
}
|
||||
|
||||
void WebContents::DevToolsIndexPath(
|
||||
@@ -3781,13 +3771,13 @@ void WebContents::DevToolsSetEyeDropperActive(bool active) {
|
||||
}
|
||||
|
||||
void WebContents::ColorPickedInEyeDropper(int r, int g, int b, int a) {
|
||||
base::DictionaryValue color;
|
||||
color.SetInteger("r", r);
|
||||
color.SetInteger("g", g);
|
||||
color.SetInteger("b", b);
|
||||
color.SetInteger("a", a);
|
||||
base::Value::Dict color;
|
||||
color.Set("r", r);
|
||||
color.Set("g", g);
|
||||
color.Set("b", b);
|
||||
color.Set("a", a);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.eyeDropperPickedColor", &color, nullptr, nullptr);
|
||||
"DevToolsAPI", "eyeDropperPickedColor", base::Value(std::move(color)));
|
||||
}
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC)
|
||||
@@ -3808,48 +3798,37 @@ void WebContents::OnDevToolsIndexingWorkCalculated(
|
||||
int request_id,
|
||||
const std::string& file_system_path,
|
||||
int total_work) {
|
||||
base::Value request_id_value(request_id);
|
||||
base::Value file_system_path_value(file_system_path);
|
||||
base::Value total_work_value(total_work);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.indexingTotalWorkCalculated", &request_id_value,
|
||||
&file_system_path_value, &total_work_value);
|
||||
"DevToolsAPI", "indexingTotalWorkCalculated", base::Value(request_id),
|
||||
base::Value(file_system_path), base::Value(total_work));
|
||||
}
|
||||
|
||||
void WebContents::OnDevToolsIndexingWorked(int request_id,
|
||||
const std::string& file_system_path,
|
||||
int worked) {
|
||||
base::Value request_id_value(request_id);
|
||||
base::Value file_system_path_value(file_system_path);
|
||||
base::Value worked_value(worked);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.indexingWorked", &request_id_value, &file_system_path_value,
|
||||
&worked_value);
|
||||
"DevToolsAPI", "indexingWorked", base::Value(request_id),
|
||||
base::Value(file_system_path), base::Value(worked));
|
||||
}
|
||||
|
||||
void WebContents::OnDevToolsIndexingDone(int request_id,
|
||||
const std::string& file_system_path) {
|
||||
devtools_indexing_jobs_.erase(request_id);
|
||||
base::Value request_id_value(request_id);
|
||||
base::Value file_system_path_value(file_system_path);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.indexingDone", &request_id_value, &file_system_path_value,
|
||||
nullptr);
|
||||
inspectable_web_contents_->CallClientFunction("DevToolsAPI", "indexingDone",
|
||||
base::Value(request_id),
|
||||
base::Value(file_system_path));
|
||||
}
|
||||
|
||||
void WebContents::OnDevToolsSearchCompleted(
|
||||
int request_id,
|
||||
const std::string& file_system_path,
|
||||
const std::vector<std::string>& file_paths) {
|
||||
base::ListValue file_paths_value;
|
||||
for (const auto& file_path : file_paths) {
|
||||
base::Value::List file_paths_value;
|
||||
for (const auto& file_path : file_paths)
|
||||
file_paths_value.Append(file_path);
|
||||
}
|
||||
base::Value request_id_value(request_id);
|
||||
base::Value file_system_path_value(file_system_path);
|
||||
inspectable_web_contents_->CallClientFunction(
|
||||
"DevToolsAPI.searchCompleted", &request_id_value, &file_system_path_value,
|
||||
&file_paths_value);
|
||||
"DevToolsAPI", "searchCompleted", base::Value(request_id),
|
||||
base::Value(file_system_path), base::Value(std::move(file_paths_value)));
|
||||
}
|
||||
|
||||
void WebContents::SetHtmlApiFullscreen(bool enter_fullscreen) {
|
||||
@@ -4164,9 +4143,7 @@ WebContents* WebContents::FromID(int32_t id) {
|
||||
// static
|
||||
gin::WrapperInfo WebContents::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
// have to isolate the usage of WebContentsImpl into a clean file to fix it:
|
||||
// error C2371: 'ssize_t': redefinition; different basic types
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
void WebContents::DetachFromOuterFrame() {
|
||||
// See detach_webview_frame.patch on how to detach.
|
||||
@@ -55,6 +53,4 @@ OffScreenRenderWidgetHostView* WebContents::GetOffScreenRenderWidgetHostView()
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
- (void)redispatchKeyEvent:(NSEvent*)event;
|
||||
@end
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
bool WebContents::IsFocused() const {
|
||||
auto* view = web_contents()->GetRenderWidgetHostView();
|
||||
@@ -81,6 +79,4 @@ bool WebContents::PlatformHandleKeyboardEvent(
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
#include "shell/browser/ui/cocoa/delayed_native_view_host.h"
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
WebContentsView::WebContentsView(v8::Isolate* isolate,
|
||||
gin::Handle<WebContents> web_contents)
|
||||
@@ -105,9 +103,7 @@ void WebContentsView::BuildPrototype(
|
||||
.SetProperty("webContents", &WebContentsView::GetWebContents);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@ namespace gin_helper {
|
||||
class Dictionary;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class WebContents;
|
||||
|
||||
@@ -53,8 +51,6 @@ class WebContentsView : public View, public content::WebContentsObserver {
|
||||
api::WebContents* api_web_contents_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||
|
||||
@@ -52,9 +52,7 @@ struct Converter<blink::mojom::PageVisibilityState> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
typedef std::unordered_map<int, WebFrameMain*> WebFrameMainIdMap;
|
||||
|
||||
@@ -391,9 +389,7 @@ const char* WebFrameMain::GetTypeName() {
|
||||
return "WebFrameMain";
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -28,9 +28,7 @@ namespace gin {
|
||||
class Arguments;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class WebContents;
|
||||
|
||||
@@ -131,8 +129,6 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
||||
base::WeakPtrFactory<WebFrameMain> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_
|
||||
|
||||
@@ -81,9 +81,7 @@ struct Converter<extensions::WebRequestResourceType> {
|
||||
|
||||
} // namespace gin
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -551,6 +549,4 @@ gin::Handle<WebRequest> WebRequest::From(
|
||||
return gin::CreateHandle(isolate, user_data->data);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -19,9 +19,7 @@ namespace content {
|
||||
class BrowserContext;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
||||
public:
|
||||
@@ -151,8 +149,6 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
||||
content::BrowserContext* browser_context_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/skbitmap_operations.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
constexpr static int kMaxFrameRate = 30;
|
||||
|
||||
@@ -180,6 +178,4 @@ gfx::Size FrameSubscriber::GetRenderViewSize() const {
|
||||
gfx::ScaleSize(gfx::SizeF(size), view->GetDeviceScaleFactor()));
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -22,9 +22,7 @@ class Image;
|
||||
class Rect;
|
||||
} // namespace gfx
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class WebContents;
|
||||
|
||||
@@ -77,8 +75,6 @@ class FrameSubscriber : public content::WebContentsObserver,
|
||||
base::WeakPtrFactory<FrameSubscriber> weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
SavePageHandler::SavePageHandler(content::WebContents* web_contents,
|
||||
gin_helper::Promise<void> promise)
|
||||
@@ -65,6 +63,4 @@ void SavePageHandler::Destroy(download::DownloadItem* item) {
|
||||
delete this;
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -19,9 +19,7 @@ namespace content {
|
||||
class WebContents;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
// A self-destroyed class for handling save page request.
|
||||
class SavePageHandler : public content::DownloadManager::Observer,
|
||||
@@ -48,8 +46,6 @@ class SavePageHandler : public content::DownloadManager::Observer,
|
||||
gin_helper::Promise<void> promise_;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "ui/events/event_constants.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace electron {
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
constexpr int mouse_button_flags =
|
||||
(ui::EF_RIGHT_MOUSE_BUTTON | ui::EF_LEFT_MOUSE_BUTTON |
|
||||
@@ -29,5 +28,4 @@ v8::Local<v8::Object> CreateEventFromFlags(int flags) {
|
||||
.Build();
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -11,12 +11,10 @@ template <typename T>
|
||||
class Local;
|
||||
} // namespace v8
|
||||
|
||||
namespace electron {
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
v8::Local<v8::Object> CreateEventFromFlags(int flags);
|
||||
|
||||
} // namespace api
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_UI_EVENT_H_
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
ImageView::ImageView() : View(new views::ImageView()) {
|
||||
view()->set_owned_by_client();
|
||||
@@ -40,9 +38,7 @@ void ImageView::BuildPrototype(v8::Isolate* isolate,
|
||||
.SetMethod("setImage", &ImageView::SetImage);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/views/controls/image_view.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
namespace electron::api {
|
||||
|
||||
class ImageView : public View {
|
||||
public:
|
||||
@@ -32,8 +30,6 @@ class ImageView : public View {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
||||
} // namespace electron::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_
|
||||
|
||||
@@ -137,8 +137,7 @@ void ElectronPermissionManager::RequestPermission(
|
||||
bool user_gesture,
|
||||
StatusCallback response_callback) {
|
||||
RequestPermissionWithDetails(permission, render_frame_host, requesting_origin,
|
||||
user_gesture, nullptr,
|
||||
std::move(response_callback));
|
||||
user_gesture, {}, std::move(response_callback));
|
||||
}
|
||||
|
||||
void ElectronPermissionManager::RequestPermissionWithDetails(
|
||||
@@ -146,11 +145,11 @@ void ElectronPermissionManager::RequestPermissionWithDetails(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::DictionaryValue* details,
|
||||
base::Value::Dict details,
|
||||
StatusCallback response_callback) {
|
||||
RequestPermissionsWithDetails(
|
||||
std::vector<blink::PermissionType>(1, permission), render_frame_host,
|
||||
user_gesture, details,
|
||||
user_gesture, std::move(details),
|
||||
base::BindOnce(PermissionRequestResponseCallbackWrapper,
|
||||
std::move(response_callback)));
|
||||
}
|
||||
@@ -162,14 +161,14 @@ void ElectronPermissionManager::RequestPermissions(
|
||||
bool user_gesture,
|
||||
StatusesCallback response_callback) {
|
||||
RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture,
|
||||
nullptr, std::move(response_callback));
|
||||
{}, std::move(response_callback));
|
||||
}
|
||||
|
||||
void ElectronPermissionManager::RequestPermissionsWithDetails(
|
||||
const std::vector<blink::PermissionType>& permissions,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool user_gesture,
|
||||
const base::DictionaryValue* details,
|
||||
base::Value::Dict details,
|
||||
StatusesCallback response_callback) {
|
||||
if (permissions.empty()) {
|
||||
std::move(response_callback).Run({});
|
||||
@@ -204,13 +203,11 @@ void ElectronPermissionManager::RequestPermissionsWithDetails(
|
||||
const auto callback =
|
||||
base::BindRepeating(&ElectronPermissionManager::OnPermissionResponse,
|
||||
base::Unretained(this), request_id, i);
|
||||
auto mutable_details =
|
||||
details == nullptr ? base::DictionaryValue() : details->Clone();
|
||||
mutable_details.SetStringKey(
|
||||
"requestingUrl", render_frame_host->GetLastCommittedURL().spec());
|
||||
mutable_details.SetBoolKey("isMainFrame",
|
||||
render_frame_host->GetParent() == nullptr);
|
||||
request_handler_.Run(web_contents, permission, callback, mutable_details);
|
||||
details.Set("requestingUrl",
|
||||
render_frame_host->GetLastCommittedURL().spec());
|
||||
details.Set("isMainFrame", render_frame_host->GetParent() == nullptr);
|
||||
request_handler_.Run(web_contents, permission, callback,
|
||||
base::Value(std::move(details)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,17 +238,17 @@ void ElectronPermissionManager::RequestPermissionsFromCurrentDocument(
|
||||
base::OnceCallback<void(const std::vector<blink::mojom::PermissionStatus>&)>
|
||||
callback) {
|
||||
RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture,
|
||||
nullptr, std::move(callback));
|
||||
{}, std::move(callback));
|
||||
}
|
||||
|
||||
blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus(
|
||||
blink::PermissionType permission,
|
||||
const GURL& requesting_origin,
|
||||
const GURL& embedding_origin) {
|
||||
base::DictionaryValue details;
|
||||
details.SetString("embeddingOrigin", embedding_origin.spec());
|
||||
bool granted = CheckPermissionWithDetails(permission, nullptr,
|
||||
requesting_origin, &details);
|
||||
base::Value::Dict details;
|
||||
details.Set("embeddingOrigin", embedding_origin.spec());
|
||||
bool granted = CheckPermissionWithDetails(permission, {}, requesting_origin,
|
||||
std::move(details));
|
||||
return granted ? blink::mojom::PermissionStatus::GRANTED
|
||||
: blink::mojom::PermissionStatus::DENIED;
|
||||
}
|
||||
@@ -273,7 +270,7 @@ bool ElectronPermissionManager::CheckPermissionWithDetails(
|
||||
blink::PermissionType permission,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
const base::DictionaryValue* details) const {
|
||||
base::Value::Dict details) const {
|
||||
if (check_handler_.is_null()) {
|
||||
return true;
|
||||
}
|
||||
@@ -281,27 +278,24 @@ bool ElectronPermissionManager::CheckPermissionWithDetails(
|
||||
render_frame_host
|
||||
? content::WebContents::FromRenderFrameHost(render_frame_host)
|
||||
: nullptr;
|
||||
auto mutable_details =
|
||||
details == nullptr ? base::DictionaryValue() : details->Clone();
|
||||
if (render_frame_host) {
|
||||
mutable_details.SetStringKey(
|
||||
"requestingUrl", render_frame_host->GetLastCommittedURL().spec());
|
||||
details.Set("requestingUrl",
|
||||
render_frame_host->GetLastCommittedURL().spec());
|
||||
}
|
||||
mutable_details.SetBoolKey(
|
||||
"isMainFrame",
|
||||
render_frame_host && render_frame_host->GetParent() == nullptr);
|
||||
details.Set("isMainFrame",
|
||||
render_frame_host && render_frame_host->GetParent() == nullptr);
|
||||
switch (permission) {
|
||||
case blink::PermissionType::AUDIO_CAPTURE:
|
||||
mutable_details.SetStringKey("mediaType", "audio");
|
||||
details.Set("mediaType", "audio");
|
||||
break;
|
||||
case blink::PermissionType::VIDEO_CAPTURE:
|
||||
mutable_details.SetStringKey("mediaType", "video");
|
||||
details.Set("mediaType", "video");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return check_handler_.Run(web_contents, permission, requesting_origin,
|
||||
mutable_details);
|
||||
base::Value(std::move(details)));
|
||||
}
|
||||
|
||||
bool ElectronPermissionManager::CheckDevicePermission(
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
namespace base {
|
||||
class DictionaryValue;
|
||||
class Value;
|
||||
} // namespace base
|
||||
|
||||
@@ -67,7 +66,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::DictionaryValue* details,
|
||||
base::Value::Dict details,
|
||||
StatusCallback callback);
|
||||
void RequestPermissions(const std::vector<blink::PermissionType>& permissions,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
@@ -78,7 +77,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||
const std::vector<blink::PermissionType>& permissions,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool user_gesture,
|
||||
const base::DictionaryValue* details,
|
||||
base::Value::Dict details,
|
||||
StatusesCallback callback);
|
||||
|
||||
blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument(
|
||||
@@ -88,7 +87,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||
bool CheckPermissionWithDetails(blink::PermissionType permission,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
const base::DictionaryValue* details) const;
|
||||
base::Value::Dict details) const;
|
||||
|
||||
bool CheckDevicePermission(blink::PermissionType permission,
|
||||
const url::Origin& origin,
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "gin/public/wrapper_info.h"
|
||||
#include "shell/browser/api/electron_api_event_emitter.h"
|
||||
|
||||
namespace gin_helper {
|
||||
|
||||
namespace internal {
|
||||
namespace gin_helper::internal {
|
||||
|
||||
gin::WrapperInfo kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
@@ -40,6 +38,4 @@ v8::Local<v8::FunctionTemplate> GetEventEmitterTemplate(v8::Isolate* isolate) {
|
||||
return tmpl;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace gin_helper
|
||||
} // namespace gin_helper::internal
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
#include "device/fido/win/webauthn_api.h"
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
namespace extensions {
|
||||
|
||||
namespace api {
|
||||
namespace extensions::api {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -307,5 +305,4 @@ CryptotokenPrivateRecordSignRequestFunction::Run() {
|
||||
return RespondNow(NoArguments());
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
} // namespace extensions
|
||||
} // namespace extensions::api
|
||||
|
||||
@@ -14,8 +14,7 @@ class PrefRegistrySyncable;
|
||||
|
||||
// Implementations for chrome.cryptotokenPrivate API functions.
|
||||
|
||||
namespace extensions {
|
||||
namespace api {
|
||||
namespace extensions::api {
|
||||
|
||||
// void CryptotokenRegisterProfilePrefs(
|
||||
// user_prefs::PrefRegistrySyncable* registry);
|
||||
@@ -80,7 +79,6 @@ class CryptotokenPrivateRecordSignRequestFunction : public ExtensionFunction {
|
||||
ResponseAction Run() override;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
} // namespace extensions
|
||||
} // namespace extensions::api
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "extensions/browser/updater/update_service_factory.h"
|
||||
#include "shell/browser/extensions/electron_extension_system_factory.h"
|
||||
|
||||
namespace extensions {
|
||||
namespace electron {
|
||||
namespace extensions::electron {
|
||||
|
||||
void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
|
||||
// TODO(rockot): Remove this once UpdateService is supported across all
|
||||
@@ -18,5 +17,4 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
|
||||
ElectronExtensionSystemFactory::GetInstance();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
} // namespace extensions
|
||||
} // namespace extensions::electron
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_
|
||||
#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_
|
||||
|
||||
namespace extensions {
|
||||
namespace electron {
|
||||
namespace extensions::electron {
|
||||
|
||||
// Ensures the existence of any BrowserContextKeyedServiceFactory provided by
|
||||
// the core extensions code.
|
||||
void EnsureBrowserContextKeyedServiceFactoriesBuilt();
|
||||
|
||||
} // namespace electron
|
||||
} // namespace extensions
|
||||
} // namespace extensions::electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_
|
||||
|
||||
@@ -61,14 +61,14 @@ std::unique_ptr<content::HidChooser> ElectronHidDelegate::RunChooser(
|
||||
bool ElectronHidDelegate::CanRequestDevicePermission(
|
||||
content::BrowserContext* browser_context,
|
||||
const url::Origin& origin) {
|
||||
base::DictionaryValue details;
|
||||
details.SetString("securityOrigin", origin.GetURL().spec());
|
||||
base::Value::Dict details;
|
||||
details.Set("securityOrigin", origin.GetURL().spec());
|
||||
auto* permission_manager = static_cast<ElectronPermissionManager*>(
|
||||
browser_context->GetPermissionControllerDelegate());
|
||||
return permission_manager->CheckPermissionWithDetails(
|
||||
static_cast<blink::PermissionType>(
|
||||
WebContentsPermissionHelper::PermissionType::HID),
|
||||
nullptr, origin.GetURL(), &details);
|
||||
nullptr, origin.GetURL(), std::move(details));
|
||||
}
|
||||
|
||||
bool ElectronHidDelegate::HasDevicePermission(
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "base/process/launch.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
|
||||
namespace relauncher {
|
||||
|
||||
namespace internal {
|
||||
namespace relauncher::internal {
|
||||
|
||||
// this is global to be visible to the sa_handler
|
||||
base::WaitableEvent parentWaiter;
|
||||
@@ -68,6 +66,4 @@ int LaunchProgram(const StringVector& relauncher_args,
|
||||
return process.IsValid() ? 0 : 1;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace relauncher
|
||||
} // namespace relauncher::internal
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "base/process/launch.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
||||
namespace relauncher {
|
||||
|
||||
namespace internal {
|
||||
namespace relauncher::internal {
|
||||
|
||||
void RelauncherSynchronizeWithParent() {
|
||||
base::ScopedFD relauncher_sync_fd(kRelauncherSyncFD);
|
||||
@@ -91,6 +89,4 @@ int LaunchProgram(const StringVector& relauncher_args,
|
||||
return process.IsValid() ? 0 : 1;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace relauncher
|
||||
} // namespace relauncher::internal
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "sandbox/win/src/win_utils.h"
|
||||
#include "ui/base/win/shell.h"
|
||||
|
||||
namespace relauncher {
|
||||
|
||||
namespace internal {
|
||||
namespace relauncher::internal {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -125,6 +123,4 @@ int LaunchProgram(const StringVector& relauncher_args,
|
||||
return process.IsValid() ? 0 : 1;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace relauncher
|
||||
} // namespace relauncher::internal
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user