Commit graph

819 commits

Author SHA1 Message Date
Cheng Zhao
0aa0efa439 Do not print warning for FILE_ERROR_NOT_FOUND
Close #4282.
2016-01-30 20:49:35 +08:00
Robo
2a278ceb8f delegate to permission manager for other permissions 2016-01-30 16:49:18 +05:30
Cheng Zhao
9d8e23c822 Bump v0.36.7 2016-01-30 13:20:46 +08:00
Cheng Zhao
899294a040 win: Don't close the handle since we already closed the fd
Fix #4266.
2016-01-30 11:47:22 +08:00
Robo
85e13333c3 webview: add permission-request event 2016-01-29 15:23:28 +05:30
Cheng Zhao
30b35644f6 Bump v0.36.6 2016-01-29 12:43:35 +08:00
Cheng Zhao
516b01e398 win: Call _close before close file handle
Fix #4258.
2016-01-28 22:38:53 +08:00
Paul Betts
05aeceeb52 Always fall back to OpenFolderViaShell when trying to reveal a file
We should always fallback to OpenFolderViaShell when revealing a file fails,
since this API seems to be highly subject to Random Bad Things happening to
you.
2016-01-28 19:05:16 +08:00
Cheng Zhao
30ff18ac64 Merge branch 'webrequest_upload_data_patch' of https://github.com/deepak1556/atom-shell into deepak1556-webrequest_upload_data_patch 2016-01-28 18:41:39 +08:00
Robo
a6bcc5d110 common: export hideInternalModules 2016-01-27 18:44:47 +05:30
Robo
dc0151099c session: provide uploadData with webrequest api when available 2016-01-27 18:39:40 +05:30
Cheng Zhao
e1e58b642e Merge pull request #4182 from deepak1556/debugger_api_patch
browser: add webContents.debugger api
2016-01-24 21:43:18 +08:00
Cheng Zhao
5372b6cd91 Fullscreenable => FullScreenable 2016-01-24 14:31:36 +08:00
Cheng Zhao
31624995bc Merge pull request #4202 from evgenyzinoviev/shadow-pr
Added hasShadow option to BrowserWindow on OS X
2016-01-22 23:56:38 -08:00
Cheng Zhao
8cabe0f008 Merge pull request #4156 from evgenyzinoviev/windows-pr
Improvements in BrowserWindow
2016-01-22 23:42:41 -08:00
Robo
d938dd68b0 wrap debugger for lazy initialization 2016-01-23 09:32:21 +05:30
evgenyzinoviev
ff41b4a267 added hasShadow option to BrowserWindow (osx) 2016-01-23 01:16:08 +01:00
evgenyzinoviev
ef51e4e108 maximizable and fullscreenable 2016-01-22 23:21:46 +01:00
Cheng Zhao
a230a89de4 Bump v0.36.5 2016-01-21 17:04:38 -07:00
Ben Gotow
a3b6f69772 Log ASAR file access to build ordering hint file
This is a work in progress—need to make this behavior optional via a new flag.
2016-01-21 14:45:22 -08:00
Kevin Sawicki
16b4b58de1 e -> error 2016-01-21 09:32:21 -07:00
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
Kevin Sawicki
4f4456bde8 Clean up indent eslint errors 2016-01-21 09:32:21 -07:00
evgenyzinoviev
2a554cb138 added or/and improved closable, minimizable, movable, resizable features for windows on os x and windows 2016-01-19 16:14:57 +01:00
Cheng Zhao
3b62ce7fa6 modules.exports => module.exports 2016-01-16 14:26:01 +08:00
Cheng Zhao
25afcf2673 Merge pull request #4121 from atom/format-coffee-helpers
Format leftover CoffeeScript helpers
2016-01-16 13:24:26 +08:00
Cheng Zhao
b132c0dde8 Update brightray, close #4124 2016-01-16 11:43:46 +08:00
Eran Tiktin
85449e953e Fix Windows crash when trying to free asar fd 2016-01-16 03:48:07 +02: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
Kevin Sawicki
741d148776 Add missing semicolon 2016-01-15 10:09:19 -08:00
Kevin Sawicki
b119704ea9 Use 2 space indent instead of 3 2016-01-15 10:05:35 -08:00
Cheng Zhao
63278aeec2 Merge pull request #4118 from Ivshti/patch-1
Ensure we close FD on Windows
2016-01-15 23:58:57 +08:00
Cheng Zhao
0937144849 Merge pull request #4111 from evgenyzinoviev/movable
Added an option to prevent a window from being moved on OS X
2016-01-15 23:24:22 +08:00
Ivo Georgiev
7586078d0a Ensure we close FD on Windows 2016-01-15 16:54:29 +02:00
Cheng Zhao
3875b30fcf Merge pull request #4109 from atom/const
[WIP] Use `const` for requires
2016-01-15 16:32:07 +08:00
Cheng Zhao
39225ac5ec Bump v0.36.4 2016-01-15 14:27:19 +08:00
evgenyzinoviev
cda88db77c Added option to prevent a window from being moved on OS X 2016-01-15 03:58:57 +01:00
Jessica Lord
ab8908a4af Use const 2016-01-14 14:41:46 -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
b547a38b3f Add wrapper functions to mirror old CoffeeScript 2016-01-12 16:24:06 -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
df27cda36c Bump v0.36.3 2016-01-08 13:40:47 +08:00
Cheng Zhao
3f2b26ddb7 Add blinkFeatures option 2016-01-07 14:10:18 +08:00
Cheng Zhao
bd20b3f32a Rely on content switches for implementing experimental features 2016-01-07 12:49:00 +08:00
Cheng Zhao
16d23bbda5 Remove pageVisibility option
The original purpose of this option is not working anymore, also adds
docs on the current way to disable process backgrounding.
2016-01-07 12:28:20 +08:00
Cheng Zhao
c6e03f8390 Remove overlayScrollbars and sharedWorker options
They are already enabled by default.
2016-01-07 12:17:19 +08:00
Cheng Zhao
c4071a7f66 Throw ENOTDIR when calling mkdir inside asar archive 2016-01-06 12:04:16 +08:00
Cyrille Lebeaupin
9d878ad6b2 Add widevine third party
Add 2 new command options to use widevine:
- widevine-cdm-path: Path to widevine plugin
- widevine-cdm-version: Version of the widevine plugin
2015-12-29 14:50:59 +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
9ffe502fb1 Bump v0.36.2 2015-12-25 13:45:07 +08:00
Cheng Zhao
6aa3464aad Merge pull request #3912 from tylergibson/FixingMoveItemToTrash-Windows7
Adding check for Windows version and alternate flags for Windows Vista/7
2015-12-24 15:32:09 +08:00
Tyler Gibson
2d0e1c313a Adding check for Windows version and alternate flags for Windows Vista/7 2015-12-24 06:08:43 +00:00
Cheng Zhao
7bd9f2e5d0 Fix converting string to NSURL 2015-12-24 12:43:07 +08:00
Robo
61004f0e46 fix cpplint warning 2015-12-21 19:16:02 +05:30
Robo
d162180196 add api to webview 2015-12-21 17:13:23 +05:30
Robo
39e615ed87 webContents: adding findInPage api 2015-12-21 17:09:56 +05:30
Cheng Zhao
bff2861311 Bump v0.36.1 2015-12-18 13:16:30 +08:00
Cheng Zhao
7d000807c5 Merge pull request #3849 from herrmannplatz/improvement/escape-url-openexternal
escape url string
2015-12-18 09:45:39 +08:00
rehez
9eb797296c escape url string 2015-12-17 16:23:30 +01:00
Cheng Zhao
353f08e477 Remove sync call in remote module 2015-12-17 22:03:16 +08:00
Cheng Zhao
0282d424bf Pass opener ID in command line 2015-12-17 21:27:14 +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
fed94aada0 Make the webRequest listener asynchronous 2015-12-12 00:09:03 +08:00
Cheng Zhao
98ba1a24db Merge pull request #3640 from deepak1556/webrequest_api_patch
session: add webrequest api
2015-12-11 16:56:00 +08:00
Cheng Zhao
9495392a1a Bump v0.36.0 2015-12-11 11:49:01 +08:00
Robo
658accab94 fix pointer usage 2015-12-11 00:25:25 +05:30
Cheng Zhao
a05aa81570 Merge pull request #3701 from deepak1556/protocol_post_data_patch
protocol: provide upload data when available
2015-12-10 19:38:35 +08:00
Robo
13b5cab738 session: add webrequest api 2015-12-09 20:14:18 +05:30
deepak1556
940289639e protocol: provide upload data when available 2015-12-09 20:10:57 +05:30
Robo
855d49100f protocol: api to register schemes that can handle service worker 2015-12-09 03:11:58 +05:30
Cheng Zhao
04f7ceab73 Merge branch 'master' into desktop-capture-api 2015-12-08 12:43:44 +08:00
Cheng Zhao
407e88cbad Update brightray 2015-12-08 12:08:33 +08:00
Paul Betts
3931ebb7ef Fix up Windows build errors 2015-12-07 10:02:06 -08:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
Cheng Zhao
e1d7ef7e24 Bump v0.35.4 2015-12-04 19:23:48 +08:00
Cheng Zhao
c8e2be7b28 Bump v0.35.3 2015-12-04 16:43:23 +08:00
Cheng Zhao
1e7c8c9fda It is fine to leak a V8 handle on exit 2015-12-03 16:33:57 +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
e5358d405a Make sure V8 Function passed to native code are destroyed on UI thread 2015-12-03 11:24:33 +08:00
Cheng Zhao
c493bec089 Make sure temp file will be cleaned up when base::Move fails 2015-12-02 11:36:29 +08:00
Cheng Zhao
c3645e3f95 Don't call Move if there is no need to move 2015-12-02 11:07:48 +08:00
Juan Cruz Viotti
a99c193cf2 🏁 Preserve file extension when extracting from asar
Currently, when calling `copyFileOut`, the original extension from the
file is lost, and a generic `*.tmp` is added instead.

