Commit graph

1114 commits

Author SHA1 Message Date
Samuel Attard
6318cd781d Update to use Squirrel.Mac that supports CDN releases 2018-02-15 14:00:46 +11:00
acheronfail
d1d50a4c92 Implement App-Scoped Security scoped bookmarks (#11711)
* implementation of security scoped bookmarks

* option is now only available on mas builds
2018-02-12 13:25:06 -05:00
Samuel Attard
66b57858b8 Fix child touch bar items not updating (#11812)
* Fix child touch bar items not updating

Deep children of a TouchBar didn't cause the top level touch bar to update, now they do

Fixes #11761.

* Remove unused newValue property in TB setter
2018-02-12 12:53:04 -05:00
kaylie
3c64062f69 Replace custom function with Object.values() 2018-02-05 20:03:28 -08:00
shelley vohr
5240352326 Remove extra menu separators (#11827)
* add function to remove leading/trailing separators

* change const  name for clarity

* add spec to check filtered separators

* clean method and add edge case spec per review
2018-02-05 11:55:12 -06:00
Cheng Zhao
8ae3d9dd0b Simplify the public PowerObserver interface 2018-02-05 15:28:58 +09:00
Thiago de Arruda
56b53e71aa Implement powerMonitor 'shutdown' event for Linux.
The event is emitted when the OS is rebooting/shutting down, and allows
an electron app to call `e.preventDefault()` in order to delay shutdown
and exit cleanly.
2018-02-05 15:21:31 +09:00
Felix Rieseberg
d586ef2f39 feature: Hot security tips (#11810)
* 🔧 Add security issue detection (and logs)

* 🔧 Check for it on load

* 👷 Add some tests

* 👷 Make the linter happy

* 🔧 Allow them to be enabled by force

* 📝 Make message slightly prettier

* 🔧 Fix a typo in the code comment

* 🔧 Classic mistake

* 🚀 Optimize things a bit more

* 👷 Add tests, fix tests

* 📝 Document things

* 🔧 Make linter happy

* 🔧 One more piece of cleanup
2018-02-03 07:50:12 -07:00
shelley vohr
1545a95782
Merge pull request #11799 from electron/browserview-inherit-fix
Don't inherit isBrowserView preference
2018-02-01 14:36:56 -05:00
Shelley Vohr
db6d84de74
don't inherit isBrowserView for spawned child windows 2018-02-01 00:09:37 -05:00
Shelley Vohr
b74304145e
createShadowRoot => attachShadow 2018-01-31 19:29:23 -05:00
Samuel Attard
32a1395bcf
Merge pull request #11565 from electron/add-load-file-helper
Add window.loadFile and webContents.loadFile helper methods
2018-01-23 09:08:23 +11:00
Cheng Zhao
bd271cffb9 Throw when inAppPurchase is used on unsupported platforms 2018-01-10 18:53:55 +09:00
Cheng Zhao
ac6f895f64 Turn InAppPurchase into an EventEmitter 2018-01-10 16:37:05 +09:00
Adrien Fery
b2542a27c3 Update code style 2018-01-10 13:14:18 +09:00
Adrien Fery
eb2520488f Adapt code style 2018-01-10 13:14:18 +09:00
Adrien Fery
f3ae566164 Add in-app purchase for MacOS 2018-01-10 13:14:18 +09:00
Zeke Sikelianos
eb89e12c5b
Merge pull request #11532 from sethlu/camelcase-menuitem-role
Make MenuItem roles camelCase-compatible
2018-01-04 09:53:58 -08:00
Samuel Attard
1553b54779
Add window.loadFile and webContents.loadFile helper methods 2018-01-04 11:38:56 +13:00
Cheng Zhao
46330ac2a9 Remove the closed event of Menu
The callback of Menu.popup does more things, and there is actually no
request for the closed event.
2018-01-01 17:22:07 +09:00
Cheng Zhao
73d78d345a Make callback work for old-style Menu.popup call
While the old-style Menu.popup has been deprecated, it is still being
used widely in apps and even in Electron itself.
2018-01-01 17:17:01 +09:00
Cheng Zhao
7b01a8b860 Add callback parameter to Menu.popup 2018-01-01 16:26:19 +09:00
Zhuo Lu
b8ec84c761 Fix syntax 2018-01-01 02:23:32 +08:00
Zhuo Lu
d45914c3f7 MenuItem roles camelCase-compatible 2017-12-28 13:28:20 +08:00
Kyle Corry
5aac091f40
Add Support for Pop!_OS GNOME Session
Similar to this PR: https://github.com/electron/electron/pull/10355 , Pop!_OS suffers from the same problem. Using Ubuntu AppIndicator will not show the icon currently unless the XDG_CURRENT_DESKTOP variable is modified. This commit will add support for pop so that this workaround is not needed. 

Ref: https://github.com/pop-os/pop/issues/84
2017-12-21 14:16:15 -05:00
Cheng Zhao
088042841d win: Correctly close popup menu 2017-12-21 15:26:32 +09:00
Cheng Zhao
e4770c7604 Coding style fixes 2017-12-20 18:48:09 +09:00
Heilig Benedek
c586806609 fix flash menu being unresponsive to commands 2017-12-20 15:40:07 +09:00
Felix Rieseberg
8166a64f98 🔧 Last round of feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
c4ec8b4545 🔧 Feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
5b7f7c8a1a 🔧 Menu returns its properties now 2017-12-12 11:25:01 -08:00
Felix Rieseberg
ffc54967e9 🔧 Fix value shift 2017-12-12 11:25:01 -08:00
Felix Rieseberg
99031834ff 🔧 Cleanup 2017-12-12 11:25:01 -08:00
Felix Rieseberg
3719ee0b53 🔧 Allow for menu.popup({}) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
9e660b1d32 🔧 Always find a window (or error) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
4f901c6d24 🔧 Oh wow, that looks wrong 2017-12-12 11:25:01 -08:00
Alexey Kuzmin
1c8eb03574
Revert "fix: Fix menu.popup() bugs" 2017-12-12 13:59:34 +03:00
Felix Rieseberg
927c63b477 🔧 Last round of feedback 2017-12-11 15:19:33 -08:00
Felix Rieseberg
89b90be6a2 🔧 Feedback 2017-12-11 14:43:35 -08:00
Felix Rieseberg
22e9d665d2 🔧 Menu returns its properties now 2017-12-11 14:03:01 -08:00
Felix Rieseberg
93b46116f4 🔧 Fix value shift 2017-12-11 13:30:35 -08:00
Felix Rieseberg
abd56eda6f 🔧 Cleanup 2017-12-08 14:40:51 -08:00
Felix Rieseberg
955564abd7 🔧 Allow for menu.popup({}) 2017-12-08 14:37:16 -08:00
Felix Rieseberg
bd6767fac6 🔧 Always find a window (or error) 2017-12-08 14:36:52 -08:00
Felix Rieseberg
38bb9baac5 🔧 Oh wow, that looks wrong 2017-12-08 14:36:29 -08:00
Shelley Vohr
24f60dcd1b
re-add warning removed in https://github.com/electron/electron/pull/11013 2017-12-07 11:42:18 -05:00
Cheng Zhao
46f79146ad
Merge pull request #11316 from electron/hide-update-exe
fix: Ensure that update.exe doesn't open up a console window
2017-12-06 14:50:12 +09:00
Cheng Zhao
cb3a9c69ab Add a SessionPreferences to manage session related data
By design the BrowserClient should not be aware of the api:: classes.
2017-12-05 15:59:15 +09:00
Samuel Attard
d9359d8b6c s/global/session in constants 2017-12-05 11:35:53 +09:00
Samuel Attard
d2707315e6 s/global/session 2017-12-05 11:35:53 +09:00
Samuel Attard
0ddd078aaf Add ability to set global preload scripts 2017-12-05 11:35:27 +09:00
Felix Rieseberg
9646f0c99a 🔧 Sprinkle some ES6 across the file 2017-12-01 17:18:57 -08:00
Felix Rieseberg
c5abe96b39 🔧 Hide subprocess window 2017-12-01 17:18:37 -08:00
Cheng Zhao
59476f0b30 Create webContents for webview even when src is not set 2017-12-01 10:35:23 +09:00
Cheng Zhao
b161a4f515
Merge pull request #11166 from sethlu/openrecent
feat: Recent documents menu item
2017-11-28 10:55:14 +09:00
Zhuo Lu
dcdc3621ac Rename roles 2017-11-27 17:26:22 +09:00
Zhuo Lu
5d44dbaf54 Redesign recent documents role API
- For more flexibility in designing the recent documents menu, now there can be one menu item (known issue: you may specify more but AppKit doens't display more than one) in the submenu list, rather than separating the labels with a tab.
- Also added is the role `clearrecent` that can be given to a menu item that can clear the recent documents.
2017-11-27 17:26:22 +09:00
Zhuo Lu
828d233f2a Rollback duplicated feature 2017-11-27 17:26:22 +09:00
Zhuo Lu
0b9cea334f Specify "Clear Menu" through label option
Like a bit of a hack right now, conforming to the existing menu item definition
2017-11-27 17:26:22 +09:00
Zhuo Lu
4da2eb9366 Introduce openrecent role
- Does not yet accept any options except label--"Clear Menu" can't be modified through exposed node API
- If `openrecent` is present across multiple menu items, the last seen will be visible in the main menu due to that it is designed to behave like a singleton
2017-11-27 17:26:22 +09:00
Zhuo Lu
f0bff74995 Add "Open Recent" submenu to default 2017-11-27 17:26:22 +09:00
Cheng Zhao
1c0ea0286e
Merge pull request #11235 from electron/standard-10
infra: Upgrade to StandardJS 10
2017-11-27 15:42:52 +09:00
Aleksei Kuzmin
465f9009ff Update stack string parsing in the CallbacksRegistry
Fixes the "ipc module > remote listeners
> detaches listeners subscribed to destroyed renderers, and shows a warning"
test.
2017-11-24 10:58:53 +09:00
Birunthan Mohanathas
4e859b4718 Remove "async" option from menu.popup()
All menus are async now. See "Cleanup MenuRunner API"
https://codereview.chromium.org/2790773002
2017-11-24 10:58:17 +09:00
Felix Rieseberg
f7d6e3fa7b 🔧 Disable standard/no-callback-literal where necessary 2017-11-23 13:53:03 -08:00
Felix Rieseberg
f81bfb7b86 🔧 Fix style issues 2017-11-23 13:42:48 -08:00
Felix Rieseberg
451a44c4b5 🔧 Don’t use deprecated new Buffer() 2017-11-23 13:41:47 -08:00
Charles Kerr
9c217fc6c7
Merge pull request #11224 from electron/browser-view-window
feature: Add `BrowserWindow.fromBrowserView()`
2017-11-23 14:41:36 +01:00
Felix Rieseberg
037f76c47b 🐛 Ooops, fix that 2017-11-22 17:07:57 -08:00
Felix Rieseberg
4d18cbe728 🔧 BrowserView.fromWebContents() 2017-11-22 16:59:00 -08:00
Felix Rieseberg
7630ac6e90 🔧 Return null if not found 2017-11-22 15:48:11 -08:00
Felix Rieseberg
8c5aad8b17 🔧 Add BrowserWindow.fromBrowserView() 2017-11-22 14:36:54 -08:00
Felix Rieseberg
05bae0b4c4 🔧 Util is no longer used here 2017-11-20 09:52:13 -08:00
Felix Rieseberg
b029c088db 🔧 Bonus ; 2017-11-20 09:48:33 -08:00
Felix Rieseberg
b8b3b441a7 🔧 util._extend is deprecated, too 2017-11-20 09:46:02 -08:00
Felix Rieseberg
71b8eaf085 🔧 Don’t use deprecated util.is* methods 2017-11-20 09:40:47 -08:00
Felix Rieseberg
c9f2080e4b 🔧 fs.readFile: options are optional 2017-11-20 08:20:20 -08:00
Charles Kerr
5eb00e45aa
Merge pull request #11158 from electron/execute-errors
fix: Pass on errors thrown in `executeJavaScript`
2017-11-20 09:14:05 -06:00
Charles Kerr
4c04f1c7ed
Merge pull request #11117 from electron/add_deprecations_spec
Add to deprecations spec
2017-11-20 09:07:06 -06:00
Shelley Vohr
7904be8763
comment out unused methods 2017-11-20 15:12:34 +01:00
Ronald Eddy
14c6e78147 Update electron.atom.io -> electronjs.org
Update electron.atom.io -> electronjs.org to reduce redirects and speed navigation.
2017-11-19 04:01:33 -08:00
Felix Rieseberg
5b18bea7e3 🔧 Alex has good ideas 2017-11-18 10:59:09 -08:00
Felix Rieseberg
cf7e9df3a0 🔧 Appease the linter 2017-11-18 01:02:09 -08:00
Felix Rieseberg
9a2d103e7f :thinking_face: What if we made it an Error again? 2017-11-18 00:51:14 -08:00
Felix Rieseberg
1dea186a6e :thinking_face: What if you could return an Error? 2017-11-18 00:50:53 -08:00
Shelley Vohr
aaae1bb176
Merge pull request #11124 from electron/expose-desktop-capturer
Expose desktopCapturer in sandbox mode.
2017-11-16 17:36:39 -05:00
Thiago de Arruda
be0e3d9555 Expose desktopCapturer in sandbox mode. 2017-11-16 16:57:29 -03:00
Shelley Vohr
933c7330a5
changes from review 2017-11-16 13:39:07 -05:00
Shelley Vohr
75a117e4e2
edit empty function for platform consistency 2017-11-16 13:27:08 -05:00
Shelley Vohr
f5c04c7037
fix includes 2017-11-16 13:27:08 -05:00
Shelley Vohr
e5983eacd6
add callbacks registry spec 2017-11-16 13:27:07 -05:00
Shelley Vohr
dc410efa36
rename and fix assoc. test 2017-11-14 14:56:16 -05:00
Shelley Vohr
99d35f7786
a few more updates to tests 2017-11-14 13:33:38 -05:00
Shelley Vohr
d05a1f8053
first pass at deprecation spec updates 2017-11-13 20:21:57 -05:00
Heilig Benedek
cafb9477b0 lint fix 2017-11-13 15:46:46 +09:00
Heilig Benedek
13b86598e8 don't show osr dummy window when dialog is shown on mac 2017-11-13 15:46:46 +09:00
Felix Rieseberg
d475eaf011
🔧 One commit per character is now hot 2017-11-07 19:44:24 -08:00
Felix Rieseberg
3dcde82485
🔧 Make this easier to read 2017-11-07 18:26:10 -08:00
Felix Rieseberg
1454783450 🔧 Check menu for being falsy 2017-11-07 13:29:14 -08:00
Aleksei Kuzmin
bd766067ac Remove unused deprecate var to make linter happy 2017-11-04 07:52:47 +03:00