Commit graph

91 commits

Author SHA1 Message Date
Cheng Zhao
00ed814962 Add executeJavaScript method for webContents. 2014-04-25 10:34:40 +08:00
Cheng Zhao
79babe858d Move some APIs from Window to WebContents. 2014-04-24 17:00:41 +08:00
Cheng Zhao
26e93e8798 Initial empty api_web_contents. 2014-04-24 16:45:25 +08:00
Cheng Zhao
486dd9edfa mac: Avoid sending "blur" event when closing window. 2014-04-24 16:17:35 +08:00
Cheng Zhao
d3cda97d50 Enable passing null to dialog API. 2014-04-24 13:10:04 +08:00
Cheng Zhao
822bc2fd52 Only call getDevTools for windows that have devtools. 2014-04-24 12:04:23 +08:00
Cheng Zhao
e8bf798b52 Fix using an null dictionary. 2014-04-24 11:25:06 +08:00
Cheng Zhao
3d267fc743 gtk: Free resources when closing window. 2014-04-23 12:59:03 +08:00
Cheng Zhao
0c9aea3308 Fix compilation under Linux. 2014-04-23 12:45:48 +08:00
Cheng Zhao
babfbe40d2 Fix the capturePage method. 2014-04-23 11:39:40 +08:00
Cheng Zhao
f6cca0df48 Remove redundant call to NotifyWindowClosed. 2014-04-23 11:21:17 +08:00
Cheng Zhao
0eb982a972 Make sure window object is destryed. 2014-04-23 10:53:07 +08:00
Cheng Zhao
1cb23a958c Should send "closed" event when native window is closed. 2014-04-23 10:24:46 +08:00
Cheng Zhao
8417f158b4 Do not free memory used by native window immediately.
Otherwise we would have two ways to destroy a window, making code much
more complicated.
2014-04-23 09:53:38 +08:00
Cheng Zhao
db39910455 Remove window from observers when it's closed instead of deleted. 2014-04-23 09:25:04 +08:00
Cheng Zhao
bccbc5e821 Fix parameter detection in capturePage. 2014-04-23 09:09:28 +08:00
Cheng Zhao
5037daadfb Use closed event instead of destroyed event.
We now do not delete window manually so the destroyed would be delayed
until the object is GCed.
2014-04-23 08:50:33 +08:00
Cheng Zhao
5a316c0c41 Free memory when native window is closed. 2014-04-23 08:50:26 +08:00
Cheng Zhao
a040a96652 Discard all our custom V8 helpers, use native-mate instead. 2014-04-22 23:07:21 +08:00
Cheng Zhao
ef5342b86e Simplify atom_browser_bindings. 2014-04-22 11:06:13 +08:00
Cheng Zhao
7e1c86a105 Remove use of native_type_conversions.h when possible. 2014-04-21 23:49:53 +08:00
Cheng Zhao
2efed6f910 Simplify menu api. 2014-04-21 23:40:10 +08:00
Cheng Zhao
a13c29f0e6 Simplify protocol api. 2014-04-21 16:33:32 +08:00
Cheng Zhao
dd6caba082 Fix cpplint warning. 2014-04-18 17:28:05 +08:00
Cheng Zhao
e5176d6a0a Use BrowserV8Locker when possible. 2014-04-18 17:25:22 +08:00
Cheng Zhao
1dd57bd3a4 Use the new function converter in dialog api. 2014-04-18 17:19:15 +08:00
Cheng Zhao
8f2b998718 Simpilfy auto_updater api. 2014-04-17 17:26:21 +08:00
Cheng Zhao
f36569c3b9 Use native_mate based Event in browser_ipc. 2014-04-17 17:14:05 +08:00
Cheng Zhao
da483ba7f3 Simplify app api. 2014-04-17 17:13:46 +08:00
Cheng Zhao
7c50393c72 Simplify power_monitor api. 2014-04-17 17:13:17 +08:00
Cheng Zhao
7106a36ccb Add native_mate implemented Event and EventEmitter. 2014-04-17 17:12:27 +08:00
Cheng Zhao
77cccc2db6 Simplify browser_ipc api. 2014-04-17 13:51:59 +08:00
Cheng Zhao
5dae7b8658 Put converters under atom/common/native_mate_converters. 2014-04-17 13:45:14 +08:00
Cheng Zhao
aa1efe70e2 Use native_mate to simplify dialog api. 2014-04-16 15:14:44 +08:00
Cheng Zhao
4fa9970eff mac: Move OS X only files to atom/browser/mac. 2014-04-15 09:35:26 +08:00
Cheng Zhao
96b23830cd Bump v0.11.10. 2014-04-11 21:02:22 +08:00
Cheng Zhao
b994ae8174 mac: Always cancel application termination.
OS X's application termination doesn't work very well with C++ message
loops. Especially when we return NSTerminateLater for shouldTerminate,
it would be impossible for the C++ message loop to quit, because unless
we explictly let NSApp terminate the application, the message loop would
think the application is not terminated and will run forever.

The fix is to simply ignore the Cocoa's application termination request
and let the C++ message loop deal with it compeletey. But we had the
side effect that atom-shell would always cancel OS X's shutdown request,
this is also the approach chosen by Chromium.

Fixes #229.
Fixes atom/atom#1864.
2014-04-15 00:13:00 +08:00
Cheng Zhao
d654afde5f Bump v0.11.9. 2014-04-11 10:44:41 +00:00
Cheng Zhao
5c5cf3c66e Fix a crash when destroying window. 2014-04-11 18:43:01 +08:00
Cheng Zhao
84d458687a mac: Avoid managing NSWindow by hand. 2014-04-11 12:47:22 +08:00
Cheng Zhao
2ab5d6e35a Remove unneeded accessor. 2014-04-11 12:45:48 +08:00
Cheng Zhao
d6079782d1 mac: InspectableWebContents should be destroyed before release NSWindow.
Fixes atom/atom#1841.
2014-04-11 12:32:42 +08:00
Cheng Zhao
e576d4c014 Fix app.exit compatibility. 2014-04-10 17:08:22 +08:00
Cheng Zhao
a16ea1fbf2 Bump v0.11.8. 2014-04-10 07:30:29 +00:00
Cheng Zhao
f0d9ee4ca9 Shutdown gracefully, fixes #227. 2014-04-10 15:22:17 +08:00
Cheng Zhao
538bd1116d Deprecate app.terminate API.
Users should use app.quit which can shutdown the application gracefuly.
2014-04-10 15:08:14 +08:00
Cheng Zhao
5ead4f655a Bump v0.11.7. 2014-04-08 06:50:40 +00:00
Cheng Zhao
b975d4c41f Detect unresponsive window when quitting.
Preivously this is disabled because quitting multiple windows could
bring up the unresponsive dialog, but since we now have increased the
unresponsive time limitto 5s, this is not needed anymore and could cause
confusions.

Fixes #17.
2014-04-08 14:24:44 +08:00
Cheng Zhao
d7a54cf3a6 Add API to execute javascript in devtools. 2014-04-08 12:50:12 +08:00
Cheng Zhao
a50d3bde5c gtk: Connect to window-state-event, fixes #226. 2014-04-08 09:32:44 +08:00