Commit graph

101 commits

Author SHA1 Message Date
renaesop
023a3fd547 Print enhancement: add webContents.printerList And a print option to select printer 2017-02-06 17:18:04 +08:00
Cheng Zhao
6e0762a540 Fix building on Windows 2017-01-19 09:05:59 +02:00
Cheng Zhao
497f5a1199 Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
Vadim Macagon
7c5d3296e7 Prevent undefined behavior when some Node Buffer objects are destroyed
If node::Buffer::New() is used to wrap an existing chunk of memory
without providing a custom callback to release that memory then Node
will just use `free()`. In a couple of places Node buffer objects were
constructed from chunks of memory that were allocated with `new[]`, but
a custom callback to release that memory was omitted, this resulted in
undefined behavior when those buffers were destroyed because `free()`
was used to release memory allocated with `new[]`.

To avoid undefined behavior the aforementioned buffer objects are now
constructed with a custom callback that safely releases the underlying
chunk of memory.
2016-10-03 10:26:26 +07:00
Cheng Zhao
6d8f900916 Fix building on Windows 2016-09-14 16:22:43 +09:00
Cheng Zhao
f28e8d7168 Fix API changes of Chrome 53 2016-09-14 16:22:43 +09:00
Cheng Zhao
381689d3ed Fix building on Windows 2016-07-05 09:31:29 +09:00
Cheng Zhao
1ba3907038 Update to API changes of Chrome 52 2016-07-04 15:32:43 +09:00
Cheng Zhao
44651656dd Fix building on Windows 2016-05-23 16:39:19 +09:00
Cheng Zhao
a2bd55dd3c Adapt to changes of Chrome 51 API changes (Part 2) 2016-05-23 12:29:14 +09:00
Brian R. Bondy
a52dbf0784 Update SharedMemory buf constructor 2016-05-13 11:07:17 +09:00
Brian R. Bondy
ce7c1023d5 Minimum fixes needed for chromium_src 2016-05-13 11:07:17 +09:00
Brian R. Bondy
2da39d31aa Update to new pref service location in components 2016-05-13 11:07:17 +09:00
Paul Betts
e3af5de7d7 Update pdf_to_emf_converter 2016-03-10 17:06:23 +09:00
Cheng Zhao
5fae63a2f5 Fix compilation errors on OS X 2016-03-10 17:06:21 +09:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
Cheng Zhao
53b9d61831 Fix building on Windows 2015-09-03 20:07:29 +08:00
Haojian Wu
10b53f7f73 Fix print spooler hangs when printing more than 3 pages on Windows. 2015-09-01 17:55:45 +08:00
Haojian Wu
11ffb9dfb6 Fix node::Buffer API changes. 2015-08-11 09:48:29 +08:00
Haojian Wu
16348fc895 Copy pdf data on IO thread to avoid causing main process hangs. 2015-06-16 20:08:30 +08:00
Haojian Wu
57580e00f9 Fix code style. 2015-06-16 20:07:45 +08:00
Haojian Wu
93bbc6c810 Simplify the pdf-data handled code. 2015-06-16 20:07:45 +08:00
Haojian Wu
894f9c0cb0 Don't use duprecated node buffer api, fix build error on OS X. 2015-06-16 20:07:44 +08:00
Haojian Wu
ccbe554ec0 Make callback aligns node.js style. 2015-06-16 20:07:44 +08:00
Haojian Wu
93243ef223 Remove some unused IPC messages. 2015-06-16 20:07:44 +08:00
Haojian Wu
ac62871645 Return node::Buffer as a printToPDF callback result. 2015-06-16 20:07:44 +08:00
Haojian Wu
ab40da3f31 Add silent and savePath options. 2015-06-16 20:07:43 +08:00
Haojian Wu
6e099af5fe Move PDF printing setting in JS part. 2015-06-16 20:07:43 +08:00
Haojian Wu
2597ded985 Cleanup. 2015-06-16 20:02:25 +08:00
Haojian Wu
600077996c Fix a landscape option error. 2015-06-16 20:02:24 +08:00
Haojian Wu
cef177abc4 Add preview failed error. 2015-06-16 20:02:24 +08:00
Haojian Wu
8572ccb807 Add callback function in printToPDF API. 2015-06-16 20:02:24 +08:00
Haojian Wu
ce8bbb689c Add options to custom print settings in printToPDF API. 2015-06-16 20:02:24 +08:00
Haojian Wu
9cf9229308 Write PDF file in FILE thread. 2015-06-16 20:02:23 +08:00
Haojian Wu
7ffa7042b1 Add printToPDF Implementation. 2015-06-16 20:02:23 +08:00
Haojian Wu
ff87592722 Make Print API work on Windows. 2015-04-30 13:42:08 +08:00
Cheng Zhao
57812616b9 win: Fix tests and compilation errors 2015-03-18 13:58:33 +08:00
Cheng Zhao
5b2c0110dc Fix other compilation errors 2015-03-18 09:57:41 +08:00
Cheng Zhao
5c78ecfe40 scoped_ptr.PassAs is removed 2015-01-27 13:18:30 -08:00
Cheng Zhao
43421aedcf OVERRIDE macro is now removed 2015-01-27 13:18:30 -08:00
Cheng Zhao
d309fd5a27 Update printing code 2014-12-07 06:55:40 -08:00
Cheng Zhao
134f8236cc Update printing code to Chrome 37. 2014-09-01 15:35:39 +08:00
Cheng Zhao
d20ec6952a Revert "Move the code of getting printing settings to another class."
This reverts commit 57d06c5241.

Conflicts:
	atom/browser/printing/printing_config_service.cc
2014-08-22 15:03:39 +08:00
Cheng Zhao
e43b3309af Add "silent" and "print_background" option for printing. 2014-08-22 15:01:07 +08:00
Cheng Zhao
57d06c5241 Move the code of getting printing settings to another class. 2014-08-22 12:46:26 +08:00
Cheng Zhao
c9b284d7f7 Remove more unused printing code. 2014-08-22 10:27:08 +08:00
Cheng Zhao
99a510701d Strip out print preview. 2014-08-21 22:14:27 +08:00
Cheng Zhao
eb3ecab6a8 Setup PrintingMessageFilter for printing. 2014-08-21 21:19:43 +08:00
Cheng Zhao
87d5b72b76 Initailize PrintViewManagerBasic for browser window. 2014-08-21 20:49:18 +08:00
Cheng Zhao
cb7196a9c1 Allow script initialized window.print(). 2014-08-21 16:32:41 +08:00
Cheng Zhao
d934526bb3 Add printing related source codes from chrome. 2014-08-21 15:43:11 +08:00