Samuel Attard
92588be2bd
refactor: add promise helper and change whenReady to be native impl ( #13115 )
...
* Add promise helper and change whenReady to be native impl
* remove commented code
* add GetInner helper to dedupe promise code
* add Promise.reject helper to be consistent with JS
* fix linting
* update promise impl per feedback
* remove param name from unused isolate
* Use non-depreceated resolvers for promises
* Add thread dchecks for promise helper, intiialize promise pointer to nullptr
2018-06-27 16:06:08 -05:00
Shelley Vohr
f9e2ec43d0
fix: deprecate properties in app.getAppMetrics() ( #13446 )
...
* fix: deprecate properties in app.getAppMetrics()
* address feedback from review
* fix deprecated property location
* simplify test
2018-06-26 23:47:01 -07:00
Shelley Vohr
daf75dd375
add app.isPackaged ( #12656 )
...
* add isPackaged method
* add false test case for app.isPackaged()
* document add.isPackaged()
* check isPackaged() without fs call
* convert to non-method property
* document app.isPackaged as a property
* update tests for app.isPackaged
* remove unused fs require
* clarify docs for isPackaged()
2018-05-07 23:15:31 -07:00
Samuel Attard
5b5c161601
feat: new makeSingleInstance API ( #12782 )
...
* Refactor app.makeSingleInstance
* new API `app.isPrimaryInstance()`
* new API `app.isSingleInstance()`
* new event `app.on('second-instance')`
* deprecated old syntax `app.makeSingleInstance(cb)`
* deprecated old syntax of `app.makeSingleInstance() --> bool` in favor
of `app.isPrimaryInstance()`
* Fix spec, we don't need process.nextTick hacks any more
* Make deprecation TODO for the return value of makeSingleInstance
* Refactor makeSingleInstance to requestSingleInstanceLock and add appropriate deprecation comments
* I swear this isn't tricking the linter
* Make const
* Add deprecation warnings for release, and add to planned-breaking-changes
BREAKING CHANGE
2018-05-08 01:29:18 +10:00
Alexey Kuzmin
fcc82ebd35
Add "app.whenReady()" ( #12652 )
...
* Make "chai-as-promised" avaialble in tests
* Add "app.whenReady()"
Closes #9561 .
2018-04-20 17:09:23 +10:00
Cheng Zhao
35cbe9d140
Fix dockMenu not being referenced in JavaScript ( #12062 )
...
* Fix dockMenu not being referenced in JavaScript
* spec: Test garbage collecting dock menu
2018-02-26 22:15:06 -08:00
Charles Kerr
1c09dede1a
singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor
2017-11-01 23:05:27 -05:00
Ryohei Ikegami
4a7eec8f2d
Pass app path as command line argument
2017-04-04 09:36:01 +09:00
Kevin Sawicki
c8ff67ab75
Use spread syntax instead of function apply
2016-12-01 14:56:00 -08:00
Kevin Sawicki
48fd2bd35f
binding -> bindings
2016-09-19 09:31:59 -07:00
Felix Rieseberg
29fa48d8c3
🔧 Ensure correct types for commandLine
...
This commit ensures that arguments passed to `appendSwitch` and `appendArgument` are turned into strings before passing them over to the binding.
2016-09-19 09:31:59 -07:00
Felix Rieseberg
90bff4d9de
🔧 Ensure correct types for commandLine
...
This commit ensures that arguments passed to `appendSwitch` and `appendArgument` are turned into strings before passing them over to the binding.
2016-09-19 09:31:59 -07:00
Cheng Zhao
844f32aa36
Set prototype of constructor directly
2016-08-02 20:38:35 +09:00
Cheng Zhao
6e0cde5b24
All native objects have prototype now
2016-08-02 17:12:17 +09:00
Gabriel Handford
7bde92deb9
Add isVisible() to app.dock
2016-08-01 15:22:37 -07:00
Jonas Schwabe
768ff7af5a
Add additional method isUnityRunning, fix multiple typos in docs
2016-06-29 20:22:17 +02:00
Jonas Schwabe
e2d389fbd4
Rename the unityLauncher api to launcher and make it available on linux in general. + Document it only works on ubuntu
2016-06-29 20:22:17 +02:00
Jonas Schwabe
e3ba6818af
Fix linter errors
2016-06-29 20:22:17 +02:00
Jonas Schwabe
b22ce93477
Implement libunity launcher badge counter to be set via electron, fixes #4193
2016-06-29 20:22:17 +02:00
Kevin Sawicki
be642612c0
Export app before requiring modules
2016-06-22 15:21:45 -07:00
Cheng Zhao
5bb8da6073
Explicitly initialize session before webContents
2016-06-01 14:57:35 +09:00
deepak1556
f68d0f324f
deprecate app.allowNTLMCredentialsForAllDomains
2016-05-23 11:44:21 +05:30
deepak1556
62cad610e0
bring back app.allowNTLMCredentialsForAllDomains
2016-05-23 01:52:09 +05:30
Kevin Sawicki
cc7395eea8
Remove returns from event listeners
2016-05-19 15:28:08 -07:00
Steve Kinney
b1275420a3
Require download_items inline
2016-05-14 19:43:30 -04:00
Steve Kinney
e5036c0988
Use anonymous function for wrapping native classes
2016-05-14 12:28:28 -04:00
Steve Kinney
0785c3bd15
💄 Add spaces to comply with Standard
2016-05-14 11:31:08 -04:00
Steve Kinney
5dc88aa543
💄 Add ES6; Clean up from CoffeeScript conversion
2016-05-14 11:17:46 -04:00
Cheng Zhao
2cd41b2f84
Merge branch 'master' of https://github.com/electron/electron
2016-05-11 15:15:15 +09:00
Daniel Pham
6dae07b76f
Add API: app.dock.downloadFinished(filePath)
2016-05-10 15:02:56 -04:00
deepak1556
14661819c2
move session wrapper to webcontents
2016-05-06 10:12:55 -07:00
Kevin Sawicki
30b60516fe
Initialize session explicitly
2016-05-06 10:12:55 -07:00
Kevin Sawicki
d627ead273
Remove linter errors
2016-05-06 10:12:55 -07:00
Kevin Sawicki
dae68be2ce
Remove deprecated APIs
2016-05-06 10:12:53 -07:00
Cheng Zhao
a421c66f3f
Deprecate the platform-theme-changed event
2016-04-25 14:35:34 +09:00
Cheng Zhao
ddd8eae661
Move isAeroGlassEnabled and isDarkMode to systemPreferences
2016-04-25 12:35:09 +09:00
Zeke Sikelianos
42e7ee2b4a
finish standardizing!
2016-03-30 17:00:33 -07:00
Zeke Sikelianos
4e2f1311e0
replace __proto__ with Object.setPrototype
2016-03-30 17:00:33 -07:00
Zeke Sikelianos
4794385fac
first pass at standardizing; suite still passing!
2016-03-30 17:00:30 -07:00
Kevin Sawicki
8889c29866
Use rest parameters
2016-03-18 11:51:02 -07:00
Kevin Sawicki
a3f08c9b51
Use arrow functions to replace old CoffeeScript => this wrappers
2016-03-11 11:25:56 -08:00
Kevin Sawicki
70aa9b06ee
Move JavaScript to root lib/ folder
2016-03-08 11:14:21 -08:00