* chore: refactor browser IPC into typescript
* chore: refactor app.ts into Typescript
* Refactors app.dock into cpp
* Removes app.launcher which has not existed for 3 years
* Removes 2 deprecated APIs (that have been deprecated for more than one
major)
* Refactors deprecate.ts as well
* feat: promisify webContents.savePage()
* no need to make compatible w callbacks, we're breaking it
* fix promise resolve type
* address feedback from review
* fix promise return text
* update smoke test
This PR adds Touch ID authentication support for macOS with two new `SystemPreferences` methods.
1. `systemPreferences.promptForTouchID()` returns a Promise that resolves with `true` if successful and rejects with an error message if authentication could not be completed.
2. `systemPreferences.isTouchIDAvailable()` returns a Boolean that's `true` if this device is a Mac running a supported OS that has the necessary hardware for Touch ID and `false` otherwise.
Capturing window thmubnails is expensive as it actually uses the
window capturer and it records one full frame per window and then
downscale to the default size 150x150. When only interested in the
window names or the app icons we do not need all of this.
Underlying change is merged in chromium72 so this patch only modifies
the doc, see:
https://chromium.googlesource.com/chromium/src.git/+log/72.0.3626.52/chrome/browser/media/webrtc/native_desktop_media_list.cc
Example: desktopCapturer.getSources({thumbnailSize: {width: 0, height: 0}}, ...)
Also added a unit test in spec/api-desktop-capturer-spec.js that verifies
that the returned thumbails are of type NativeImage and empty,
when the user disable fetching thumbnails.
notes: Can disable fetching the thumbnails for the DesktopCapturer.
https://github.com/electron/electron/issues/14872
* chore: Add new webFrame IsolatedWorldInfo API and deprecate
* Flag deprecated methods in documentation
* address comments
* Address review comments
* remove unused variable
* Update based on review
It was implemented on Mac and Win but not on X11.
Tested on Ubuntu 16.04 and 18.04.
Also added a unit test in spec/api-browser-window-spec.js.
This test BrowserWindow.moveTop verifies that calling moveTop
on a window does not give the focus to this window.
notes: BrowserWindow.moveTop is now available on Linux/x11
https://github.com/electron/electron/issues/12516
* docs: added webContents.getType() method
* docs: add enumeration of return value for webContents.getType()
* docs: getType() in WebContents should be class method not module method
* chore: deprecate webFrame.registerURLSchemeAsPrivileged
* Add register schemes protocol api
* update branch to enable browser process API
* Revert deprecation changes
* Fetch API support
* Updated api to take an array, still working on tests
* Update tests
* Remove web frame API
* Minor changes
* update scheme registrations on browser and renderer process
* fix: enable ses.getBlobData spec
* Update breaking changes doc
* feat: promisify the Cookie API
* chore: update specs to test promisified cookies
* chore: add deprecate wrapper for cookie callback API
* docs: update docs to cookie promise changes
* chore: remove redundant namespace use
* docs: improve cookie example
* docs: restore docs for cookie callback API
* chore: restore cookie callback tests
* fix: syntax of cookie promise return types
* feat: add support for node / preloads in subframes
This feature has delibrately been built / implemented in such a way
that it has minimum impact on existing apps / code-paths.
Without enabling the new "nodeSupportInSubFrames" option basically none of this
new code will be hit.
The things that I believe need extra scrutiny are:
* Introduction of `event.reply` for IPC events and usage of `event.reply` instead of `event.sender.send()`
* Usage of `node::FreeEnvironment(env)` when the new option is enabled in order to avoid memory leaks. I have tested this quite a bit and haven't managed to cause a crash but it is still feature flagged behind the "nodeSupportInSubFrames" flag to avoid potential impact.
Closes#10569Closes#10401Closes#11868Closes#12505Closes#14035
* feat: add support preloads in subframes for sandboxed renderers
* spec: add tests for new nodeSupportInSubFrames option
* spec: fix specs for .reply and ._replyInternal for internal messages
* chore: revert change to use flag instead of environment set size
* chore: clean up subframe impl
* chore: apply suggestions from code review
Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
* chore: clean up reply usage
* chore: fix TS docs generation
* chore: cleanup after rebase
* chore: rename wrap to add in event fns
Unify the behavior between default app and packaged apps:
- create default application menu unless the app has one
- default window-all-closed handling unless the app handles the event
HEX with alpha can be #RRGGBBAA or #AARRGGBB. In Electron it's the latter. It's nice to explicitly state that, so others wont have to try twice like me :).
* feat: add multi BrowserView support to BrowserWindow
Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.
* fix: for lint and osx compile errors
* fix: lint error in test code
* feat: add multi BrowserView support to BrowserWindow
Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.
* fix: for lint and osx compile errors
* fix: lint error in test code
* fix: method to be accessible on mac api impl
* fix: missed function declarations for mac impl
* fix: use base class reset function
* Added mouse forward/back button support on Linux
* Added browser history navigation action bindings for Windows, Mac, and Linux keyboard
* Removed new `history-action` event and modified `app-command` to execute on such events
* Removed attempt at macOS support and added constants
* Clarified app-command documentation
* Reverted 'app-command' description change
* Format code
* docs: apply arrow functions to app.makeSingleInstance example
* docs: apply arrow functions to session docs
* docs: change normal to arrow functions in File object docs
* feat: Implement process.getMemoryFootprint to get the process memory usage
* Add spec
* fix: must enter node env in callback
* Update function call
* Update spec
* Update API data
* update spec
* Update include
* update test for shared bytes
* Update atom/common/api/atom_bindings.cc
Co-Authored-By: nitsakh <nitsakh@icloud.com>
* Update atom/common/api/atom_bindings.cc
Co-Authored-By: nitsakh <nitsakh@icloud.com>
* Update API
* Update the callback isolate
* Update to work after app ready
* Update docs
* Update docs/api/process.md
Co-Authored-By: nitsakh <nitsakh@icloud.com>
* Update docs/api/process.md
Co-Authored-By: nitsakh <nitsakh@icloud.com>
* Fix crash
* feat: add registerAccelerator flag to allow menu items to skip registration
* docs: add docs for registerAccelerator
* docs: re-add accidentally removed line
* Add method to get system´s user region
* Fix linter
* Remove auto types
* Improved detection for POSIX
* Change name, add specs, minor fixes
* Remove left overs
* Fix locale test
* Fix Linux test
* Coding style fixes
* Fix docs
* Add test excaption for Linux
* fix spelling
* Polishing
Extend the existing win.setBounds functionality by allowing developers to partially update bounds without being forced to pass in all four bounds values. No existing functionality is altere
* feat: add method to DownloadItem that allows customization of dialog options
* docs: add docs for get/setSaveDialogOptions
* add missing copy constructor for DialogSettings on mac and linux
* fix: don't filter dialog options for mas build, don't return properties
* test: add test for get/setSaveDialogOptions
* fix: remove openDevtools added for debugging
* test: fix failing test because of new event parameter
* docs: use SaveDialogOptions instead of Object
* docs: Add 'worker' as a possible value for `process.type`
* fix: make certain properties on `process` read only:
* `mas`
* `windowsStore`
* `versions.electron`
* `versions.chrome`
* `type`
* `pid`
* `sandboxed`
* feat: add event and method to detect high contrast color mode
* docs: add docs for isHighContrastColorScheme and high-contrast-color-scheme-changed
* refactor: correct type of contrast
* refactor: improve menubar keyboard accessibility
* fix: create a temporary widget for tray icon context menu
* fix: focus menu bar with Alt when autohide is off
* fix: make menu bar focus work more like the native menus
* fix: only focus menu bar if it's not already focused
* fix: track accelerator registration to avoid duplicates
* docs: add docs for & notation in app menu item names
* fix: only try to activate accelerator if it's registered
* fix: add friend to monitor window focus change
* style: add <memory> include
* fix: child window with nativeWindowOpen should disable node integration
* Revert "fix: do not enable node integration in child window if not enabled (#15076)"
This reverts commit 0252d7686c.
This patch is not needed anymore since we are force disabling node integration
for child windows.
Allows passing `workingDirectory` to the underlying `ShellExecuteW` API on Windows.
the motivation is that by default `ShellExecute` would use the current working directory, which would get locked on Windows and can prevent autoUpdater from working correctly. We need to be able specify a different `workingDirectory` to prevent this situation.