* refactor: return a std::array<int 2> from BaseWindow::GetMaximumSize()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: return a std::array<int 2> from BaseWindow::GetMinimumSize()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: return a std::array<int 2> from BaseWindow::GetPosition()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: return a std::array<int 2> from BaseWindow::GetSize()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: return a std::array<int 2> from BaseWindow::GetContentSize()
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: extract helper method ToArray(const gfx::Size)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: #include correctness
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: make api::View::GetBounds() const
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make api::View::OnViewBoundsChanged() private
refactor: make api::View::OnViewIsDeleting() private
refactor: make api::View::OnChildViewRemoved() private
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make ChildPair private
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: instantiate navigation_entries on the stack instead of the heap
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: reserve the full size of navigation_entries
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use emplace_back to simplify the code a little
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 electron::api::App::FileIconCallback
last use removed in 2018 by 3f15f516
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8
Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>
* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager
Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Yang Liu <ouyangliu.leo@gmail.com>
refactor: use v8::String::Empty() when creating empty strings
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 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
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>
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: 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>
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: 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: 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 | 6208630
Co-authored-by: alice <alice@makenotion.com>
* Remove HasUnsupportedFeature Mojo interface
Xref: 6220800
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* 6217444: Remove scoped_gdi_object.h type aliases. | 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() | 6221378
Co-authored-by: alice <alice@makenotion.com>
* Update ExtensionPrefs::GetDisableReasons to return DisableReasonSet
Xref: 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 | 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>