This becomes problematic in the scenario where we use
`child_process.execFile` on a Windows Batch script that lives inside the
`asar` package.

Windows relies on the extension being present in order to interpret the
script accordingly, which results in the following bug because the
operating system doesn't know what do to with this `*.tmp` file:

```
Error: spawn UNKNOWN
```

Steps to reproduce:

1. Create a dummy batch script (test.bat):

```
@echo off
echo "Hello world"
```

2. Create an electron app that attemps to call this script with
`child_process.execFile`:

```js
var child_process = require('child_process');
var path = require('path');

child_process.execFile(path.join(__dirname, 'test.bat'), function(error, stdout) {
    if (error) throw error;
    console.log(stdout);
});
```

3. Package this small application as an asar archive:

```sh
> asar pack mytestapp app.asar
```

4. Execute the application:

```sh
> electron.exe app.asar
```
2015-12-01 14:55:58 -04:00
Cheng Zhao
0f17a0163d Put common constants in atom_constants 2015-12-01 16:21:15 +08:00
Cheng Zhao
e3ec1fe8ab Add process.noAsar to turn off asar support 2015-12-01 13:09:37 +08:00
Cheng Zhao
62add3abcc Bump v0.35.2 2015-11-27 22:23:19 +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
29052b0498 Bump v0.35.1 2015-11-20 13:36:59 +08:00
Cheng Zhao
784d2633a9 Make child_process.execFileSync support asar 2015-11-20 10:33:57 +08:00
Cheng Zhao
24f573eceb Merge pull request #3344 from deepak1556/certificate_verifier_api_patch
session: api to allow handling certificate verification
2015-11-17 18:53:35 +08:00
Cheng Zhao
202d2eeb8a Merge pull request #3454 from brenca/keyboard-pr
Adding further options to specify the character being sent with sendInputEvent (keyboard)
2015-11-16 22:13:09 +08:00
Heilig Benedek
14740eeb8a Merging keyCode and keyIdentifier and adjusting the docs accordingly 2015-11-16 14:51:26 +01:00
Cheng Zhao
9e70d35afa Bump v0.35.0 2015-11-16 16:48:51 +08:00
Heilig Benedek
bb6d7d1498 Added the option to KeyboardEvent to specify the sent character by it's name (if it can't be sent via the keyCode parameter) 2015-11-16 04:54:21 +01: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
860c46b3c1 Separate options from switches
On Windows the case sensitivity of command line switches are ignored, so
--nodeIntegraion will become --nodeintegration.

