Commit graph

237 commits

Author SHA1 Message Date
Kevin Sawicki
daea448b61 .coffee -> .js 2016-05-23 15:14:55 -07:00
Kevin Sawicki
7929daa48c Pass both callback values to then 2016-05-23 15:07:01 -07:00
Cheng Zhao
9f858e1243 Merge branch 'master' into chrome51 2016-05-23 19:49:43 +09:00
Cheng Zhao
9d82041923 Fix js lint warnings 2016-05-23 16:15:39 +09:00
Cheng Zhao
d6f9e57e33 Fix chrome.devtools not available in devtools extensions 2016-05-23 16:04:37 +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
Cheng Zhao
67d9ae27c3 Remove the JavaScript wrapper for setContextMenu 2016-05-20 16:18:38 +09:00
Cheng Zhao
8ac93e02c6 Merge pull request #5616 from electron/inherit-zoom
Inherit zoomFactor in webview
2016-05-20 00:27:06 +00:00
Cheng Zhao
4193fb1742 Merge pull request #5617 from electron/dont-return-from-on-functions
Remove returns from event listeners
2016-05-20 00:26:29 +00:00
Cheng Zhao
844f9e989b Merge pull request #5611 from jviotti/fix/invalid-archive-asar-exec
Override `child_process.execFile` asar patch for `child_process.exec`
2016-05-20 00:24:10 +00:00
Kevin Sawicki
cc7395eea8 Remove returns from event listeners 2016-05-19 15:28:08 -07:00
Kevin Sawicki
4754e4aabb Add zoomFactor to guest params 2016-05-19 14:32:16 -07:00
Kevin Sawicki
fef2f789cd 🎨 2016-05-19 14:30:53 -07:00
Juan Cruz Viotti
1a27ecdad4 Override child_process.execFile asar patch for child_process.exec
NodeJS implements `child_process.exec` by simply passing the whole
command to `child_process.execFile`. See:

- https://github.com/nodejs/node/blob/master/lib/child_process.js#L90
- https://github.com/nodejs/node/blob/master/lib/child_process.js#L99

Electron patches `child_process.execFile` to add support for `asar`
archives by injecting logic that extracts the required files from the
`asar` to a temporary location before delegating the work to the
original `child_process.execFile`.

In order to decide whether to inject the custom `asar` extracting logic,
Electron makes use of a helper function called `splitPath()`. See:

- https://github.com/electron/electron/blob/master/lib/common/asar.js#L37

If the first argument of the returned array equals `true`, means that
the path is considered to be an `asar` archive, and thus the extraction
logic takes place. The problem is that if the command passed to
`child_process.execFile` *contains* a path to an asar archive, padded
with other commands/arguments, `splitPath()` will consider it to be an
`asar` archive, and will try to extract it, throwing a rightfully
`Invalid package` error.

Fixes: https://github.com/electron/electron/issues/5571
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-19 17:19:36 -04:00
Bruno Queiros
046cb0df8d 🎨 Use the same stack trace for both cases 2016-05-18 19:02:42 -03:00
Bruno Queiros
06e3e65c1b 🎨 Improve error message 2016-05-18 11:00:08 -03:00
Cheng Zhao
87c10b3ac2 Make non-public module accesible via remote 2016-05-18 13:57:48 +09:00
Cheng Zhao
90f52169af No more need to check for nodeIntegration when creating guest view 2016-05-17 17:06:02 +09:00
Cheng Zhao
c1399f9bdc Disable webview when nodeIntegration is off 2016-05-17 16:51:06 +09:00
Cheng Zhao
ecbb088ea6 Merge pull request #5542 from stevekinney/standardize-requires
Standardize requires
2016-05-16 10:42:12 +09:00
Steve Kinney
0d3d097ce8 💄 Standarize requires in JavaScript API 2016-05-15 09:41:30 -04:00
Steve Kinney
2317b56ac4 💄 Make the power-save-blocker a bit more concise 2016-05-15 09:36:13 -04:00
Ben Gotow
84cce6c2c1 Don't default to "Open", "Save", just let OS decide 2016-05-15 01:03:32 -05:00
Ben Gotow
40c531737d Add buttonLabel param to showOpen/showSave dialogs 2016-05-15 01:03:32 -05:00
Cheng Zhao
88f3c34412 Merge pull request #5532 from stevekinney/patch-2
💄 Use ES6; clean up CoffeeScript conversion in BrowserWindow module
2016-05-15 12:38:28 +09:00
Steve Kinney
fd9c9c3be7 💄 Use spread operator instead of arguments object 2016-05-14 22:33:21 -04:00
Steve Kinney
236810a923 💄 Use ES6; clean up CoffeeScript conversion
💄 Destructure app module

Address linting errors
2016-05-14 22:33:20 -04:00
Cheng Zhao
88dc73ec3f Merge pull request #5533 from stevekinney/patch-3
💄 Destructure globalShortcut module
2016-05-15 11:16:19 +09:00
Steve Kinney
c11d18fe06 💄 Destructure globalShortcut module
💄 Remove globalShortcut property

