* perf: use absl::flat_hash_set in SpellCheckClient::SpellCheckText()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use absl::flat_hash_set in MessagePort::DisentanglePorts()
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>
* perf: avoid a redundant map lookuop in GetStorageMask()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: avoid a redundant map lookup in GetDataTypeMask()
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: ftbfs when printing is disabled
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: extract-method GetAddedFileSystems()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
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 using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Beutner <beutner.john@gmail.com>
This fixes a crash with the PipeWire capturer caused by a Chromium
change introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/5783826.
DesktopMediaListBase now calls Refresh(true) after dispatching
DesktopMediaListObserver::OnDelegatedSourceListDismissed, so it's
important not to call DesktopCapturer::HandleFailure (which deallocates
the DesktopMediaList) synchronously from OnDelegatedSourceListDismissed.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Beutner <beutner.john@gmail.com>
refactor: remove unused field ServiceWorkerMain::weak_factory_
Added in a467d06, appears to have never been used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: use '= default' to define trivial destructors
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: decouple api::Protocol from ElectronBrowserContext
now they do not know about each other
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make electron::api::ProtocolError private
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: remove unused isolate arg in Protocol constructor
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use =default for trivial destructor
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>
refactor: use GetDefaultStoragePartition()
Use GetDefaultStorageParition() instead of GetStoragePartition(nullptr)
- It improves code uniformity, since we use get-default everywhere else
- It's more readable
- It's marginally faster, since GetStoragePartition() has more steps
Added in 49b0a1bf4a
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make UtilityProcessWrapper inherit privately from mojo::MessageReceiver
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make ParentPort inherit privately from mojo::MessageReceiver
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make MessagePort inherit privately from mojo::MessageReceiver
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>
refactor: remove unused isolate arg from GlobalShortcut constructor
has not been used since f1a0d5e811 (#22755)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: use base::FindPtrOrNull() in WebFrameMain::FromFrameTreeNodeId()
refactor: use base::FindPtrOrNull() in WebFrameMain::FromFrameToken()
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: use C++20's contains() method (#45742)
* chore: use std::map<>::contains() instead of count() or find()
* chore: use std::map<>::contains() instead of base::Contains()
Use `base::as_string_view()` as a safer alternative to `reinterpret_cast`
in a couple of places.
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5472408
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump chromium to 134.0.6992.0
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: add BrowserProcessImpl::CreateGlobalFeaturesForTesting() stub
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6216193
Remove GlobalFeatures from TestingBrowserProcess::Init
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump chromium to 134.0.6994.0
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6208630: Mac sandbox: don't use protobuf for policy serialization | https://chromium-review.googlesource.com/c/chromium/src/+/6208630
Co-authored-by: alice <alice@makenotion.com>
* Remove HasUnsupportedFeature Mojo interface
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6220800
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6217444: Remove scoped_gdi_object.h type aliases. | https://chromium-review.googlesource.com/c/chromium/src/+/6217444
Co-authored-by: alice <alice@makenotion.com>
* chore: bump chromium to 134.0.6998.10
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6221378: Revert [OBC] Exclude Aliasing Cookies in FilterCookiesWithOptions() | https://chromium-review.googlesource.com/c/chromium/src/+/6221378
Co-authored-by: alice <alice@makenotion.com>
* Update ExtensionPrefs::GetDisableReasons to return DisableReasonSet
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6218840
change copied from 6218840 extensions/shell/browser/shell_extension_loader.cc
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6218402: Typemap ui.gfx.DXGIHandle <=> gfx::DXGIHandle | https://chromium-review.googlesource.com/c/chromium/src/+/6218402
Co-authored-by: alice <alice@makenotion.com>
* chore: disable flaky contentTracing test
not new to this roll; it is happening in main as well
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! chore: disable flaky contentTracing test
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: update patches
* chore: disable flaky content tracing tests on Linux (#45612)
(cherry picked from commit a1e4550c9e)
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* feat: Working navigationHistory.restore with just title/url
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* feat: Restore page state, too
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* chore: Docs, lint, tests
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Implement feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* More magic
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Make _awaitNextLoad truly private
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* Implement API group feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
* One more round of feedback
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
- Prefer GURL() when we want to return a non-reference empty URL.
- In ServiceWorkerMain::GetStorageKey(), use a reference instead
of instantiating a new temporary GURL.
From url/gurl.h:
> // Returns a reference to a singleton empty GURL. This object is for
> // callers who return references but don't have anything to return in
> // some cases. If you just want an empty URL for normal use, prefer
> // GURL().
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
refactor: forward v8::Context to v8::MicrotasksScope constructor
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
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
* chore: bump chromium in DEPS to 133.0.6943.16
* chore: bump chromium in DEPS to 133.0.6943.27
* chore: bump chromium in DEPS to 133.0.6943.35
* chore: bump chromium to 134.0.6968.0
cherry picked from 75eac86506
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>