We should separate options from switches so we use "nodeIntegraion" in
options, while passing "--node-integration" in command line.
2015-11-13 14:05:49 +08:00
Cheng Zhao
996a3c2a35 Merge branch 'content_tracing_patch' of https://github.com/deepak1556/atom-shell into deepak1556-content_tracing_patch 2015-11-13 12:29:18 +08:00
Cheng Zhao
852500e5fa Fix a few places using old style require 2015-11-13 09:38:22 +08:00
Robo
3d5437e0a4 tracing: fix docs and allow null values in file path conversion fromv8 2015-11-13 02:36:38 +05:30
Robo
d072e61282 session: api to allow handling certificate verification 2015-11-13 01:27:30 +05:30
Cheng Zhao
2ca5a33d28 Add electron.hideInternalModules 2015-11-12 21:46:03 +08:00
Cheng Zhao
c649c4cf4f Rename the env to ELECTRON_HIDE_INTERNAL_MODULES 2015-11-12 21:37:44 +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
f9d7e7ce55 Add ELECTRON_DISABLE_OLD_STYLE_MODULES env 2015-11-12 17:02:04 +08:00
Cheng Zhao
c2c09daa23 Add "electron" module 2015-11-12 16:40:27 +08:00
Cheng Zhao
737e22b003 Use minWidth style for options instead of min-width 2015-11-11 10:37:34 +08:00
Cheng Zhao
d37aa8bed9 Reorder switches 2015-11-11 10:37:34 +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
312a79165b Bump v0.34.3 2015-11-06 21:37:37 +08:00
Cheng Zhao
d70706f876 Make sure handles of callbacks are releases on exit
Some callbacks are stored in native resources that not managed by
JavaScript, so when those resources are destroyed the JavaScript context
may already be destroyed, and releasing callbacks then would result in
crash.
2015-11-06 21:00:32 +08:00
Cheng Zhao
acf4372cf7 win: Add ELECTRON_DEFAULT_ERROR_MODE env
It is useful to help debugging crashes without opening debugger.
2015-11-06 20:25:20 +08:00
Cheng Zhao
2505ebb9a6 win: Guard against failure of RtlAddFunctionTable
On some machines this call will fail and CHECK will abort the
application.
2015-11-05 22:00:40 +08:00
Cheng Zhao
47649ffd17 win: Fix calling showItemInFolder in renderer process 2015-11-05 20:47:27 +08:00
Tyler Gibson
4ff5ce4d6d Fixing MoveItemToTrash behavior in Windows
Modifying MoveItemToTrash for Windows to actually verify file can be
moved to a drive's recycle bin before attempting to delete it.