Add back the globalShortcut property
2016-05-14 21:53:42 -04: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
064af6ecb2 Merge branch '1-0-release' 2016-05-11 22:11:08 +09:00
Cheng Zhao
759a46f3d6 Use DoubleIDWeakMap for |rendererFunctions| 2016-05-11 20:40:48 +09:00
Kevin Sawicki
a32f50ef64 Use arrow function for this binding 2016-05-11 12:54:52 +02:00
Kevin Sawicki
1b2b7fc4ce Listen for devtools-opened on webContents 2016-05-11 12:48:46 +02:00
Cheng Zhao
49ac160ff7 Move createIDWeakMap to v8Util 2016-05-11 19:30:06 +09:00
Cheng Zhao
04d59991b0 Use create function instead of IDWeakMap constructor 2016-05-11 16:15:32 +09:00
Cheng Zhao
2cd41b2f84 Merge branch 'master' of https://github.com/electron/electron 2016-05-11 15:15:15 +09:00
Cheng Zhao
0f52a6da39 Merge branch '1-0-release' 2016-05-11 15:14:56 +09:00
Cheng Zhao
ed70a11ff8 Merge pull request #5477 from danhp/download-bounce
Add API: app.dock.downloadFinished(filePath)
2016-05-11 09:41:08 +09:00
Daniel Pham
6dae07b76f Add API: app.dock.downloadFinished(filePath) 2016-05-10 15:02:56 -04:00
Cheng Zhao
566bb1f708 Turn the exception in protocol.registerStandardSchemes to warning 2016-05-10 09:53:35 +09:00
Cheng Zhao
ab3122ef2a No need to keep the deprecated APIs
They will be removed in next release.
2016-05-10 09:53:35 +09:00
Cheng Zhao
af0afecb45 Merge pull request #5406 from deepak1556/protocol_standard_scheme_patch
protocol: fix registerStandardSchemes api
2016-05-09 09:12:35 +09:00
deepak1556
70dac71639 delay protocol object creation 2016-05-08 16:44:14 +05:30
deepak1556
0f2ae385ed allow protocol module initialization before app ready.
* ensure registerStandardSchemes can only be called before app ready
 * ensure other protocol methods can only be used after app ready
2016-05-08 01:36:34 +05:30
Steve Kinney
91220f2a98 💄 Simplify conditional check for BrowserWindow 2016-05-07 09:13:40 -06:00
Steve Kinney
f3e633eb2c 💄 Use destructuring to shift arguments 2016-05-07 08:55:26 -06:00
Steve Kinney
6708e2a302 💄 Cache last argument in parseArgs
This is to eliminate the need to access the array twice.
2016-05-07 08:52:52 -06:00
Cheng Zhao
fd432ddbc9 Fix the toDataUrl call in desktopCapturer 2016-05-06 10:12:56 -07:00
Kevin Sawicki
7685380105 Remove crashed event forwarding 2016-05-06 10:12:56 -07:00
Kevin Sawicki
56cd57872c Remove BrowserWindow events now on WebContents 2016-05-06 10:12:56 -07:00
Kevin Sawicki
f2d8eadf4e Remove deprecated prototol APIs 2016-05-06 10:12:55 -07: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
814ae7b4a4 🎨 2016-05-06 10:12:55 -07:00
Kevin Sawicki
d627ead273 Remove linter errors 2016-05-06 10:12:55 -07:00
Kevin Sawicki
16d4c436cb Keep exporting deprecate/deprecations 2016-05-06 10:12:55 -07:00
Kevin Sawicki
7ad86a12b4 Remove empty _init 2016-05-06 10:12:54 -07:00
Kevin Sawicki
2ce4237083 Remove hideInternalModules API 2016-05-06 10:12:54 -07:00
Kevin Sawicki
dafa14fe42 Don't export deprecate API 2016-05-06 10:12:54 -07:00
Kevin Sawicki
bf91410a22 Remove deprecated main process ipc module 2016-05-06 10:12:54 -07:00
Kevin Sawicki
d988cae16d Remove deprecated ipc module 2016-05-06 10:12:53 -07:00
Kevin Sawicki
a6cf7a1095 Remove deprecated crashReporter.start options 2016-05-06 10:12:53 -07:00
Kevin Sawicki
6f0471f6cb Remove deprecated options check in BrowserWindow 2016-05-06 10:12:53 -07:00
Kevin Sawicki
0342db9328 Remove hyphenated options 2016-05-06 10:12:53 -07:00
Kevin Sawicki
dae68be2ce Remove deprecated APIs 2016-05-06 10:12:53 -07:00
deepak1556
4e6b148eaa webContents: fix executejavascript when called before page load 2016-04-28 01:54:08 +05:30
Cheng Zhao
06cf0406fe Dereference remote objects with native code
Previously we rely on the v8util.setDestructor to dereference the remote
objects in JavaScript, however as documented in V8, it is forbidden to
call V8 APIs in object's destructor (e.g. the weak callback), and doing
so would result in crashs.

