Commit graph

335 commits

Author SHA1 Message Date
Cheng Zhao
7e86ee37f3 💄 cpplint. 2013-09-23 17:27:32 +08:00
Cheng Zhao
f444e9dc74 💄 CoffeeScript is cute. 2013-09-23 16:51:00 +08:00
Cheng Zhao
76ac8f2719 Enable taking window as parameter in dialog.showOpenDialog. 2013-09-23 16:36:33 +08:00
Cheng Zhao
a4262bc39d mac: Make ShowOpenDialog able to be shown as sheet. 2013-09-23 16:27:22 +08:00
Cheng Zhao
85d6588661 Make dialog.showMessageBox asynchronous. 2013-09-23 14:29:55 +08:00
Cheng Zhao
b70722feb6 mac: Implement async ShowMessageBox. 2013-09-22 18:47:00 +08:00
Cheng Zhao
bfe59480e3 Add header for asynchronous version of ShowMessageBox. 2013-09-22 17:11:09 +08:00
Cheng Zhao
761b9d22c8 Do not reply sync messages when window is closed. 2013-09-22 10:44:18 +08:00
Cheng Zhao
1e4762ce92 Do not store the event.returnValue. 2013-09-22 10:03:47 +08:00
Cheng Zhao
d443b36446 Send reply for sync messages when event.returnValue is set. 2013-09-22 09:52:58 +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
07b5039c64 Make sure all sync messages get a return value. 2013-09-20 21:39:07 +08:00
Cheng Zhao
a9c824eba1 Use event.returnValue instead of event.result in atom-shell's code.
event.result is still kept for backward compatible.
2013-09-20 21:37:47 +08:00
Cheng Zhao
2be1145a9e Guard against using protocol module too early. 2013-09-20 18:45:53 +08:00
Cheng Zhao
92e157de30 Fix crash when using protocol module on startup.
The job factory was not created before any request was sent, so when the
app used the protocol module on startup it would cause a crash.
2013-09-20 18:32:05 +08:00
Cheng Zhao
3f357f184d Use custom url request getter to setup request job factory. 2013-09-20 16:47:47 +08:00
Steve Smith
a2c3690592 Merge pull request #91 from atom/rounded-corner
Round whole frame in Frameless mode
2013-09-12 08:43:30 -07:00
Steve Smith
7a21ae831f Skip the whole AtomFramelessWindow.
Just round the web view and set the bounds to the window, not the main
view.
2013-09-12 11:20:38 -04:00
Cheng Zhao
ef92cd8b45 mac: Makes sure MainMenu.nib is alwasys loaded from Atom.framework. 2013-09-12 17:16:33 +08:00
Cheng Zhao
7a1365673e Remove code which are used for borderless window. 2013-09-12 15:13:56 +08:00
Cheng Zhao
6c098deb57 💄 Fix cpplint warnings. 2013-09-12 13:03:57 +08:00
Steve Smith
cf4a566290 Just round the top also and use a standard window.
Using borderless window causes too many issues. Smaller, less
window-like shadows being the most annoying.
2013-09-11 22:02:42 -04:00
Steve Smith
aabba3c641 Fix view autoresizing. 2013-09-11 17:25:42 -04:00
Steve Smith
8f31bf8615 Get radius working with frameless window.
Right now it's set as a constant `AtomWindowCornerRadius`, but it could
be set to a variable.
2013-09-11 16:23:17 -04:00
Cheng Zhao
5d49fc4bee WIP: rounded corner of frameless window. 2013-09-11 18:10:28 +08:00
Cheng Zhao
f38eb1b66f mac: Import chromium's CustomFrameView code. 2013-09-11 13:46:36 +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
cc62978ac3 win: Add NativeWindowFramelessView as non-client view. 2013-09-09 14:30:07 +08:00
Cheng Zhao
f833423a2f win: Save draggable region. 2013-09-09 12:12:17 +08:00
Cheng Zhao
3c0671c179 Quit when all windows are closed if running an app by passing it in command line. 2013-09-09 10:54:08 +08:00
Cheng Zhao
a00bf3e1e1 Print stack when got error on startup. 2013-09-09 10:49:28 +08:00
Cheng Zhao
b9d994dca2 Make sure the cursor doesn't drift away when dragging window. 2013-09-06 12:12:17 +08:00
Cheng Zhao
b7c2295a1c Don't use setMouseDownCanMoveWindow to implement draggable area.
It would not work when we have the in-window devtools.
2013-09-06 11:54:52 +08:00
Cheng Zhao
da2ded5453 Implement frameless window on OS X.
Most of the code came from Chromium's packaged app window.
2013-09-05 23:52:29 +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
3b7dd85d3f Merge pull request #65 from atom/custom-protocol
Support custom protocols
2013-09-04 03:33:09 -07:00
Cheng Zhao
c7fed48c4a Emit erros when getting errors in IO thread. 2013-09-03 17:21:10 +08:00
Cheng Zhao
7737708fdd Add protocol interceptor API. 2013-09-03 16:50:10 +08:00
Cheng Zhao
610ac5b045 Revert "💄 for the beforeunload handler."
Restore the previous behavior of beforeunload handler.

This reverts commit b1f30c1eb6.
2013-09-02 16:39:00 +08:00
Cheng Zhao
30c9cd4318 Use dummy stdin stream on Windows. 2013-08-31 12:13:08 +08:00
Cheng Zhao
790c53825b Merge pull request #79 from atom/message-box-button-order
Fix button order on Win32
2013-08-30 16:41:25 -07:00
Paul Betts
10bd2384d0 Fix button order on Win32
On Windows, the button order is left to right, with the primary action on the
left (i.e. "Ok" "Cancel"). On Mac, the button order is that the primary action
is nearest to the corner.
2013-08-30 12:08:04 -07:00
Cheng Zhao
335db788a5 Add InterceptProtocol AtomURLRequestJobFactory. 2013-08-30 21:15:46 +08:00
Cheng Zhao
d8cd3d78ff Make ReadRawData a public member, so there is no need to detect types. 2013-08-30 20:49:27 +08:00
Cheng Zhao
2a462cc2b7 💄 fix cpplint warning. 2013-08-30 20:24:42 +08:00
Cheng Zhao
df30f130d3 Separate logics between low level URLRequestJob and js calls. 2013-08-30 20:02:17 +08:00
Cheng Zhao
24e613c827 Separate URLRequestStringJob from atom_api_protocol. 2013-08-30 16:16:41 +08:00
Cheng Zhao
7df256f8dc Move atom_url_request_job_factory to browser/net. 2013-08-30 16:10:36 +08:00