PR: #3337.
2015-11-05 20:42:30 +08:00
Cheng Zhao
9236adfbf5 Translate menu template directly in C++ 2015-11-02 23:31:44 +08:00
Robo
c969052f12 browser: handle flash context menu 2015-11-01 01:13:17 +05:30
Cheng Zhao
cb91d4487b Clean up the code handling renderer callback 2015-10-31 15:00:06 +08:00
Cheng Zhao
323ab92299 Merge pull request #3251 from deepak1556/remote_callback_patch
remote: track listeners on browser side
2015-10-31 14:18:58 +08:00
Robo
2c59f4567e use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
Antonio Scandurra
9c69877421 Allow v8 to optimize fs.readFileSync 2015-10-30 10:30:27 +01:00
Cheng Zhao
21a7c459d8 Bump v0.34.2 2015-10-30 14:50:57 +08:00
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
f40a3f72d7 Converted callback can only be called for once 2015-10-28 20:44:46 +08:00
Cheng Zhao
4eac6b31b1 Also pass "webContents" in "login" event 2015-10-28 20:23:18 +08:00
Cheng Zhao
131531219e Pass auth_info and request in "login" event 2015-10-28 20:13:06 +08:00
Cheng Zhao
54dad72d92 Don't leak TranslaterHolder 2015-10-28 19:54:59 +08:00
Cheng Zhao
3881ad1c4b Don't leak FunctionTemplate when converting C++ callback 2015-10-28 19:54:59 +08:00
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