Commit graph

2453 commits

Author SHA1 Message Date
Cheng Zhao
f9d7e7ce55 Add ELECTRON_DISABLE_OLD_STYLE_MODULES env 2015-11-12 17:02:04 +08:00
Cheng Zhao
c2c09daa23 Add "electron" module 2015-11-12 16:40:27 +08:00
Cheng Zhao
0a5b234e3d Merge pull request #3354 from nishanths/master
Add drag-entered and drag-exited events to Tray
2015-11-11 22:44:05 +08:00
Cheng Zhao
60ec1ca3f7 Use new styles of browserWindow options 2015-11-11 10:37:34 +08:00
Cheng Zhao
ba457681b2 Avoid storing unrelated things in WebContentsPreferences 2015-11-11 10:37:34 +08:00
Cheng Zhao
b807685453 Deep copy the options
Otherwise a window's options is possible to be affected by others.
2015-11-11 10:37:34 +08:00
Cheng Zhao
960d325a58 Be compatible with old BrowserWindow options 2015-11-11 10:37:34 +08:00
Cheng Zhao
5cca947f4d Remove unneeded override code 2015-11-11 10:37:34 +08:00
Cheng Zhao
737e22b003 Use minWidth style for options instead of min-width 2015-11-11 10:37:34 +08:00
Cheng Zhao
d37aa8bed9 Reorder switches 2015-11-11 10:37:34 +08:00
Nishanth Shanmugham
d1e8e71e3f Tray: Add drag-end and drop events 2015-11-10 10:02:50 -06:00
Nishanth Shanmugham
f98147ea01 Tray: Rename events to drag-enter and drag-leave
Previously, the names were drag-entered and drag-exited. The new names mirror the HTML Drag and Drop event names
2015-11-10 09:27:39 -06:00
Levin Rickert
08e245e3dc Fix typo 2015-11-10 12:42:05 +01:00
Cheng Zhao
d234f10177 Implement event.sender for ipcRenderer 2015-11-10 16:59:08 +08:00
Cheng Zhao
751af25f37 Use ipcMain in Electron's code 2015-11-10 16:04:34 +08:00
Cheng Zhao
844cea8f21 Deprecate ipc module for ipcMain 2015-11-10 15:41:24 +08:00
Cheng Zhao
6515a445a0 Use ipcRenderer in Electron's code 2015-11-10 15:29:43 +08:00
Cheng Zhao
828d911ed1 Deprecate ipc module for ipcRenderer 2015-11-10 15:12:07 +08:00
Cheng Zhao
91c4ed26fc Print warnings for deprecated APIs 2015-11-09 21:51:30 +08:00
Cheng Zhao
f0bd28ca8d Do not turn off deprecation notice by default
It is v4 now, people should be punished if they are still using
deprecated Node.js APIs.
2015-11-09 21:19:16 +08:00
Cheng Zhao
89ff62b1b5 Add "deprecate" module 2015-11-09 21:19:16 +08:00
Cheng Zhao
312a79165b Bump v0.34.3 2015-11-06 21:37:37 +08:00
Cheng Zhao
d70706f876 Make sure handles of callbacks are releases on exit
Some callbacks are stored in native resources that not managed by
JavaScript, so when those resources are destroyed the JavaScript context
may already be destroyed, and releasing callbacks then would result in
crash.
2015-11-06 21:00:32 +08:00
Cheng Zhao
acf4372cf7 win: Add ELECTRON_DEFAULT_ERROR_MODE env
It is useful to help debugging crashes without opening debugger.
2015-11-06 20:25:20 +08:00
Cheng Zhao
863199348f Make process.exit() quit gracefully
Instead of abrupting the whole program immediately, we should close all
windows and release all native resources gracefully on exit. This avoids
possible crashes.

Fix #3350.
2015-11-06 20:25:20 +08:00
Nishanth Shanmugham
8a296f82a0 Tray: Remove extra qualification in header 2015-11-05 19:02:24 -06:00
Nishanth Shanmugham
818892d474 Tray: Add drag-entered and drag-exited events 2015-11-05 18:46:49 -06:00
Cheng Zhao
2505ebb9a6 win: Guard against failure of RtlAddFunctionTable
On some machines this call will fail and CHECK will abort the
application.
2015-11-05 22:00:40 +08:00
Cheng Zhao
47649ffd17 win: Fix calling showItemInFolder in renderer process 2015-11-05 20:47:27 +08:00
Tyler Gibson
4ff5ce4d6d Fixing MoveItemToTrash behavior in Windows
Modifying MoveItemToTrash for Windows to actually verify file can be
moved to a drive's recycle bin before attempting to delete it.

