Cheng Zhao [Thu, 16 May 2013 14:22:33 +0000 (22:22 +0800)]
Make MenuItem's type default to 'submenu' if it has submenu property.
Cheng Zhao [Thu, 16 May 2013 12:53:10 +0000 (20:53 +0800)]
Add 'selector' property for MenuItem, which automatically calls first reponder's selector.
Cheng Zhao [Thu, 16 May 2013 12:48:09 +0000 (20:48 +0800)]
Automatically convert menu with tile of 'Window' to Window menu in application menu.
Cheng Zhao [Thu, 16 May 2013 12:31:58 +0000 (20:31 +0800)]
setApplicationMenu and sendActionToFirstResponder are Mac only.
Cheng Zhao [Thu, 16 May 2013 12:29:13 +0000 (20:29 +0800)]
Build application menu with the new menu API in default app.
Cheng Zhao [Thu, 16 May 2013 12:06:25 +0000 (20:06 +0800)]
Read menu item's properties in menu's delegate.
Cheng Zhao [Thu, 16 May 2013 11:34:23 +0000 (19:34 +0800)]
Build node-webkit style Menu API arounding the delegate-style Menu API.
Cheng Zhao [Thu, 16 May 2013 09:25:02 +0000 (17:25 +0800)]
Add API to SendActionToFirstResponder.
It's important to bind application menu items to curtain actions of
first responder, like 'quit', 'minimize', 'copy' etc. This API gives
developers ability to do most of them in javascript.
Cheng Zhao [Thu, 16 May 2013 07:32:37 +0000 (15:32 +0800)]
Calling delegate methods should pass command id of menu item.
Cheng Zhao [Thu, 16 May 2013 07:24:18 +0000 (15:24 +0800)]
Convert generic accelerator to platform accelerator.
When creating menus, the accelerators must be converted to platform
accelerators before they can be used.
Cheng Zhao [Thu, 16 May 2013 06:39:12 +0000 (14:39 +0800)]
Fix titles of submenus in application menu.
Cheng Zhao [Thu, 16 May 2013 02:54:37 +0000 (10:54 +0800)]
Add Menu.setApplicationMenu API to set main menu of NSApp.
Cheng Zhao [Wed, 15 May 2013 14:17:27 +0000 (22:17 +0800)]
Fix places where Window should be BrowserWindow.
Cheng Zhao [Wed, 15 May 2013 12:24:51 +0000 (20:24 +0800)]
Add 'Reload' in application menu. Fixes atom/atom-shell#4.
Cheng Zhao [Wed, 15 May 2013 11:19:35 +0000 (19:19 +0800)]
Rename 'window' module to 'browser_window' module. Fix #3.
Cheng Zhao [Wed, 15 May 2013 11:11:30 +0000 (19:11 +0800)]
Implement some common web contents overrides.
Cheng Zhao [Wed, 15 May 2013 05:56:25 +0000 (13:56 +0800)]
Implement window.moveTo and window.ResizeTo. Fix #2.
Cheng Zhao [Wed, 15 May 2013 05:47:15 +0000 (13:47 +0800)]
Fix typo in the comment.
Cheng Zhao [Tue, 14 May 2013 14:17:25 +0000 (22:17 +0800)]
Prevent submenu from getting destroyed bebore the container menu.
Cheng Zhao [Tue, 14 May 2013 13:39:00 +0000 (21:39 +0800)]
Add a context menu for the initial default app.
Cheng Zhao [Tue, 14 May 2013 13:37:59 +0000 (21:37 +0800)]
Set accelerator for menu item by string in delegate.
Cheng Zhao [Tue, 14 May 2013 13:12:27 +0000 (21:12 +0800)]
Add StringToAccelerator to parse a string as an accelerator.
Cheng Zhao [Tue, 14 May 2013 12:24:53 +0000 (20:24 +0800)]
Emit 'execute' event when menu item is clicked.
Cheng Zhao [Tue, 14 May 2013 12:00:44 +0000 (20:00 +0800)]
Improve error reporting in RPC by printing stack trace.
Cheng Zhao [Tue, 14 May 2013 11:26:16 +0000 (19:26 +0800)]
Expose Menu's delegate methods in javascript.
Cheng Zhao [Tue, 14 May 2013 11:25:14 +0000 (19:25 +0800)]
Fix the menu popup on OS X.
Cheng Zhao [Tue, 14 May 2013 11:24:52 +0000 (19:24 +0800)]
Expose Menu API in javascript.
Cheng Zhao [Tue, 14 May 2013 08:50:56 +0000 (16:50 +0800)]
Add popup method for Menu.
Cheng Zhao [Tue, 14 May 2013 07:50:33 +0000 (15:50 +0800)]
Use Atom's icon.
Cheng Zhao [Mon, 13 May 2013 10:45:17 +0000 (18:45 +0800)]
Update node: add Atom.app/Contents/Resources/app to module paths.
Cheng Zhao [Mon, 13 May 2013 08:22:21 +0000 (16:22 +0800)]
It seems that shutil.make_archive doesn't support symbol links, invoke the zip command instead.
Cheng Zhao [Mon, 13 May 2013 07:27:49 +0000 (15:27 +0800)]
When copying bundle the symbol links should be kept.
Cheng Zhao [Sun, 12 May 2013 08:52:43 +0000 (16:52 +0800)]
Save the latest version when uploading distribution.
Cheng Zhao [Sun, 12 May 2013 08:18:12 +0000 (16:18 +0800)]
Update node: cleanup unused hacks.
Cheng Zhao [Sun, 12 May 2013 08:16:52 +0000 (16:16 +0800)]
Add script to download atom-shell.
The scripts are stolen from aroben/libchromiumcontent.
Cheng Zhao [Sun, 12 May 2013 08:16:02 +0000 (16:16 +0800)]
Add script to make distribution and upload.
The scripts are stolen from aroben/libchromiumcontent.
Cheng Zhao [Sat, 11 May 2013 13:07:03 +0000 (21:07 +0800)]
Ship the custom node binary build with atom-shell.
This is required by the child_process.fork, which is indeed executing
the node binary to start a script.
The node fork can be found at:
https://github.com/atom/cefode-node/tree/chromium-v8
Cheng Zhao [Fri, 10 May 2013 13:19:13 +0000 (21:19 +0800)]
Expose dialog.showMessageBox API.
Cheng Zhao [Fri, 10 May 2013 12:54:55 +0000 (20:54 +0800)]
:lipstick:
Cheng Zhao [Fri, 10 May 2013 12:34:05 +0000 (20:34 +0800)]
Modify Window API to be more consistent.
* '_' becomes '-'
* removes 'position' field
* adds 'center' method.
Cheng Zhao [Tue, 7 May 2013 12:33:50 +0000 (20:33 +0800)]
Rename atom module to atom_delegate to avoid conflicts with Atom.
Cheng Zhao [Tue, 7 May 2013 08:20:52 +0000 (16:20 +0800)]
Make sure the 'closed' event is emitted before 'window-all-closed'.
Cheng Zhao [Tue, 7 May 2013 04:06:54 +0000 (12:06 +0800)]
Update to lastest brightray.
Cheng Zhao [Tue, 7 May 2013 03:43:21 +0000 (11:43 +0800)]
Fix whitespace/line_length warnings of cpplint.
Cheng Zhao [Mon, 6 May 2013 16:03:34 +0000 (00:03 +0800)]
Expose MenuModel's methods in js.
Cheng Zhao [Mon, 6 May 2013 12:27:09 +0000 (20:27 +0800)]
Add Menu API. (WIP)
Cheng Zhao [Sun, 5 May 2013 12:36:46 +0000 (20:36 +0800)]
Pass the native window object directly in native dialog API.
Cheng Zhao [Sun, 5 May 2013 12:30:38 +0000 (20:30 +0800)]
Make the CallbacksRegistry a separate module, though rather small.
Cheng Zhao [Sun, 5 May 2013 12:24:20 +0000 (20:24 +0800)]
Use cross-platform callbacks in the dialog API.
Cheng Zhao [Sat, 4 May 2013 15:00:57 +0000 (23:00 +0800)]
Don't send ATOM_BROWSER_DEREFERENCE message if context is already gone.
It's possible that the object gets destructed after reloading, however
since we already released all objects in browser when unloading, it
would cause troubles when sending message in an unexist context. We just
rely on the closure to mark whether the context is gone.
A more suitable solution, however, is to restart renderer process when
doing reloading.
Cheng Zhao [Sat, 4 May 2013 14:59:32 +0000 (22:59 +0800)]
The unwrapArgs relies on the valueToMeta function.
Cheng Zhao [Sat, 4 May 2013 14:57:17 +0000 (22:57 +0800)]
Check whether id is valid when adding to weak map.
It's possible that the object has been added to weak map before and then
erased, so having an id property doesn't mean it's added in the weak map.
Cheng Zhao [Sat, 4 May 2013 13:52:14 +0000 (21:52 +0800)]
Clear listeners on process object when unloading.
The process object is created under node context, and it will live
through the reloading, so we are responsible for clearing the listeners
to make sure resources are not leaked.
Cheng Zhao [Sat, 4 May 2013 13:38:25 +0000 (21:38 +0800)]
Modify funtion's names to make RPC code more easy to understand.
Cheng Zhao [Sat, 4 May 2013 09:01:28 +0000 (17:01 +0800)]
Resupport cross-process callback.
It seems that it's avoidable to make callback cross-process when we
start to emitting events for GUI elements, without this feature our
implementation will be much more complicated. I will find a way to warn
about resources leak in browser.
Cheng Zhao [Fri, 3 May 2013 13:50:36 +0000 (21:50 +0800)]
Pass remote objects from renderer to browser by ID.
Cheng Zhao [Fri, 3 May 2013 13:14:28 +0000 (21:14 +0800)]
Cache remote.getCurrentWindow.
Cheng Zhao [Fri, 3 May 2013 13:03:26 +0000 (21:03 +0800)]
Add the generialized showMessageBox API.
Cheng Zhao [Fri, 3 May 2013 11:31:24 +0000 (19:31 +0800)]
Add dialog API.
Supported APIs:
* openFile
* openMultiFiles
* openFolder
* saveAs
Each API is asynchronous and accepts a callback.
Cheng Zhao [Fri, 3 May 2013 07:21:41 +0000 (15:21 +0800)]
URL => Url, ID => Id in coffee script.
Cheng Zhao [Fri, 3 May 2013 02:53:54 +0000 (10:53 +0800)]
Add 'quit' and 'window-all-closed' events for app module.
Cheng Zhao [Thu, 2 May 2013 16:05:09 +0000 (00:05 +0800)]
Add the 'app' built-in module.
Cheng Zhao [Thu, 2 May 2013 15:43:23 +0000 (23:43 +0800)]
Add Browser class to controll when the application should quit.
Cheng Zhao [Thu, 2 May 2013 15:03:14 +0000 (23:03 +0800)]
Add _mac suffix for obj-c files.
Cheng Zhao [Thu, 2 May 2013 14:54:09 +0000 (22:54 +0800)]
Add WindowList class to manage all windows.
Cheng Zhao [Thu, 2 May 2013 12:09:19 +0000 (20:09 +0800)]
Quiting the application is now equivalent to close all windows.
Cheng Zhao [Thu, 2 May 2013 12:08:23 +0000 (20:08 +0800)]
Make sure WindowClosed message is sent when window is destroyed.
Cheng Zhao [Thu, 2 May 2013 10:19:07 +0000 (18:19 +0800)]
Add 'closed' and 'destroyed' event for Window.
Cheng Zhao [Wed, 1 May 2013 15:28:01 +0000 (23:28 +0800)]
Correctly handle window's lifetime when it's closed.
Cheng Zhao [Wed, 1 May 2013 08:33:19 +0000 (16:33 +0800)]
Add window closing related methods for window observer.
Cheng Zhao [Wed, 1 May 2013 08:12:00 +0000 (16:12 +0800)]
Simply the closing model.
Cheng Zhao [Wed, 1 May 2013 07:42:30 +0000 (15:42 +0800)]
Closing a window requires closing web contents now.
In this way, we can prevent the close of window by using beforeunload
handler.
Cheng Zhao [Wed, 1 May 2013 02:59:29 +0000 (10:59 +0800)]
Release resources in browser when renderer view is gonna unloaded.
Cheng Zhao [Tue, 30 Apr 2013 15:56:50 +0000 (23:56 +0800)]
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.
Cheng Zhao [Tue, 30 Apr 2013 14:37:54 +0000 (22:37 +0800)]
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.
Cheng Zhao [Tue, 30 Apr 2013 12:32:23 +0000 (20:32 +0800)]
Enable getting window from routing id and process id.
Cheng Zhao [Tue, 30 Apr 2013 10:59:07 +0000 (18:59 +0800)]
Update to newest brightray.
Cheng Zhao [Tue, 30 Apr 2013 08:27:14 +0000 (16:27 +0800)]
Add API to get any global variable from browser.
Cheng Zhao [Tue, 30 Apr 2013 08:10:25 +0000 (16:10 +0800)]
Add Clipboard API.
Cheng Zhao [Mon, 29 Apr 2013 14:10:03 +0000 (22:10 +0800)]
Add shell.beep() API.
Cheng Zhao [Mon, 29 Apr 2013 13:57:05 +0000 (21:57 +0800)]
Add Shell API.
Include APIs:
shell.showItemInFolder
shell.openItem
shell.openExternal
shell.moveItemToTrash
Cheng Zhao [Mon, 29 Apr 2013 12:41:11 +0000 (20:41 +0800)]
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.
Cheng Zhao [Mon, 29 Apr 2013 12:40:59 +0000 (20:40 +0800)]
Fix header guard.
Cheng Zhao [Mon, 29 Apr 2013 11:56:12 +0000 (19:56 +0800)]
:lipstick:
Cheng Zhao [Mon, 29 Apr 2013 11:39:05 +0000 (19:39 +0800)]
Add vendor/ to .gitignore, so ag won't search it.
Cheng Zhao [Mon, 29 Apr 2013 11:38:18 +0000 (19:38 +0800)]
Avoid using destoryed native objects in js API.
Cheng Zhao [Mon, 29 Apr 2013 10:59:34 +0000 (18:59 +0800)]
Uniform message names.
Messages sent to browser should be prefixed with ATOM_BROWSER_, and
messages sent to renderer should be prefixed with ATOM_RENDERER_.
Cheng Zhao [Mon, 29 Apr 2013 10:24:37 +0000 (18:24 +0800)]
Support passing callbacks from renderer to browser.
Cheng Zhao [Sat, 27 Apr 2013 11:13:24 +0000 (19:13 +0800)]
Use camelCase not under_score, I forgot it's coffee script.
Cheng Zhao [Sat, 27 Apr 2013 11:06:41 +0000 (19:06 +0800)]
Add remote.getCurrentWindow() API in renderer.
Cheng Zhao [Sat, 27 Apr 2013 08:54:17 +0000 (16:54 +0800)]
Add API to return all keys of weak map.
Cheng Zhao [Fri, 26 Apr 2013 15:58:49 +0000 (23:58 +0800)]
Make the RPC stuff code more understandable.
Cheng Zhao [Fri, 26 Apr 2013 15:26:41 +0000 (23:26 +0800)]
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.
Cheng Zhao [Fri, 26 Apr 2013 14:33:31 +0000 (22:33 +0800)]
Keep an id for each object added to global weak map.
Cheng Zhao [Fri, 26 Apr 2013 14:25:30 +0000 (22:25 +0800)]
Add remote.getObject API to get object in browser by it's ID.
Cheng Zhao [Fri, 26 Apr 2013 13:28:41 +0000 (21:28 +0800)]
Should wrap WeakCallback with handle scope.
Cheng Zhao [Fri, 26 Apr 2013 13:14:29 +0000 (21:14 +0800)]
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.
Cheng Zhao [Thu, 25 Apr 2013 13:46:04 +0000 (21:46 +0800)]
Add WeakMap built-in module.
Cheng Zhao [Thu, 25 Apr 2013 12:23:00 +0000 (20:23 +0800)]
Notify creation and destruction of native objects.
Cheng Zhao [Thu, 25 Apr 2013 11:41:23 +0000 (19:41 +0800)]
Enable idle GC in browser.