Cheng Zhao
ec43f740a7
Add the generialized showMessageBox API.
2013-05-03 21:03:26 +08:00
Cheng Zhao
4aeb5e1388
Add dialog API.
...
Supported APIs:
* openFile
* openMultiFiles
* openFolder
* saveAs
Each API is asynchronous and accepts a callback.
2013-05-03 19:31:24 +08:00
Cheng Zhao
42f10a15d5
URL => Url, ID => Id in coffee script.
2013-05-03 15:36:25 +08:00
Cheng Zhao
9b75019898
Add 'quit' and 'window-all-closed' events for app module.
2013-05-03 10:53:54 +08:00
Cheng Zhao
66404b5f15
Add the 'app' built-in module.
2013-05-03 00:05:09 +08:00
Cheng Zhao
d151d494bd
Add Browser class to controll when the application should quit.
2013-05-02 23:43:23 +08:00
Cheng Zhao
8cf1050730
Add _mac suffix for obj-c files.
2013-05-02 23:03:14 +08:00
Cheng Zhao
264f085afb
Add WindowList class to manage all windows.
2013-05-02 22:54:09 +08:00
Cheng Zhao
43d42ca57f
Quiting the application is now equivalent to close all windows.
2013-05-02 20:09:19 +08:00
Cheng Zhao
e7aab096e7
Make sure WindowClosed message is sent when window is destroyed.
2013-05-02 20:08:23 +08:00
Cheng Zhao
21df63fc9b
Add 'closed' and 'destroyed' event for Window.
2013-05-02 18:19:07 +08:00
Cheng Zhao
afe07521c5
Correctly handle window's lifetime when it's closed.
2013-05-01 23:28:01 +08:00
Cheng Zhao
9e489cae0c
Add window closing related methods for window observer.
2013-05-01 16:33:19 +08:00
Cheng Zhao
edd8410c24
Simply the closing model.
2013-05-01 16:12:00 +08:00
Cheng Zhao
9f1fe4d2c2
Closing a window requires closing web contents now.
...
In this way, we can prevent the close of window by using beforeunload
handler.
2013-05-01 15:42:30 +08:00
Cheng Zhao
31d6be0e63
Release resources in browser when renderer view is gonna unloaded.
2013-05-01 10:59:29 +08:00
Cheng Zhao
a674572dd4
Implement beforeunload event.
...
Unlike normal browser which would show a dialog to choose whether to
continue, you can just return a empty string in the handler to prevent
unloading.
2013-05-01 00:05:19 +08:00
Cheng Zhao
bcf6cd9f1b
Drop support for cross-process callbacks.
...
Now it's forbidden for browser to store reference to objects (including
functions) in renderer, because when the renderer is destroyed, it's
extremely hard to clean all of corresponding objects in browser
correctly, which would cause very bad resources leak.
2013-04-30 22:37:54 +08:00
Cheng Zhao
74c519ac3f
Enable getting window from routing id and process id.
2013-04-30 20:32:23 +08:00
Cheng Zhao
de94e4f37e
Update to newest brightray.
2013-04-30 18:59:07 +08:00
Cheng Zhao
a06c9b806b
Add API to get any global variable from browser.
2013-04-30 16:27:14 +08:00
Cheng Zhao
7a2734ed71
Add Clipboard API.
2013-04-30 16:10:25 +08:00
Cheng Zhao
a34a63797a
Add shell.beep() API.
2013-04-29 22:10:03 +08:00
Cheng Zhao
157c978aa8
Add Shell API.
...
Include APIs:
shell.showItemInFolder
shell.openItem
shell.openExternal
shell.moveItemToTrash
2013-04-29 21:57:05 +08:00
Cheng Zhao
fbad5bc822
Add platform_util from Chrome.
...
The platform_util files just come from chrome/browser/ with slight
modifications so it doesn't depend on grit/generate_resources.h, which
is not availabe in libchromiumcontent because it's generated by chrome's
chrome/app/generated_resources.grd.
2013-04-29 20:41:11 +08:00
Cheng Zhao
c5ef255c4b
Fix header guard.
2013-04-29 20:40:59 +08:00
Cheng Zhao
1f1f6abd78
💄
2013-04-29 19:56:12 +08:00
Cheng Zhao
ae0e7ade78
Add vendor/ to .gitignore, so ag won't search it.
2013-04-29 19:39:05 +08:00
Cheng Zhao
6c21121001
Avoid using destoryed native objects in js API.
2013-04-29 19:38:18 +08:00
Cheng Zhao
af57d3be08
Uniform message names.
...
Messages sent to browser should be prefixed with ATOM_BROWSER_, and
messages sent to renderer should be prefixed with ATOM_RENDERER_.
2013-04-29 18:59:34 +08:00
Cheng Zhao
f1e15b49a9
Support passing callbacks from renderer to browser.
2013-04-29 18:24:37 +08:00
Cheng Zhao
948e50285d
Use camelCase not under_score, I forgot it's coffee script.
2013-04-27 19:13:24 +08:00
Cheng Zhao
99f6a5678a
Add remote.getCurrentWindow() API in renderer.
2013-04-27 19:06:41 +08:00
Cheng Zhao
51db9494bd
Add API to return all keys of weak map.
2013-04-27 16:54:17 +08:00
Cheng Zhao
b35946381b
Make the RPC stuff code more understandable.
2013-04-26 23:58:49 +08:00
Cheng Zhao
da3d4c8408
Allow renderer to get object in browser for arbitrary times.
...
Now, when creating a remote object in renderer, the browser will
reference the corresponding object by storing it in a strong map. And
when the remote object in renderer is GCed, the corresponding object
will be dereferenced in browser.
2013-04-26 23:26:41 +08:00
Cheng Zhao
536b523232
Keep an id for each object added to global weak map.
2013-04-26 22:33:31 +08:00
Cheng Zhao
cc921fed1e
Add remote.getObject API to get object in browser by it's ID.
2013-04-26 22:25:30 +08:00
Cheng Zhao
d4d1230107
Should wrap WeakCallback with handle scope.
2013-04-26 21:28:41 +08:00
Cheng Zhao
dded164052
Separate stored objects by the render view.
...
When a render view is closed, it's not guarrenteed that all objects'
weak callback would be called. So we must clean up all objects manually
after the render view gets closed.
2013-04-26 21:14:29 +08:00
Cheng Zhao
e91d4c7c99
Add WeakMap built-in module.
2013-04-25 21:46:04 +08:00
Cheng Zhao
bcfec7c8cd
Notify creation and destruction of native objects.
2013-04-25 20:23:00 +08:00
Cheng Zhao
a513daae30
Enable idle GC in browser.
2013-04-25 19:41:23 +08:00
Cheng Zhao
3f6f2f4bea
Tell browser to release remote object when the object is GCed.
2013-04-25 19:28:04 +08:00
Cheng Zhao
cc37431a1f
Add v8_util.setDestructor.
...
This API can monitor when the object is GCed by V8, this is required by
the RPC API since we want to make sure the remote object got destroied
when object in renderer is GCed.
2013-04-25 18:25:18 +08:00
Cheng Zhao
a7ddf57620
Cheat on the remote object's constructor name.
2013-04-25 16:36:28 +08:00
Cheng Zhao
ddad3e4846
Add built-in v8_util module for internal use.
2013-04-25 16:30:31 +08:00
Cheng Zhao
678a4953fa
Better support of array type in RPC.
2013-04-25 16:03:29 +08:00
Cheng Zhao
ab4015ef51
Module names starting with atom_common_ can be loaded by both sides.
2013-04-25 15:36:01 +08:00
Cheng Zhao
70fe77ca34
Return object instead of function for remote object type.
2013-04-25 15:28:37 +08:00