Thomas Beverley
1674388028
Fix webContents.print() ( #17052 )
2019-02-25 13:30:21 +00:00
ZYSzys
a40d826b11
chore: remove unused catch bindings ( #16121 )
2019-02-21 09:26:07 +00:00
Shelley Vohr
3edc497d3d
feat: show user gesture type in click event ( #16954 )
2019-02-20 12:20:24 +00:00
Felix Rieseberg
91f81b4b72
refactor: Port renderer/init to TypeScript ( #17027 )
...
* refactor: Port renderer/init to TypeScript
* Update lib/renderer/init.ts
Co-Authored-By: felixrieseberg <felix@felixrieseberg.com>
* refactor: Type this a bit more loosely
* refactor: Type parseOption strictly
2019-02-19 17:05:14 +00:00
Felix Rieseberg
2223114f20
refactor: Port chrome-api to TypeScript ( #17014 )
2019-02-19 13:09:44 +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
Felix Rieseberg
eaa0e28396
refactor: Port content-scripts-injector to TypeScript ( #17012 )
2019-02-18 12:47:07 +00:00
Felix Rieseberg
596acdcb91
refactor: Port web-frame-init to TypeScript ( #16934 )
...
* refactor: Port web-frame-init to TypeScript
* refactor: Use ipcRendererInternal
2019-02-18 00:24:18 +00:00
Felix Rieseberg
6b3ff4f1f7
refactor: Port security warnings to TypeScript ( #16937 )
...
* refactor: Port security-warnings to TypeScript
* chore: make aliasify work on .ts files as well
* refactor: Implement feedback <3
* refactor: Correctly call executeJavaScript
2019-02-16 17:06:30 -08:00
Milan Burda
975a035d34
chore: re-enable devtools renderer sandbox ( #16864 )
...
* chore: re-enable devtools renderer sandbox
* chore: enable sandbox for chrome extension background script host renderers
2019-02-15 15:10:32 +05:30
Felix Rieseberg
2498e8d1c2
refactor: Port renderer-internal to TypeScript ( #16939 )
...
* chore: make aliasify work on .ts files as well
* refactor: Port ipc-renderer-internal to TypeScript
* refactor: Correctly import internal ipcRenderer
* refactor: One more rename
* refactor: Fix one more lint issue
* refactor: Correctly reference ipcRendererInternal
2019-02-14 17:24:25 -08: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
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
deepak1556
606c84b302
Blink: Plumb correct security origin for isolated world CSPs.
...
https://chromium-review.googlesource.com/c/chromium/src/+/1395190
2019-02-14 23:59:22 +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
Stewart Lord
84ef9cae6c
fix: send chrome.runtime/tabs.sendMessage
result to correct sender ( #16945 )
...
Additionally, use `.once` instead of `.on` for result specific listeners.
2019-02-14 06:07:55 -10:00
Felix Rieseberg
31494dfade
refactor: Port getRemote to TypeScript ( #16938 )
...
* chore: make aliasify work on .ts files as well
* refactor: Port getRemote to TypeScript
* refactor: Implement feedback <3
2019-02-14 04:04:53 -10:00
Felix Rieseberg
6cd75744ef
refactor: Port window-setup to TS ( #16894 )
...
* refactor: Port window-setup to TS
* refactor: Make the linter happy
* refactor: Sneaky little TS error
* refactor: Correctly import window-setup
* refactor: Implement feedback <3
* refactor: Allow decorators in TS
* refactor: Use named windowSetup in isolatedRenderer
* refactor: Help TS understand
* refactor: Welp, use createEvent again
* refactor: Use the correct target in the decorator
2019-02-14 03:52:38 -10:00
Milan Burda
2492f0bcac
refactor: promisify prototype methods ( #16935 )
2019-02-14 03:40:24 -10:00
Felix Rieseberg
9112ad01be
refactor: Port renderer-internal-utils to TypeScript ( #16942 )
...
* chore: make aliasify work on .ts files as well
* refactor: Port renderer-internal-utils to TypeScript
* refactor: Implement feedback <3
2019-02-13 23:05:49 -08:00
Stewart Lord
228805353f
fix: pass result to chrome.tabs.executeScript callback ( #16941 )
...
* fix: pass result to chrome.tabs.executeScript callback
Additionally, remove `nextId` counter in favor of `originResultID` counter which is more widely used in this file.
* fix: remove need for eslint override and better match style
2019-02-13 17:00:36 -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
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
Samuel Maddock
8f6a543398
feat: add chrome.runtime.getManifest ( #16891 )
...
* feat: add chrome.runtime.getManifest
* Add test for chrome.runtime.getManifest
* Use IPC utils for getManifest internals
2019-02-13 07:16:12 -10:00
Samuel Attard
01c442de64
refactor: convert more files to typescript ( #16820 )
2019-02-12 04:22:33 -10:00
Milan Burda
d8ba1278d1
chore: disable the remote module in devtools / chrome extension background scripts ( #16866 )
...
* 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() ( #16795 )
2019-02-11 09:20:04 -10:00
Milan Burda
7a3d220347
refactor: implement Chrome Extension APIs without the remote module ( #16686 )
...
* refactor: implement Chrome Extension APIs without the remote module
* remove unused potentiallyRemoteRequire
2019-02-10 10:38:14 -08:00
Cheng Zhao
d16b581140
fix: remove memory leak when using webFrame and spell checker ( #16770 )
...
* fix: do not create native api::WebFrame in webFrame
When reloading a page without restarting renderer process (for example
sandbox mode), the blink::WebFrame is not destroyed, but api::WebFrame
is always recreated for the new page context. This leaves a leak of
api::WebFrame.
* fix: remove spell checker when page context is released
2019-02-08 13:38:31 -08:00
Milan Burda
3f52e18a38
chore: add menu-will-close comment explaining setTimeout ( #16794 )
2019-02-08 13:38:03 -08:00
Milan Burda
1632c4b837
refactor: implement chrome.i18n.getMessage() without the remote module ( #16739 )
...
* refactor: implement chrome.i18n.getMessage() without the remote module
* replace navigator.language with app.getLocale()
2019-02-08 12:07:09 -08:00
Shelley Vohr
e790dbd737
chore: add standalone function deprecation helper ( #16782 )
2019-02-08 09:50:11 -08:00
Samuel Attard
db11b9b13b
fix: restore accidentally removed chrome-extension require ( #16819 )
2019-02-07 12:38:57 -08:00
Shelley Vohr
9ebba76c03
chore: improve existing error preservation in promisify ( #16815 )
...
This PR better preserves existing behavior in `deprecate.promisify()` in the cases where the promise fails. Previously, if a callback was only called with `data` instead of `err, data` and the promise was rejected, `data` would be populated with `err`, which could be confusing to users. This makes it such that `err` is called back on promise rejection if a callback is called with `err, data` a la Node.js.
2019-02-07 10:25:20 -08:00
Samuel Attard
4f8ebafa97
chore: dont log 100000000 chars of URL ( #16800 )
2019-02-07 08:50:47 -08:00
Samuel Attard
26df9992cf
build: use typescript for internal Electron JS code ( #16441 )
2019-02-06 10:27:20 -08:00
Shelley Vohr
858781ba83
feat: allow Menu.buildFromTemplate() to accept MenuItems ( #16697 )
...
* 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
4211a9c69f
refactor: use ipcRendererUtils.invokeSync / ipcMainUtils.handleSync ( #16759 )
2019-02-06 09:53:28 -08:00
Milan Burda
6d674eebb1
refactor: crashReporterInit ( #16729 )
2019-02-05 12:56:44 -08:00
Shelley Vohr
f303caa87c
refactor: remove ServiceWorker APIs from WebContents ( #16717 )
2019-02-04 22:22:46 -08:00
Samuel Attard
af64140100
refactor: enforce naming of ipcMainInternal ( #16689 )
2019-02-04 14:49:53 -08:00
Milan Burda
7dc565fc2e
refactor: implement inspector APIs without the remote module ( #16607 )
2019-02-01 19:56:46 +01:00
michtsu
392458b252
Add devtools API to inspect shared worker. ( #16615 )
2019-02-01 10:44:24 -08:00
Charles Kerr
76dcbcd6ea
chore: fix 'browserView' typo ( #16621 )
2019-01-30 21:07:08 -08:00
Shelley Vohr
ba57e1d991
feat: promisify contentTracing recording APIs ( #16584 )
...
* 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() ( #16583 )
...
* 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 ( #16565 )
2019-01-30 08:20:03 -08:00
Milan Burda
fa5442f211
fix: execute session preload scripts in sandboxed renderers ( #16538 )
2019-01-29 10:16:46 +09:00
Shelley Vohr
d105dcc0d3
feat: promisify webContents.hasServiceWorker() ( #16535 )
...
* 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 ( #16544 )
...
* 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 ( #16464 )
...
* 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
713df08e3e
chore: remove deprecated modules internally using remote.require in sandboxed renderer context ( #15957 )
2019-01-24 10:53:52 -08:00
Milan Burda
fef262f829
fix: check process.isMainFrame in sandboxed_renderer/init.js ( #16500 )
2019-01-24 10:53:16 -08:00
Milan Burda
cc90919384
refactor: pass internal flag via IPC message struct for consistency ( #16490 )
2019-01-23 08:24:57 -08:00
Samuel Attard
f3e30c7ae3
Merge remote-tracking branch 'origin/chromium-upgrade/72'
2019-01-22 12:01:18 -08:00
Samuel Attard
0b85fb7ea2
Revert "feat: upgrade to Chromium 72.0.3626.52 ( #16334 )"
...
This reverts commit 1918e76913
.
2019-01-22 12:01:04 -08:00
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
Samuel Attard
ff9b23ebe5
fix: dont run window-setup on chrome:// protocol, introduced in b965e54efc
( #16489 )
2019-01-22 10:32:18 -08:00
Cheng Zhao
03d499bf34
fix: detach webview instead of destroying it
...
Chromium no longer cleans up everything when a guest webcontents is
destroyed, we have to force detaching it and let Chromium destroy everything.
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
7d71ad6f91
fix: takeHeapSnapshot() using public IPC channel for internal implementation ( #16480 )
2019-01-22 17:32:24 +09:00
Milan Burda
b965e54efc
fix: <webview> not working with contextIsolation + sandbox ( #16469 )
2019-01-22 10:08:16 +09: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
Shelley Vohr
f105c84349
test: ensure legacy callback functions work ( #16436 )
...
* test: test legacy callback functions
* add TODO removal comments
* fix callback spec
2019-01-17 14:17:16 -08:00
Shelley Vohr
720197f9c8
fix: correctly handle IPC for promise-based methods ( #16433 )
2019-01-17 12:08:54 -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
Milan Burda
52e257668d
fix: windowmenu did not show the window list on macOS ( #16387 )
2019-01-14 17:27:52 +01:00
Robo
52fe92d02e
feat: Upgrade to Chromium 71.0.3578.98 ( #15966 )
2019-01-11 17:00:43 -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
5c250455ad
refactor: pass isWebViewTagEnabled via ELECTRON_BROWSER_SANDBOX_LOAD ( #16238 )
2019-01-08 10:12:34 +01:00
Shelley Vohr
b71a5a5955
fix: register accelerator if role has no registerAccelerator ( #16309 )
...
* fix: register accelerator if role has no registerAccelerator
* ensure roles[role].registerAccelerator is defined
2019-01-07 16:01:03 -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
Jeremy Apthorp
959c7a76e9
Merge pull request #16252 from electron/miniak/guest-view-manager
...
fix: security: improve IPC validation in guest-view-manager
2019-01-04 16:47:27 -08:00
Milan Burda
a0cdcc5f8d
security: improve IPC validation in guest-view-manager
2019-01-05 00:06:47 +01:00
Jeremy Apthorp
849dd0db64
fix: correctly pass hidden-page argument to isolated renderers ( #16258 )
2019-01-04 08:25:47 -08:00
Milan Burda
3f1d22759a
refactor: use helpers for command-line parsing in renderer/init.js ( #16239 )
2019-01-03 11:22:34 -05:00
Cheng Zhao
a5e63dc5fd
fix: don't expose isolatedWorld
to global ( #16208 )
2018-12-28 10:54:32 +09: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
Alex Greenland
dc93d94bc8
fix: support async child process methods without callback in asar ( #15927 )
...
* fix: support async child process methods without callback in asar
* fix: support async child process methods without callback in asar (improved)
2018-12-18 16:27:39 +09:00
Milan Burda
7a6fe00f49
chore: simplify code for modules internally using remote.require in sandbox ( #16104 )
2018-12-17 22:47:41 +03:00
Cheng Zhao
8584c2f14b
fix: register webview in main world when using contextIsolation ( #16067 )
2018-12-14 15:38:35 +09:00
Cheng Zhao
897c6e93cb
chore: simplify main world setup of contextIsolation ( #16046 )
2018-12-13 16:25:12 -05:00
Charles Kerr
f7528a0204
fix: fix an original-fs regression introduced in 4.0 betas ( #16028 )
...
* fix: fix an original-fs regression introduced in 4.0 betas
* chore: remove cruft from earlier draft
2018-12-12 15:32:53 -06:00
Milan Burda
c65a0d90b8
chore: misc cleanup ( #16037 )
2018-12-12 15:31:16 -06:00
Milan Burda
607b53c883
security: block chrome.tabs.executeScript() for non chrome-extension: URLs ( #15929 )
2018-12-11 10:45:46 +01:00
Benjamin Pasero
c74ae107f1
fix: do not print an error for an expected condition ( #15991 ) ( #15992 )
2018-12-10 12:06:26 -08:00
Shelley Vohr
4b18a38e9f
chore: simplify promisify helper ( #15952 )
...
chore: simplify promisify helper
2018-12-10 08:13:09 -08:00
Cheng Zhao
db2fda1b6f
chore: make rpc-server reply to sender frame instead of the main frame ( #15973 )
...
* chore: make rpc-server reply to frame
* fix: check IsRenderFrameLive
2018-12-10 09:37:42 +09:00
Milan Burda
177091ca6f
chore: rename nativeRequire to potentiallyRemoteRequire ( #15971 )
2018-12-06 18:12:50 -08:00
Jeremy Apthorp
442c1b22e3
feat: webContents.loadURL returns a promise ( #15855 )
2018-12-06 12:16:19 -08:00