🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@nilayarya
Copy link
Contributor

Description of Change

Note

This PR is part of the GSoC 2025. It must be stacked on top of the previous PR #48069

Tutorial for windowStatePersistence constructor option.

Checklist

Release Notes

Notes: none

nilayarya and others added 30 commits August 11, 2025 09:43
* test: support for multimonitor tests

* fix: update yarn.lock file

* test: support any resolution for new displays

* test: support display positioning

* docs: multi-monitor tests

* test: remove dummy test
…electron#47764)

* feat: save window state (electron#47425)

* feat: save/restore window state

* cleanup

* remove constructor option

* refactor: apply suggestions from code review

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: forward declare prefservice

* refactor: remove constructor option

* refactor: save window state on move/resize instead of moved/resized

* feat: resave window state after construction

* test: add basic window save tests

* test: add work area tests

* test: asynchronous batching behavior

* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions

* chore: move includes to main block

* Update spec/api-browser-window-spec.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* docs: update docs/api/structures/base-window-options.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* fix: preserve original bounds during window state save in special modes

* feat: save kiosk state in window preferences

* chore: remove ts-expect-error

* test: check hasCapturableScreen before running tests

* test: remove multimonitor tests

* test: add missing hasCapturableScreen checks before tests

* docs: add blurb on saving mechanism

* feat: add debounce window of 200ms to saveWindowState

* docs: remove blurb until finalized

* style: convert constants from snake_case to camelCase

* refactor: initialize prefs_ only if window state is configured to be saved/restored

* refactor: rename window states key

* refactor: store in application-level Local State instead of browser context

* refactor: switch to more accurate function names

* fix: add dcheck for browser_process

* fix: flush window state to avoid race condition

* refactor: change stateId to name

* refactor: change windowStateRestoreOptions to windowStatePersistence

* Update docs/api/structures/base-window-options.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fix: add warning when window state persistence enabled without window name

* docs: lowercase capital B for consistency

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>

* feat: enforce unique window names across BaseWindow and BrowserWindow

* docs: update docs for name property

* fix: linter issue with symbol

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
…ron#48174)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.10 to 3.29.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@96f518a...3c3833e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
nilayarya and others added 26 commits November 12, 2025 12:53
…ron#48762)

* refactor: make api::WebRequest inherit from gin::Wrappable

refactor: remove unused v8::Isolate* arg from WebRequest ctor

refactor: make electron::api::Session::web_request_ a cppgc::Member<api::WebRequest>

refactor: allocate api::WebRequest on cpp heap

refactor: modify Create(), Find(), and FindOrCreate() to return a WebRequest*

* refactor: ProxyingURLLoaderFactory takes a concrete api::WebRequest instead of a WebRequestAPI

Experimental commit to ensure `ProxyingURLLoaderFactory::web_request_api_`
won't be a dangling pointer.

* chore: fix doc shear

* refactor: use cppgc::WeakPersistent<> in ProxyingURLLoaderFactory

* refactor: make ProxyingURLLoaderFactory::web_request_ const

* refactor: make ProxyingWebSocket::web_request_ a cppgc::WeakPersistent<>

* add a gin::WeakCellFactory to api::WebRequest

* refactor: use a gin::WeakCell for the bound WebRequest argument in HandleOnBeforeRequestResponseEvent()

* chore: update patches
…a window to lose focus (electron#45640)

Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.
* chore: bump chromium in DEPS to 144.0.7522.0

* 7131867: Remove GenericScopedHandle::IsValid in favor of is_valid

https://chromium-review.googlesource.com/c/chromium/src/+/7131867

* 7078879: [video pip] Remove old controls

https://chromium-review.googlesource.com/c/chromium/src/+/7078879

* chore: fixup patch indices

* 7128138: Add a pref to enable Secure DNS 'automatic mode with DoH fallback'.

https://chromium-review.googlesource.com/c/chromium/src/+/7128138

* chore: fixup indices

* fix: pip patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
)

* docs: clarify meaning of string value for menu item icon

* fix: format

* fix: wording
…#45934)

* feat(macos): add --disable-geolocation-mac command-line flag

* internally deny geolocation requests if flag set

e

* wrap PermissionRequestHandler instead

* wrap custom handler and deny regardless of response

* Update docs/api/command-line-switches.md

Co-authored-by: Will Anderson <will@itsananderson.com>

* resolving conflicts during rebase

* tests added

* tests added: minor changes

* move IsGeolocationDisabledViaCommandLine inside ElectronPermissionManager as a static member

* test: inject fixturesPath via --boot-eval

* Update shell/browser/electron_permission_manager.cc

Co-authored-by: Robo <hop2deep@gmail.com>

* chore: Fixup after merge

* fixup after merge

---------

Co-authored-by: Will Anderson <will@itsananderson.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* docs: explain how to load SF Symbols with `nativeImage`

* fix: use single quotes

* fix: use single quotes
* chore: bump chromium in DEPS to 144.0.7526.0

* 7138583: [Partitioned Popins Removal] IPC

https://chromium-review.googlesource.com/c/chromium/src/+/7138583

* chore: fixup patch indices

* 7139794: Partially remove check for global handlers in plugin mime_type code

https://chromium-review.googlesource.com/c/chromium/src/+/7139794

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
In 6399527 we changed the path strings
that `node_modules.cc` operates on from single-byte to wide strings.
Unfortunately this means that `generic_path()` that the
"fix: ensure TraverseParent bails on resource path exit" patch was
calling was no longer a safe method to call on Windows if the underlying
string has unicode characters in it.

Here we fix it by using `ConvertGenericPathToUTF8` from the Node.js
internal utilities.
…ron#48941)

* fix: handle tar.xz files in uploaders, add to breaking changes

* docs: add additional file extension info
)

refactor: use std::map::extract() in api::WebRequest

Small readability refactor to api::WebRequest::blocked_requests_:
use extract() when we want to pull a BlockedRequest from the map
and then process it.
test: add view.getBounds|setBounds tests
…ctron#48973)

Revert "fix: enable wasm trap handlers in all Node.js  processes (electron#48788)"

This reverts commit ca0b46b.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Nov 25, 2025
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​electron/​typescript-definitions@​9.1.2 ⏵ 9.1.581 -110082 +189 +9100
Added@​types/​node@​24.9.11001008195100
Added@​xmldom/​xmldom@​0.8.1110010010083100
Updated@​electron/​asar@​3.2.13 ⏵ 4.0.1100 +110010084 +2100
Updatedwebpack-cli@​5.1.4 ⏵ 6.0.19810010084100
Updatedtypescript@​5.6.2 ⏵ 5.8.3100 +110090 +110090

View full report

Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with #48069, reviewing this is impossible because there are about 20000 lines of change. Did you possibly merge main into these branches?

If merging main into gsoc-2025 is intentional -- and I do see where that could be useful -- could we do that in a standalone PR so that 49078 and 48069 are humanly reviewable? 😅

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants