* 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 3x call to GetID() in RegisterPendingSiteInstance()
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
perf: avoid a double-map lokup in NotificationPresenter::RemoveNotification()
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: emit `context-menu` event in Windows draggable regions (#46032)
fix: emit context-menu event in Windows draggable regions
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
perf: avoid a triple-redundant map lookup in ViewsDelegate::GetAppbarAutohideEdges()
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
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 weak_factory_
Appears to have been added in 3745b76da but never used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Appears to have been added in c608d6d7 but never used
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.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 forward declaration of MediaDeviceIDSalt in electron_browser_context.h
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: remove unused #include from browser_context.h
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: remove unused ElectronBrowserContext::GetWeakPtr()
last use removed in Aug 2020 by bac2f46
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 '= 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: Add `ElectronBrowserContext::BrowserContexts()`
* refactor: add ElectronBrowserContext::BrowserContexts()
* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronBrowserMainParts::PostMainMessageLoopRun()
* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::IsValidContext()
* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::BroadcastEventToRenderers()
* refactor: move PartitionKey, BrowserContextMap private
* refactor: add ElectronBrowserContext::IsValidContext()
decouple ElectronExtensionsBrowserClient from the internals of ElectronBrowserContext
Move the URLPipeLoader class into an anonymous namespace in
electron_url_loader_factory.cc.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
base::NumberToString() is slightly more efficient than
absl::StrFormat("%u").
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: remove unused ElectronBrowserContext::extension_system()
Last use removed on Jul 21, 2020 by 2fb14f5 in PR #24575
This fixes a raw_ptr warning by letting us remove the raw_ptr field
`ElectronBrowserContext::extension_system_`.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
The former is now a pass-through for the latter and is slated for removal
Xref: https://issues.chromium.org/issues/402415654907781
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>
fix: remove redundant MediaCaptureDevicesDispatcher::GetInstance() call
This appears to be a copy-paste error introduced in 465dee2c
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use base::SplitStringPiece() in SetNodeOptions()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* perf: use base::SplitStringPiece() in StringToAccelerator()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: StringToAccelerator() now takes a std::string_view
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: content protection after hide on Windows
5789117
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>