* 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
* Update mojave-dark-mode-guide.md
Add info about dark mode support in electron-builder
* Update mojave-dark-mode-guide.md
* Update mojave-dark-mode-guide.md
* 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.
* Inital setSize check
* Only resize if above minimum size constraints
* lint
* Resize to min if size is changed
* Remove unneeded if statement
* chore: remove trailing whitespace
* Add note about setSize method in docs
* [ci skip] refactor: create request context from network context
* [ci skip] refactor: subscribe to mojo cookiemanager for cookie changes
* [ci skip] refactor: manage the lifetime of custom URLRequestJobFactory
* refactor: use OOP mojo proxy resolver
* revert: add support for kIgnoreCertificateErrorsSPKIList
* build: provide service manifest overlays for content services
* chore: gn format
* fix: log-net-log switch not working as expected
* spec: verify proxy settings are respected from pac script with session.setProxy
* chore: use chrome constants where possible
* fix: initialize request context for global cert fetcher
* refactor: fix destruction of request context getters
* spec: use custom session for proxy tests
* fix: queue up additional stop callbacks while net log is being stopped
* fix: Add CHECK for cookie manager retrieval
* chore: add helper to retrieve logging state for net log module
* fix: ui::ResourceBundle::GetRawDataResourceForScale => GetRawDataResource
* style: comment unused parameters
* build: move //components/certificate_transparency deps from //brightray
* chore: update gritsettings_resource_ids patch
* chore: update api for chromium 68
* fix: net log instance is now a property of session
* feat: add evt listeners for SetAlwaysOnTop
* only emit one event on AlwaysOnTop change
* docs: add new alwaysontop event
* dont emit if theres no change
* address feedback from review
* Implementation of getGPUInfo API.
* Clear promise set
* Changes to promise usage
* Minor fixes
* Fix linux build
* Update spec
* Fix lint (linter didn't run on windows locally)
* Test running single test for CI
* Update spec
I think there's more to do here, and I'll continue to add to & update this documentation as I go through the process of upgrading node in the context of the GN build.
* feat: add will-redirect to allow people to prevent 30X redirects
* spec: add tests for the will-redirect event
* refactor: implement will-redirect using NavigationThrottle instead of PostTask
This avoids a potential race condition and immediately cancels the
navigation
* docs: add docs for did-redirect-navigation
* refactor: move AtomNavigationThrottle out of net folder
* refactor: update header guard for atom_navigation_throttle.h
* refactor: fix chromium style errors in the GN build
* refactor: update throttle impl to NOTREACHED and std::make_unqique
* build: [m67] enable widevine support
* fix: remove plugin cache reset hack
It was added in (#8907) to make widevine cdm shows up in
navigator.plugins, since widevine support is no longer
enabled by a plugin it can be removed safely.
* feat: allow all nonbreaking changes during beta
Changes the version policy: currently only nonbreaking bug/security
fixes are allowed during beta. This change would allow all nonbreaking
changes, e.g. new features, during beta.
* refactor: clarify criteria for changes during beta
* Update electron-versioning.md
* feat: deprecate default value of nodeIntegration
* Use DeprecationStatus::Stable as the default instead of shadowing
* change wording of deprecations
* chore: also deprecate kWebviewTag and kContextIsolation
* chore: do as we preach, lets be secure-by-default in the default app
* First commit
* Add Mac support (1st attempt)
* Add Mac support (2nd attempt)
* Simplify tests
* Restore window state !
* Looking at other tests, seems minimize, maximize, fullscreen are skipped when in CI
* Fix Mac tests
* Restore tests in CI
* Fix typo
* widget getRestoredBounds not working on Mac !!
* widget getRestoredBounds not working on Mac !!
* Add IsNormal function
* Add IsNormal
* IsNormal => isNormal
* Deactivate fullscreen on Mac. Do not receive leave-fullscreen event
* Set default original_frame_
* Set default original_frame_
* Fix Mac
* build: update-external-binaries fetches sccache
* build: add util.add_exec_bit in scripts/
* build: use util.add_exec_bit in create-dist
* build: use util.add_exec_bit in update-external-binaries
this is needed to work around a bug in python's zipfile module that doesn't preserve the exec bit
https://bugs.python.org/issue18262
* fix: linting errors
* build: vsts, circleci use patched sccache
* build: always look for the x64 sccache
as it's the only arch we have it on
* fix: windows-specific errors in updaste-external-binaries
* fix: tyop
* fix: set SCCACHE_BUCKET, SCCACHE_TWO_TIER on circleci
* fix: syntax error in circleci yaml
* fix: keep churning
* chore: add tracer to file downloader
* docs: add sccache instructions for GN builds
* build: pull down the darwin sccache on mas builds
* build: use gn sync verbosely on circleci and vsts
* docs: copyediting
* build: remove unnecessary cache-dir arg
* docs: fix shell quoting in gn build instructions
* fix: invoke gclient without -verbose in circleci
* refactor: remove debug tracer
* fix: invoke gclient without -verbose in appveyor
* fix: invoke gclient without -verbose in vsts
* fix: pull add_exec_bit from correct source
* fix: remove 'SCCACHE_TWO_TIER' from CI scripts
* refactor: remove SCCACHE_BUCKET from ci scripts
this environment variable will be set via the CI UI instead
* refactor: clarify log message
* fix: set SCCACHE_PATH correctly for Windows CI
* docs: chrome-command-line-switches.md: update proxy-server support
Per issue #12443, the proxy URL in proxy-server switch would not
support username and password authentication.
* docs: security.md: correct checklist #14 markdown
When running "npm run lint:docs" script, linting warning suggests
"Broken links: #13-disable-or-limit-creation-of-new-windows". Update
accordingly to #14.
The `url` module is not a constructor; change `require('url')` to
`require('url').URL`. Also, check the entire origin rather than just
the hostname, since otherwise `http://my-own-server.com` is allowed in
addition to `https://my-own-server.com`, in violation of point 1 (only
load secure content).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* build: add GIT_CACHE_PATH
The merge at https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1105473 was to specify git cache entirely from the environment variable [and] removal of the general --cache-dir option from gclient
* docs: document GIT_CACHE_PATH in GN build
* fix: try to fix appveyor-gn env syntax
* Add process creation time
* Making docs clear for process creation time
* Address comments for process creation time
* Add process info cc file
* fixing comments around documentation
* Update doc for return val
* Capitalize number in docs
* chore: bump electron-typescript-definitions
Updates the node upgrade doc to take path changes into account as well as to incorporate the new `get-patch` script which simplifies work significantly.
This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.