PR: #3337.
2015-11-05 20:42:30 +08:00
Ryan Molden
4ce840d8e6 Re-enable accessibility in Electron on Windows
In conjunction with commit 7c41f0e.
2015-11-05 19:49:48 +08:00
Cheng Zhao
d56b34de3b Make sure all native resources get freed on exit 2015-11-04 18:21:03 +08:00
Cheng Zhao
07c55f321f Destroy JS env immediately after running destruction callbacks 2015-11-04 17:31:10 +08:00
Cheng Zhao
84410a7e1c mac: Destroy the app delegate before running destruction callbacks
Otherwise users might be able to access wrapper functions after they are
destroyed.
2015-11-04 17:23:27 +08:00
Cheng Zhao
75f49477ca Cleanup wrapper function when app has done quitting
The app may still do something when quitting, we need to make sure the
wrapper function is still there at that time.
2015-11-04 16:54:36 +08:00
Cheng Zhao
441cc3e57e Style fix 2015-11-04 16:50:19 +08:00
mgarciaisaia
4013b652ff 🏁🐛 Buffer overflows in tooltips
Fixes #3290.
2015-11-04 15:34:58 +08:00
Joao Moreno
7c41f0e0e3 remove kDisableLegacyIntermediateWindow switch set 2015-11-03 16:12:01 -08:00
Cheng Zhao
1b165559f5 win: Use electron.app.$1 as default user model id
This is to keep compatibility with old apps that don't set app user
model id explicitly.
2015-11-03 15:50:43 +08:00
Cheng Zhao
7b47b70c9e Fix building on POSIX 2015-11-03 15:30:37 +08:00
Cheng Zhao
9047f81835 win: Set app user model ID in one place
Fix #3297.
Fix #2573.
2015-11-03 15:09:31 +08:00
Cheng Zhao
7c7a7b96de win: Do not set app user model id by default
When user drags exe file into taskbar directly the pinned icon will not
has an app user model id, so if we set app user model id in the
application two icons will show in the taskbar.

For apps installed with a installer it is not a problem since the
shortcut icon will be created with app user model id, but we should also
keep the ability to make portable apps work out of box.

Fix #3303.
2015-11-03 14:55:43 +08:00
Cheng Zhao
9236adfbf5 Translate menu template directly in C++ 2015-11-02 23:31:44 +08:00
Cheng Zhao
56e6b28370 Merge pull request #3288 from deepak1556/flash_context_menu_pathc
browser: handle flash context menu request
2015-11-02 21:20:44 +08:00
Cheng Zhao
f7c0418bd8 Ignore case for type of savePage 2015-11-02 21:19:00 +08:00
Cheng Zhao
647a0c4e2b Code cleanup for remote module 2015-11-02 20:28:01 +08:00
Max Claus Nunes
bbb5aef5d2 Improve error handling from remote
This way copy all properties available in the error object and keep the real stack trace
2015-10-31 21:20:54 -02:00
Robo
c969052f12 browser: handle flash context menu 2015-11-01 01:13:17 +05:30
Cheng Zhao
cb91d4487b Clean up the code handling renderer callback 2015-10-31 15:00:06 +08:00
Cheng Zhao
323ab92299 Merge pull request #3251 from deepak1556/remote_callback_patch
remote: track listeners on browser side
2015-10-31 14:18:58 +08:00
Robo
2c59f4567e use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
Antonio Scandurra
9c69877421 Allow v8 to optimize fs.readFileSync 2015-10-30 10:30:27 +01:00
Cheng Zhao
21a7c459d8 Bump v0.34.2 2015-10-30 14:50:57 +08:00
Robo
3a154ab8ea add line and column values to callback id 2015-10-29 21:21:30 +05:30
Robo
ac4df34ecd create binding to idweakmap 2015-10-29 17:51:56 +05:30
Robo
eae7c840b7 use idweakmap for holding callbacks in browser 2015-10-29 17:51:56 +05:30
Robo
62d15953ff remote: track listeners for browser side 2015-10-29 17:51:56 +05:30
Cheng Zhao
917b33dbe7 Small code cleanup 2015-10-29 10:55:08 +08:00
Cheng Zhao
0f89f67a84 Merge pull request #3254 from templateK/master
Fix remove boolean parameter at IsSwitchEnabled function
2015-10-29 10:54:56 +08:00
Cheng Zhao
bf9e6ba11e Merge pull request #3256 from omrilitov/master
Use WPARAM as uint64_t and LPARAM as int64_t
2015-10-29 10:41:11 +08:00
Omri Litov
ef038257d1 Returns buffer instead of WPARAM and LPARAM 2015-10-29 03:00:44 +02:00
Omri Litov
f22837523f Use WPARAM as uint64_t and LPARAM as int64_t 2015-10-28 21:54:50 +02:00
taemu
16eafdb0ce Fix remove boolean parameter at IsSwitchEnabled function 2015-10-29 03:22:08 +09:00
Cheng Zhao
51ba37440d Guard against multiple calls of auth 2015-10-28 21:20:08 +08:00
Cheng Zhao
569e87035a Also emit "login" on WebContents 2015-10-28 21:00:39 +08:00
Cheng Zhao
f40a3f72d7 Converted callback can only be called for once 2015-10-28 20:44:46 +08:00
Cheng Zhao
4eac6b31b1 Also pass "webContents" in "login" event 2015-10-28 20:23:18 +08:00
Cheng Zhao
131531219e Pass auth_info and request in "login" event 2015-10-28 20:13:06 +08:00
Cheng Zhao
d05255179a Add login event for "app" module 2015-10-28 19:54:59 +08:00
Cheng Zhao
54dad72d92 Don't leak TranslaterHolder 2015-10-28 19:54:59 +08:00
Cheng Zhao
9847747736 Use the callback converter in JsAsker 2015-10-28 19:54:59 +08:00
Cheng Zhao
3881ad1c4b Don't leak FunctionTemplate when converting C++ callback 2015-10-28 19:54:59 +08:00
Cheng Zhao
9df89cf79b Add dummy LoginHandler 2015-10-28 19:54:59 +08:00
Cheng Zhao
b86267aa3b Use uint64_t instead of LPARAM
LPARAM is defined to differnt types on differnt machines with different
SDKs, so there is no way to represent it on all platforms safely, using
uint64_t seems to be the only safe choice.
2015-10-28 19:51:24 +08:00
Cheng Zhao
5fd310c75f Add converter for LPARAM 2015-10-28 19:43:05 +08:00
Cheng Zhao
c9b53a6e8b Merge pull request #3240 from atom/reland-win-remove-wildcard-extension
Reland win remove wildcard extension
2015-10-27 20:52:43 +08:00
Cheng Zhao
142f380376 Merge pull request #3231 from omrilitov/master
Hooking windows messages
2015-10-27 20:48:19 +08:00
Haojian Wu
f69bafd48a Win: Fix adding '.*' to filename in callback. 2015-10-27 20:15:43 +08:00
Haojian Wu
fa24e15d8b Win: Remove adding '*.*' to file name in a save dialog. 2015-10-27 20:15:20 +08:00
Omri Litov
e355532d27 Change windows messages api to hook instead of emitter 2015-10-27 14:00:08 +02:00
Cheng Zhao
dacd921a04 Revert "Win: Remove adding default file filter(*.*) in a save dialog."
This reverts commit 00493f64b7.
2015-10-27 14:58:44 +08:00
Cheng Zhao
3042f604cc Merge pull request #3234 from atom/win-remove-default-filter
Win: Remove adding default file filter(*.*) in a save dialog.
2015-10-27 14:30:35 +08:00
Haojian Wu
00493f64b7 Win: Remove adding default file filter(*.*) in a save dialog. 2015-10-27 13:10:34 +08:00
Omri Litov
edbebf84b9 Added browser-window event 'message' 2015-10-27 03:12:01 +02:00
Gohy Leandre
b29a8c94b9 Add extra headers option to webContents.loadUrl 2015-10-26 22:18:16 +01:00
Cheng Zhao
f399f50e9e Fix calling showItemInFolder in renderer
The remote method always assumes the existence of the remote object but
doesn't keep a reference to it, so if we only keep the reference of a
remote method we will get into troubles once the remote object is
garbage collected.

