Commit graph

3166 commits

Author SHA1 Message Date
Jeremy Apthorp
034f4d5734
fix: implement 'login' event for WebContents (#20954) 2019-11-11 09:47:01 -08:00
Milan Burda
093f2dd4a6 chore: remove deprecated <webview>.getWebContents() (#20986) 2019-11-08 15:46:35 -05:00
Shelley Vohr
d3622f9c37
feat: convert shell.openItem to async shell.openPath (#20682) 2019-11-07 23:08:43 -08:00
Samuel Attard
b06a479240
build: remove debug builds (#21016)
* build: remove debug builds

* Update docs/development/debugging-instructions-macos.md

Co-Authored-By: Robo <hop2deep@gmail.com>
2019-11-07 11:51:44 -08:00
Milan Burda
f1e7393e30 feat: deprecate <webview>.getWebContents() (#20726) 2019-11-07 09:43:19 -08:00
Andrew MacDonald
9b01bb00d2 feat: add app.getApplicationNameForProtocol API (#20399)
* Add GetApplicationNameForProtocol.

* Fix Windows implementation.

* Fix up test.

* Add documentation.

* Implement for real on Linux using xdg-mime.

Also ensure we allow blocking calls here to avoid errant DCHECKing.

* Improve docs for Linux.

* Clean up tests.

* Add a note about not relying on the precise format.

* Update docs/api/app.md

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

* Remove needless `done()`s from tests.

* Use vector list initialization.

* Add a simple test for isDefaultProtocolClient.

* Remove unneeded include and skip a test on Linux CI.

* We no longer differentiate between CI and non-CI test runs.
2019-11-06 17:50:33 -08:00
Samuel Attard
5b7382765c
feat: allow TouchBarButton instances to be disabled (#20945)
* feat: allow TouchBarButton instances to be disabled

* Update touch-bar-button.md
2019-11-05 15:56:36 -08:00
Shelley Vohr
05de7277ab docs: fix win.setIcon ts type (#20950)
* docs: fix win.setIcon ts type

* test: update smoke tests
2019-11-05 13:47:08 -08:00
Samuel Attard
fcee7212ce
chore: upgrade ts generator for better type safety (#20975)
* chore: upgrade ts generator for better type safety

* spec: fix tests
2019-11-05 13:34:04 -08:00
Shelley Vohr
38711233c5
feat: allow some NODE_OPTIONS in packaged apps (#20857)
* feat: allow some NODE_OPTIONS in packaged apps

* fix: correctly detect packaged app
2019-11-01 18:06:15 -07:00
Erick Zhao
dcf6f046d9 feat: implement win.setAspectRatio() on Linux (#19516) 2019-11-01 09:22:07 -07:00
Samuel Attard
6bcf67e051
feat: enable builtin spellchecker (#20692)
* chore: add code required to use chromes spellchecker

* chore: fix linting

* chore: manifests needs buildflags now

* chore: add dictionarySuggestions to the context menu event when the spellchecker is active

* chore: enable by default for windows builds

* chore: add patch to remove incognito usage in the spellchecker

* chore: add dependencies on spellcheck common and flags

* chore: conditionally include spell check panel impl

* chore: fix deps for spellcheck feature flags

* chore: add patch for electron resources

* chore: add dependency on //components/language/core/browser

* chore: patches to make hunspell work on windows

* build: collect hunspell dictionaries into a zip file and publish

* chore: clean up patches

* chore: add docs and set spell checker url method

* chore: fix error handling

* chore: fix hash logic

* build: update hunspell filename generator

* fix: default spellchecker list to the current system locale if we can

* docs: document the language getter

* chore: patch IDS_ resources for linux builds

* feat: add spellcheck webpref flag to disable the builtin spellchecker

* chore: fix docs typo

* chore: clean up spellchecker impl as per feedback

* remove unneeded deps
2019-10-31 13:11:51 -07:00
Samuel Attard
375e612ac5 docs: the ipc main listener being removed can have args (#20712) 2019-10-29 13:18:39 +09:00
Shelley Vohr
cdff1bde22
docs: fix process.getSystemVersion() type (#20736) 2019-10-27 09:40:41 -07:00
Shelley Vohr
aa26e8b946
fix: macOS getColor inconsistencies (#20611) 2019-10-21 14:31:03 -07:00
Samuel Attard
2b890827ef
docs: mark contextBridge as experimental (#20638)
* docs: mark contextBridge as experimental

This commit didn't make it to the original PR, quick addition here

* Update context-bridge.md
2019-10-18 13:46:03 -07:00
Samuel Attard
0090616f7b
feat: add a new contextBridge module (#20307)
* feat: add a new contextBridge module

* chore: fix docs linting

* feat: add support for function arguments being proxied

* chore: ensure that contextBridge can only be used when contextIsolation is enabled

* docs: getReverseBinding can be null

* docs: fix broken links in md file

* feat: add support for promises in function parameters

* fix: linting failure for explicit constructor

* Update atom_api_context_bridge.cc

* chore: update docs and API design as per feedback

* refactor: remove reverse bindings and handle GC'able functions across the bridge

* chore: only expose debugGC in testing builds

* fix: do not proxy promises as objects

* spec: add complete spec coverage for contextBridge

* spec: add tests for null/undefined and the anti-overwrite logic

* chore: fix linting

* spec: add complex nested back-and-forth function calling

* fix: expose contextBridge in sandboxed renderers

* refactor: improve security of default_app using the new contextBridge module

* s/bindAPIInMainWorld/exposeInMainWorld

* chore: sorry for this commit, its a big one, I fixed like everything and refactored a lot

* chore: remove PassedValueCache as it is unused now

Values transferred from context A to context B are now cachde in the RenderFramePersistenceStore

* chore: move to anonymous namespace

* refactor: remove PassValueToOtherContextWithCache

* chore: remove commented unused code blocks

* chore: remove .only

* chore: remote commented code

* refactor: extract RenderFramePersistenceStore

* spec: ensure it works with numbered keys

* fix: handle number keys correctly

* fix: sort out the linter

* spec: update default_app asar spec for removed file

* refactor: change signatures to return v8 objects directly rather than the mate dictionary handle

* refactor: use the v8 serializer to support cloneable buffers and other object types

* chore: fix linting

* fix: handle hash collisions with a linked list in the map

* fix: enforce a recursion limit on the context bridge

* chore: fix linting

* chore: remove TODO

* chore: adapt for PR feedback

* chore: remove .only

* chore: clean up docs and clean up the proxy map when objects are released

* chore: ensure we cache object values that are cloned through the V8 serializer
2019-10-18 12:57:09 -07:00
Jeremy Apthorp
8dad0c7aaa
test: move crashReporter specs to the main process (#20417) 2019-10-14 14:38:54 -07:00
Jeremy Apthorp
1f44f47de1 test: move debugger spec to main process (#20514) 2019-10-14 14:32:11 +09:00
Jeremy Apthorp
5d696c5c69
fix: return type of webview.printToPDF is now Uint8Array (#20505) 2019-10-10 11:25:11 -07:00
Jeremy Apthorp
2fad53e66b refactor: use v8 serialization for ipc (#20214)
* refactor: use v8 serialization for ipc

* cloning process.env doesn't work

* serialize host objects by enumerating key/values

* new serialization can handle NaN, Infinity, and undefined correctly

* can't allocate v8 objects during GC

* backport microtasks fix

* fix compile

* fix node_stream_loader reentrancy

* update subframe spec to expect undefined instead of null

* write undefined instead of crashing when serializing host objects

* fix webview spec

* fix download spec

* buffers are transformed into uint8arrays

* can't serialize promises

* fix chrome.i18n.getMessage

* fix devtools tests

* fix zoom test

* fix debug build

* fix lint

* update ipcRenderer tests

* fix printToPDF test

* update patch

* remove accidentally re-added remote-side spec

* wip

* don't attempt to serialize host objects

* jump through different hoops to set options.webContents sometimes

* whoops

* fix lint

* clean up error-handling logic

* fix memory leak

* fix lint

* convert host objects using old base::Value serialization

* fix lint more

* fall back to base::Value-based serialization

* remove commented-out code

* add docs to breaking-changes.md

* Update breaking-changes.md

* update ipcRenderer and WebContents docs

* lint

* use named values for format tag

* save a memcpy for ~30% speedup

* get rid of calls to ShallowClone

* extra debugging for paranoia

* d'oh, use the correct named tags

* apparently msstl doesn't like this DCHECK

* funny story about that DCHECK

* disable remote-related functions when enable_remote_module = false

* nits

* use EnableIf to disable remote methods in mojom

* fix include

* review comments
2019-10-09 13:59:08 -04:00
Shelley Vohr
f80a17c5be feat: allow Linux/Windows users to set notification timeout (#20153)
* feat: allow Linux users to set notification timeout

* implement on windows
2019-10-09 11:22:21 -04:00
Shelley Vohr
c16a186de0 feat: improve TouchBarButton accessibility (#20454) 2019-10-08 11:13:57 -04:00
Milan Burda
ccff140046 feat: add --enable-api-filtering-logging commandline switch (#20335) 2019-10-04 10:49:09 -07:00
Milan Burda
2f03d393c3 feat: allow inspection of specific shared workers (#20389) 2019-10-02 14:38:27 +02:00
bughit
01ed55ff02 docs: WebContents console-message event is emitted for offscreen windows (#20386)
since c3d11a51cc
2019-10-01 14:32:59 -04:00
Milan Burda
ead8f2bbcd fix: BrowserWindow.fromWebContents() can return null (#19983) 2019-09-27 13:07:55 +02:00
Shelley Vohr
ffe2182883
feat: set urgency on linux notifications (#20152) 2019-09-18 22:35:20 -07:00
Shelley Vohr
e510af77b2
docs: improve and add examples for clipboard (#20224)
* docs: improve and add examples for clipboard

* address feedback from jkleinsc review
2019-09-18 16:00:43 -07:00
Samuel Attard
660e566201
fix: don't expose nativeTheme in the renderer process (#20139)
Exposing these in the renderer didn't make sense as they weren't backed
by the same instance / value store.  This API should be browser only
especially now that we have nativeTheme.themeSource.  Exposing in
//common was a mistake from the beginning.
2019-09-16 14:23:13 -07:00
Charles Kerr
8a0a41b9ef docs: fix BrowserWindow options.hasShadow platform (#20038)
The docs claimed this is only available on macOS; however, Linux and Win
got this feature in 239bfe970c
2019-09-05 16:04:07 -04:00
Samuel Attard
0d16be9560
feat: add nativeTheme.themeSource to allow apps to override Chromiums theme choice (#19960)
* feat: add nativeTheme.shouldUseDarkColorsOverride to allow apps to override Chromiums theme choice

* spec: add tests for shouldUseDarkColorsOverride

* chore: add missing forward declarations

* refactor: rename overrideShouldUseDarkColors to themeSource

* chore: only run appLevelAppearance specs on Mojave and up

* chore: update patch with more info and no define

* Update spec-main/api-native-theme-spec.ts

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts
2019-09-05 10:57:04 -07:00
Samuel Attard
137622931b
fix: ensure document.visibilityState aligns with the visibility of the TopLevelWindow (#19988)
* fix: ensure document.visibilityState aligns with the visibility of the
TopLevelWindow

* chore: disable the specs on linux on CI
2019-09-05 10:56:06 -07:00
Cem Schemel
bff16e027a docs: Improve wording of setBrowserView and getBrowserView (#20065)
* Improve wording of setBrowserView and getBrowserView

* Update wording based on feedback
2019-09-04 14:19:49 -07:00
Dave Jeffery
0f5ff1f5bb docs: clarify app.setName() effects (#19893)
* Document that `app.setName()` has no effect in Mac environments

* docs: add note to clarify `app.setName()` functionality

* Update app.md
2019-08-30 10:30:38 -07:00
Jeremy Apthorp
805a55099b test: tsify more web contents specs (#19969)
* test: tsify more WebContents specs

* getFocusedWebContents

* setDevToolsWebContents, isFocused, isCurrentlyAudible

* getWebPreferences, openDevTools

* before-input-event

* zoom-changed

* sendInputEvent

* insertCSS

* startDrag

* focus, getOSProcessId

* zoom api

* more closeAllWindows

* fix detached dev tools test

* fix zoom-changed test

* compare the correct kind of id 🤦‍♂️

* 'fix' openDevTools test to wait for multiple focus events

* fix tests? 🤞

* use request instead of blur to detect openExternal success

* try not timing out the keychain for testing

* use blur event on mac, sigh

* oh, right, still gotta open an actual url
2019-08-29 19:45:41 -05:00
Milan Burda
eed72c35d7 feat: add session.downloadURL() (#19889) 2019-08-28 20:27:20 -07:00
Jeremy Apthorp
af138dab55
test: move webRequest spec to main runner (#19992) 2019-08-28 13:56:15 -07:00
Marat Abdullin
ae9424d93a feat: add "accessibleTitle" property to a BrowserWindow instance (#19698)
Sometimes it's necessary to convey more information about the window to screen reader users only (simply putting everything to the window title might be unnecessarily noisy).

For example, Chromium uses that technique to tell screen reader users that the window is in incognito mode (the incognito window looks differently and doesn't have «incognito» in the title, but for blind users the screen reader will announce that it's incognito).
2019-08-28 00:35:34 +02:00
Jeremy Apthorp
bdc84d0bfb
test: tsify session spec (#19604) 2019-08-27 14:55:19 -07:00
Kuts Alexey
cddbddc543 feat: HTTP preconnect feature minimal for electronjs (#18671) 2019-08-26 09:47:32 -07:00
Shelley Vohr
c6a8b7f959 docs: clarify dock.bounce usage (#19894) 2019-08-23 01:16:18 -07:00
Erick Zhao
145b4fae94 feat: implement will-move event on macOS (#19641) 2019-08-20 07:53:43 -07:00
Shelley Vohr
1dc02e6dbc
fix: fall back to default logs path in getPath('logs') (#19653) 2019-08-19 15:16:00 -07:00
pi1024e
0851697cb7 docs: fix punctuation errors in native-image.m (#19620)
* Added correct punctuation to sentences in documentation as well as changed lets to consts to pass the docs linter

* Fixed inconsistent indentation
2019-08-19 15:15:13 -07:00
Micha Hanselmann
56d10aeef7 docs: add mising return desc (#19778) 2019-08-16 09:24:17 -07:00
Jean-Philippe Morin
42ac64284f docs: MessageBoxOptions.icon should allow type string (#19782)
In the `dialog` documentation (and the generated typings in `electron.d.ts`), it is mentionned that the `icon` property only supports `NativeImage`, but the `nativeImage` documentation says that:

```
In Electron, for the APIs that take images, you can pass either file paths or NativeImage
```
2019-08-16 17:06:02 +02:00
Micha Hanselmann
e59095423e docs: add exemplary fiddle for launch in fiddle feat (#19759)
* add fit-screen

* new url format

* nit
2019-08-15 15:37:37 -07:00
Julien Isorce
680399f476 feat: Implement BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId) (#18926)
* feat: Implement BrowserWindow.moveAbove(mediaSourceId)

BrowserWindow.{focus,blur,moveTop}() are not enough in some
situations. For example when implementing an overlay that
follows another window that can lose focus. In that case
it is useful to move the overlay above the tracked window.

sourceId is a string in the format of DesktopCapturerSource.id,
for example "window:1869:0".

Notes: Added BrowserWindow.moveAbove(mediaSourceId)

https://github.com/electron/electron/issues/18922

* feat: Implement BrowserWindow.getMediaSourceId

Return the Window id in the format of DesktopCapturerSource's id.
For example "window🔢0".

https://github.com/electron/electron/issues/16460

Notes: Added BrowserWindow.getMediaSourceId
2019-08-15 15:51:15 +09:00
Samuel Attard
efa1818cb4
feat: add new nativeTheme API (#19656)
* feat: add new nativeTheme API

* chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module

* chore: clean up and deprecate things per feedback

* chore: add tests for deprecate and clean up invert impl

* build: when is a boolean not a boolean???
2019-08-14 13:42:55 -07:00