| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: implements cold COM activation (#49919) * fix: implements cold COM activation * fix: code review feedack | 6 个月前 | |
feat: add save/restore window state API (#51510) * feat: save window state (#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> * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * feat: clear and restore window state (#47781) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * test: multi monitor tests for save/restore window state (#48048) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: support for multimonitor tests * fix: update yarn.lock file * feat: support any resolution for new displays * feat: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * fix: native-addon forceCleanup * docs: add forceCleanup description * test: add two basic multi-monitor tests * fix: find the closest display for non-overlapping saved bounds * test: windowStatePersistence multi-monitor tests * docs: add note on display APIs in CI * fix: remove duplicate destroy registration * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * docs: remove inaccurate comment * fix: move expect blocks outside beforeEach * test: exclude macOS-x64 for now * test: remove invalid display test * test: remove invalid display test * feat: save window state (#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> * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * feat: clear and restore window state (#47781) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * feat: add 'restored-persisted-state' event to BaseWindow (#50516) * docs: add note on display APIs in CI * docs: remove inaccurate comment * test: set show to true * docs: restored-window-state event * feat: add 'restored-window-state' event to BaseWindow * test: add tests for 'restored-window-state' event emission * test: move createWindowAndSave * docs: differentiate between name and title * test: add checks for virtual display creation * docs: tutorial for windowStatePersistence * fix: ensure only single display before multi monitor tests * docs: better docs for virtual display addon * docs: better docs for virtual display addon * refactor: rename event restored-window-state to restored-persisted-state * refactor: rename BaseWindow.clearWindowState to clearPersistedState * docs: improve docs for name property and fix typos * build: run yarn install * fix: update base::Value::Dict -> base::DictValue * fix: add install script to virtual-display native addon The virtual-display fixture was missing an "install" script, so node-gyp never compiled it during `yarn install`. This caused "Cannot find module '../build/Release/virtual_display.node'" in CI. Also removed unused dependencies (bindings, @types/jest, node-gyp) to match the pattern of other native addon fixtures. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> * chore: fixup yarn.lock, lint * chore: fix build errors after rebase onto main Remove stale `#include "shell/browser/native_window_features.h"` (header was deleted in #51160) and add the required `animate` parameter to the `SetBounds` call in `RestoreBounds` (signature changed on main). * fix: rewrite virtual-display addon in Objective-C, removing Swift dependency The CI runner's Xcode 16.4 has a broken Swift toolchain where swift-frontend cannot load lib_CompilerSwiftIDEUtils.dylib. Since the addon only uses CoreGraphics private C/ObjC APIs (CGVirtualDisplay, CGVirtualDisplayDescriptor, etc.), rewrite the implementation entirely in Objective-C to eliminate the Swift compilation step. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * chore: remove nut-js dependent tests * test: fix macos display tests * Update docs/api/base-window.md Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: defer is_being_restored reset and persisted-state-restored to display-mode callback Resetting is_being_restored_ synchronously at the end of RestoreWindowState let the deferred display-mode callback (kiosk/fullscreen/maximize) fire from Show() with the flag already false, so the resize/move events it produced scheduled DebouncedSaveWindowState and persisted transitional bounds over the user's saved bounds. Also rename the BaseWindow event to persisted-state-restored consistently across the C++ emit, tutorial, and spec, and move the 25s busy-loop spec into a spawned Electron fixture so the spec runner main thread isn't blocked. * test: bump main-thread-busy spec timeout to 60s Spawned Electron fixture sleeps 25s plus startup, exceeding mocha's 30s default. * fix: emit persisted-state-restored synchronously, not in deferred callback The previous fix moved NotifyWindowStateRestored() into the deferred display-mode callback to keep it ordered after the kiosk/fullscreen/ maximize change. But that callback only fires from Show() via FlushPendingDisplayMode(), so windows constructed with show: false (and restore_display_mode_ true, which is the default) never emitted the event - including the spec coverage. Restore the synchronous emit and keep the is_being_restored_ deferral, since only the flag reset needs to straddle the deferred resize/move events that schedule DebouncedSaveWindowState. * fix: tie window-state restore guard to display-mode transition lifecycle The is_being_restored_ guard was reset on the deferred display-mode callback invocation rather than the actual restoration lifecycle, which caused three defects: 1. A window created with show:false and destroyed before show() left the guard stuck true, so the close-time FlushWindowState save no-op'd and state changes made while hidden were dropped. 2. showInactive() never flushed the deferred display mode, so a persisted hidden window shown inactive did not re-apply saved fullscreen/ maximize/kiosk and left the guard stuck true. 3. On macOS the guard was reset synchronously after the async SetFullScreen/Maximize/SetKiosk calls, so a flush during the transition persisted transitional bounds over the saved state. Reset the guard from the NotifyWindowEnterFullScreen/NotifyWindowMaximize observers once the transition completes, drain a never-run callback in FlushWindowState, flush the pending display mode from ShowInactive on both backends, and skip saves while a fullscreen transition is in flight. --------- Co-authored-by: Nilay Arya <84241885+nilayarya@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com> Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> Co-authored-by: George Xu <george.xu@slack-corp.com> | 2 个月前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: `titleBarOverlay` is defined as a `BaseWindow` ctor option (#43430) docs: titleBarOverlay is defined as a BaseWindow ctor option | 2 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: clipboard module aligned with the W3C Clipboard API (#51707) | 1 个月前 | |
feat: add `ColorSpace` (#47314) | 1 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: clarify CPUUsage window (#53337) | 9 天前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: make Chrome extensions work on custom protocols (#49951) | 5 个月前 | |
docs: fix broken links (#36519) * docs: fix broken links * docs: change link to navigator.getUserMedia Co-authored-by: Jeremy Rose <nornagon@nornagon.net> * docs: fix link in examples.md Co-authored-by: Jeremy Rose <nornagon@nornagon.net> | 3 年前 | |
docs: fix typos across documentation (#49734) Fix 40 typos across 25 documentation files including misspellings, missing words, doubled words, wrong words, and grammatical errors. | 6 个月前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: backslash escape parametrized TypeScript types (#41575) * docs: backslash escape parametrized TypeScript types * missing instances | 2 年前 | |
feat: implement File System API support (#41419) | 2 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: support `HIDDevice.collections` (#47391) * feat: support HIDDevice.collections * Update docs/api/structures/hid-device.md Co-authored-by: Erick Zhao <ezhao@slack-corp.com> --------- Co-authored-by: Erick Zhao <ezhao@slack-corp.com> | 1 年前 | |
docs: fix capitalization for `InputEvent.modifiers` (#46130) | 1 年前 | |
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 | 1 年前 | |
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 | 1 年前 | |
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 | 1 年前 | |
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 | 1 年前 | |
chore: remove deprecated `ipcRenderer.sendTo()` (#39087) chore: remove deprecated ipcRenderer.sendTo() | 2 年前 | |
docs: unify [!NOTE] structure (#46893) * docs: unify [!NOTE] structure * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/browser-window.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/download-item.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/global-shortcut.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * revert line break --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de> | 1 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: add `Menu` module tutorials (#47268) * docs: add `Menu` module tutorials * link API docs to new tutorials * removed unreferenced fiddles * add wording for new types * fix import sort errors * delete accelerator.md * fixes | 1 年前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
feat: implement the Prompt API via localAIHandler (#50659) * feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 | 2 个月前 | |
fix: report screen and tab capture as display-capture permission requests (#52824) * fix: report screen and tab capture as display-capture permission requests Media access requests for screen, window and tab capture - getDisplayMedia() and legacy getUserMedia() with the chromeMediaSource desktop/screen/tab constraints - were passed to session.setPermissionRequestHandler as the "media" permission with an empty `mediaTypes` array, so a handler could not tell them apart from a camera or microphone request other than by that empty array, and the documented "display-capture" permission was never requested. Request "display-capture" for those, keep "media" for camera and microphone devices, and populate `mediaTypes` for display-capture requests with the video/audio kinds that were asked for. Update the docs, add a breaking-changes entry and add tests covering both permissions, including that a denied display-capture request never reaches the display media request handler. * fix: apply the display-capture permissions policy to legacy desktop capture Blink enforces the `display-capture` Permissions-Policy for getDisplayMedia() but not for getUserMedia() with the chromeMediaSource desktop/screen/tab constraints, so a frame that the embedding page has not allowed to capture the display could still do so through the older API. Check the policy in WebContentsPermissionHelper::RequestMediaAccessPermission for all display capture requests before asking the app, and reject with CAPTURE_NOT_ALLOWED_BY_POLICY when it is disabled for the requesting frame. | 18 天前 | |
feat: add memory to app.getAppMetrics() (#18831) | 7 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: add `menuItem.badge` support on macOS (#50805) * feat: add `menuItem.badge` support on macOS Adds a `badge` property to `MenuItem` on macOS, backed by AppKit's `NSMenuItemBadge` API (macOS 14+). The property accepts a `MenuItemBadge` object with a `type` (`alerts`, `updates`, `new-items`, or `none`) and an optional `count` or custom `content` string. The badge can be set at construction time or updated dynamically after the item has been added to a menu. * docs: note macOS 14+ * test: add coverage for menuItem.badge on macOS Adds TypeScript smoke tests and functional tests for the MenuItem badge property, covering all badge types, dynamic updates, and menu integration. * Update docs/api/menu-item.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: yarn run format * docs: tweak wording to get string union Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: add reference to Apple docs * docs: add reference to Apple docs * refactor: tighten menuItem.badge plumbing Validate badge options in JS, allow removing a badge by clearing the property, share one gin converter for the native side, and reference the MenuItemBadge structure from the constructor docs. --------- Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> | 22 天前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: Restore webContents navigation history and page state (#45433) * feat: Working navigationHistory.restore with just title/url * feat: Restore page state, too * chore: Docs, lint, tests * Implement feedback * More magic * Make _awaitNextLoad truly private * Implement API group feedback * One more round of feedback | 1 年前 | |
feat: improve Windows Toast actions support (#48132) * feat: improve Windows Toast actions support * fix: ensure MSIX compatibility * test: add bad clsid format test | 6 个月前 | |
docs: backslash escape parametrized TypeScript types (#41575) * docs: backslash escape parametrized TypeScript types * missing instances | 2 年前 | |
feat: offscreen rendering support rgbaf16 hdr output format. (#48265) * feat: offscreen rendering support rgbaf16 * docs: update doc * docs: update doc. | 10 个月前 | |
feat: implement File System API support (#41419) | 2 年前 | |
feat: Added missing info to IAP transaction and product structures (#31739) | 4 年前 | |
feat: implement File System API support (#41419) | 2 年前 | |
docs: unify [!NOTE] structure (#46893) * docs: unify [!NOTE] structure * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/browser-window.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/download-item.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * Update docs/api/global-shortcut.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> * revert line break --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de> | 1 年前 | |
feat: remove nativeWindowOpen option (#29405) Co-authored-by: Cheng Zhao <zcbenz@gmail.com> Co-authored-by: Milan Burda <milan.burda@gmail.com> | 4 年前 | |
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 | 1 年前 | |
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 | 1 年前 | |
feat: add webFrameMain.printToPDF() (#52439) * feat: add webFrameMain.printToPDF() Allows printing an individual frame (e.g. an <iframe>) to PDF from the main process, rather than only the full page via webContents.printToPDF. The C++ PDF path already operates on a RenderFrameHost, so the core is extracted to shell/browser/printing/print_to_pdf.cc and shared by both entry points. The JS option translation and job queueing move to a shared lib/browser/print-to-pdf.ts; jobs are serialized per frame tree (keyed by the top frame's frameTreeNodeId, which is stable across navigations) because concurrent print jobs within one frame tree conflict in the renderer, while frames in different webContents still print concurrently. Co-Authored-By: Claude <noreply@anthropic.com> * docs: add API history block for webFrameMain.printToPDF() Co-Authored-By: Claude <noreply@anthropic.com> * docs: move printToPDF options into a shared structure The options table was duplicated across webContents, <webview>, and now webFrameMain. Pull it into a PrintToPDFOptions structure and give its margins their own PrintToPDFMargins structure so the generated typings no longer merge them with webContents.print()'s pixel-based Margins. No-Verification-Needed: docs-only --------- Co-authored-by: Claude <noreply@anthropic.com> | 1 个月前 | |
feat: add webFrameMain.printToPDF() (#52439) * feat: add webFrameMain.printToPDF() Allows printing an individual frame (e.g. an <iframe>) to PDF from the main process, rather than only the full page via webContents.printToPDF. The C++ PDF path already operates on a RenderFrameHost, so the core is extracted to shell/browser/printing/print_to_pdf.cc and shared by both entry points. The JS option translation and job queueing move to a shared lib/browser/print-to-pdf.ts; jobs are serialized per frame tree (keyed by the top frame's frameTreeNodeId, which is stable across navigations) because concurrent print jobs within one frame tree conflict in the renderer, while frames in different webContents still print concurrently. Co-Authored-By: Claude <noreply@anthropic.com> * docs: add API history block for webFrameMain.printToPDF() Co-Authored-By: Claude <noreply@anthropic.com> * docs: move printToPDF options into a shared structure The options table was duplicated across webContents, <webview>, and now webFrameMain. Pull it into a PrintToPDFOptions structure and give its margins their own PrintToPDFMargins structure so the generated typings no longer merge them with webContents.print()'s pixel-based Margins. No-Verification-Needed: docs-only --------- Co-authored-by: Claude <noreply@anthropic.com> | 1 个月前 | |
chore: lint code blocks in docs with ESLint (#42113) | 1 年前 | |
docs: fix platform location for params (#18987) | 7 年前 | |
docs: clarify CPUUsage window (#53337) | 9 天前 | |
feat: Added missing info to IAP transaction and product structures (#31739) | 4 年前 | |
feat: Added missing info to IAP transaction and product structures (#31739) | 4 年前 | |
chore: bump chromium to 117.0.5852.0 (main) (#38891) * chore: bump chromium in DEPS to 117.0.5846.0 * chore: update patches * 4628901: Bump the macOS deployment target to 10.15 https://chromium-review.googlesource.com/c/chromium/src/+/4628901 * 4593350: [Private Network Access] Trigger Permission Prompt https://chromium-review.googlesource.com/c/chromium/src/+/4593350 * 4631011: Remove unlaunched "InstallReplacementAndroidApp" Platform App APIs https://chromium-review.googlesource.com/c/chromium/src/+/4631011 * chore: disable API deprecation warnings in NSKeyedArchiver * chore: update libcxx filenames * chore: bump chromium in DEPS to 117.0.5848.2 * chore: update feat_add_set_theme_source_to_allow_apps_to.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629743 No manual changes; patch succeeded with fuzz * chore: update process_singleton.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4605398 Trivial manual patch adjustments to account for code shear. * chore: remove electron::BrowserContext::GetMediaDeviceIDSalt() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4608130 upstream tldr: - content::BrowserContext::GetMediaDeviceIDSalt() - content::ContentBrowserClient::ArePersistentMediaDeviceIDsAllowed() + content::ContentBrowserClient::GetMediaDeviceIDSalt() This commit leaves ElectronBrowserContext::GetMediaDeviceIDSalt() in place (now non-virtual, non-override). It is now called by the new function ElectronBrowserClient::GetMediaDeviceIDSalt(). As a followup, we might want to consider using the new upstream media_device_salt::MediaDeviceSaltService and removing our electron::MediaDeviceIDSalt code. CC @MarshallOfSound for 2nd opinion since he has done the most work on MediaDeviceIDSalt and may have more context. * chore: fix iwyu breakage Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629624 electron_browser_main_parts.cc uses ui::ColorProviderManager but didn't include it. Things worked anyway because we got it indirectly from content/public/browser/web_contents.h until 4629624. * chore: remove call to base::mac::IsAtLeastOS10_14 upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove obsolete API_AVAILABLE calls in IAP upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove obsolete API_AVAILABLE calls in electron_application_delegate upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove broken-before-macOS-10.15 patch in mas_avoid_usage_of_private_macos_apis.patch Upstream has bumped minimum to macOS 10.15 * chore: remove @available(macOS 10.14) check Upstream minimum requirement for macOS is now 10.15 * chore: update patches * chore: bump chromium in DEPS to 117.0.5850.0 * chore: update patches * chore: bump chromium in DEPS to 117.0.5852.0 * chore: update patches * Move two params from NetworkContextParams to NetworkContextFilePaths. https://chromium-review.googlesource.com/c/chromium/src/+/4615930 * WebUSB: Add exclusionFilters to USBRequestDeviceOptions https://chromium-review.googlesource.com/c/chromium/src/+/4614682 * Convert /chrome/browser/ui to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4615920 * fixup! Bump the macOS deployment target to 10.15 * fixup! Bump the macOS deployment target to 10.15 * chore: update libcxx files * win: Remove 10Glass from Windows10Glass function and var names https://chromium-review.googlesource.com/c/chromium/src/+/4641314 * chore: revert 392e5f43 from chromium * Add an ExecutionContext to ScriptState https://chromium-review.googlesource.com/c/chromium/src/+/4609446 * fixup! Add an ExecutionContext to ScriptState * chore: fix header * Revert "chore: revert 392e5f43 from chromium" This reverts commit b7f782943e4ce83cae8cd35780d8d3618cf0772c. * fix: return correct min/max sizes in WinFrameView * fixup! Revert chore: revert 392e5f43 from chromium * fixup! Add an ExecutionContext to ScriptState * Revert "fixup! Revert chore: revert 392e5f43 from chromium" This reverts commit 7e2c7281abfc4f309255339fdba073d90a9ae3eb. * Revert "fix: return correct min/max sizes in WinFrameView" This reverts commit 3f418b1ab5155686730e087ae6cabe4a21b4bb61. * Revert "Revert "chore: revert 392e5f43 from chromium"" This reverts commit 56296d8b7c434147e032e3c3b08c0e371b6c27ba. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com> | 3 年前 | |
feat: identify the requesting frame and initiator on network, auth and download events (#53685) * feat: identify the requesting frame and initiator on network, auth and download events * webRequest listener details gain `initiator`, the origin that issued the request (kept from the original request across redirects, as in Chrome's webRequest API) * protocol.handle() requests and ProtocolRequest gain `initiator` * DownloadItem gains getInitiatorOrigin(); session 'will-download' gets a trailing `frame` * session 'preconnect' gets a trailing `frame` * specs for each * docs: add API history PR reference | 4 天前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat!: remove support for ProtocolResponse.session null value (#46264) BREAKING CHANGE This was deprecated in f7ba0d3b & is now being removed for Electron 37. | 1 年前 | |
feat: add support for configuring system network context proxies (#41335) * feat: add support for configuring system network context proxies * chore: add specs * chore: fix lint * fix: address review feedback | 2 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
chore: bump chromium to 143.0.7451.0 (main) (#48362) * chore: bump chromium in DEPS to 142.0.7429.0 * chore: bump chromium in DEPS to 142.0.7430.0 * 6954508: Reland Migrate WrappableWithNamedPropertyInterceptor to gin::Wrappable | https://chromium-review.googlesource.com/c/chromium/src/+/6954508 * https://chromium-review.googlesource.com/c/chromium/src/+/6955633 * 5584820: Fix font face resolution when renderer is blocked | https://chromium-review.googlesource.com/c/chromium/src/+/5584820 * chore: export patches * chore: remove patch that keeley says is ok to remove in comments * chore: bump chromium in DEPS to 142.0.7432.0 * chore: export patches * chore: bump chromium in DEPS to 142.0.7434.0 * 6973697: Use type tags for data stored in V8 internal fields | https://chromium-review.googlesource.com/c/chromium/src/+/6973697 * 6976272: Revert Reland mac: click through content area in main window | https://chromium-review.googlesource.com/c/chromium/src/+/6976272 * chore: export patches * 6938086: Rename native_widget_types.h -> native_ui_types.h | https://chromium-review.googlesource.com/c/chromium/src/+/6938086 * 6951252: Correct PersistentCache backed code cache context grouping * chore: bump chromium in DEPS to 142.0.7436.0 * 6981628: Reland Use unordered_map in AcceleratorMap | https://chromium-review.googlesource.com/c/chromium/src/+/6981628 * chore: export patches * chore: resolve patch conflict with main * chore: merge conflict with main * chore: bump chromium in DEPS to 142.0.7438.0 * chore: bump chromium in DEPS to 142.0.7440.0 * chore: bump chromium in DEPS to 142.0.7442.0 * chore: bump chromium in DEPS to 142.0.7444.0 * chore: bump chromium in DEPS to 143.0.7445.0 * chore: bump chromium in DEPS to 143.0.7447.0 * chore: bump chromium in DEPS to 143.0.7449.0 * chore: bump chromium in DEPS to 143.0.7451.0 * 7001364: Migrate GURL accessors to Get* variants in //content | https://chromium-review.googlesource.com/c/chromium/src/+/7001364 * 6986521: Implicit second value 'any' instead of 'span-all' for fallback query | https://chromium-review.googlesource.com/c/chromium/src/+/6986521 * chore: update chromium patches * chore: update chromium patches * chore: update patches * fix: parse macOS SDK version across line break https://chromium-review.googlesource.com/c/chromium/src/+/6980166 * fix: replace v8::Object::SetPrototype() usage https://chromium-review.googlesource.com/c/v8/v8/+/6983465 https://github.com/nodejs/node/pull/55453 * fix: regenerate filenames.libcxx.gni https://chromium-review.googlesource.com/c/chromium/src/+/6980307 * fix: replace additional usages of SetPrototype https://chromium-review.googlesource.com/c/v8/v8/+/6983465 * build: use macos 15 minimum https://chromium-review.googlesource.com/c/chromium/src/+/6980166 * ci: ignore missing dir for strip_universal_deep * fix: js2c compilation failure https://chromium-review.googlesource.com/c/chromium/src/+/6950738 See patch description explaining MacOS 26 SDK headers incompatibility. * fixup! chore: export patches * feat: add new memory-eviction exit reason https://chromium-review.googlesource.com/c/chromium/src/+/6991933 * fix: set JSON reader parsing options https://chromium-review.googlesource.com/c/chromium/src/+/6992114 * fix: provide DeviceEmulationCacheBehavior param https://chromium-review.googlesource.com/c/chromium/src/+/6965238 * fix: views::NonClientFrameView -> views::FrameView https://chromium-review.googlesource.com/c/chromium/src/+/7005027 https://chromium-review.googlesource.com/c/chromium/src/+/6966937 * fix: check new forced colors enum value https://chromium-review.googlesource.com/c/chromium/src/+/6944403 * fix: migrate NetworkConditions -> MatchedNetworkConditions https://chromium-review.googlesource.com/c/chromium/src/+/6827307 * fix: migrate GURL string methods to Get*() https://chromium-review.googlesource.com/c/chromium/src/+/7007010 * fix: disable C++ modules in electron_lib builds https://chromium-review.googlesource.com/c/chromium/src/+/6950738 * fix: partially revert is_headless_mode removal https://chromium-review.googlesource.com/c/chromium/src/+/6955633 This patch should likely be reworked. For now, this partially reverts the removal of a required class property to restore behavior. * Revert "build: use macos 15 minimum" This reverts commit 2fc12d6acc1b24f3cbd0adb03122bf6b21eb14b9. Initially this change was made to test if it fixes libcxx compilation issues. As that's now resolved by disabling libcxx modules, this can be reverted. * fix: disable C++ modules in libnode builds * fixup! fix: replace v8::Object::SetPrototype() usage https://chromium-review.googlesource.com/c/v8/v8/+/6983465 https://github.com/nodejs/node/pull/55453 * fixup! fix: replace v8::Object::SetPrototype() usage https://chromium-review.googlesource.com/c/v8/v8/+/6983465 https://github.com/nodejs/node/pull/55453 * build: switch to macos-15 runner build/mac/find_sdk.py now requires macOS 15 SDK as a minimum version. The macos 15 runners default to an Xcode using the 15 SDK and removes older versions. * fixup! fix: check new forced colors enum value https://chromium-review.googlesource.com/c/chromium/src/+/6944403 * fixup! fix: migrate GURL string methods to Get*() https://chromium-review.googlesource.com/c/chromium/src/+/7007010 * fix: use std::u16string for Extension::Create() error parameter https://chromium-review.googlesource.com/c/chromium/src/+/6975452 * fix: add missing image_skia include https://chromium-review.googlesource.com/c/chromium/src/+/6986762 * fixup! fix: add missing image_skia include https://chromium-review.googlesource.com/c/chromium/src/+/6986762 * fix: remove outdated V8 flag https://chromium-review.googlesource.com/c/v8/v8/+/6948286 * fix: disable protocol handler DCHECK https://chromium-review.googlesource.com/c/chromium/src/+/6727594 Ignore the extension custom protocol handler registry DCHECK until we invest in supporting it. Replacing this DCHECK seems harmless and will unblock the roll. * fix: replace deprecated usage of SetPrototype https://chromium-review.googlesource.com/c/v8/v8/+/6983465 * fixup! fix: migrate NetworkConditions -> MatchedNetworkConditions https://chromium-review.googlesource.com/c/chromium/src/+/6827307 * fixup! fix: migrate GURL string methods to Get*() https://chromium-review.googlesource.com/c/chromium/src/+/7007010 * chore: remove patch already included in roll * chore: remove extraneous formatting added to patch * chore: remove fix_harden_blink_scriptstate_maybefrom.patch https://chromium-review.googlesource.com/c/chromium/src/+/6973697 No longer needed since the above CL landed. * 6973697: Use type tags for data stored in V8 internal fields https://chromium-review.googlesource.com/c/chromium/src/+/6973697 * chore: update patches * fixup! chore: export patches * chore: restore electron embedder data tag patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Alice Zhao <alicelovescake@anthropic.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> | 10 个月前 | |
feat: session.resolveHost (#37690) * feat: session.resolveHost Expose Chromium's host resolution API through the Session object. * Update shell/browser/api/electron_api_session.cc Co-authored-by: Jeremy Rose <nornagon@nornagon.net> * address feedback * fix tests * address feedback * Add options * Update shell/browser/api/electron_api_session.cc Co-authored-by: Cheng Zhao <github@zcbenz.com> * Update shell/browser/net/resolve_host_function.cc Co-authored-by: Cheng Zhao <github@zcbenz.com> * lint * return object * add missing file * fix crash * handle scope * links --------- Co-authored-by: Fedor Indutny <indutny@signal.org> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: Cheng Zhao <github@zcbenz.com> | 3 年前 | |
feat: session.resolveHost (#37690) * feat: session.resolveHost Expose Chromium's host resolution API through the Session object. * Update shell/browser/api/electron_api_session.cc Co-authored-by: Jeremy Rose <nornagon@nornagon.net> * address feedback * fix tests * address feedback * Add options * Update shell/browser/api/electron_api_session.cc Co-authored-by: Cheng Zhao <github@zcbenz.com> * Update shell/browser/net/resolve_host_function.cc Co-authored-by: Cheng Zhao <github@zcbenz.com> * lint * return object * add missing file * fix crash * handle scope * links --------- Co-authored-by: Fedor Indutny <indutny@signal.org> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: Cheng Zhao <github@zcbenz.com> | 3 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: fix SerialPort typing (#38544) | 3 年前 | |
feat: ServiceWorkerMain (#45232) * feat: ServiceWorkerMain * refactor: disconnect remote * handle version_info_ nullptr case * initiate finish request when possible and enumerate errors * explicit name for test method * oops * fix: wait for redundant version to stop before destroying * docs: clarify when undefined is returned * chore: remove extra semicolons | 1 年前 | |
feat: Add shared dictionary management APIs (#44750) * Add bare-bones GetSharedDictionaryUsageInfo * Add GetSharedDictionaryInfo() * Improve API, use isolation keys * Add documentation * Update docs/api/session.md Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> * Update shell/browser/api/electron_api_session.cc Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> * Add tests * Implement feedback <3 * Improve tests * chore: lint * docs: add note about clearing cache in ses.clearData --------- Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: alice <alice@makenotion.com> | 1 年前 | |
feat: Add shared dictionary management APIs (#44750) * Add bare-bones GetSharedDictionaryUsageInfo * Add GetSharedDictionaryInfo() * Improve API, use isolation keys * Add documentation * Update docs/api/session.md Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> * Update shell/browser/api/electron_api_session.cc Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> * Add tests * Implement feedback <3 * Improve tests * chore: lint * docs: add note about clearing cache in ses.clearData --------- Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: alice <alice@makenotion.com> | 1 年前 | |
fix: rgbaf16 shared texture remove keyed mutex. (#49798) * fix: rgbaf16 shared texture remove keyed mutex. * fix: rgbaf16 patch. * 更新 shared-texture-handle.md Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> --------- Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> | 6 个月前 | |
feat: import shared texture supports nv16 (#50728) | 4 个月前 | |
feat: add `sharedTexture` module to import shared texture (#47317) feat: add `sharedTexture` module. | 9 个月前 | |
feat: add `sharedTexture` module to import shared texture (#47317) feat: add `sharedTexture` module. | 9 个月前 | |
feat: add `sharedTexture` module to import shared texture (#47317) feat: add `sharedTexture` module. | 9 个月前 | |
feat: add `sharedTexture` module to import shared texture (#47317) feat: add `sharedTexture` module. | 9 个月前 | |
feat: add `sharedTexture` module to import shared texture (#47317) feat: add `sharedTexture` module. | 9 个月前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
chore: lint code blocks in docs with ESLint (#42113) | 1 年前 | |
feat: Added missing info to IAP transaction and product structures (#31739) | 4 年前 | |
docs: type names changed from wrapper to primitive (#31752) | 4 年前 | |
feat: add protocol.handle (#36674) | 3 年前 | |
fix: pass postData to new-window event (#28513) | 5 年前 | |
feat: support complete WebUSB device properties (#47459) * feat: support complete WebUSB device properties * docs: correct type consistency | 1 年前 | |
chore: fix some typos (#40506) | 2 年前 | |
fix: gate preload and worker Node integration on the creating frame (#53686) * workers only get Node integration when the frame creating them has it (main frame, or nodeIntegrationInSubFrames); previously any same-process subframe's workers got it whenever nodeIntegrationInWorker was set (feat_plumb_node_integration_in_worker_through_workersettings.patch) * the "DevTools extension" preload exception applies only to extension documents hosted inside the DevTools front-end, not to any chrome-extension:// frame; browser-side startup-data push matches * specs for worker gating; docs and breaking-changes entries | 4 天前 | |
feat: add excludeUrls and modify urls in WebRequestFilter for better URL filtering (#44692) * feat: add excludeUrls to web request filter * refactor: add deprecated field * test: update tests * lint: newline * docs: improve API doc * fix: add is filter defined property to match all urls * refactor: remove includeUrls * refactor: remove typescript binding * refactor: all_url * refactor: remove isDefined methods * refactor: remove comment * fix: logic * docs: add to breaking changes | 1 年前 | |
feat: add net.WebSocket (#51593) * feat: add net.WebSocket Add a WHATWG-compatible WebSocket client to the net module, backed by Chromium's network stack via NetworkContext::CreateWebSocket(). This gives main-process code a WebSocket that goes through the session's proxy configuration, certificate verification, and cookie store, with the same drop-in API shape as the browser/Node global WebSocket. The implementation has two pieces: - shell/browser/api/electron_api_web_socket.{h,cc}: a gin-wrapped object that implements network.mojom.{WebSocketHandshakeClient, WebSocketClient, WebSocketAuthenticationHandler}, drives the mojo data pipes with back-pressure on both sides, reassembles fragmented frames, tracks bufferedAmount, and emits low-level events. - lib/browser/api/net-websocket.ts: a class WebSocket extends EventTarget that implements the WHATWG surface (addEventListener, on{open,message, error,close}, readyState, bufferedAmount, protocol, extensions, binaryType, send(), close(), CONNECTING/OPEN/CLOSING/CLOSED) plus Electron-specific options (headers, origin, useSessionCookies, session, partition). binaryType supports 'nodebuffer' (default), 'arraybuffer', and 'blob'. useSessionCookies defaults to false, matching net.request(). The Origin header defaults to the http(s) equivalent of the WebSocket URL's origin so that the connection looks first-party for SameSite cookie purposes; it can be overridden with the origin option. Main process only for now; webRequest interception is a known follow-up. * fix: address review findings and migrate WebSocketWrapper to gin::Wrappable Migrate WebSocketWrapper from gin_helper::DeprecatedWrappable to gin::Wrappable (cppgc-based, electron/electron#47922): - Add kElectronWebSocket wrappable pointer tag. - Replace Pin()/Unpin() with gin_helper::SelfKeepAlive, cleared on teardown. - Replace base::WeakPtrFactory with gin::WeakCellFactory + gin::WrapPersistent for callbacks; add Trace() to visit the weak cell. - Annotate mojo::Receiver/Remote fields with GC_PLUGIN_IGNORE (browser process doesn't need execution-context tracking), matching UtilityProcessWrapper. - Public constructor for cppgc::MakeGarbageCollected; Create() returns T*. Spec and correctness fixes: - Drop the unused WebSocketAuthenticationHandler. The 'login' event it emitted was never bridged to the WHATWG-only TS surface, leaving the mojo OnAuthRequired callback orphaned and the connection hung on a 401/407 challenge until V8 GC. Pass NullRemote() so the network service fails the challenge fast (matching WebSocketConnectorImpl). Drop the 'authenticated proxies' claim from the docs. - Serialize the send queue so a Blob send (which must read asynchronously) doesn't let a later string/ArrayBuffer send overtake it on the wire. - Set readyState to CLOSED before dispatching the 'error' event, per the WebSocket spec ordering rules. - Stop nulling the wrapper on close so bufferedAmount reflects untransmitted bytes (it must not reset to zero) and continues to count post-close sends. - Use WebIDL [Clamp] semantics for the close() code argument. - Disable permessage-deflate on the test ws server; it isn't the subject under test and ws@7's deflate close path can race a server-initiated close. * chore: correct copyright holder in new files * fix: address review feedback - Track all bytes queued in the JS send chain (not just Blob reads) so bufferedAmount is accurate while a non-Blob send is waiting behind an asynchronous Blob read. - Surface the network failure message and net error in CloseEvent.reason for connection failures (the WHATWG 'error' Event has no payload). Failure reasons from the network service already embed the net error name; only append it for internally-generated failures. - Emit a Node Buffer from the C++ side via electron::Buffer::Copy() instead of a raw ArrayBuffer, avoiding a TS-side wrap on the default 'nodebuffer' path. - Drop the redundant disconnect handler on the WebSocket remote; the WebSocketClient receiver and the remote terminate at the same WebSocketImpl in the network process. * chore: remove accidentally committed lock file | 3 个月前 | |
chore: bump chromium to 99.0.4767.0 (main) (#31986) * chore: bump chromium in DEPS to 98.0.4726.0 * 3292117: Remove unneeded base/compiler_specific.h includes in //chrome. https://chromium-review.googlesource.com/c/chromium/src/+/3292117 * 3289198: Enables calculating line, word and sentence boundaries on the browser https://chromium-review.googlesource.com/c/chromium/src/+/3289198 * 3276176: Remove expired gdi-text-printing flag and associated code. https://chromium-review.googlesource.com/c/chromium/src/+/3276176 * 3240963: content: allow embedder to prevent locking scheme registry https://chromium-review.googlesource.com/c/chromium/src/+/3240963 * 3269899: Rename WebContentsImpl::GetFrameTree to GetPrimaryFrameTree https://chromium-review.googlesource.com/c/chromium/src/+/3269899 * chore: fixup patch indices * 3276279: Enable -Wshadow by default for the "chromium code" config. https://chromium-review.googlesource.com/c/chromium/src/+/3276279 * 3279737: appcache: Remove WebPreference/WebSetting https://chromium-review.googlesource.com/c/chromium/src/+/3279737 * 3275564: [api] Advance API deprecation for APIs last marked in v9.6 https://chromium-review.googlesource.com/c/v8/v8/+/3275564 * 3261873: Clean up WebScriptSource constructors https://chromium-review.googlesource.com/c/chromium/src/+/3261873 * 3279346: appcache: Remove ConsoleMessage appcache field https://chromium-review.googlesource.com/c/chromium/src/+/3279346 * 3264212: Move legacy file loading to legacy_test_runner https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264212 Both Persistence and UI have been removed from globals, but the issues they seemed to be patching are no longer reproducible from what I can tell, and so we can just delete these and re-evaluate if something surfaces. * 3290415: x11: remove the USE_X11 define. https://chromium-review.googlesource.com/c/chromium/src/+/3290415 * chore: bump Chromium to 98.0.4728.0 * 3179530: Defer system calls in PrintingContext for OOP printing https://chromium-review.googlesource.com/c/chromium/src/+/3179530 * 3299445: Consolidate is_win conditionals in chrome/test/BUILD.gn. https://chromium-review.googlesource.com/c/chromium/src/+/3299445 * chore: update patch indices * 3223975: Break PrintJobWorker OOP logic into separate class https://chromium-review.googlesource.com/c/chromium/src/+/3223975 * chore: bump chromium in DEPS to 98.0.4730.0 * 3279001: Remove support for font-family: -webkit-pictograph https://chromium-review.googlesource.com/c/chromium/src/+/3279001 * chore: fixup patch indices * chore: bump chromium in DEPS to 98.0.4732.0 * chore: update patches * chore: bump chromium in DEPS to 98.0.4734.0 * chore: bump chromium in DEPS to 98.0.4736.0 * chore: update patches * chore: update printing patch for miracle ptr * chore: add noexcept to fix clang error * chore: bump chromium in DEPS to 98.0.4738.0 * chore: update patches * chore: bump chromium in DEPS to 98.0.4740.0 * chore: bump chromium in DEPS to 98.0.4742.0 * chore: bump chromium in DEPS to 98.0.4744.0 * chore: bump chromium in DEPS to 98.0.4746.0 * chore: bump chromium in DEPS to 98.0.4748.0 * chore: bump chromium in DEPS to 98.0.4750.0 * chore: update patches * 3293841: Remove File Handling permissions code Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3293841 * chore: update patches 3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700 * 3289260: [CodeHealth]: Remove uses of Notification Service Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3289260 * 3301600: Disable scripted print in fenced frames Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3301600 * chore: add missing thread_restrictions headers * 3305132: Rewrite most `Foo* field_` pointer fields to `raw_ptr<Foo> field_`. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3305132 * fix: add ppapi_sandbox header for linux 3311700: Move the PpapiPluginSandboxedProcessLauncherDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/3311700 * chore: manually bump chromium in DEPS to 98.0.4757.0 * chore: update patches * 3321044: Remove DictionaryValue::Clear() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3321044 * chore: update printing.patch Refs: - 3304556: [code health] Remove notification observation from PrintJob. | https://chromium-review.googlesource.com/c/chromium/src/+/3304556 - 3305095: [code health] Remove NotificationService from PrintViewManagerBase. | https://chromium-review.googlesource.com/c/chromium/src/+/3305095 * build: add v8-embedder-state headers to GN patch * chore: bump chromium in DEPS to 99.0.4767.0 * chore: update patches * chore: rename CookiePartitionKeychain ...to CookiePartitionKeyCollection * chore: update video consumers * refactor: use newer base::Value API * 3232598: Convert net::DnsOverHttpsServerConfig into a class | https://chromium-review.googlesource.com/c/chromium/src/+/3232598 * 3327865: Remove the default WebContentsUserData ctor. | https://chromium-review.googlesource.com/c/chromium/src/+/3327865 * 3302814: DevTools: Add getPreference binding | https://chromium-review.googlesource.com/c/chromium/src/+/3302814 * 3301474: [tq][runtime] Use build flags for JS context promise hooks | https://chromium-review.googlesource.com/c/v8/v8/+/3301474 * oops 😵💫 * 3272411: Reland "base/allocator: Enable PartitionAlloc-Everywhere on macOS" | https://chromium-review.googlesource.com/c/chromium/src/+/3272411 build: turn PartitionAlloc back off on mac for now * fix: WCO method got renamed * 3344749: Revert "Stop using NSRunLoop in renderer process" https://chromium-review.googlesource.com/c/chromium/src/+/3344749 * 3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues. https://chromium-review.googlesource.com/c/chromium/src/+/3288746 * Revert "3288746: [serial] Fix BluetoothSerialDeviceEnumerator threading issues." This reverts commit 5cc69f102e43ca72ac9ef45063711bcc7d849740. * chore: disable serial device enumerator sequence dcheck * fix: comment out line in DeviceService dtor * fixup! 3279001: Remove support for font-family: -webkit-pictograph * fixup! 3279346: appcache: Remove ConsoleMessage appcache field * chore: update patches after rebase Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: VerteDinde <khammond@slack-corp.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org> | 4 年前 | |
feat: support WebAuthn Touch ID platform authenticator on macOS (#51255) * feat: support WebAuthn Touch ID platform authenticator on macOS Adds `app.configureWebAuthn({ touchID: { keychainAccessGroup } })` to enable the Secure Enclave platform authenticator for `navigator.credentials`. Credentials are stored under the app-supplied keychain access group with a per-session metadata secret that is generated on first use and persisted in prefs. Also introduces `ElectronAuthenticatorRequestClientDelegate` and wires it via `ContentBrowserClient::GetWebAuthenticationRequestDelegate()` so that discoverable-credential `get()` calls with multiple matches emit a new `select-webauthn-account` session event instead of DCHECK-failing in the base delegate. If no listener is registered (or the callback is invoked with no credential), the request is cancelled with NotAllowedError rather than silently auto-selecting. Tests use the DevTools virtual authenticator so the account-selection flow is exercised in CI without entitlements or real hardware. * fix: register request delegate as FidoRequestHandlerBase observer The base AuthenticatorRequestClientDelegate::StartObserving() is a no-op, so observer() on the request handler stayed null. MakeCredentialRequestHandler:: SpecializeRequestForAuthenticator dereferences observer()->SupportsPIN() when residentKey is 'preferred', crashing with SEGV when a real FIDO2 HID key is dispatched. Override StartObserving/StopObserving to register via a ScopedObservation like ChromeAuthenticatorRequestDelegate does. Added a virtual-authenticator regression test for create() with residentKey: 'preferred'. * chore: update copyright attribution for new webauthn files * fix: address review feedback on webauthn account-select event - Encode credentialId and userHandle as URL-safe base64 without padding so the values match PublicKeyCredential.id from navigator.credentials.get() byte-for-byte; tests now assert the equality rather than transcoding. - Cancel the pending request when the listener invokes the callback with a credentialId that does not match any account, instead of leaving the request hanging while the listener retries. The TypeError still surfaces so the misuse remains visible to the developer. - DCHECK that the Touch ID config helpers run on the UI thread, encoding the threading invariant the read-then-write metadata-secret pref relies on. * fix: oxfmt formatting in webauthn spec * fix: use out-param form of base::Base64UrlEncode * fix: silently cancel webauthn account select on unknown credentialId Throwing back into the listener bubbles up as an unhandled exception in the main process. Match the no-args branch exactly so the listener sees a single consistent failure mode (cancel + NotAllowedError) whether it declines deliberately or by mistake. | 4 个月前 | |
feat: Allow creation of new window to be customizable. (#41432) | 2 年前 | |
feat: add query-session-end and improve session-end events on Windows (#44598) * feat: add query-session-end event for Windows * fix: remove debug line * feat: notify with reason on session-end * docs: add comments and return params * docs: add same docs to the BrowserWindow * fix: add shutdown reason if lParam == 0 * docs: remove 'force' word * docs: revert multithreading.md change * docs: add reasons documentation, reason variable renamed to reasons * docs: improve 'shutdown' reason wording * docs: reword with 'can be' * fix: pass reasons by reference * fix: use newer approach which expose reasons value directly on Event object * docs: add escaping * style: linter fixes * fix: project now should compile * fix: EmitWithoutEvent method added, EmitWithEvent moved to private again * docs: typo fix Co-authored-by: Sam Maddock <samuel.maddock@gmail.com> * docs: dedicated WindowSessionEndEvent type created * docs: better wording for session-end event description Co-authored-by: Will Anderson <will@itsananderson.com> --------- Co-authored-by: Sam Maddock <samuel.maddock@gmail.com> Co-authored-by: Will Anderson <will@itsananderson.com> | 1 年前 | |
feat: add save/restore window state API (#51510) * feat: save window state (#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> * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * feat: clear and restore window state (#47781) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * test: multi monitor tests for save/restore window state (#48048) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: support for multimonitor tests * fix: update yarn.lock file * feat: support any resolution for new displays * feat: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * fix: native-addon forceCleanup * docs: add forceCleanup description * test: add two basic multi-monitor tests * fix: find the closest display for non-overlapping saved bounds * test: windowStatePersistence multi-monitor tests * docs: add note on display APIs in CI * fix: remove duplicate destroy registration * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * docs: remove inaccurate comment * fix: move expect blocks outside beforeEach * test: exclude macOS-x64 for now * test: remove invalid display test * test: remove invalid display test * feat: save window state (#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> * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * feat: clear and restore window state (#47781) * feat: save window state (#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: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#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> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * 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 * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#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> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * feat: add 'restored-persisted-state' event to BaseWindow (#50516) * docs: add note on display APIs in CI * docs: remove inaccurate comment * test: set show to true * docs: restored-window-state event * feat: add 'restored-window-state' event to BaseWindow * test: add tests for 'restored-window-state' event emission * test: move createWindowAndSave * docs: differentiate between name and title * test: add checks for virtual display creation * docs: tutorial for windowStatePersistence * fix: ensure only single display before multi monitor tests * docs: better docs for virtual display addon * docs: better docs for virtual display addon * refactor: rename event restored-window-state to restored-persisted-state * refactor: rename BaseWindow.clearWindowState to clearPersistedState * docs: improve docs for name property and fix typos * build: run yarn install * fix: update base::Value::Dict -> base::DictValue * fix: add install script to virtual-display native addon The virtual-display fixture was missing an "install" script, so node-gyp never compiled it during `yarn install`. This caused "Cannot find module '../build/Release/virtual_display.node'" in CI. Also removed unused dependencies (bindings, @types/jest, node-gyp) to match the pattern of other native addon fixtures. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> * chore: fixup yarn.lock, lint * chore: fix build errors after rebase onto main Remove stale `#include "shell/browser/native_window_features.h"` (header was deleted in #51160) and add the required `animate` parameter to the `SetBounds` call in `RestoreBounds` (signature changed on main). * fix: rewrite virtual-display addon in Objective-C, removing Swift dependency The CI runner's Xcode 16.4 has a broken Swift toolchain where swift-frontend cannot load lib_CompilerSwiftIDEUtils.dylib. Since the addon only uses CoreGraphics private C/ObjC APIs (CGVirtualDisplay, CGVirtualDisplayDescriptor, etc.), rewrite the implementation entirely in Objective-C to eliminate the Swift compilation step. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * chore: remove nut-js dependent tests * test: fix macos display tests * Update docs/api/base-window.md Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: defer is_being_restored reset and persisted-state-restored to display-mode callback Resetting is_being_restored_ synchronously at the end of RestoreWindowState let the deferred display-mode callback (kiosk/fullscreen/maximize) fire from Show() with the flag already false, so the resize/move events it produced scheduled DebouncedSaveWindowState and persisted transitional bounds over the user's saved bounds. Also rename the BaseWindow event to persisted-state-restored consistently across the C++ emit, tutorial, and spec, and move the 25s busy-loop spec into a spawned Electron fixture so the spec runner main thread isn't blocked. * test: bump main-thread-busy spec timeout to 60s Spawned Electron fixture sleeps 25s plus startup, exceeding mocha's 30s default. * fix: emit persisted-state-restored synchronously, not in deferred callback The previous fix moved NotifyWindowStateRestored() into the deferred display-mode callback to keep it ordered after the kiosk/fullscreen/ maximize change. But that callback only fires from Show() via FlushPendingDisplayMode(), so windows constructed with show: false (and restore_display_mode_ true, which is the default) never emitted the event - including the spec coverage. Restore the synchronous emit and keep the is_being_restored_ deferral, since only the flag reset needs to straddle the deferred resize/move events that schedule DebouncedSaveWindowState. * fix: tie window-state restore guard to display-mode transition lifecycle The is_being_restored_ guard was reset on the deferred display-mode callback invocation rather than the actual restoration lifecycle, which caused three defects: 1. A window created with show:false and destroyed before show() left the guard stuck true, so the close-time FlushWindowState save no-op'd and state changes made while hidden were dropped. 2. showInactive() never flushed the deferred display mode, so a persisted hidden window shown inactive did not re-apply saved fullscreen/ maximize/kiosk and left the guard stuck true. 3. On macOS the guard was reset synchronously after the async SetFullScreen/Maximize/SetKiosk calls, so a flush during the transition persisted transitional bounds over the saved state. Reset the guard from the NotifyWindowEnterFullScreen/NotifyWindowMaximize observers once the transition completes, drain a never-run callback in FlushWindowState, flush the pending display mode from ShowInactive on both backends, and skip saves while a fullscreen transition is in flight. --------- Co-authored-by: Nilay Arya <84241885+nilayarya@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com> Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> Co-authored-by: George Xu <george.xu@slack-corp.com> | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 2 个月前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 9 天前 | ||
| 4 年前 | ||
| 5 个月前 | ||
| 3 年前 | ||
| 6 个月前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 18 天前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 22 天前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 2 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 9 天前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 天前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 4 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 天前 | ||
| 1 年前 | ||
| 3 个月前 | ||
| 4 年前 | ||
| 4 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 个月前 |