* feat: support exclude from capture on Windows
Check for WDA_EXCLUDEFROMCAPTURE support, and fallback to WDA_MONITOR. Windows versions that support exclude from capture will exclude the window entirely when `setContentProtection` is enabled similar to how Mac behaves. Fall back to `WDA_MONITOR` for windows verisions that do not support.
This flag is mentioned at the very end of a Microsoft blog post here: https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/
Use WDA_EXCLUDEFROMCAPTURE for content protection on windows
Starting with Windows 10, version 2004 this will exclude a window similar to the expected behavior on mac. It is safe to use WDA_EXCLUDEFROMCAPTURE on older Windows versions, as it will still behave as if WDA_MONITOR is applied.
https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/64#issuecomment-697074762
See the docs here: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity
* docs: update setContentProtection docs
Update `setContentProtection` docs with `WDA_EXCLUDEFROMCAPTURE` info. This is to support screen capture fully excluding a particular window instead of showing it as a black screen.
* feat: add worldSafe flag for executeJS results
* chore: do not log warning for webContents.executeJS
* Apply suggestions from code review
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* chore: apply PR feedback
* chore: split logic a bit
* chore: allow primitives through the world safe checl
* chore: clean up per PR feedback
* chore: flip boolean logic
* chore: update per PR feedback
* chore: fix typo
* chore: fix spec
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Address incorrect typing for isEnabled. The root cause of this was due
to missing backticks which caused the docs parser to think that the
return type of the `isEnabled` function was null, where it was supposed
to be a boolean type.
The side effect of this was that the generated typescript typings were
incorrect for this function.
Fixes#24409
* docs: document what experimental means explicitly
* Apply suggestions from code review
Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>
* Update experimental.md
Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
* docs: fix minor grammar error 'punctuations'
* docs: fix minor grammar error pluralizing Chromium
* docs: fix typo 'updateCurrentActiviy'
* docs: use consistent spelling of 'behavior'
* docs: use 'macOS' instead of 'Mac OS' or 'OS X'.
* docs: use 'GTK' instead of 'GTK+'
https://mail.gnome.org/archives/gtk-devel-list/2019-February/msg00000.html
* docs: minor capitalization: use 'TCP' not 'tcp'
* Update docs/development/build-instructions-linux.md
Co-Authored-By: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
* feat: default gtk darkTheme option to nativeTheme.shouldUseDarkColors for better platform support
* chore: update syntax for PR feedback
* refactor: only define SetGTKDarkThemeEnabled when needed
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
* feat: set app.enableRendererProcessReuse to true by default
* chore: add context aware info to breaking changes doc
* spec: fix nodeIntegration in child windows test for rendererprocessreuse
* spec: fix remote listeners in destroyed renderers spec as the error is now async
* Update api-browser-window-spec.ts
* chore: deprecate affinity
* chore: fix docs
* spec: handle tests crashing without an exist code
* spec: update tests for new rendererprocessreuse default
* spec: with renderer process re-use we get to destroy less views
* feat: custom positioning for traffic light buttons
* remove NSLog and unnecessary call-site in IsVisible()
* no longer need to check if entering fullscreen
* change API to take a point object
Co-authored-by: tonyfwoo <55114329+tonyfwoo@users.noreply.github.com>
* chore: add code required to use chromes spellchecker
* chore: fix linting
* chore: manifests needs buildflags now
* chore: add dictionarySuggestions to the context menu event when the spellchecker is active
* chore: enable by default for windows builds
* chore: add patch to remove incognito usage in the spellchecker
* chore: add dependencies on spellcheck common and flags
* chore: conditionally include spell check panel impl
* chore: fix deps for spellcheck feature flags
* chore: add patch for electron resources
* chore: add dependency on //components/language/core/browser
* chore: patches to make hunspell work on windows
* build: collect hunspell dictionaries into a zip file and publish
* chore: clean up patches
* chore: add docs and set spell checker url method
* chore: fix error handling
* chore: fix hash logic
* build: update hunspell filename generator
* fix: default spellchecker list to the current system locale if we can
* docs: document the language getter
* chore: patch IDS_ resources for linux builds
* feat: add spellcheck webpref flag to disable the builtin spellchecker
* chore: fix docs typo
* chore: clean up spellchecker impl as per feedback
* remove unneeded deps
Sometimes it's necessary to convey more information about the window to screen reader users only (simply putting everything to the window title might be unnecessarily noisy).
For example, Chromium uses that technique to tell screen reader users that the window is in incognito mode (the incognito window looks differently and doesn't have «incognito» in the title, but for blind users the screen reader will announce that it's incognito).
* feat: Implement BrowserWindow.moveAbove(mediaSourceId)
BrowserWindow.{focus,blur,moveTop}() are not enough in some
situations. For example when implementing an overlay that
follows another window that can lose focus. In that case
it is useful to move the overlay above the tracked window.
sourceId is a string in the format of DesktopCapturerSource.id,
for example "window:1869:0".
Notes: Added BrowserWindow.moveAbove(mediaSourceId)
https://github.com/electron/electron/issues/18922
* feat: Implement BrowserWindow.getMediaSourceId
Return the Window id in the format of DesktopCapturerSource's id.
For example "window🔢0".
https://github.com/electron/electron/issues/16460
Notes: Added BrowserWindow.getMediaSourceId