Commit graph

3205 commits

Author SHA1 Message Date
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
Shelley Vohr
28466a39d8
feat: add property customization to save dialogs (#19672) 2019-08-13 13:40:07 -07:00
Shelley Vohr
e1824c00a9
feat: macOS removal fallback when moveItemToTrash fails (#19700)
* feat: macOS removal fallback when moveItemToTrash fails

* platform_util shouldn't know about mate::Arguments

* pull full_path from args as well
2019-08-13 12:31:53 -07:00
Shelley Vohr
b5798326e8
feat: add dontAddToRecent to windows showOpenDialog (#19669) 2019-08-13 08:48:22 -07:00
Shelley Vohr
e8fa248571
fix: crash in window.print() (#19690)
* fix: crash in window.print()

* add preliminary tests
2019-08-12 23:44:14 -07:00
Erick Zhao
f654da9f56 feat: add about panel customization on Windows (#19420) 2019-08-12 16:32:51 -07:00
Сковорода Никита Андреевич
ef03c4b7bb docs: fix app.on('session-created' example (#19713)
It does not have the 'event' argument.

Refs: https://github.com/electron/electron/pull/12123
Refs: https://github.com/electron/electron/pull/15236
Refs: https://github.com/electron/electron/issues/15203
2019-08-12 14:46:42 -07:00
Shelley Vohr
7861e9f728
feat: allow customization of print page header and footer (#19688)
* feat: allow customization of more print settings

* address feedback from @jkleinsc

* header and footer are optional
2019-08-09 13:16:25 -07:00
Milan Burda
03debb4ef9 feat: add tray.focus() (#19548) 2019-08-09 07:43:48 -07:00
Shelley Vohr
ed3b69ffb1
docs: update hasShadow for win and linux (#19675) 2019-08-08 15:49:43 -07:00
Milan Burda
0fb3c8cb7c feat: add new options to tray.displayBalloon() (#19544) 2019-08-08 14:43:33 -07:00
Erick Zhao
8a9a5d69b6 fix: normalize behavior of win.setOpacity() for invalid number values across operating systems (#19535)
* fix: define behavior for out-of-bounds setOpacity

* fix linux issue

* fix getOpacity behaviour

* wrong variable

* normalize more stuff

* docs

* test: use ifdescribe helper

* Update spec-main/api-browser-window-spec.ts

Co-Authored-By: Charles Kerr <ckerr@github.com>

* fixes

* more tests!!!

* Update shell/browser/native_window_views.cc

Co-Authored-By: Charles Kerr <ckerr@github.com>

* Update shell/browser/native_window_mac.mm

Co-Authored-By: Charles Kerr <ckerr@github.com>
2019-08-07 16:17:32 +09:00
András Polgár
c0982d7316 docs: update link to webContents.send (#19608) 2019-08-05 20:58:06 -07:00
Samuel Attard
cfd230d7f1
docs: remove implicit 'any' and 'Object' types from the docs (#19585)
* docs: remove implicit 'any' and 'Object' types from the docs

* docs: more docs improvements, remove all remaining empty interfaces

* chore: update tests for better types
2019-08-05 10:45:58 -07:00
Milan Burda
ee674acca4 feat: add tray.removeBalloon() (#19547) 2019-08-05 08:52:47 -07:00
Zach Bloomquist
40d9f828d4 docs: Fix process.enablePromiseAPI typo in promisification.md (#19576)
* Fix `process.enablePromiseAPI` typo in promisification.md

* Update promisification.md
2019-08-05 10:19:48 +09:00
Milan Burda
115b57649e docs: fix TouchBar related documentation (#19444) 2019-08-01 10:59:26 -04:00
Shelley Vohr
a5f87cee6b
doc: add missing MenuItem roles (#19329) 2019-07-31 14:13:56 -07:00
Micha Hanselmann
47a38daee2 feat: migrate custom macOS tray view to native one (#18981)
* restore stash

revert

some things work others dont

tracking area for rescue

manual popup

restore drag n drop

cleanup

* fix: make tray not block main process (#18880)

* fix: make tray not block main process

* make AtomMenuModel refcounted

* add support for ansi codes in title

add remove TODOs

* chore: use ScopedPumpMessagesInPrivateModes in tray (#18977)

* chore: use ScopedPumpMessagesInPrivateModes in tray

* revert refcounting of AtomMenuModel

* Prefer WeakPtr for posting tasks to handle unexpected destruction

* cleanup .h

* cleanup .mm

* add imports

add missing include

* fix: crash when tray popup called twice (#18999)

* remove highlightMode and TODOs

* remove unnecessary copy
2019-07-31 10:52:50 -07:00
Shelley Vohr
69646f4258
fix: throw better error on getPath('logs') (#19514) 2019-07-30 13:55:04 -07:00
Micha Hanselmann
af3316707f fix invalid lang tags (#19513) 2019-07-30 13:11:56 -07:00
Micha Hanselmann
42a483ad27 feat: add getBounds() method for BrowserView (#19370)
* implement getBounds on mac

* add Linux/Win impl

* add test

* add docs
2019-07-29 19:43:05 -07:00
Erick Zhao
ceb64b3b1b docs: BrowserWindow transparency limitation on Windows (#19399)
* docs: BrowserWindow transparency limitation on Win

* fix md link
2019-07-29 11:22:31 -07:00
Micha Hanselmann
9da1251dbc add desc (#19417) 2019-07-29 11:21:56 -07:00
Erick Zhao
c1d7d60ca2 docs: specify macOS-only about panel option (#19439) 2019-07-29 11:21:29 -07:00
Shelley Vohr
6c9d40ec33
feat: emit always-on-top-changed on macOS (#19462)
* feat: emit always-on-top-changed on macOS

* update event emission test for macos
2019-07-26 22:25:51 -07:00
Shelley Vohr
5aa1385cfc
doc: fix GPU infoType typings (#19470) 2019-07-26 16:16:38 -07:00
Samuel Attard
db3cf52add
docs: add support for readonly,deprecated and platform doc annotations (#19478) 2019-07-26 16:12:59 -07:00
Samuel Attard
12bbbef688
docs: fix type information for contents.sendInputEvent (#19479)
The `event` type and keyword is reserved by the typescript generator, in the future we should throw an error from the generator if someone uses a reserved interface like that.

This also splits and documents the InputEvent type way better so that TS
users get strong type safety.

Fixes electron/typescript-definitions#36
2019-07-26 16:11:50 -07:00
Samuel Attard
48f2807473
docs: fix app.getPath types so that "name" is a string enum (#19480)
* docs: fix app.getPath types so that "name" is a string enum

Fixes https://github.com/electron/typescript-definitions/issues/140

* Update app.md
2019-07-26 16:11:22 -07:00
Shelley Vohr
bdd626f57a
doc: fix types for traceConfig recording_mode (#19448) 2019-07-25 21:42:28 -07:00
Jeremy Apthorp
477661d0e4
feat: allow setting capture mode and max file size in netLog API (#19215) 2019-07-25 16:06:39 -07:00
Jeremy Apthorp
e58f8a79ee
test: move the TouchBar specs to the main process (#19413) 2019-07-25 11:30:42 -07:00
Shelley Vohr
49096c2359
fix: throw on invalid webRequest filters (#19337)
Closes #11371.

Previously, we didn't consider the return value of the webRequest URLPattern mate converter, which meant that when the pattern wasn't correctly parsed owing to invalid filter specification users would not be made aware of that fact and would just think that the filtering itself had failed. This corrects that error by moving the business logic of url pattern parsing out of the converter and into the function itself so that granular and specific errors can be thrown.

There's also no real reason that i'm aware of not to allow wider breadth of filters by letting users use a wildcard for effective TLD, so I also overrode that (default for the 1-arg Parse is not to allow that).

Finally, I added some examples of url filter types for users to reference.
2019-07-25 10:20:02 -07:00
Jeremy Apthorp
86c2ea1cb8
test: move Notification spec to main process (#19414) 2019-07-24 17:18:11 -07:00
Micha Hanselmann
637cfdd9a0 docs: fix broken link in ipcMain docs (#19401) 2019-07-24 11:39:39 -07:00
Shelley Vohr
9dfc4eb2ff
test: add tests for systemPreferences apis (#19419) 2019-07-24 10:40:12 -07:00
Jeremy Apthorp
9910507bc4 test: move BrowserView specs to main process (#19409) 2019-07-24 08:44:24 -07:00
Samuel Attard
b7f554f1dc
docs: make setBounds take a Partial<Rectangle> (#19416) 2019-07-23 23:51:22 -07:00
Milan Burda
103b38650f feat: add memory to app.getAppMetrics() (#18831) 2019-07-23 13:41:58 -07:00
Erick Zhao
2c383b51c1 feat: add rotate gesture for macOS (#19294)
* feat: add rotate gesture for macOS

* docs: document change

* refactor: rename 'rotate' -> 'rotate-gesture'

* refactor: const float -> float

* forgot one 🤦‍♂️
2019-07-23 14:42:26 -05:00
Shelley Vohr
3395a1d4db
doc: improve EventEmitter md formatting (#19345) 2019-07-22 08:20:43 -07:00
Mark Lee
0c0197a0ef docs: update Electron Packager links (#19333) 2019-07-19 18:52:11 -07:00
Micha Hanselmann
dc30b86377 feat: support isHighContrastColorScheme() on macOS (#19331)
* change docs

* use NativeTheme to check high contrast scheme
2019-07-19 16:04:42 -07:00
Micha Hanselmann
2467350180 feat: support mouse-move event of Tray API on Windows (#19265)
* add Tray.mouse-move on win

* change docs
2019-07-18 10:52:15 -07:00
Shelley Vohr
3ee95cf0e8
feat: support css origin in frame.insertCSS (#19268)
* feat: support css origin in frame.insertCSS

* move cssOrigin to an options object
2019-07-17 14:34:05 -07:00
Milan Burda
c79613b037 chore: convert more files to TypeScript (#18820) 2019-07-17 10:23:52 -07:00
Jeremy Apthorp
70857e9a5d test: move more BrowserWindow specs (#19290)
* test: move more BrowserWindow specs

* use async instead of setTimeout for cleaner code
2019-07-16 16:37:17 -07:00
Jeremy Apthorp
27599a851f test: move some BrowserWindow specs to the main process (#19182)
* test: move some BrowserWindow specs to the main process

* uncomment cross-site test

* move more tests

* re-enable, refactor and move visibilitychange specs

* move new-window event tests and re-enable them on mac

* move max/minimize event tests

* move modal tests

* move beginFrameSubscription tests

* move savePage test

* move BrowserWindow options argument is optional test

* move restore, unmaximize, fullscreen tests

* move parent window tests

* don't wait for show event on windows (#8664)

* add debugging logs to fullscreen tests

* more debugging on windows

* explicitly destroy browserviews to prevent crash during gc

* only await show on darwin

* more event timing fixes

* disable max/minimize event tests on linux, since they're broken on CI
2019-07-15 21:13:32 -07:00
Micha Hanselmann
da672a3b5c feat: support systemPreferences.isDarkMode() on Windows (#19217)
* add support for isDarkMode on Windows

* use NativeTheme for darkmode detection
2019-07-15 14:37:33 -07:00
Shelley Vohr
50f4977048
docs: differentiate static/instance class props (#19196) 2019-07-15 10:15:32 -07:00
Shelley Vohr
f6a29707b6
feat: app.moveToApplicationsFolder conflict handling (#18916)
Resolves #18805.

We want to keep default move conflict handling behavior in that it's still what most users would expect, but there exist edge cases in which users may not want to be forced into that behavior.

This thus introduces an optional conflict handler that allows developers access to more granular move actions. They could now allow the user to choose whether to delete an existing app in favor of the current one being moved, or whether to quit the current app and focus on the existing one should it both exist and be running. I added a fair amount of new documentation outlining this behavior, but if there are things users may benefit from seeing examples of or nuances that should be added please leave feedback!
2019-07-15 09:34:20 -07:00
Samuel Attard
4d8a05568b feat: enable dark mode support by default on macOS (#19226)
This adds the NSRequiresAquaSystemAppearance key to our default Info.plist file which will tell macOS to auto-switch our effectiveAppearance in sync with the OS.  The dark mode documentation has been updated to reflect how to opt *out* of this but it is also noted that certain dark mode APIs will not work on Catalina if you opt out.
2019-07-15 17:23:12 +09:00
Milan Burda
beb996b847 docs: specify possible values for ProcessMetric.type (#19203) 2019-07-12 14:10:18 +03:00
Shelley Vohr
75a020e0ac
feat: expose new vibrancy types (#19073) 2019-07-11 14:10:45 -05:00
Louis Rose
79114ff40a feat: add object to subscribe notification callback (#19110) 2019-07-11 10:06:31 -07:00
lvs
6d34314457 Remind user the executeJavaScript will not run their code immediately (#19129)
Remind user the contents.executeJavaScript will not run their code immediately if the web page still in running.  Without the knowledge, user would think their code not function properly and it's hard to debug because different page have different loading time.

According to  [web-contents.js](731edbe2b6/lib/browser/api/web-contents.js (L199))
2019-07-11 10:55:30 -05:00
Micha Hanselmann
1f70dfbffd chore: deprecate setHighlightMode (#19202) 2019-07-11 10:11:46 -05:00
Micha Hanselmann
06d48514c6 add toolTip property for MenuItem (#19099) 2019-07-11 17:56:22 +09:00
Julien Isorce
8b31953d40 feat: Can a window always on top but behind the taskbar on Win32 (#18982)
For now it only adds the ability to place the window below
the task bar while still being always on top.
Previous behaviour was always showing the window above the task
bar when top is true. We keep this default behaviour, i.e. when
the 'level' parameter is omitted.

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

Notes: Can set a window always on top but behind the taskbar on Windows
2019-07-10 09:40:11 -05:00
Cheng Zhao
faa2710485 fix: do not wait on promise returned by remote APIs (#18990)
* fix: make <webview>.loadURL async

* docs: webview.loadURL returns Promise
2019-07-10 08:20:28 -05:00
Micha Hanselmann
62a3666773 remove non-existent event (#19126) 2019-07-09 17:45:18 +03:00