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>
* chore: bump chromium in DEPS to 134.0.6998.1
* chore: bump chromium in DEPS to 134.0.6998.5
* chore: bump chromium in DEPS to 134.0.6998.3
* chore: bump chromium to 134.0.6988.0 (main) (#45334)
* chore: bump chromium in DEPS to 134.0.6976.0
* chore: update mas_avoid_private_macos_api_usage.patch.patch
6171046
process_info_mac.cc -> process_info_mac.mm
* chore: update build_do_not_depend_on_packed_resource_integrity.patch
6196857
* chore: update feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
618229661834046187853
A lot changed in the upstream implementation. There's a good chance I got
this wrong as threading has changed and moved some variables into globals.
* chore: remove build_remove_vr_directx_helpers_dependency.patch
6186102
This landed upstream
* chore: e patches all
* chore: update net::CookieInclusionStatus::ExclusionReason enum
61832526185544
* chore: update content::WebAuthenticationDelegate import
6189769
* Revert "chore: disable focus handling test due to win32/ia32 regression"
This reverts commit 1a57ba5d59848d0c841ddda59c9299a4f957452a.
* chore: bump chromium in DEPS to 134.0.6978.0
* chore: bump chromium in DEPS to 134.0.6980.0
* chore: bump chromium in DEPS to 134.0.6982.0
* chore: bump chromium in DEPS to 134.0.6984.0
* 6196281: Allow direct embedder IsPdfInternalPluginAllowedOrigin() interaction
6196281
* 6196283: Delete PdfInternalPluginDelegate
6196283
* chore: update patches
* chore: bump chromium in DEPS to 134.0.6986.0
* chore: update patches
* 6205762: Support option to use window.showSaveFilePicker() in PDF attachment code
6205762
See also:
* https://issues.chromium.org/issues/373852607
* 5939153: [PDF] Add PdfUseShowSaveFilePicker feature flag | 5939153
* 6205761: Delete spurious Ink-specific code in pdf_viewer.ts | 6205761
* 6209609: Remove WebVector: Automatic changes
6209609
* 6205488: UI: make QT5 optional
6205488
* 6178281: Rename pak files from branding strings
6178281
* fixup! 6209609: Remove WebVector: Automatic changes 6209609
* 6193249: Switch from safe_browsing::EventResult to enterprise_connectors:EventResult
6193249
* 6197457: Remove Pause/ResumeReadingBodyFromNet IPCs
6197457
* 6191230: Record total time spent on a picture in picture window
6191230
* chore: bump chromium in DEPS to 134.0.6988.0
* chore: update patches
* 6215440: Remove base/ranges/.
6215440
* Disable unsafe buffers error
Not sure what changed, but we're now seeing unsafe buffer errors in Chromium code, at least when using reclient. Will update this comment if we find out the cause.
* 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType
6187853
* fix `setDisplayMediaRequestHandler` test
Given how this test is written, I would expect this assertion to be false. It seems the oppositue was true before, but that was also acknowledged to be suprising. Seems that the underlying implementation is now fixed and works as expected.
* fixup! 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType 6187853
* chore: udpate patches
* Multiple PRS: 6185544 | 6183252
* fix: cast enum class to numeric type
* fix: add 1 to MAX_EXCLUSION_REASON because enum values are zero-based, and we want the total count of reasons.
* Reapply "chore: disable focus handling test due to win32/ia32 regression"
This reverts commit 760b1a519b5919b483c66bc3096eeefb4d7011f4.
* refactor: use ExclusionReasonBitset::kValueCount for size
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
(cherry picked from commit 213165a467)
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.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>
* refactor: remove InspectableWebContentsViewMac in favor of the Views version
* cherry-pick: refactor: remove InspectableWebContentsViewMac in favor of the Views version (#41326)
commit e67ab9a93d
Confilcts not resolved, except removal of the files removed
by the original commit.
* resolved conflicts and build issues after cherry-pick
* cherry-picked: fix: add method allowing to disable headless mode in native widget
https://github.com/electron/electron/pull/42996
fixing
https://github.com/electron/electron/issues/42995
* fix: displaying select popup in window created as fullscreen window
`constrainFrameRect:toScreen:` is not being call for windows created
with `fullscreen: true` therefore `headless` mode was not being removed
and `RenderWidgetHostNSViewBridge::DisplayPopupMenu` ignored displaying
popup.
Issue could be fixed by placing additional removal of `headless` mode
in the `toggleFullScreen:`, but `orderWindow:relativeTo:` is called
both for a regular and a fullscreen window, therefore there will be
a single place fixing both cases.
Because `electron::NativeWindowMac` lifetime may be shorter than
`ElectronNSWindow` on which macOS may execute `orderWindow:relativeTo:`
we need to clear `shell_` when `NativeWindow` is being closed.
Fixes#43010.
* fix: Content visibility when using `vibrancy`
We need to put `NSVisualEffectView` before `ViewsCompositorSuperview`
otherwise when using `vibrancy` in `BrowserWindow` `NSVisualEffectView`
will hide content displayed by the compositor.
Fixes#43003Fixes#42336
In fact main issues reported in these tickets were not present after
cherry-picking original refactor switching to `views::WebView`, so
text could be selected and click event was properly generated. However
both issues testcases were using `vibrancy` and actual content was
invisible, because it was covered by the `NSVisualEffectView`.
* fix: EXCEPTION_ACCESS_VIOLATION crash on BrowserWindow.destroy()
Restored postponed deletion of the `NativeWindow`.
Restoration caused `DCHECK(new_parent_ui_layer->GetCompositor());` failure
in `BrowserCompositorMac::SetParentUiLayer` after the spec test:
`chrome extensions chrome.webRequest does not take precedence over Electron webRequest - http`
with stack:
```
7 Electron Framework 0x000000011fe07830 content::BrowserCompositorMac::SetParentUiLayer(ui::Layer*) + 628
8 Electron Framework 0x000000011fe0c154 content::RenderWidgetHostViewMac::SetParentUiLayer(ui::Layer*) + 220
9 Electron Framework 0x000000011fe226a8 content::WebContentsViewMac::CreateViewForWidget(content::RenderWidgetHost*) + 600
10 Electron Framework 0x000000011fd37e4c content::WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(content::RenderViewHost*) + 164
11 Electron Framework 0x000000011fb32278 content::RenderFrameHostManager::CreateSpeculativeRenderFrame(content::SiteInstanceImpl*, bool, scoped_refptr<content::BrowsingContextState> const&) + 816
12 Electron Framework 0x000000011fb2ab8c content::RenderFrameHostManager::CreateSpeculativeRenderFrameHost(content::SiteInstanceImpl*, content::SiteInstanceImpl*, bool) + 1308
13 Electron Framework 0x000000011fb28598 content::RenderFrameHostManager::GetFrameHostForNavigation(content::NavigationRequest*, content::BrowsingContextGroupSwap*, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>*) + 1796
14 Electron Framework 0x000000011fa78660 content::NavigationRequest::SelectFrameHostForOnRequestFailedInternal(bool, bool, std::__Cr::optional<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>> const&) + 280
15 Electron Framework 0x000000011fa6a994 content::NavigationRequest::OnRequestFailedInternal(network::URLLoaderCompletionStatus const&, bool, std::__Cr::optional<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>> const&, bo
+ 1008
16 Electron Framework 0x000000011fa7772c content::NavigationRequest::OnRequestFailed(network::URLLoaderCompletionStatus const&) + 72
17 Electron Framework 0x000000011f8554ac content::NavigationURLLoaderImpl::NotifyRequestFailed(network::URLLoaderCompletionStatus const&) + 248
```
This was probably the reason of removing `NativeWindow` immediately
in order to cleanup `views_host_` in `WebContentsViewMac` to prevent
using layer without compositor in `WebContentsViewMac::CreateViewForWidget`.
`[ElectronNSWindowDelegate windowWillClose:]` is deleting window host
and the compositor used by the `NativeWindow` therefore detach `NativeWindow`
contents from parent. This will clear `views_host_` and prevent failing
mentioned `DCHECK`.
Fixes#42975
* chore: Applied review suggestions
Co-authored-by: Michał Pichliński <michal.pichlinski@here.io>
* refactor: directly cleanup shell
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michał Pichliński <michal.pichlinski@here.io>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
refactor: simplify StopTracing() a little by using a string_view instead of an optional<string>
We have compile-time string literals that we're passing to a method
that takes a string_view argument, so we don't need all this extra
optional<string> scaffolding
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>