Vjekoslav Ratkajec
252b12be13
Add readRtf feature with appropriate spec test. Docs updated as well.
2016-02-05 09:06:21 +01:00
Vjekoslav Ratkajec
acd5d40ab0
Adding support to write RTF to clipboard.
2016-02-04 19:38:47 +01:00
Robo
a6bcc5d110
common: export hideInternalModules
2016-01-27 18:44:47 +05:30
Kevin Sawicki
b1f679ff6d
Clean up semicolon lint errors
2016-01-21 09:32:21 -07:00
Kevin Sawicki
70bcb0ac5a
Clean up no-unused-vars lint errors
2016-01-21 09:32:21 -07:00
Cheng Zhao
3b62ce7fa6
modules.exports => module.exports
2016-01-16 14:26:01 +08:00
Kevin Sawicki
f830af49c2
Use ES6 style class
2016-01-15 15:30:01 -08:00
Kevin Sawicki
2b95aeba3c
Declare vars one per line
2016-01-15 10:17:45 -08:00
Jessica Lord
1779701445
Use const
2016-01-14 14:40:12 -08:00
Kevin Sawicki
030d2a843c
Remove extra newlines around comments
2016-01-14 11:10:12 -08:00
Kevin Sawicki
990dc30e8d
Use // for multi-line comments
2016-01-14 10:44:21 -08:00
Kevin Sawicki
f4af744519
Use // for single line comments
2016-01-14 10:35:29 -08:00
Cheng Zhao
af02739c4e
Change webview's zoom level on JavaScript side
2016-01-13 12:50:02 +08:00
Cheng Zhao
55dfddba77
Handle executeJavaScript in JavaScript
2016-01-13 12:11:46 +08:00
Kevin Sawicki
1f9691ae13
Convert all source files to JavaScript
2016-01-12 16:24:06 -08:00
Kevin Sawicki
403870a27e
Migrate to block comments
2016-01-12 16:22:34 -08:00
Cheng Zhao
2294a5ce69
Leak FunctionTemplateHandle
...
They are cached through the app's lifetime, and freeing them at the
right time is complicate, so just leak them.
2015-12-29 10:40:10 +08:00
Cheng Zhao
d8d963b780
Cache function templates created by CreateObjectWithName
2015-12-29 10:29:48 +08:00
Cheng Zhao
3d2163230b
Optimize the case when creating plain object
2015-12-28 22:51:40 +08:00
Cheng Zhao
353f08e477
Remove sync call in remote module
2015-12-17 22:03:16 +08:00
Kevin Sawicki
67c0de36a3
📝 Add missing period
2015-12-15 16:47:19 -08:00
Kevin Sawicki
d44a9d1fcc
🎨 Remove parens
2015-12-15 16:46:53 -08:00
Kevin Sawicki
aedfd3bf0e
Add specs for companyName/submitURL being required
2015-12-15 16:44:38 -08:00
Kevin Sawicki
80e9631220
Use better signature match in deprecation message
2015-12-15 16:27:01 -08:00
Kevin Sawicki
524649797f
Make companyName and submitURL required options
2015-12-15 16:22:31 -08:00
Kevin Sawicki
dcc99dd5cb
Remove duplicate start calls
2015-12-15 16:10:04 -08:00
Cheng Zhao
73e7773d84
Update to API changes of Chrome 47
2015-12-07 19:56:23 +08:00
Cheng Zhao
a15f9fab5b
Use BuildPrototype to build prototype
...
This saves the step of manually keeping the global template object,
which is easy to forget then leak.
2015-12-03 16:04:46 +08:00
Cheng Zhao
cfdcfcbd80
Add executable permission in CopyFileOut
2015-11-27 22:06:37 +08:00
Juan Cruz Viotti
585ff9062c
🐛 Fix missing execution permission bit in execFile override
...
Consider an electron application that uses `execFile` to run a script
that lives within the application code base:
```coffee
child_process = require 'child_process'
child_process.execFile __dirname + '/script.sh', (error) ->
throw error if error?
```
An application like this will fail when being packaged in an `asar` with
an following error:
```
Error: spawn EACCES
```
Electron overrides certain `fs` functions to make them work within an
`asar` package. In the case of `execFile`, the file to be executed is
extracted from the `asar` package into a temporary file and ran from
there.
The problem is that during the extraction, the original permissions of
the file are lost.
We workaround this by:
1. Extending `asar.stat` to return whether a file is executable or not,
which is information that's already saved in the `asar` header.
2. Setting execution permissions on the extracted file if the above
property holds true.
Fixes: https://github.com/atom/electron/issues/3512
2015-11-26 23:30:23 -04:00
Cheng Zhao
94e24abb99
Use the new style remote module in Electron
2015-11-13 22:22:25 +08:00
Cheng Zhao
e8ffd24e4e
Rename the "clicked" event to "click" in Tray
2015-11-13 16:41:33 +08:00
Cheng Zhao
fbb8e61958
Replace "Url" in API names with "URL"
2015-11-13 16:03:40 +08:00
Cheng Zhao
852500e5fa
Fix a few places using old style require
2015-11-13 09:38:22 +08:00
Cheng Zhao
2ca5a33d28
Add electron.hideInternalModules
2015-11-12 21:46:03 +08:00
Cheng Zhao
8b2942c279
Optimize remote.require('electron')
2015-11-12 20:30:40 +08:00
Cheng Zhao
1d1f911b09
Use require('electron') in Electron's code
2015-11-12 20:29:30 +08:00
Cheng Zhao
c2c09daa23
Add "electron" module
2015-11-12 16:40:27 +08:00
Cheng Zhao
f0bd28ca8d
Do not turn off deprecation notice by default
...
It is v4 now, people should be punished if they are still using
deprecated Node.js APIs.
2015-11-09 21:19:16 +08:00
Cheng Zhao
89ff62b1b5
Add "deprecate" module
2015-11-09 21:19:16 +08:00
Cheng Zhao
47649ffd17
win: Fix calling showItemInFolder in renderer process
2015-11-05 20:47:27 +08:00
Cheng Zhao
cb91d4487b
Clean up the code handling renderer callback
2015-10-31 15:00:06 +08:00
Robo
2c59f4567e
use webcontents id to identify callbacks
2015-10-30 19:51:19 +05:30
Robo
3a154ab8ea
add line and column values to callback id
2015-10-29 21:21:30 +05:30
Robo
ac4df34ecd
create binding to idweakmap
2015-10-29 17:51:56 +05:30
Robo
eae7c840b7
use idweakmap for holding callbacks in browser
2015-10-29 17:51:56 +05:30
Robo
62d15953ff
remote: track listeners for browser side
2015-10-29 17:51:56 +05:30
Cheng Zhao
f399f50e9e
Fix calling showItemInFolder in renderer
...
The remote method always assumes the existence of the remote object but
doesn't keep a reference to it, so if we only keep the reference of a
remote method we will get into troubles once the remote object is
garbage collected.
We should probably fix this in remote module, but since most things are
already working quite good, I'm using the work-around for now.
Fix #3139 .
2015-10-26 16:48:27 +08:00
Cheng Zhao
6bfe06ec4e
Pass original argv in callback
2015-10-22 19:02:21 +08:00
Cheng Zhao
d9fdfb711f
Clean up CallbackRegistry
...
There were some ancient code there.
2015-10-16 20:25:30 +08:00
Ben Gotow
aeb24b784d
Allow "released callback" errors to be traced to remote calls
2015-10-15 18:46:59 -07:00
Cheng Zhao
7b57a945f8
mac: Set process.mas to true for MAS build
2015-10-14 11:53:52 +08:00
Cheng Zhao
df12f181a4
Can not print string16 in wcout on POSIX
2015-10-10 17:43:56 +08:00
Eran Tiktin
1896deb10e
Fix console.* calls on Windows
...
- Calls for console.* on browser process are printed with no need for
--enable-logging
- The output is without the logging prefix
- The cursor in the terminal is always after the last output
- The first output starts on a new line and not at the prompt
- console.* from renderer are not printed to cmd
- Added a missing '\n' in the default_app help output
2015-10-10 06:39:02 +03:00
Robo
7756bb6762
webcontents: notify guests of embedders' zoom level change
2015-10-08 10:38:22 +05:30
Cheng Zhao
e365cb6b1c
No longer needs to define node_includes.h at last
2015-09-07 16:41:49 +08:00
Cheng Zhao
45491ca7ab
Fix API changes
2015-09-03 17:50:23 +09:00
Robo
af52eda0eb
process: api to set file descriptor soft limit
2015-08-31 13:00:04 +05:30
Cheng Zhao
63eb4b72e2
IDWeakMap is not used anly more in JS
2015-08-27 19:55:16 +08:00
Cheng Zhao
64e8ce0c07
Don't rely on IDWeakMap for bookkeeping remote objects
...
It frees us from using C++ to track JS objects, thus improves the
performance of collecting memory.
2015-08-27 19:01:34 +08:00
Cheng Zhao
bd64f5ced2
Use V8's new SetWeak method
2015-08-27 16:41:51 +08:00
Cheng Zhao
9212a1db8e
Merge branch 'master' into chrome44
2015-08-21 19:29:34 +08:00
Cheng Zhao
82fc98848a
win: Move the ICO reading code into a separate function
2015-08-21 12:06:38 +08:00
Eran Tiktin
f386342a7c
Fix memory leak and confirming to style guide
...
Fixed according to @hokein 's suggestions.
2015-08-20 19:26:20 +03:00
Eran Tiktin
2bc087b5d5
Merge branch 'master' into nativeimage_ico_support_windows
2015-08-20 17:11:52 +03:00
Haojian Wu
11ffb9dfb6
Fix node::Buffer API changes.
2015-08-11 09:48:29 +08:00
Eran Tiktin
850edd546c
Added support for reading .ico from asar
...
If the file path is to an asar archive, we extract the file to temp, so
LoadImage can load it
2015-08-08 21:57:29 +03:00
Eran Tiktin
ab1b4c46b2
Converted tabs to spaces
2015-08-08 18:31:12 +03:00
Eran Tiktin
bec7a399cb
Add support for using .ico icon files on Windows
...
NativeImage::CreateFromPath now supports loading .ico icon files on
Windows.
2015-08-08 17:58:05 +03:00
Cheng Zhao
c51f349dfa
Run microtask before handling pending process.nextTick tasks
...
This follows the behavior of Node.js.
2015-08-07 21:26:24 +08:00
Cheng Zhao
1bb0dde360
Use WebScopedRunV8Script in converted C++ functions
2015-08-07 19:37:17 +08:00
Cheng Zhao
2ff104d012
Move callback converter from native mate to electron
2015-08-07 19:35:35 +08:00
Cheng Zhao
2f04f76e69
ImageSkiaRep doesn't release memory
2015-08-05 15:49:37 +08:00
Robo
239d535cac
render: executejavascript with option to simulate usergesture
2015-07-30 15:38:46 +05:30
Cheng Zhao
2d5c0ac9ee
Coffeescript declares variable before assigning it
2015-07-30 10:31:49 +08:00
Cheng Zhao
8d09f13bad
Fix running callback when global.global is deleted
...
Close #2366 .
2015-07-30 10:28:24 +08:00
Cheng Zhao
9afa94f4b8
win: Implement double-clicked event
2015-07-29 12:36:01 +08:00
Cheng Zhao
2c97cd64cf
Minor style fix for #2352
2015-07-29 11:48:40 +08:00
Nishanth Shanmugham
9211109088
Add NativeImage.IsTemplateImage method
...
* Rename internal function that determines template image filename patterns
* Add the new IsTemplateMethod
2015-07-26 21:58:48 -07:00
Robo
2d3e938a7f
clipboard: api to write multiple formats to same writer
2015-07-10 09:20:52 +05:30
Cheng Zhao
15f350edcb
Don't make IDWeakMap public API
2015-06-24 13:38:55 +08:00
Cheng Zhao
d02413de00
Make the JS IDWeakMap a thin wrapper of C++ IDWeakMap
2015-06-24 13:35:39 +08:00
deepak1556
8e05fe3350
process: add hang method
2015-06-18 14:14:29 +05:30
Cheng Zhao
132c13a11b
Fix calls to deprecated node::ThrowError API
2015-06-10 14:21:09 +08:00
Cheng Zhao
db9615f5cd
Don't rely on JS for setting optional argument
...
It makes the code much shorter and cleaner.
2015-06-10 12:12:37 +08:00
Cheng Zhao
200a19dad9
linux: Don't use clipboard module in renderer process
2015-06-10 11:57:28 +08:00
Haojian Wu
cd1c331112
Fix coffeelint error.
2015-06-06 17:59:20 +08:00
Haojian Wu
c821a06e2f
Implement crash-reporter.getUploadedReports API.
...
Also redefine the getLastCrashReport API implementation using
getUploadedReports API.
2015-06-05 18:59:03 +08:00
Cheng Zhao
f54506acc0
Merge pull request #1822 from hokein/crashpad-mac
...
Crashpad!
2015-06-04 22:11:14 +08:00
Haojian Wu
d5b47d1059
Simplify and polish the code.
2015-06-04 15:53:37 +08:00
Haojian Wu
94382cbaa2
Fix cpplint error.
2015-06-03 11:31:34 +08:00
Haojian Wu
4457edb1d3
Implement crash-reporter.getLastLastCrashReport API on OS X.
2015-06-03 09:47:42 +08:00
deepak1556
4d56281972
restore clipboard.has api and fix docs
2015-05-27 13:35:51 +05:30
deepak1556
5584e3fd49
clipboard: api to list supported types, reading and writing markup
2015-05-27 13:21:56 +05:30
Cheng Zhao
d78efe7c22
Use Local instead of Handle
2015-05-22 19:11:22 +08:00
Cheng Zhao
01e891652f
Fix compilation errors
2015-05-22 15:24:34 +08:00
Cheng Zhao
fa169ee7ff
Remove the original-fs.js
...
It is acutally not needed.
2015-05-20 13:31:28 +08:00
Cheng Zhao
d8d7e5b9bb
Add Archive::GetFD
2015-05-11 11:02:17 +08:00
Cheng Zhao
cd0aa4a956
Merge pull request #1389 from atom/rename-to-electron
...
Rename to electron
2015-04-17 15:22:07 +08:00
Cheng Zhao
76316e5e65
Forgot to set default version in crash reporter
2015-04-14 17:37:22 +08:00
Cheng Zhao
c6c305a827
Don't hard-code product name in crash-repoter
2015-04-14 15:39:48 +08:00
Cheng Zhao
b86f149512
Set process.versions['electron']
2015-04-14 14:18:20 +08:00
Cheng Zhao
91c9f590dd
Remove the NativeImage::MakeTemplateImage method
...
Is duplicate with SetTemplateImage.
2015-04-13 11:53:24 +08:00
deepak1556
efd294d69d
nativeImage: adding setTemplateImage method
2015-04-08 14:39:14 +05:30
Cheng Zhao
b54e786b09
linux: it is now safe to use clipboard in renderer process
2015-03-26 15:46:08 +08:00
Cheng Zhao
6f082b630d
Add clipboard.writeImage API
2015-03-26 12:54:15 +08:00
Cheng Zhao
b5a8cfb704
Recognize asar archive with unpacked files
2015-03-20 20:34:58 +08:00
Cheng Zhao
3678f13dfb
Make NativeImage work with asar archive
2015-02-12 19:34:21 +08:00
Cheng Zhao
c8738a88a4
Add nativeImage.createFromBuffer()
2015-02-12 15:19:05 +08:00
Cheng Zhao
353b485202
Add NativeImage.toDataUrl()
2015-02-12 14:32:51 +08:00
Cheng Zhao
8e94856cc8
Add nativeImage.createFromDataUrl()
2015-02-12 14:27:53 +08:00
Cheng Zhao
b9f6d6dffc
Add nativeImage.createEmpty()
2015-02-12 13:55:45 +08:00
Cheng Zhao
509ce0d5cb
mac: Don't rely on NSImage to read file
...
It doesn't work with asar.
2015-02-12 12:24:18 +08:00
Cheng Zhao
2ca6be69e2
Fix cpplint warnings
2015-02-12 10:45:04 +08:00
Cheng Zhao
054b6a9817
Use NativeImage when converting images from V8
2015-02-12 10:45:04 +08:00
Cheng Zhao
6556602bdc
Enable creating NativeImage from file path
2015-02-12 10:45:04 +08:00
Cheng Zhao
2876f15063
Enable creating NativeImage with native-image module
2015-02-12 10:45:04 +08:00
Cheng Zhao
85f5ef2ab1
Enable creating NativeImage from PNG and JPEG
2015-02-12 10:45:04 +08:00
Cheng Zhao
53fca43d89
Add NativeImage.ToJPEG
2015-02-12 10:45:03 +08:00
Cheng Zhao
549df36f00
Add a few more methods for NativeImage
2015-02-12 10:45:03 +08:00
Cheng Zhao
aae576b484
Convert gfx::Image to NativeImage instance
2015-02-12 10:45:03 +08:00
Cheng Zhao
b76615f3e7
Add clipboard.readImage method
2015-02-12 10:45:03 +08:00
Cheng Zhao
7861eec426
linux: Fix building
2015-02-04 11:18:25 -08:00
Cheng Zhao
a02707f998
Fix cpplint warnings
2015-02-04 11:01:01 -08:00
Cheng Zhao
45e2dd2ab5
Init asar support without external .js files
2015-02-04 10:45:17 -08:00
Cheng Zhao
afd6f41e08
Redirect process.binding('natives').fs to global fs object
2015-02-02 13:35:32 -08:00
Cheng Zhao
12998399f8
Do not warn about deprecated APIs
...
Some APIs deprecated by iojs is still in use.
2015-01-27 14:49:14 -08:00
Cheng Zhao
c2b109f7fc
Fix process.crash()
2015-01-23 21:55:42 -08:00
Cheng Zhao
a755edebfa
Simplify atom_bindings
2015-01-23 21:33:40 -08:00
Cheng Zhao
7e33e26465
Add atom-shell bindings before loading environment
2015-01-21 15:02:09 -08:00
Cheng Zhao
0933a7d1b2
Evaluate the "fs.js" in original-fs
...
Some high-level APIs in fs are using low-level APIs via "fs.xxx", which
will be overriden by our asar wrappers, so just shadow-copy those
methods is not enough.
By evaluating the whole "fs.js" we can make sure original-fs is not
polluted by the asar wrappers.
Fixes #782 .
2015-01-19 14:22:32 -08:00
Cheng Zhao
809c995c0b
Make "screen" module a browser module
2015-01-16 11:01:38 -08:00
Cheng Zhao
97070246b7
Don't put gfx_converter's implementaion in header file
2015-01-16 11:01:38 -08:00
Cheng Zhao
029ee9aa1e
Add a few more API bindings
2015-01-16 11:01:38 -08:00
Cheng Zhao
509294b228
Don't hard-code API names
2015-01-16 11:01:38 -08:00
Cheng Zhao
895ccf69a7
Avoid using app API in renderer process for #907
2015-01-04 22:51:00 -08:00
Cheng Zhao
335cd79b37
Don't call Screen functions until app is ready
...
Fixes #907 .
2015-01-04 22:27:02 -08:00
Cheng Zhao
10823eeeaa
Fix compilation errors caused by Chrome 39
2014-12-07 07:43:26 -08:00
Cheng Zhao
5cb97545fd
Add original-fs module
2014-11-12 11:09:59 +08:00
Cheng Zhao
66e96f69fc
Add crashRepoter.getLastCrashReport API
2014-11-11 17:30:01 +08:00
Kevin Sawicki
b6b6fc3bfd
Remove All Rights Reserved after GitHub copyright
...
Closes #762
2014-10-31 11:17:05 -07:00
Cheng Zhao
24b4fcea15
Add BIND_DONE event for process object
2014-10-25 23:21:17 +08:00
Cheng Zhao
2d8fe489a7
Add converters between gfx:: and v8
2014-10-24 12:48:52 +08:00
Cheng Zhao
32dff999a5
Fix API changes of Chrome 38
2014-10-11 19:11:34 +08:00
Cheng Zhao
cc4897f8c1
Add process.versions['chrome'], fixes #675
2014-10-02 23:48:17 +08:00
Cheng Zhao
885ac53a48
asar: Add support in fs.realpathSync
2014-09-30 14:53:58 +08:00
Cheng Zhao
c49a44f944
Remove unneeded ArchiveFactory.
2014-09-25 21:54:59 +08:00
Cheng Zhao
05317ad81e
Clean cached asar archives when quitting.
2014-09-25 21:49:01 +08:00
Cheng Zhao
dbbfef38b1
Cache asar archives on JavaScript side.
2014-09-25 20:48:32 +08:00
Cheng Zhao
4006b6407c
Just use plain pointer for weak reference.
2014-09-25 20:38:12 +08:00