We should probably fix this in remote module, but since most things are
already working quite good, I'm using the work-around for now.

Fix #3139.
2015-10-26 16:48:27 +08:00
Robo
70fe169b0f nativemate: use maybe version of v8::Function::Call to avoid exceptions 2015-10-26 10:59:40 +05:30
Cheng Zhao
30ec7fdeed Bump v0.34.1 2015-10-23 20:32:02 +08:00
Cheng Zhao
fae2c7bc7a win: Make auto-updater really work
Apparently that PR was never tested.
2015-10-23 19:41:54 +08:00
Cheng Zhao
aeafc46ded Keep compatibility with old API style 2015-10-23 15:50:55 +08:00
Cheng Zhao
f89d28a63e Simplify the auto-updater implementations
We used to use Sparkle on OS X, and the design was reserved to be
extended to all platforms, which are all wrong now.
2015-10-23 15:40:56 +08:00
Cheng Zhao
d74ef5c078 Move implementation of auto-updater on OS X to another file 2015-10-23 15:13:24 +08:00
Cheng Zhao
85c84a0eb0 Emit Date object in C++ directly 2015-10-23 14:58:19 +08:00
Cheng Zhao
a3f62da615 Fix passing Date object in remote
Close #2017.
2015-10-23 14:51:41 +08:00
Cheng Zhao
95fe4beda8 Pass real Error object in error event 2015-10-23 14:37:35 +08:00
Cheng Zhao
d5c964c68c Fix passing Error object in remote
Closes #3089
2015-10-23 14:37:28 +08:00
Cheng Zhao
07adbc8e8a Merge pull request #1984 from patrickdet/windows-auto-updater
Windows Auto Updater
2015-10-23 13:54:29 +08:00
Cheng Zhao
e36d455d51 Add setBackgroundColor method 2015-10-23 11:35:33 +08:00
Cheng Zhao
4a6134f3f7 win: Set native window's background color 2015-10-23 11:17:14 +08:00
Cheng Zhao
6182e4ce81 Merge pull request #3179 from deepak1556/session_api_patch
session: allow setproxy to use external pac script
2015-10-23 10:36:37 +08:00