Commit graph

767 commits

Author SHA1 Message Date
Shelley Vohr
2769e75b49
feat: promisify session proxy methods () 2019-03-08 12:51:12 -08:00
Shelley Vohr
e5e6aa207c
feat: promisify ses.clearHostResolverCache() () 2019-03-08 10:26:17 -08:00
Shelley Vohr
bbfa63fd9d
feat: promisify session.clearStorageData() () 2019-03-08 09:02:30 -08:00
Felix Rieseberg
5581990d78 build: Update TypeScript, use @typescript-eslint ()
* build: Update TypeScript to v3.3

* build: Update TypeScript, use @typescript-eslint
2019-03-07 12:56:02 -08:00
Shelley Vohr
6cb7b8d3a4
feat: promisify dialog.showSaveDialog() ()
* feat: promisify dialog.showSaveDialog()

* address some feedback from review

* filename => filePath

* fix last filename => filePath
2019-03-05 13:48:20 -08:00
Shelley Vohr
e05985145b
feat: promisify dialog.showOpenDialog() ()
* 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 ()
* feat: allow MenuItems to work optionally when hidden

* fix: actually include forward_declaration
2019-02-28 17:00:54 +00:00
Nitish Sakhawalkar
bfa07ec4be feat: Add new powerMonitor synchronous API ()
`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
08066581b0 fix: set cancelId to 1 when defaultId == 0 and no 'cancel' button () 2019-02-27 08:24:13 +00:00
Shelley Vohr
d9c7735a04 chore: augment promisifyMultiArg deprecation () 2019-02-25 18:25:25 -08:00
Thomas Beverley
1674388028 Fix webContents.print() () 2019-02-25 13:30:21 +00:00
ZYSzys
a40d826b11 chore: remove unused catch bindings () 2019-02-21 09:26:07 +00:00
Shelley Vohr
3edc497d3d
feat: show user gesture type in click event () 2019-02-20 12:20:24 +00:00
Milan Burda
7e7abc28f5 feat: promisify netLog.stopLogging () 2019-02-19 10:48:27 +00:00
Samuel Attard
5790869a3f
chore: refactor browser IPC into TS and app API into TS ()
* 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
deepak1556
005b7d8099 Print Preview: Add validity check for kSettingPagesPerSheet.
https://chromium-review.googlesource.com/c/chromium/src/+/1381133
2019-02-14 23:59:25 +05:30
deepak1556
547add94d0 Make //ui/base/idle API synchronous
https://chromium-review.googlesource.com/c/chromium/src/+/1379183
2019-02-14 23:59:23 +05:30
Shelley Vohr
de27911661
feat: promisify webContents.savePage() ()
* 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
Milan Burda
2492f0bcac refactor: promisify prototype methods () 2019-02-14 03:40:24 -10:00
Shelley Vohr
fed5b99a9f
feat: promisify contentTracing.getTraceBufferUsage() ()
* feat: promsify contentTracing.getTraceBufferUsage()

* deprecate getTraceBufferUsage

* address feedback from review

* properly deprecate
2019-02-13 13:24:57 -08:00
Milan Burda
1f458eb177 feat: promisify debugger.sendCommand() ()
* remove duplicate entry for desktopCapturer.getSources

* feat: promisify debugger.sendCommand
2019-02-13 07:23:53 -10:00
Samuel Attard
01c442de64 refactor: convert more files to typescript () 2019-02-12 04:22:33 -10:00
Milan Burda
d8ba1278d1 chore: disable the remote module in devtools / chrome extension background scripts ()
* cache isRemoteModuleEnabled

* chore: disable the remote module in devtools / chrome extension background scripts
2019-02-11 10:42:37 -10:00
Milan Burda
36ce3e9546 feat: promisify webContents.printToPDF() () 2019-02-11 09:20:04 -10:00
Shelley Vohr
858781ba83
feat: allow Menu.buildFromTemplate() to accept MenuItems ()
* feat: allow Menu.buildFromTemplate to accept MenuItems

* add another spec

* fix linter error

* add submenu spec
2019-02-06 10:04:40 -08:00
Milan Burda
6d674eebb1 refactor: crashReporterInit () 2019-02-05 12:56:44 -08:00
Shelley Vohr
f303caa87c
refactor: remove ServiceWorker APIs from WebContents () 2019-02-04 22:22:46 -08:00
Samuel Attard
af64140100
refactor: enforce naming of ipcMainInternal () 2019-02-04 14:49:53 -08:00
michtsu
392458b252 Add devtools API to inspect shared worker. () 2019-02-01 10:44:24 -08:00
Charles Kerr
76dcbcd6ea chore: fix 'browserView' typo () 2019-01-30 21:07:08 -08:00
Shelley Vohr
ba57e1d991
feat: promisify contentTracing recording APIs ()
* feat: promisify contentTracing.startRecording()

* feat: promisify contentTracing.stopRecording()

* test: convert specs for new promisified apis

* chore: deprecate and ensure legacy tests work
2019-01-30 18:53:55 -08:00
Shelley Vohr
641b47f384
feat: promisify contentTracing.getCategories() ()
* feat: promisify contentTracing.getCategories()

* deprecate contentTracing/getCategories
2019-01-30 12:39:55 -08:00
Milan Burda
dfcee48f81 fix: don't forward IPC filtering events to app for dev-tools and extensions () 2019-01-30 08:20:03 -08:00
Shelley Vohr
d105dcc0d3
feat: promisify webContents.hasServiceWorker() ()
* feat: promisify contents.hasServiceWorker()

* spec: add initial test for hasServiceWorker()
2019-01-26 10:23:16 -08:00
Shelley Vohr
5a35c3a279
chore: fix promisify helper ()
* chore: fix promise deprecation helper

* fix deprecations

* update deprecation tests
2019-01-25 14:23:24 -08:00
Charles Kerr
8396a2d504
feat: promisify cookies api ()
* 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
2019-01-25 12:11:35 -06:00
Milan Burda
cc90919384 refactor: pass internal flag via IPC message struct for consistency () 2019-01-23 08:24:57 -08:00
Samuel Attard
58a6fe13d6
feat: preloads and nodeIntegration in iframes ()
* 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 
Closes 
Closes 
Closes 
Closes 

* 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 () 2019-01-22 10:44:28 -08:00
Milan Burda
6cba2c50a2 feat: make ipc-message and ipc-message-sync events public () 2019-01-22 08:47:58 -08:00
Milan Burda
7d71ad6f91 fix: takeHeapSnapshot() using public IPC channel for internal implementation () 2019-01-22 17:32:24 +09:00
Shelley Vohr
3ca87d205f
feat: make zoomLevel/zoomFactor sync ()
* feat: make zoomLevel/zoomFactor sync

* update ts defs dep
2019-01-20 23:40:27 -08:00
Shelley Vohr
f105c84349
test: ensure legacy callback functions work ()
* test: test legacy callback functions

* add TODO removal comments

* fix callback spec
2019-01-17 14:17:16 -08:00
Shelley Vohr
1f2b02c18f
feat: promisify protocol.isProtocolHandled() ()
* 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 ()
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
Milan Burda
52e257668d fix: windowmenu did not show the window list on macOS () 2019-01-14 17:27:52 +01:00
Milan Burda
eb02a422de feat: add fileMenu / viewMenu / appMenu roles () 2019-01-10 14:32:03 +01:00
Milan Burda
349a3c20ae feat: add additional remote APIs filtering () 2019-01-08 14:27:56 -08:00
Shelley Vohr
b71a5a5955
fix: register accelerator if role has no registerAccelerator ()
* fix: register accelerator if role has no registerAccelerator

* ensure roles[role].registerAccelerator  is defined
2019-01-07 16:01:03 -08:00
Milan Burda
6f117b8e0c feat: add app.commandLine.hasSwitch() / app.commandLine.getSwitchValue() ()
* 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