This commit removes the JavaScript setDestructor method, and avoids
doing the dereference work with V8.
2016-04-26 16:16:22 +09:00
Cheng Zhao
570dc7ca9b Merge branch 'MarshallOfSound-master' 2016-04-26 11:15:56 +09:00
Samuel Attard
315cd9d2c8 Emit an error if quitAndInstall is called without an update being available 2016-04-26 11:55:57 +10: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
Cheng Zhao
13f8599ba1 Add systemPreferences module 2016-04-25 11:32:33 +09:00
Kevin Sawicki
08e18d46ea Merge pull request #5244 from electron/disable-node-in-web-view-when-disabled-in-parent
Disable node in webviews when disabled in parent window
2016-04-22 09:05:58 -07:00
Felix Rieseberg
c0f63eed4e 🎨 Windows Store Camels 2016-04-21 19:11:25 -07:00
Kevin Sawicki
8e7bf1051d Disable node integration on webview when disabled on window 2016-04-21 11:52:10 -07:00
Cheng Zhao
c92e622ce0 Merge pull request #5238 from electron/felix/appx-detection
Add Windows Store Detection
2016-04-21 16:21:38 +09:00
Felix Rieseberg
2a2a8d3263 Add Windows Store Detection
If we're running as a Windows Store appx package,
`process.windowsstore` will be `true`, otherwise
`undefined`.
2016-04-21 00:02:03 -07:00
Cheng Zhao
b5c1db9ad9 Guard against unexist owner when removing ref to remote object 2016-04-21 11:23:20 +09:00
Cheng Zhao
aa29dc0c8a Merge pull request #5199 from Mr0grog/5183-disambiguate-loading-from-main-frame-loading
Add `isLoadingMainFrame()` to WebContents
2016-04-20 20:49:56 +09:00
Cheng Zhao
680652d01c buffer, null, array etc. all belong to object 2016-04-20 14:32:32 +09:00
Cheng Zhao
ff1b7d18f6 Cleanup the code determining value's type 2016-04-20 14:26:49 +09:00
Rob Brackett
64a84dee3b Add isLoadingMainFrame method to WebContents.
Also switch `webContents.executeJavaScript` to check it instead of `isLoading`.
There doesn’t seem to be a reasonable public way to get this information out of Chromium, so it’s synthesized here based on WebContentsObserver callbacks.
Fixes #5183.
2016-04-18 10:37:08 -07:00
Cheng Zhao
cb947873c4 Merge pull request #5161 from electron/felix/iss5097
AutoUpdate Windows: Don't spawn if running
2016-04-15 20:10:03 +09:00
Felix Rieseberg
a5b93211e6 AutoUpdate Windows: Don't spawn if running
Previously, the auto updater would run as many squirrel processes
as told. This introduces a little change where instead of spawning
a second process, we attach to the already running process - or, if
different arguments are passed, return and emit an error.

This is not failsafe, but it ensures that we don't run into simple
race condition crashes.

Closes $5097
2016-04-14 11:22:28 -07:00
Cheng Zhao
31eb793fb0 Avoid adding a new option to webPreferences 2016-04-14 10:50:07 +09:00
Cheng Zhao
8f0e594007 Fix lint warnings 2016-04-13 23:10:31 +09:00
Cheng Zhao
43c44da50b Correctly set initial visibilityState 2016-04-13 23:07:28 +09:00
Cheng Zhao
07a4c52919 Reduces the IPC messages used for visibilityState 2016-04-13 21:36:43 +09:00
Cheng Zhao
92882c358a No more need to delay did-fail-load event 2016-04-13 19:33:59 +09:00
Cheng Zhao
2fbe06a2a5 Handle the Page.reload command coming from devtools 2016-04-12 16:36:12 +09:00
Cheng Zhao
a07612c1ed Merge branch '5074-did-get-response-details-resource-type' of https://github.com/Mr0grog/electron into Mr0grog-5074-did-get-response-details-resource-type 2016-04-11 21:05:40 +09:00
Rob Brackett
15b042b5f6 Add support/tests for did-get-response-details event on <WebView> 2016-04-08 12:55:20 -07:00
Kevin Sawicki
732697a8a2 Rename ATOM_SHELL_ASAR to ELECTRON_ASAR 2016-04-08 08:53:58 -07:00
Kevin Sawicki
8d8d5878a3 Rename ATOM_ ipc event prefix to ELECTRON_ 2016-04-07 09:04:55 -07:00
Rob Brackett
f12f87d6f0 Add isMainFrame as last argument to WebContents did-fail-load event.
Fixes #5013.
2016-04-04 19:26:06 -07:00