* fix: free UvTaskRunner timers only after they are closed
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: UvTaskRunner now holds UvHandles
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: Launch apps with XDG_ACTIVATION_TOKEN in ozone/wayland
Ensure apps are launched with the activation token received from
xdg_activation_v1 protocol.
Co-authored-by: Orko Garai <orko@igalia.com>
* add focus_launched_process option
Co-authored-by: Orko Garai <orko@igalia.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Orko Garai <orko@igalia.com>
* perf: use v8::Object* as direct keys instead of using hash + a linked list
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use v8::Local<v8::Object> as the key
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera
Co-authored-by: George Xu <george.xu@slack-corp.com>
* Revert "fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera"
This reverts commit e9cc67216558263402867056ed332f8781da3153.
Co-authored-by: George Xu <george.xu@slack-corp.com>
* should only do these checks for audio or video, but not screenshare
Co-authored-by: George Xu <george.xu@slack-corp.com>
* no service
Co-authored-by: George Xu <george.xu@slack-corp.com>
* oops
Co-authored-by: George Xu <george.xu@slack-corp.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: George Xu <george.xu@slack-corp.com>
* fix: -Wunsafe-buffer-usage warnings in IsUrlArg()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: improve code comments for CheckCommandLineArguments()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: reduce diffs from main
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: CheckCommandLineArguments takes a StringVector arg
Fixes another buffer warning!
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
As per the gin docs: "Wrappable<T> explicitly does not support further
subclassing of T. Subclasses of Wrappable<T> should be declared final."
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: remove use of deprecated v8::String::Value
Upstream marked v8::String::Value as `V8_DEPRECATE_SOON` last month,
so let's stop using it.
The replacement code mostly does the same as v8::String::Value();
but since our test only cares about the length and not the contents,
we get a small perf win of not needing to allocate a char array and
not needing to call Local::String::Write().
Upstream V8_DEPRECATE_SOON:
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/5667299kkk
v8::String::Value() implementation:
20226b740b/src/api/api.cc (10883)
History on why we used it:
80c1a9739df49ed30f72
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* Update shell/common/gin_converters/file_path_converter.h
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! Update shell/common/gin_converters/file_path_converter.h
do not return success for all non-Null non-Strings
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
When an electron app is launched by another app ensure that the
XDG_ACTIVATION_TOKEN env var is read and used for activation using
xdg_activation_v1 protocol.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Orko Garai <orko@igalia.com>
added in Aug 2021 (41646d11, #29600) but never used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: avoid double-call to url.scheme() in WebContentsZoomController::SetZoomMode()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.scheme_piece() in GetAppInfoHelperForProtocol()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.scheme_piece() in Browser::GetApplicationNameForProtocol()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: add std::less<> to HandlersMap
This lets us search it using string_view keys
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: ProtocolRegistry::FindRegistered() now takes a std::string_view
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.scheme_piece() in InspectableWebContents::LoadNetworkResource()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: ProtocolRegistry::FindIntercepted() now takes a std::string_view
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.scheme_piece() in SimpleURLLoaderWrapper::GetURLLoaderFactoryForURL()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.scheme_piece() in ProxyingURLLoaderFactory::CreateLoaderAndStart()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.host_piece() in ElectronWebUIControllerFactory::GetWebUIType()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use gurl.host_piece() in ElectronWebUIControllerFactory::CreateWebUIControllerForURL()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
chore: remove unused asar::ClearArchives()
last use removed in Jun 2021 (b1d1ac65, #29293)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump chromium in DEPS to 129.0.6645.0
* chore: update patches
* chore: bump chromium in DEPS to 129.0.6646.0
* refactor: remove ppapi dependency
PPAPI removal - https://issues.chromium.org/issues/40511450
PDF viewer migration - https://issues.chromium.org/issues/40511452
* chore: update patches
* chore: enable `content_enable_legacy_ipc`
We were indirectly relying on this via `enable_ppapi=true`, with
633a57d9b62da7850ef7946f6b101ed440d04cdd ppapi is now disabled and
this commit makes the dependency explicit.
* fix: gn check
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
* refactor: in FramelessView, move empty function decls to header
* refactor: in electron::api::WebContents, move empty function decls to header
* refactor: in electron::api::NativeWindow, move empty function decls to header
* refactor: in electron::OffScreenWebContentsView, move empty function decls to header
* refactor: in electron::OffScreenRenderWidgetHostView, move empty function decls to header
* refactor: in auto_updater::AutoUpdater, move empty function decls to header
* refactor: in electorn::api::FrameSubscriber, move empty function decls to header
* refactor: in electorn::api::SimpleURLLoaderWrapper, move empty function decls to header
* refactor: in electorn::InspectableWebContents, move empty function decls to header
* refactor: in electorn::OffScreenVideoConsumer, move empty function decls to header
* refactor: in electron::OffScreenWebContentsView, move empty function decls to header
* refactor: in electron::TrayIcon, move empty function decls to header
* refactor: in electron::ViewsDelegate, move empty function decls to header
* refactor: in electron::MediaCaptureDevicesDispatcher, move empty function decls to header
* refactor: in electron::UsbChooserContext::DeviceObserver, move empty function decls to header
* refactor: in electron::ProxyingWebSocket, move empty function decls to header
* refactor: in electron::Notification, move empty function decls to header
* refactor: in electron::PlatformNotificationService, move empty function decls to header
* Revert "refactor: in electron::PlatformNotificationService, move empty function decls to header"
This reverts commit 9103750d03b9ba1ceccba43d11dfdc2404ff6191.
* refactor: in electron::ElectronPDFDocumentHelperClient, move empty function decls to header
* refactor: in electron::api::SpellCheckClient, move empty function decls to header
* refactor: in electron::ElectronExtensionHostDelegate, move empty function decls to header
* refactor: in electron::PlatformNotificationService, move empty function decls to header
* refactor: in electron::NativeWindowViews, move empty function decls to header
* chore: move SetTouchBar() back to cc
* Revert "refactor: in auto_updater::AutoUpdater, move empty function decls to header"
This reverts commit c43d6862d32c74f63f82700a7546a732ac05ecb8.
* perf: avoid double-calls to GetView()
There are a lot of places where we call the virtual method GetView()
twice in succession: the first to check if the view exists, and the
second to use. This PR holds the view in a temp variable instead, e.g.:
if (auto* view = foo->GetView())
view->DoSomething();
* perf: avoid discarded GetView() call
* chore: bump chromium in DEPS to 129.0.6634.0
* chore: update chore_add_electron_deps_to_gitignores.patch
no manual changes. patch applied with fuzz 1.
* chore: e patches all
* chore: update call to gfx::Image::CreateFrom1xPNGBytes()
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5743597
The call now takes a base::span
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>