Commit graph

58 commits

Author SHA1 Message Date
Cheng Zhao
249366c90a Restart renderer process for all navigations and reloads, fixes #157. 2014-01-14 16:03:01 +08:00
Cheng Zhao
a60be1563f Do not implement window.open. 2013-12-27 14:32:24 +08:00
Cheng Zhao
409a431892 Huge commit to use new V8 and Content APIs.
Still got a lots of linking errors!
2013-12-11 15:48:19 +08:00
Cheng Zhao
cb73a3c572 Remove the RestartHangMonitorTimeout API, which is useless now. 2013-12-09 14:17:56 +08:00
Cheng Zhao
623e0f3ae4 Release render view's remote objects when it's deleted.
Privously we release them when the window is unloaded, which is not
correct since a render view can have multiple windows (or js contexts)
and when the unload event is emitted the render view could already have
gone.

This PR does the cleaning work purely in browser, so here is no need to
worry about renderer's life time.
2013-12-06 14:44:25 +08:00
Cheng Zhao
e45f83e62a Make sure browserWindow.destroy() doesn't leave zombie processes. 2013-12-04 22:00:20 +08:00
Cheng Zhao
bfe8928ab1 Do not use flags to mark whether the window is unresponsive.
It's error prone.
2013-12-04 17:10:59 +08:00
Cheng Zhao
d6d1604623 mac: Add API to return whether the window has attached sheet. 2013-12-04 16:32:32 +08:00
Cheng Zhao
a0a5b20ef1 Send the "unresponsive" event if window is not closed in 500ms when closing it. 2013-11-29 14:52:12 +08:00
Cheng Zhao
8d6764e0a0 Return screenshot's data buffer instead of directly saving to file. 2013-11-21 22:03:29 +08:00
Cheng Zhao
36ecb35cb1 Add API to capture a page into file. 2013-11-21 21:50:06 +08:00
Cheng Zhao
baa6d9730c win: Enable setting window icon in creation options. 2013-11-11 19:29:40 +08:00
Cheng Zhao
dc1a8b644a Get the status of devtools from brightray, fixed #27. 2013-11-05 10:32:45 +08:00
Cheng Zhao
88ce2a5390 Add BrowserWindow.isVisible() API. 2013-10-03 08:28:22 +08:00
Cheng Zhao
ef4b36d621 Use string16 instead of std::string when sending IPC messages.
The underlying V8::String is represented in UTF18, by using string16 in
IPC messages we can avoid the overhead of encode conversion.
2013-09-20 22:55:42 +08:00
Cheng Zhao
ef5a4b5fe0 Pass synchronous messages by JSON string.
We are going to use IPC_MESSAGE_HANDLER_DELAY_REPLY to handle
synchronous messages but DictionaryValue is not copyable, so we pass the
JSON string instead.
2013-09-20 22:32:59 +08:00
Cheng Zhao
a567ba08ea Hide the fullscreen button when leaving fullscreen mode. Fixes #88. 2013-09-11 13:05:08 +08:00
Cheng Zhao
a5eb9ea08f Add has_frame_ attribute for NativeWindow. 2013-09-05 21:43:47 +08:00
Cheng Zhao
4223867dbc Send and receive the AtomViewHostMsg_UpdateDraggableRegions message. 2013-09-05 20:06:54 +08:00
Cheng Zhao
dbdf2d8d54 Add OnLoadingStateChanged for NativeWindowObserver. 2013-08-29 11:19:34 +08:00
Cheng Zhao
a949e9542d Add AtomWindow.isWebViewFocused() API, fixes #57. 2013-08-16 12:56:25 +08:00
Cheng Zhao
a33c068ed1 Should inherit brightray's default web contents delegate, fixes #31. 2013-08-16 10:38:02 +08:00
Cheng Zhao
d888f5cc31 Revert "Enable getUserMedia(). Part of fixes for #31."
Now the getUserMedia is implemented in brightray.

This reverts commit f26db5c7a1.

Conflicts:
	atom.gyp
2013-08-01 14:50:06 +08:00
Cheng Zhao
e248e2ffc8 Delay the unresponsive message for a second, fixes #42.
It could happen that a window became responsive immediately after the
unresponsive message is sent (for example, the window was blocked by
showing a save as dialog), by delaying sending the unresponsive message
for a second, we can give the window a chance to whether it's really
unresponsive or not.
2013-07-23 15:29:56 +08:00
Cheng Zhao
d59fb55a81 Add BrowserWindow.inspectElement(x, y) API. 2013-07-18 19:21:25 +08:00
Cheng Zhao
4ddd1bccb4 Fix how we detect renderer crash. 2013-07-18 18:37:40 +08:00
Cheng Zhao
6bdf7c51b4 Don't rely on "iosfwd" for forward including std::string.
It seems that VS fails on this.
2013-07-01 21:56:46 +08:00
Cheng Zhao
f26db5c7a1 Enable getUserMedia(). Part of fixes for #31. 2013-06-21 16:05:28 +08:00
Cheng Zhao
e440ad2714 Make window aware of renderer crashes. 2013-06-10 20:42:10 +08:00
Cheng Zhao
f62b88d9ae Add BrowserWindow.restartHangMonitorTimeout() API. 2013-06-07 18:42:57 +08:00
Cheng Zhao
ae88f303fa Add responsive and unresponsive events for window. 2013-06-06 19:45:48 +08:00
Cheng Zhao
edf2e84895 Add BrowserWindow.focusOnWebView and blurWebView. 2013-05-24 17:51:15 +08:00
Cheng Zhao
5c3857790c Add BrowserWindow.isFocused() API. 2013-05-16 22:56:52 +08:00
Cheng Zhao
f477ec09c0 Implement some common web contents overrides. 2013-05-15 19:11:30 +08:00
Cheng Zhao
349ed4fd73 Implement window.moveTo and window.ResizeTo. Fix #2. 2013-05-15 13:56:25 +08:00
Cheng Zhao
34e9132b68 Modify Window API to be more consistent.
* '_' becomes '-'
* removes 'position' field
* adds 'center' method.
2013-05-10 20:34:05 +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
d151d494bd Add Browser class to controll when the application should quit. 2013-05-02 23:43:23 +08:00
Cheng Zhao
264f085afb Add WindowList class to manage all windows. 2013-05-02 22:54:09 +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
afe07521c5 Correctly handle window's lifetime when it's closed. 2013-05-01 23:28:01 +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
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
74c519ac3f Enable getting window from routing id and process id. 2013-04-30 20:32:23 +08:00
Cheng Zhao
1b87a31940 Add ipc.sendSync in renderer. 2013-04-23 21:52:19 +08:00
Cheng Zhao
16244e42e0 Use require('ipc').send to communicate between browser and renderer. 2013-04-23 12:18:07 +08:00
Cheng Zhao
66a0abe799 Renderer can now use process.send to send messages to browser. 2013-04-22 21:32:48 +08:00
Cheng Zhao
993cf1cc61 Add API messages for IPC. 2013-04-21 11:01:04 +08:00
Cheng Zhao
7f581973c3 Implement window.open. 2013-04-20 13:56:01 +08:00