Commit graph

2930 commits

Author SHA1 Message Date
Shelley Vohr
3e5a98b5f4
feat: promisify In-App Purchase (#17355)
* feat: promisify In-App Purchase

* use mate::Arguments in GetProducts
2019-03-13 13:56:01 -07:00
Shelley Vohr
8991c0056e
feat: promisify dialog.showMessageBox() (#17298)
* feat: promisify dialog.showMessageBox()

* address feedback from review
2019-03-12 11:06:59 -07:00
Milan Burda
48a95f9677 fix: remove non-existent gpu-crashed event on <webview> (#17317) 2019-03-11 17:25:46 -07:00
Samuel Maddock
f943db7ad5 feat: Add content script world isolation (#17032)
* Execute content script in isolated world

* Inject script into newly created extension worlds

* Create new content_script_bundle for extension scripts

* Initialize chrome API in content script bundle

* Define Chrome extension isolated world ID range

1 << 20 was chosen as it provides a sufficiently large range of IDs for extensions, but also provides a large enough buffer for any user worlds in [1000, 1 << 20).

Ultimately this range can be changed if any user application raises it as an issue.

* Insert content script CSS into document

This now avoids a script wrapper to inject the style sheet. This closely matches the code used by chromium in `ScriptInjection::InjectCss`.

* Pass extension ID to isolated world via v8 private
2019-03-11 16:27:57 -07:00
Milan Burda
6072da239d feat: add global renderer-process-crashed event (#17315) 2019-03-11 16:17:24 -07:00
Shelley Vohr
9ea6c01e02
feat: promisify session.clearAuthCache() (#17259)
* feat: promisify session.clearAuthCache()

* remove unused callback runner helpers
2019-03-08 18:41:42 -08:00
Shelley Vohr
fc10620082
feat: promisify session cache methods (#17185) 2019-03-08 14:42:03 -08:00
Shelley Vohr
2769e75b49
feat: promisify session proxy methods (#17222) 2019-03-08 12:51:12 -08:00
Shelley Vohr
e5e6aa207c
feat: promisify ses.clearHostResolverCache() (#17229) 2019-03-08 10:26:17 -08:00
Shelley Vohr
bbfa63fd9d
feat: promisify session.clearStorageData() (#17249) 2019-03-08 09:02:30 -08:00
Samuel Maddock
ac88b3ead5 feat: add 'disableHtmlFullscreenWindowResize' option to webPreferences (#17203)
This option allows users to prevent the window from resizing when the HTML5 FullScreen API is used.
2019-03-07 15:29:37 -08:00
Shelley Vohr
6cb7b8d3a4
feat: promisify dialog.showSaveDialog() (#17054)
* feat: promisify dialog.showSaveDialog()

* address some feedback from review

* filename => filePath

* fix last filename => filePath
2019-03-05 13:48:20 -08:00
Koen [XII]
aa863f3246 Fix typo in registerSchemesAsPrivileged reference (#17214) 2019-03-05 09:20:52 -08:00
Shelley Vohr
e05985145b
feat: promisify dialog.showOpenDialog() (#16973)
* feat: promisify dialog.showOpenDialog()

* address feedback from review

* address feedback from review
2019-03-05 05:54:48 -08:00
Shelley Vohr
544d8a423c
feat: allow MenuItems to work optionally when hidden (#16853)
* feat: allow MenuItems to work optionally when hidden

* fix: actually include forward_declaration
2019-02-28 17:00:54 +00:00
Linda_pp
6d55498cc7 docs: Fix types and missing property in WebRequest APIs (#17046)
* docs: Fixed hook methods of WebRequest accepts null as listener

* docs: Added missing `referrer` property in OnBeforeRequestDetails

* docs: Add `referrer` to each webRequest responses
2019-02-28 09:30:38 +00:00
Nitish Sakhawalkar
bfa07ec4be feat: Add new powerMonitor synchronous API (#17144)
`powerMonitor.querySystemIdleState` and `powerMonitor.querySystemIdleTime` had async backing APIs in chromium (https://chromium-review.googlesource.com/c/chromium/src/+/1379183). However, that has changed in ch73. So, this PR deprecates the old async APIs and adds new sync APIs.
2019-02-27 15:54:01 -05:00
Samuel Attard
e01c3615c4
chore: replace usage of deprecated beginSheetModalForWindow API (#16994) 2019-02-27 10:23:17 -08:00
Shelley Vohr
5ecda17c7a
refactor: make shell.ShowItemInFolder asynchronous (#17121)
* fix: add scoped_blocking_calls to platform_win

https://chromium-review.googlesource.com/c/chromium/src/+/1191582

* feat: make ShowItemInFolder async

* address feedback from review

* fix build
2019-02-27 12:58:23 +00:00
Vlad Hashimoto
30213089ae docs: allow webRequest listener to passing null (#17006) 2019-02-25 18:13:00 -08:00
Gavin Wang
391f6dd663 docs: add sample code for contents.insertCSS() (#16959)
it not work before Event: 'did-finish-load', so add this sample code to show it.
2019-02-25 18:10:56 -08:00
Sindre Sorhus
df5305d6a7 docs: fix MenuItem windowMenu role description (#17065)
It was changed in https://github.com/electron/electron/pull/15930
2019-02-25 13:34:32 +00:00
Shelley Vohr
3edc497d3d
feat: show user gesture type in click event (#16954) 2019-02-20 12:20:24 +00:00
Milan Burda
7e7abc28f5 feat: promisify netLog.stopLogging (#16862) 2019-02-19 10:48:27 +00:00
Samuel Attard
3b74837020 refactor: Split 'Event' docs/types into more specific Event types (#17038)
* Event = Base event type (with preventDefault)
* IpcMainEvent = Event that ipcMain emits (with sender, reply, etc.)
* IpcRendererEvent = Event that ipcRenderer emits (with sender,
senderId, etc.)
* KeyboardEvent = Event that we emit with keyboard flags (ctrlKey,
altKey, etc.)

This will dramatically improve peoples TS experience with IPC events
2019-02-19 09:24:19 +00:00
Milan Burda
a04d9ef35b feat: add process.getSystemVersion() (#16599) 2019-02-18 12:59:48 +00:00
Shelley Vohr
1e8ac79e6f
docs: document the Event interface (#16966)
* docs: document the Event interface

* update docs deps

* pull new VoidFunction update
2019-02-15 12:08:45 -08:00
Aayush Chhabra
6d005ff137 docs: Remove redundant 'Instance Events' Headline (#16865) 2019-02-15 08:29:33 -10:00
Samuel Attard
5790869a3f
chore: refactor browser IPC into TS and app API into TS (#16921)
* 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
2019-02-14 14:29:20 -08:00
Samuel Attard
28638b0a6b docs: update dialog documentation for "undefined" ret vals (#16970) 2019-02-14 14:28:17 -08:00
deepak1556
1b982e200a Autoplay: remove cross-origin autoplay policy from //chrome and //content.
https://chromium-review.googlesource.com/c/chromium/src/+/1362225
2019-02-14 23:59:24 +05:30
Shelley Vohr
de27911661
feat: promisify webContents.savePage() (#16742)
* 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
2019-02-14 09:03:28 -08:00
Shelley Vohr
46a24c82ff
feat: add Touch ID authentication support for macOS (#16707)
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.
2019-02-13 18:36:28 -08:00
Shelley Vohr
319c2853df chore: move ts-smoke tests to core (#16930)
* chore: move ts smoke tests to core

* fix: fix paths for tsconfig / ts-smoke runner

* update ts-defs version

* do not lintr
2019-02-13 15:24:28 -08:00
Shelley Vohr
fed5b99a9f
feat: promisify contentTracing.getTraceBufferUsage() (#16600)
* feat: promsify contentTracing.getTraceBufferUsage()

* deprecate getTraceBufferUsage

* address feedback from review

* properly deprecate
2019-02-13 13:24:57 -08:00
Julien Isorce
9b29befdc8 feat: disable fetching thumbnails if thumbnailSize is 0 (#14906)
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
2019-02-13 10:27:42 -08:00
Nitish Sakhawalkar
3dfef4a376 chore: Add new webFrame IsolatedWorldInfo API and deprecate (#16801)
* 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
2019-02-13 08:05:28 -10:00
Milan Burda
1f458eb177 feat: promisify debugger.sendCommand() (#16861)
* remove duplicate entry for desktopCapturer.getSources

* feat: promisify debugger.sendCommand
2019-02-13 07:23:53 -10:00
Shelley Vohr
ca83d36426
feat: promisify app.dock.show() (#16904)
* feat: promisify app.dock.show

* add a spec
2019-02-12 21:06:33 -08:00
Robo
5478cc7e8e
chore: fix lint errors (#16906) 2019-02-13 00:19:47 +05:30
Shelley Vohr
bf276ecc69 feat: add new components to Display structure (#16870)
* feat: add new components to Display structure

* add internal property

* expose colorDepth

* add specs
2019-02-12 05:34:42 -10:00
Jeremy Apthorp
5a44cc50cf docs: migration guide for register{StandardSchemes => SchemesAsPrivileged} (#16762)
* docs: migration guide for register{StandardSchemes => SchemesAsPrivileged}

cc @nitsakh

* Update docs/api/protocol.md

Co-Authored-By: nornagon <nornagon@nornagon.net>

* Update docs/api/protocol.md

Co-Authored-By: nornagon <nornagon@nornagon.net>

* Update protocol.md

* Update docs/api/protocol.md

Co-Authored-By: nornagon <nornagon@nornagon.net>
2019-02-12 04:31:53 -10:00
Samuel Attard
01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Samuel Attard
7baa218ca9
docs: remove removed autosize attribute (#16884)
Closes #16199

Notes: no-notes
2019-02-11 14:15:15 -08:00
Samuel Attard
5301808926 docs: reference the webviewTag option in the webview docs (#16879)
Closes #16773

Notes: Add a reference to the "webviewTag" option in the webview docs
2019-02-11 10:38:36 -10:00
Milan Burda
36ce3e9546 feat: promisify webContents.printToPDF() (#16795) 2019-02-11 09:20:04 -10:00
Shelley Vohr
3effa6f20c feat: add support for scroll lock accelerator (#16873) 2019-02-11 09:13:13 -10:00
Samuel Attard
90ebd8eb12
docs: document how setAsDefaultProtocolClient works in Windows Store (#16874)
Closes #16852
2019-02-11 10:51:46 -08:00
Jeremy Apthorp
72f3a22ecc docs: reorder crashReporter notes to make more sense (#16825)
the note about reports from child processes on Windows should be next to the code snippet.

Side note: is that code even still necessary?
2019-02-08 13:26:59 -08:00
Julien Isorce
27bd47a333 feat: implement BrowserWindow.moveTop on X11 (#16629)
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
2019-02-07 12:48:19 -08:00