Commit graph

176 commits

Author SHA1 Message Date
Cheng Zhao
54b0d0c9c0 Free the native window's memory after the event were sent for all observers.
If we delete the window immediately other observers may get a invalid
window and cause random crashes.
2013-09-27 15:24:03 +08:00
Cheng Zhao
6bee435170 Destroy the event object immediately after the reply is sent, fixes #102. 2013-09-26 11:28:53 +08:00
Cheng Zhao
5480cf58c2 Add spec for destroying synchronous event. 2013-09-26 11:27:09 +08:00
Cheng Zhao
14de58a6b7 Calling asynchronous functions in renderer now doesn't block browser. 2013-09-24 18:01:12 +08:00
Cheng Zhao
11ca836afc Use the convient V8 wrapper in all files. 2013-09-24 09:41:54 +08:00
Cheng Zhao
a824c88352 Use same name convention in string16_conversions. 2013-09-23 23:00:58 +08:00
Cheng Zhao
8fdd3b3044 Use FromV8Arguments in atom_api_dialog.cc. 2013-09-23 22:52:48 +08:00
Cheng Zhao
a0d1a7620c Put FromV8Value and ToV8Value to a new header. 2013-09-23 21:30:54 +08:00
Cheng Zhao
770a0068a3 Simplify conversions between native types and v8 types. 2013-09-23 21:12:40 +08:00
Cheng Zhao
26f0e49c9a Make dialog.showSaveDialog accept a callback. 2013-09-23 20:08:49 +08:00
Cheng Zhao
30ca085fd8 Make dialog.showSaveDialog accept no parent window. 2013-09-23 19:59:00 +08:00
Cheng Zhao
c95cfc9540 Make dialog.showOpenDialog accept callback. 2013-09-23 19:23:49 +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
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
2be1145a9e Guard against using protocol module too early. 2013-09-20 18:45:53 +08:00
Cheng Zhao
3f357f184d Use custom url request getter to setup request job factory. 2013-09-20 16:47:47 +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
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
Cheng Zhao
2000f88c84 Allow passing a fallback protocol handler for request jobs. 2013-08-30 15:48:57 +08:00
Cheng Zhao
738cbd4080 💄 Fix protocol specs. 2013-08-30 13:04:02 +08:00
Cheng Zhao
11221979e5 Disable overriding built-in protocols with protocol.registerProtocol. 2013-08-30 12:51:15 +08:00
Cheng Zhao
72c604f741 Custom the implementation of url request job factory.
It's needed for interceptor API.
2013-08-30 12:04:51 +08:00
Cheng Zhao
04910b8391 Skelecton for interceptor APIs. 2013-08-30 10:15:15 +08:00
Cheng Zhao
4bdd1b88ad Wrap passed 'url' and 'referrer' in an 'request' object. 2013-08-29 21:12:48 +08:00
Cheng Zhao
261f50701a Add 'registered' and 'unregistered' events for protocol module.
This is only used for writing specs.
2013-08-29 20:56:25 +08:00
Cheng Zhao
bc4201f911 Make protocol module an EventEmitter. 2013-08-29 20:38:04 +08:00
Cheng Zhao
6915f020d9 Add protocol.isHandledProtocol API. 2013-08-29 20:22:52 +08:00
Cheng Zhao
34e1800716 Add 'loading-state-changed' event for BrowserWindow.
It's required for testing the BrowserWindow class.
2013-08-29 11:47:07 +08:00
Cheng Zhao
244d7eaf17 Allow returning file for custom protocol. 2013-08-25 16:06:29 +08:00
Cheng Zhao
1ed77371c0 Enable customing mime type and charset when returning reqeust string job. 2013-08-25 15:07:07 +08:00
Cheng Zhao
912bac698c Allow returning string in custom protocols. 2013-08-25 12:36:06 +08:00
Cheng Zhao
8464fb4f64 Pass weak pointers when posting tasks to other threads. 2013-08-24 20:32:12 +08:00
Cheng Zhao
0b01e49cd3 💄 2013-08-24 20:21:46 +08:00
Cheng Zhao
8cd7ccdc0d Call the JS handler to get the type of job. 2013-08-24 20:18:12 +08:00
Cheng Zhao
b7c9f8ba1c The request should go through UI thread. 2013-08-24 19:46:38 +08:00
Cheng Zhao
f63661256f Return AdapterRequestJob when creating job. 2013-08-24 19:33:23 +08:00
Cheng Zhao
33279b1a2f Actually set and remove protocol handlers in IO thread.. 2013-08-24 17:59:34 +08:00
Cheng Zhao
96c173217f Remember registered schemes. 2013-08-24 16:38:19 +08:00