Commit graph

2956 commits

Author SHA1 Message Date
Samuel Attard
58a6fe13d6
feat: preloads and nodeIntegration in iframes (#16425)
* 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 #10569
Closes #10401
Closes #11868
Closes #12505
Closes #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
2019-01-22 11:24:46 -08:00
Jeremy Apthorp
92b9525cfd
feat: enable mixed-sandbox mode by default (#15894) 2019-01-22 10:44:28 -08:00
Jeremy Apthorp
1918e76913 feat: upgrade to Chromium 72.0.3626.52 (#16334) 2019-01-22 10:39:32 -08:00
Jeremy Apthorp
6d4480ea6b feat: allow setting autoplayPolicy in webPreferences (#16396) 2019-01-22 10:32:06 -08:00
Milan Burda
6cba2c50a2 feat: make ipc-message and ipc-message-sync events public (#16468) 2019-01-22 08:47:58 -08:00
Milan Burda
dbc5f67dca docs: fix web-request.md listener signatures in electron.d.ts (#16485) 2019-01-22 08:46:40 -08:00
Matthew Leffler
a9ac75c1f9 docs: Fix TouchBar API example (#16482) 2019-01-21 17:07:47 -08:00
Shelley Vohr
3ca87d205f
feat: make zoomLevel/zoomFactor sync (#16410)
* feat: make zoomLevel/zoomFactor sync

* update ts defs dep
2019-01-20 23:40:27 -08:00
Shelley Vohr
441c9ce376
feat: promisify desktopCapturer.getSources (#16427)
* feat: promisify desktopCapturer.getSources

* fix doc

* fix docs lint error
2019-01-18 15:29:32 -08:00
Milan Burda
7d4a1223fd feat: add preload-error event to webContents (#16411) 2019-01-18 12:03:43 +01:00
Milan Burda
4d0b2ac9be docs: fix promisification.md formatting (#16434) 2019-01-17 09:30:32 -08:00
Shelley Vohr
1f2b02c18f
feat: promisify protocol.isProtocolHandled() (#16423)
* feat: promisify protocol

* fix base::Bind and specs

* update documentation

* make callback-compatible

* async awaitify tests
2019-01-17 09:05:10 -08:00
Milan Burda
23d44e322d feat: use default-app behavior in packaged apps (#16310)
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
2019-01-15 21:35:53 +01:00
Shelley Vohr
0881fd6397
feat: split openExternal into sync and async (#16176)
* feat: split openExternal into sync and async

* v8::Locker => mate::Locker

* fix: enter js env when resolving promise
2019-01-14 20:35:21 -08:00
Milan Burda
eb02a422de feat: add fileMenu / viewMenu / appMenu roles (#16328) 2019-01-10 14:32:03 +01:00
Milan Burda
349a3c20ae feat: add additional remote APIs filtering (#16293) 2019-01-08 14:27:56 -08:00
Milan Burda
fade3eb679 chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
Milan Burda
6f117b8e0c feat: add app.commandLine.hasSwitch() / app.commandLine.getSwitchValue() (#16282)
* feat: add app.commandLine.hasSwitch() / app.commandLine.getSwitchValue()

* add more tests

* refactor: move appendSwitch / appendArgument to command_line module

* replace AppendSwitchASCII with AppendSwitchNative

* remove castArgs
2019-01-07 07:48:27 -08:00
Kilian Valkhof
21d1849723 Update browser-window.md with alpha hex formatting (#16269)
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 :).
2019-01-04 10:33:12 -08:00
Shelley Vohr
de0e4735de fix: error if a11y support changed before ready (#16261) 2019-01-04 10:20:06 -05:00
Tyler Saballus
2117524102 Fix typos in app.md (#16260)
Mostly added commas to prepositions that occur in the predicate. There was a misspelling and a few run-on sentences as well though.
2019-01-04 10:18:15 -05:00
Shelley Vohr
876064036d
fix: don't register some shortcuts without accessibility (#16125)
Fixed crash on macOS when using globalShortcut for media keys when accessibility access is not granted.
2019-01-03 20:40:17 -08:00
Shelley Vohr
b57046e67d
feat: add mac support to systemPrefs.getColor() (#16249) 2019-01-03 16:17:07 -08:00
Shelley Vohr
03892153de
feat: expose systemPreferences.getSystemColor() (#16248) 2019-01-03 14:30:38 -08:00
Shelley Vohr
439ba5116f
feat: add mac support to systemPrefs.getAccentColor() (#16251)
* feat: add mac support to systemPrefs.getAccentColor()

* note 10.14 retriction
2019-01-03 13:24:55 -08:00
Vladimir
5ae3d1a1b2 feat: add multi BrowserView support to BrowserWindow (#16148)
* 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
2018-12-22 10:49:26 +09:00
Zac Walker
51cfb5cff1 fix: extend tracing startRecording API to take a full tracing config (#13914)
This allows memory-infra to be traced correctly.
Fixes #12506.
2018-12-20 15:11:17 +03:00
Milan Burda
547097b036 security: allow to block desktopCapturer.getSources() calls (#15964)
* security: allow to block desktopCapturer.getSources() calls

* return empty instead of error

* fix: release resources of DesktopCapturer on exit
2018-12-20 11:44:30 +09:00
Mosh Feu
ddc38eda26 docs: specify "role" types for "menu-item" (#16129) 2018-12-19 09:39:35 -05:00
David Baker
cc85946f55 feat: Support response headers in File protocol handler (#16098)
* feat: Support response headers in File protocol handler

* bugfix: Null check headers value & fix tests

* refactor: Use non-deprecated FindKeyOfType
2018-12-18 23:17:02 -07:00
Jeremy Apthorp
03f876470e docs: note that visual zoom is disabled by default (#16130) 2018-12-18 20:40:42 -07:00
Shelley Vohr
a58d989b60 feat: expose app accessibility status api (#16119)
* feat: expose app accessibility status api

* fix prompt
2018-12-18 11:15:22 -05:00
Milan Burda
1c7a47239b chore: remove chrome_process_finder.patch (#16113) 2018-12-18 10:00:34 +09:00
Milan Burda
41a3f123f1 docs: move require related breaking changes to Electron 6.0 (#16109) 2018-12-17 14:01:00 -08:00
popod
f6081b18b6 docs: Improve the doc about BrowserWindow title property (#16086)
* Improve the doc about BrowserWindow title property

* Update docs/api/browser-window.md

Co-Authored-By: popod <popod@me.com>
2018-12-17 13:16:24 -07:00
Shelley Vohr
280f9bf49c
feat: allow immediate MacOS notifications (#16060)
* feat: allow immediate MacOS notifications

* fix args->GetNext

* update docs/api/system-preferences.md

Co-Authored-By: codebytere <codebytere@github.com>

* address feedback from @ckerr's review
2018-12-14 13:46:46 -08:00
Michelle Tilley
d6d245d0c3 docs: contextIsolation is no longer experimental (#16043) 2018-12-13 11:21:16 -05:00
Simone Cattaneo
649633bbb7 fix: make 'setParentWindow' compatible under Windows (#15775) 2018-12-12 16:05:16 -08:00
Shelley Vohr
45a937df0a fix: incorrect view ordering for customButtonsOnHover (#15564) 2018-12-10 11:05:30 -08:00
Jeremy Apthorp
442c1b22e3
feat: webContents.loadURL returns a promise (#15855) 2018-12-06 12:16:19 -08:00
Saswat Bhattacharya
d243a45173 feat: implement 'app-command' events for browser history navigation keys on Linux (#15441)
* 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
2018-12-05 09:35:59 -08:00
Shelley Vohr
3f15f51615
feat: promisify app.getFileIcon() (#15742) 2018-12-05 08:50:12 -08:00
Moisés Neto
cfbea4a0e3 docs: es6ify 'Breaking Changes' and 'File' API pages (#15507)
* 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
2018-12-05 23:14:52 +11:00
Milan Burda
d561c5531b feat: deprecate modules internally using remote.require in sandboxed renderer context (#15145) 2018-12-05 10:34:09 +01:00
Milan Burda
cfb2812cea docs: remove methods invoking the callback repeatedly from promisification.md (#15951) 2018-12-04 13:45:55 -08:00
Shelley Vohr
c31629ad98
feat: add media access APIs for macOS Mojave (#15624) 2018-12-04 07:54:13 -08:00
Julien Isorce
1f55f1635f feat: add support for DesktopCapturerSource.appIcon
Useful to get the icon of the application owning the source.
Only available for sources of type window, i.e. not for screen.

https://github.com/electron/electron/issues/14845
2018-12-04 15:42:49 +09:00
Ho Wing Yip
cd8099d336 Fixed typo in dialog.md (#15861)
Changed "masOS" to "macOS"
2018-11-28 20:41:27 -08:00
Milan Burda
07f8f5f95a refactor: eliminate duplicate code exposing process APIs (#15824) 2018-11-28 11:08:17 -05:00
Nitish Sakhawalkar
9890d1e251 feat: Implement process.getProcessMemoryInfo to get the process memory usage (#14847)
* 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
2018-11-28 17:57:53 +09:00
Shelley Vohr
41c2685204
feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage

* mark optional arg correctly

* Add to breaking changes doc

* properly deprecate win.capturePage

* remove change from api-contract

* document both callback and promise versions

* address docs feedback

* update promisification progress doc
2018-11-27 23:50:53 -05:00
Milan Burda
d63a848011 feat: add activate option to webContents.openDevTools (#13852) 2018-11-27 18:34:44 +09:00
Shelley Vohr
0a5f8611e8
chore: add promise api runtime flag (#15841)
* chore: add promise api runtime flag

* add promisification plan document

* fix process.md typo
2018-11-26 16:00:46 -05:00
Heilig Benedek
0242818f39 feat: add registerAccelerator flag to allow menu items to optionally skip accelerator registration (#15723)
* feat: add registerAccelerator flag to allow menu items to skip registration

* docs: add docs for registerAccelerator

* docs: re-add accidentally removed line
2018-11-26 10:43:55 -08:00
Ondřej Záruba
de05ff894b feat: Add app.getLocaleCountryCode() method for region detection (#15035)
* 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
2018-11-20 15:33:23 -05:00
Daniel Turcich
a59b53c7e6 Update webview-tag.md (#15741)
Added Mouse and Scroll to list of events that webview can't have event listeners for
2018-11-20 01:01:57 -05:00
Jeremy Apthorp
08b56b7675
docs: add note about win_delay_load_hook (#15766) 2018-11-19 16:13:50 -08:00
Jeremy Apthorp
0642be296d
fix: crash in sandbox on linux when getting execPath (#15701) 2018-11-15 12:59:01 -08:00
Shelley Vohr
511dc9a80b
feat: add numpad accelerator strings (#15689) 2018-11-14 14:02:18 -05:00
Shelley Vohr
787dbbe610
feat: add about panel customization on linux (#15658) 2018-11-13 17:12:24 -05:00
Shelley Vohr
c06f023313
feat: allow partial setting of window bounds (#15677)
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
2018-11-12 15:31:14 -05:00
Shelley Vohr
a54dd1085a
feat: expose showAboutPanel for MacOS (#15674) 2018-11-11 22:52:27 -05:00
Shelley Vohr
9fd98bb27b
refactor: no longer require submenu for services menuitem (#15656) 2018-11-10 12:47:55 -05:00
Heilig Benedek
ca2d74e118 feat: add methods to allow customization of save dialog during will-download event (#15497)
* 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
2018-11-08 10:51:06 -04:00
Michelle Tilley
2a8e8a0603 fix: make certain values on process read-only (#15628)
* 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`
2018-11-08 10:28:06 -04:00
Shelley Vohr
e9ba26f50e
feat: allow registering multiple shortcuts (#15542)
This PR allows for multiple global shortcuts to be registered such that triggering any of them calls the same callback.
2018-11-07 09:40:38 -08:00
Jeremy Apthorp
87565ec667
docs: add more links to the devtools protocol docs (#15581)
I missed the link at the top when I was skimming this documentation
2018-11-05 16:53:18 -08:00
trop[bot]
c422011d58 docs: fix the "second-instance" event handler signature in the docs (#15551) 2018-11-03 11:37:59 +11:00
nixxquality
6e6ab9b907 Fix callback info for showSaveDialog and showOpenDialog (#15549) 2018-11-02 10:47:19 -04:00
Samuel Attard
bdef033459 docs: add Size as an option for pageSize in docs for printToPDF (#15519) 2018-11-01 09:00:33 -04:00
Shelley Vohr
b2e1a93177
refactor: remove hardcoded google api key (#15478)
* refactor: remove hardcoded Google API key

* address changes from review
2018-10-31 07:49:44 -07:00
Samuel Attard
86064a7bd8 docs: add return type for subscribeNotification (#15490) 2018-10-31 10:24:50 -04:00
Heilig Benedek
6d2a088be9 feat: detect high contrast color mode (#15493)
* 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
2018-10-31 10:22:18 -04:00
David Sanders
bae652f46d docs: http protocol handlers can access headers (#15431)
* test: check http protocol handlers can access headers

* docs: http protocol handlers can access headers
2018-10-30 11:37:49 -07:00
Shelley Vohr
2bd94293e0 doc: clarify menu item properties not available top-level (#15458) 2018-10-29 15:04:25 -05:00
David Sanders
c93973ab7a docs: fix protocol.isProtocolHandled documentation (#15430) 2018-10-29 15:23:23 -04:00
Heilig Benedek
894ae1b3f5 refactor: Improve accessibility of menus (#15302)
* 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
2018-10-29 13:08:46 -05:00
Shelley Vohr
bea4de9262
fix: use gio as default linux trash impl (#15399)
* fix: use gio as default linux trash impl

* doc: add ELECTRON_TRASH env var
2018-10-26 08:36:56 -07:00
Shelley Vohr
7a03e5f0b2 doc: correct ipcRenderer sendTo windowId param (#15403) 2018-10-26 10:18:47 -05:00
Milan Burda
1f3a89197c chore: bump minimum supported macOS version to 10.10 (#15357) 2018-10-25 10:59:42 +02:00
Cheng Zhao
2f3a8ecd42
fix: child window with nativeWindowOpen should disable node integration (#15213)
* 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.
2018-10-25 15:31:07 +09:00
Samuel Attard
9262731f2c docs: we don't emit an event object for session-created (#15236) 2018-10-20 19:46:21 -07:00
Andy Dill
37f2113032 feat: expose setBackgroundThrottling api (#15104) 2018-10-19 11:32:22 +11:00
Shelley Vohr
a0b9d47d5e fix: enable NODE_OPTIONS env var (#15158) 2018-10-19 10:57:28 +11:00
Nitish Sakhawalkar
a9ca152069 feat: Spellchecker Async Implementation (#14032)
* feat:Spellchecker Async Implementation

* Adhere to chromium style

* Updating dependency to use gh branch

* Update docs and electron-typescript-definitions module

* Fix lint

* Update electron typescript definitions version

* Update spec

* Address review
2018-10-18 11:11:53 -05:00
Milan Burda
db37ab1039 feat: add remote.require() / remote.getGlobal() filtering (#15014) 2018-10-18 14:36:45 +11:00
AbhilashJN
de1d24b616 docs: change examples in docs to use for..of and async/await (#15196) 2018-10-16 10:41:42 -07:00
Milan Burda
d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Samuel Attard
c806c465fa
chore: mark browserview api as not-experimental (#15117)
I think it's safe to say this API has been around long enough to be considered past the experimental phase 👍
2018-10-13 12:31:58 +11:00
Sitong Peng
9e7bbcd8f6 docs: app.getLoginItemStatus -> app.getLoginItemSettings (#15093) 2018-10-12 09:23:37 -04:00
Milan Burda
a9475f3590 feat: add workingDirectory option to shell.openExternal() (#15065)
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.
2018-10-10 22:46:54 +02:00
Samuel Attard
33abd736e9
chore: add deprecation notice for webPrefences defaults (#15045) 2018-10-10 16:36:18 +11:00
Milan Burda
5bd6de52e0 feat: add app.enableSandbox() (#14999) 2018-10-10 15:32:09 +11:00
Samuel Attard
6b621e203c fix: use valid markdown syntax in browser-window.md to fix docs linter 2018-10-10 11:01:05 +11:00
Jeremy Apthorp
373ffa9fee docs: document BrowserWindow.setBackgroundColor 2018-10-09 14:39:39 -07:00
Cheng Zhao
a6256c672a feat: getGPUInfo not longer supports 'complete' on macOS
See https://chromium-review.googlesource.com/c/chromium/src/+/1208362
2018-10-09 14:38:00 -07:00
Troy
d678d9ee75 fix: Check minSize constraints before resizing (#14931)
* 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
2018-10-09 12:08:15 -05:00
Robo
434a6e3561 refactor: create request context from network context (#14656)
* [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
2018-10-04 13:08:56 -05:00
Shelley Vohr
27bbf6a3c6 feat: add evt listeners for SetAlwaysOnTop (#14951)
* 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
2018-10-04 13:02:16 -05:00
Samuel Attard
d628aad3bf
feat: remove needless mojave dark mode APIs and add instructions on how to use the macOS replacement (#14895) 2018-10-02 14:44:50 +10:00
Milan Burda
ce38be74df refactor: simplify process object initialization for sandboxed renderers (#14878)
Also fix `process.windowsStore`.
2018-09-30 23:24:00 +02:00
Samuel Attard
0d2a0c7583 feat: add APIs to support mojave dark modes (#14755)
* feat: add APIs to support mojave dark mode

Closes #13387

* docs: fix system-prefs typo
2018-09-27 10:33:31 -05:00
Nitish Sakhawalkar
5c108728d6 feat: Implementation of getGPUInfo API. (#13486)
* 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
2018-09-28 00:59:23 +10:00
Shelley Vohr
be2c27d5b8
correct key code reqs for accel doc (#14823) 2018-09-26 15:03:55 -07:00
Shelley Vohr
2bcc86dac7 docs: clarify allowable background colors for BrowserWindow transparency (#14762)
* docs: clarify allowable colors for transparency

* fix alpha value specification
2018-09-24 10:51:01 -05:00
Sylvester Keil
a24307b8e8 Fix second-instance handler signature (#14731) 2018-09-20 20:02:28 -07:00
Samuel Attard
5541cab1ba
docs: type the promises in our docs (#14715) 2018-09-20 22:37:56 +10:00
John Kleinschmidt
e059f303d7
Merge pull request #14526 from jakubzitny/window-open-clarifications
docs: specify BrowserWindow features passable to window.open
2018-09-19 15:05:10 -04:00
Milan Burda
e22142ef9c feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456) 2018-09-18 11:00:31 -07:00
Samuel Attard
7065093869
feat: add will-redirect (#13866)
* 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
2018-09-16 01:42:43 +10:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
John Kleinschmidt
429b18d7a0
Merge pull request #14600 from electron/media-permission
feat: add mediaTypes to media permission requests
2018-09-13 10:39:08 -04:00
Samuel Attard
73a1a8b3f0 feat: automatically round numbers that are converted to points (#14604)
Fixes #14490
2018-09-13 08:28:56 -05:00
Samuel Attard
7025cbd0c9 feat: add mediaTypes to media permission requests
This is done to be consistent with setPermissionCheckHandler and to be
backwards compatible

Fixes #14168
2018-09-13 16:58:57 +10:00
Samuel Attard
dde194d853 Remove the memory property from getAppMetrics
See 03d0bfd593 for more information
2018-09-11 20:24:03 +02:00
Samuel Attard
14df89f214 Remove the 'getProcessMemoryInfo' API
* Underlying APIs have been removed in Chromium
  * https://chromium-review.googlesource.com/c/chromium/src/+/969089
  * https://chromium-review.googlesource.com/c/chromium/src/+/953723
  * https://bugs.chromium.org/p/chromium/issues/detail?id=819289
* https://github.com/electron/electron/projects/11#card-11509601
2018-09-11 20:21:32 +02:00
Milan Burda
58577bd431 feat: add options to webContents.loadFile (#14515) 2018-09-11 17:56:49 +10:00
Jakub Žitný
3ab22c6164
docs: specify BrowserWindow features passable to window.open 2018-09-10 17:49:54 +02:00
Felix Rieseberg
f012ed8357 docs: Update menu-item with new position props (#14465)
* docs: Update menu-item with new position props

* 📦 Update electron-typescript-definitions
2018-09-09 20:03:58 -07:00
Jeremy Apthorp
72526927d9 build: remove gyp build files (#14097)
* build: remove gyp build files

* docs: update build instructions

* build: temporary restore electron.gyp

* build: do not update Electron version in the electron.gyp

* chore: remove unused submodules

* ci: remove obsolete CI scripts and configs

* chore: remove obsolete scripts

* chore: remove obsolete functions from lib/util.py

* ci: send Slack notification for nightly build results
2018-09-09 10:15:32 +09:00
Milan Burda
e828348904 docs: add missing documentation for <webview> methods (#14413) 2018-09-03 13:27:51 +10:00
Milan Burda
c17a1b37ea feat: add event.senderId property to IPCs sent via ipcRenderer.sendTo (#14395) 2018-08-31 20:13:51 -05:00
Paulius
b89848d683 feat: allow window above full screen windows on mac (#14122)
* allow window above full screen windows on mac

* add visibility change params to higher level files

* adress feedback, fix bool issue, remove compilation hooks

* adjust readme

* switch to options object

* single argument for native window views
2018-08-31 15:06:02 -07:00
Cheng Zhao
0ecea96048 fix: use flexbox to style webview (#14400)
* fix: use flexbox to style webview

* docs: remove notes on browserplugin based webview
2018-09-01 08:53:13 +12:00
Cheng Zhao
586a6f2e6d docs: add notes on OOPIF webview's behaviors (#14401) 2018-09-01 08:52:09 +12:00
Samuel Attard
1b7418fb7b
Revert "sec: deprecate some webPreference defaults to be secure-by-default (#14284)" (#14380)
This reverts commit 66d6ba8689.
2018-08-30 09:57:49 +12:00
Samuel Attard
66d6ba8689 sec: deprecate some webPreference defaults to be secure-by-default (#14284)
* 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
2018-08-29 13:14:04 -05:00
Cheng Zhao
2f759151d2
docs: keyboard listeners no longer work on webview (#14369) 2018-08-29 15:59:23 +09:00
Samuel Attard
68da311ed1 feat: add session.setPermissionCheckHandler (#13925)
* feat: add session.setPermissionCheckHandler to handle syncornous permission checks vs requests

* spec: add tests for session.setPermissionCheckHandler

* docs: add docs for session.setPermissionCheckHandler

* feat: add mediaType to media permission checks

* chore: cleanup check impl
2018-08-28 09:05:08 -05:00
Siddharth Dalal
afdb6c5f90 feat: 'will-move' event for windows. (#14283)
* feat: 'will-resize' window event (Windows only)

* documentation for 'will-move' event

* comment and line break fix in docs
2018-08-28 08:44:10 -05:00
Milan Burda
a08ca9defb fix: don't crash on tray.setContextMenu(null) (#14322) 2018-08-27 11:58:47 -05:00
Samuel Attard
90545bda95
docs: explain "worldId" in the web frame docs (#14309)
Fixes #14288
2018-08-25 12:48:57 -07:00
Emmanuel Kimmerlin
5f6706ac33 feat: BrowserWindow.getNormalBounds() (#13290)
* 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
2018-08-24 14:33:27 -07:00
Leo MG Nesfield (LMGN)
519b57838a Fix broken link (#14301) 2018-08-24 14:25:15 -07:00
Cheng Zhao
cd8bb1d3b4
chore: print error when removed webview attribute is used (#14230)
* chore: print error when removed webview attribute is used

* docs: document removed webview features
2018-08-23 10:45:43 +09:00
Milan Burda
fc85d02786 feat: expose missing process APIs in sandboxed renderers (#13505) 2018-08-21 11:05:45 -07:00
Beni von Cheni
aef64c6f48 docs: chrome-command-line-switches.md: update proxy-server support (#14198)
* 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.
2018-08-19 12:34:14 -07:00
Troy
5ea05ddee7 fix: Stricter Testing For Menu Items (#13992)
This PR includes stricter testing for empty objects so that false context menus are not created along with the tests to ensure future compatibility.
2018-08-17 13:10:14 -07:00
Milan Burda
9076a20dc8 docs: fix electron.d.ts typings (#14125) 2018-08-16 10:26:36 -07:00
Shelley Vohr
e415efaceb
docs: crashReporter companyName is not optional 2018-08-16 09:15:17 -07:00
Husayn
19cb5bad94 feat: Add creationTime function to process (#13542)
* 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
2018-08-10 09:03:30 -05:00
secult
9902d42760 docs: cancelId works on windows (#13882)
The note about cancelId not working on windows is not valid. Tried on Windows 7 and Windows 10 and it works in both cases (tested on electron 1.8.7).
2018-08-10 16:07:39 +10:00
Dominic
a7052efaf4 fix: make menu.popup options optional (#13977)
* add empty object as default param for options

* update docs

* add spec for optional options

* fix: add null check for options
2018-08-08 17:38:52 -05:00
Milan Burda
fceed0fcbc fix: dipToScreenRect / screenToDipRect - window can be null (#13903) 2018-08-03 13:08:42 +10:00
Jeremy Apthorp
3bdff2d238
feat: allow setting window shape (#13789)
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.
2018-07-30 13:37:40 -07:00
Alexandre Lacheze
2bba11c5b0 docs: warning unicity of webRequest event listener (#13482) 2018-07-30 11:38:59 +10:00
Felix Rieseberg
c2218cc414 📝 First draft: Here be dragons (#13835) 2018-07-30 11:19:23 +10:00
Milan Burda
db38c8b620 Fix process.execPath returning parent process path instead of the helper in sandboxed renderer (#13839) 2018-07-30 11:13:42 +10:00
Milan Burda
aacbd76baa docs: fix electron.d.ts typings (#13841) 2018-07-30 11:11:23 +10:00
Samuel Attard
4b3011f3e8 feat: add getUploadProgress API to the net API (#13783) 2018-07-27 07:15:48 -07:00