Compare commits

...

3740 Commits

Author SHA1 Message Date
John Kleinschmidt
c30a6beece v1.6.18 2018-05-15 15:26:48 -04:00
John Kleinschmidt
1449a36d34 Merge pull request #12925 from electron/unsupported-warning_1-6-x
add end-of-support warning
2018-05-15 12:04:53 -04:00
Charles Kerr
06e375c0c2 add end-of-support warning 2018-05-14 19:15:49 -05:00
John Kleinschmidt
347f3c7dc2 v1.6.17 2018-01-31 15:12:28 -07:00
John Kleinschmidt
c29251cb9d Merge pull request #11778 from electron/parallel-releases-1-6-x
Allow multiple releases to run at once for 1-6-x
2018-01-31 13:42:38 -05:00
John Kleinschmidt
7f74a39346 Merge pull request #11786 from electron/case-insensitive-comparison-1-6-x
Do case insensitive comparisons
2018-01-31 13:38:05 -05:00
Samuel Attard
a7c8e7241b Do case insensitive comparisons 2018-01-31 10:40:24 -07:00
John Kleinschmidt
6360acb87b Allow multiple releases to run at once
Find draft release by draft flag and tag name;also backport release scripts to 1-6-x
2018-01-30 18:08:35 -07:00
John Kleinschmidt
acc04b9ca6 Backport for upload retry 2018-01-22 19:26:35 -05:00
John Kleinschmidt
fcd7692182 Bump v1.6.16 2018-01-22 17:10:13 -05:00
Aleš Pergl
ad0f44843d Disallow launching unknown apps via browser client.
CVE-2018-1000006
2018-01-22 15:26:47 -06:00
John Kleinschmidt
5a44e7c058 Bump for missing builds 2017-10-11 12:27:12 -04:00
John Kleinschmidt
bee5a70fbf Bump v1.6.15 2017-10-11 11:28:58 -04:00
John Kleinschmidt
73c4fe626b Merge pull request #10756 from electron/1-6-crankshaft-fix
Crankshaft RCE fix
2017-10-11 11:12:23 -04:00
John Kleinschmidt
befa1d9c79 Crankshaft RCE fix 2017-10-11 10:45:36 -04:00
John Kleinschmidt
40e37c68d5 Add publish-to-npm script 2017-09-28 09:20:28 -04:00
John Kleinschmidt
0c37f633b8 Remove arm64 references from prerelease check 2017-09-28 09:20:17 -04:00
John Kleinschmidt
1723c302f7 Bump for release build 2017-09-27 19:00:58 -04:00
John Kleinschmidt
f41051fe60 Merge branch 'release-1-6' of https://github.com/electron/electron into release-1-6 2017-09-27 18:55:18 -04:00
John Kleinschmidt
396a49e349 Bump for building with larger machines 2017-09-27 18:54:23 -04:00
John Kleinschmidt
482a1d2e2b Bump to add release logic to CircleCI 2017-09-27 18:50:30 -04:00
John Kleinschmidt
ca6127c802 Bump to properly set ELECTRON_RELEASE 2017-09-27 18:35:50 -04:00
John Kleinschmidt
588f906fba Bump to fix bootstrap call 2017-09-27 18:35:49 -04:00
John Kleinschmidt
14bdbbcc10 Bump to fix circleci indentation 2017-09-27 18:35:49 -04:00
John Kleinschmidt
a0cec63c91 Bump for circleCI config update 2017-09-27 18:35:49 -04:00
John Kleinschmidt
233fdeaef0 Bump to add release logic to CircleCI 2017-09-27 18:35:49 -04:00
John Kleinschmidt
54b12ba15d Bump to add prerelease check 2017-09-27 18:35:49 -04:00
John Kleinschmidt
cfa4fbc9c1 Change GitHub upload to use JS GitHub lib 2017-09-27 18:35:49 -04:00
John Kleinschmidt
4b03f5b87e Bump v1.6.14 2017-09-27 18:35:49 -04:00
John Kleinschmidt
acf6518317 Bump for building with larger machines 2017-09-27 17:44:32 -04:00
John Kleinschmidt
f7e07205b4 Bump to properly set ELECTRON_RELEASE 2017-09-27 15:59:45 -04:00
John Kleinschmidt
248c1e1118 Bump to fix bootstrap call 2017-09-27 15:37:49 -04:00
John Kleinschmidt
cb251892c2 Bump to fix circleci indentation 2017-09-27 15:30:59 -04:00
John Kleinschmidt
5fcf20a7aa Bump for circleCI config update 2017-09-27 15:27:27 -04:00
John Kleinschmidt
2e38f9ca1c Bump to add release logic to CircleCI 2017-09-27 14:42:09 -04:00
Birunthan Mohanathas
ece433f766 Merge pull request #10631 from electron/squirrel-avoid-double-update-1-6
Use Squirrel.Windows --checkForUpdate (1.6.x)
2017-09-27 21:20:30 +03:00
J.M
f6005ce28d Use Squirrel.Windows --checkForUpdate
This cherry-picks #10483 to fix #5057.
2017-09-27 20:35:08 +03:00
John Kleinschmidt
93cea48d04 Bump to add prerelease check 2017-09-27 11:27:36 -04:00
John Kleinschmidt
4fb6bef8ed Bump for release build 2017-09-24 14:41:19 +09:00
John Kleinschmidt
f4fd62db47 Change GitHub upload to use JS GitHub lib 2017-09-24 14:40:37 +09:00
John Kleinschmidt
2ede7d9ec9 Bump v1.6.14 2017-09-24 14:14:03 +09:00
John Kleinschmidt
7a67c36cdb Disable flaky cert tests 2017-09-24 10:09:46 +09:00
John Kleinschmidt
1131b5ae2f Merge pull request #10587 from electron/turbofan-fix
Apply turbofan-fix
2017-09-23 18:14:50 +09:00
John Kleinschmidt
9429eea12c Apply turbofan-fix 2017-09-23 16:54:55 +09:00
John Kleinschmidt
a0b04005a9 Fix CircleCI test step 2017-09-13 11:24:53 -04:00
John Kleinschmidt
a7d3cea6e8 Add CircleCI config 2017-09-13 10:36:20 -04:00
John Kleinschmidt
f2fe287b34 Bump v1.6.13 2017-09-06 13:17:43 -04:00
John Kleinschmidt
47242064ba Fix syntax error 2017-09-06 12:54:26 -04:00
John Kleinschmidt
da73284515 Make sure future 1.6 releases are tagged correctly 2017-09-06 12:30:47 -04:00
John Kleinschmidt
9b74f25770 Backport macOS IME backspace fix for 1.6.x (#10450) 2017-09-06 11:25:14 -04:00
Zeke Sikelianos
dcb5a34922 Bump empty commit 2017-08-03 13:31:21 -07:00
Zeke Sikelianos
df55c1e717 Bump a third time 2017-08-03 10:43:29 -07:00
Zeke Sikelianos
a62f13856b Bump v1.6.12 2017-08-03 10:38:07 -07:00
Zeke Sikelianos
c83ff61fdf lock typescript generator to older version 2017-08-03 10:37:45 -07:00
John Kleinschmidt
2b83512c44 Merge pull request #10166 from electron/1-6-fixes
Backport fixes to 1.6
2017-08-02 16:58:14 -04:00
John Kleinschmidt
c12f7d3132 Fix commitText invocation 2017-08-02 09:45:42 -04:00
Zeke Sikelianos
9c0a8ab168 point to newer 1-6-fixes commit 2017-08-01 15:57:24 -07:00
Zeke Sikelianos
8842b04567 Merge pull request #10164 from electron/backport-10070-1-6-x
Backport 10070 to 1.6
2017-08-01 10:10:18 -07:00
Zeke Sikelianos
0573919fd3 use latest commit from libcc electron-1-6-x branch 2017-07-31 16:01:36 -07:00
Cheng Zhao
5253c0a816 Leak the Node environment when context is released 2017-07-31 13:23:35 -07:00
John Kleinschmidt
05b412313d Backport 10070 to 1.6 2017-07-31 10:20:49 -04:00
Kevin Sawicki
0428632a4e Bump v1.6.11 2017-05-25 10:56:30 -07:00
Kevin Sawicki
855d2c4b20 Merge pull request #9586 from electron/upgrade-libcc
Upgrade libcc with 1.6.x fixes
2017-05-25 10:55:25 -07:00
Kevin Sawicki
f0402be869 Enable verbose bootstrap on CI 2017-05-25 10:25:51 -07:00
Kevin Sawicki
5a1e3fc0f3 Upgrade to electron/libchromiumcontent@e2ec6935 2017-05-25 09:51:16 -07:00
Kevin Sawicki
01c31ee924 Merge pull request #9564 from rreimann/pdf-plugins-preference-backport
Backport suppress dispatching to PDF viewer if plugins are disabled to 1.6.x
2017-05-24 09:04:33 -07:00
rreimann
c29316b568 Remove superfluous method 2017-05-24 07:09:51 +02:00
Kevin Sawicki
21f15fa87e Delete mock.pdf after download completes
(cherry picked from commit 647e88da5a)
2017-05-23 14:22:26 +02:00
rreimann
ab95ecda42 Fix naming and formatting
(cherry picked from commit 25015c4c63)
2017-05-23 14:22:08 +02:00
rreimann
456e83f286 Extract common code into IsPreferenceEnabled method
(cherry picked from commit 791486433d)
2017-05-23 14:21:53 +02:00
rreimann
1612ebc539 Move preferences check to OnPdfResourceIntercepted
(cherry picked from commit 65da983ccb)
2017-05-23 14:21:35 +02:00
rreimann
1ddb8a8bf1 Add new test and enable plugins for existing tests
(cherry picked from commit 13665090d5)
2017-05-23 14:21:09 +02:00
rreimann
bbcdbc2e7c Fix linting violations
(cherry picked from commit 7982754958)
2017-05-23 14:20:41 +02:00
rreimann
d94bbd1573 Suppress pdf plugin dispatch if plugins are disabled
(cherry picked from commit 1b75e45a62)
2017-05-23 14:20:00 +02:00
Kevin Sawicki
583e14efcd Merge pull request #9514 from electron/disable-crash-specs-on-linux
Backport disabling crash specs on linux to 1.6
2017-05-17 15:25:14 -07:00
Kevin Sawicki
b96803e3a0 Disable crashReporter specs on Linux CI 2017-05-17 15:00:39 -07:00
Kevin Sawicki
c03cb11aaf Merge pull request #9505 from electron/backport-sandbox-remote-exception-fix
Backport sandbox remote exception fix
2017-05-17 11:19:25 -07:00
Kevin Sawicki
5de881e668 Merge pull request #9499 from electron/node-cert-patch
Upgrade node for StartCom/WoSign cert rejection
2017-05-17 11:07:21 -07:00
Thiago de Arruda
964505398d Add test for #9387 2017-05-17 07:29:22 -03:00
Thiago de Arruda
16f2958ad7 Fix how rpc-server releases references after page reload
In addition to listening for "render-view-deleted", listen for
"ELECTRON_BROWSER_CONTEXT_RELEASE" synchronous message, which is sent by the
remote module when the page is about to be navigated.

This is required to allow child windows running in the same renderer to
correctly manage remote object references, since `render-view-deleted` is only
called when the renderer exits.

Close #9387
2017-05-17 07:29:06 -03:00
Kevin Sawicki
332b92ebab Upgrade node for StartCom/WoSign cert rejection 2017-05-16 16:29:43 -07:00
Kevin Sawicki
b9f66a342c Bump v1.6.10 2017-05-16 10:38:35 -07:00
Kevin Sawicki
23ce796450 Merge pull request #9484 from electron/1-6-x-typescript-backport
backport electron.d.ts fixes 1.6
2017-05-16 10:15:29 -07:00
Samuel Attard
df6d316dc2 Fix webcontents capital 2017-05-15 15:16:22 -07:00
Kevin Sawicki
82a93ce645 Correct property name to pid 2017-05-15 14:19:02 -07:00
Kevin Sawicki
5ceaca66f5 fix setAutoResize options 2017-05-15 14:18:44 -07:00
Kevin Sawicki
4c0e35776b fix setAutoResize options 2017-05-15 14:18:02 -07:00
Birunthan Mohanathas
cc1f213d84 bump versions of electron-docs-linter and electron-typescript-definitions 2017-05-15 14:04:22 -07:00
Birunthan Mohanathas
4c18037e6a Fix copy paste typos in BrowserView docs 2017-05-15 14:02:05 -07:00
Samuel Attard
7f0ccdadcd Fix createFromDataURL return type
Fixes #9469
2017-05-15 14:02:00 -07:00
Birunthan Mohanathas
8ac9499b45 Make docs for webview.findInPage and webContents.findInPage consistent 2017-05-15 14:01:55 -07:00
Birunthan Mohanathas
8094d68acc Fix postData type definition in docs 2017-05-15 14:01:50 -07:00
Samuel Attard
80066c22b2 Fix return type of makeSingleInstance 2017-05-15 14:01:45 -07:00
Zeke Sikelianos
8f78f3b253 add npm scripts for convenience 2017-05-15 14:01:34 -07:00
Kevin Sawicki
f0c38b7354 Bump v1.6.9 2017-05-10 08:35:30 -07:00
Zeke Sikelianos
7145aef02c Merge pull request #9415 from electron/no-more-tslint
let the typescript module do its own linting
2017-05-09 16:52:38 -07:00
Zeke Sikelianos
9b82d1a996 let the typescript module do its own linting 2017-05-09 15:44:25 -07:00
Kevin Sawicki
8c856922f3 Merge pull request #9292 from 22222/issue8911
Fix #8911
2017-05-09 09:06:26 -07:00
Kevin Sawicki
aa212bd955 Merge pull request #9408 from Hum4n01d/patch-1
Fix order of OSs
2017-05-09 08:57:03 -07:00
Zeke Sikelianos
08dc66c9aa Merge pull request #9388 from electron/use-tslint-config
use tsconfig file when linting electron.d.ts
2017-05-08 15:42:09 -07:00
Hum4n01d
a694110d48 Fix order of OSs
It was previously inconsistent
2017-05-08 13:36:28 -07:00
Kevin Sawicki
dd84fd4348 Merge pull request #9400 from brianzelip/patch-1
📝 minor docs copy edit - add two words
2017-05-08 08:57:50 -07:00
Brian Zelip
68c19fc509 📝 minor docs copy edit - add two words
[ci skip]
2017-05-07 11:06:46 -04:00
Kevin Sawicki
b712521056 Merge pull request #9381 from electron/cpu-usage-fix
CPU Usage requires process metrics to be preserved
2017-05-05 16:03:26 -07:00
Zeke Sikelianos
f228809317 fix the tslint.json path 2017-05-05 15:00:29 -07:00
Zeke Sikelianos
d4d1409e6f use tsconfig file when linting electron.d.ts 2017-05-05 13:52:14 -07:00
Zeke Sikelianos
0a941fe2f5 Merge pull request #9385 from LestaD/patch-1
Add Russian Telegram community
2017-05-05 10:34:06 -07:00
Sergey Sova
888b2d6bd1 Add Russian Telegram community 2017-05-05 19:34:53 +03:00
Zeke Sikelianos
7d7a2d9319 Merge pull request #7857 from electron/publish-electron.d.ts
Initial scripts to publish electron.d.ts
2017-05-05 08:31:00 -07:00
Zeke Sikelianos
c46b70c68d Merge pull request #9383 from johangp/patch-1
Is Google Chrome an open source browser?
2017-05-05 08:11:48 -07:00
Johan Giraldo
39d7981624 Is Google Chrome an open source browser?
Google Chrome isn't an open source project. Chromium is an open source project, so I think that is more precise say "and is used in Chromium, the open source browser from Google" or something like these.
2017-05-05 13:49:38 +02:00
Hari Krishna Reddy Juturu
d65c4fe912 CPU Usage requires process metrics to be preserved 2017-05-05 02:38:51 -07:00
Kevin Sawicki
6980e92a00 Merge pull request #8998 from electron/felix-notification-docs
Improve notification docs
2017-05-04 15:31:12 -07:00
Kevin Sawicki
70033009eb Merge pull request #9373 from electron/process-metrics
Adding CPU and I/O metrics to process module
2017-05-04 15:30:19 -07:00
Hari Krishna Reddy Juturu
07d8dfaa53 Fixing UT 2017-05-04 14:50:06 -07:00
Hari Krishna Reddy Juturu
6b51c25820 Exposing cpu & io counters function similar to mem methods 2017-05-04 14:48:37 -07:00
Hari Krishna Reddy Juturu
472dad1ffc convert var to const 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
982c5064d8 Removing extra bool 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
656fb593b4 Fixing lint error 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
8bc4d3f8bd GetIOCounters is not implemented on mac 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
3c71f542a8 Fixing UT on mac 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
8a5aa04756 Adding CPU and I/O metrics to process module 2017-05-04 14:33:59 -07:00
Kevin Sawicki
70e199e255 Merge pull request #9333 from electron/process-memory-info-sandbox
Expose `process.get{System,Process}MemoryInfo` to sandbox
2017-05-04 14:17:44 -07:00
Kevin Sawicki
eebae82bc1 Merge pull request #9315 from electron/segmented-control-mode
Add mode prop to segmented touch bar control
2017-05-04 14:16:28 -07:00
Kevin Sawicki
01b3db3d2f 🎨 2017-05-04 14:15:48 -07:00
Kevin Sawicki
1e4b99bd7f Merge pull request #9338 from mcizol/master
add auto-invite for turkish community(en-readme)
2017-05-04 14:14:22 -07:00
Kevin Sawicki
59511354fd Merge pull request #9214 from electron/app-memoryinfo
API to get memory of all processes of the app
2017-05-04 14:00:30 -07:00
Kevin Sawicki
3b3e7cc14e Assert memory info for all returned processes 2017-05-04 13:43:45 -07:00
Hari Krishna Reddy Juturu
ab1bcefe9e Make pid an integer 2017-05-04 13:37:43 -07:00
Kevin Sawicki
edd28c9a91 Link to MemoryInfo structure 2017-05-04 13:35:12 -07:00
Kevin Sawicki
e206aae9fc 🎨 Use snake case 2017-05-04 13:27:42 -07:00
Kevin Sawicki
76c15a7a3e Merge pull request #9348 from tsekityam/patch-1
Change translation of `license` to `授權條款`
2017-05-04 11:32:12 -07:00
Kevin Sawicki
0343db53ad Merge pull request #9344 from rafbm/patch-1
Use actual Chromium l10n_util list in locales.md
2017-05-04 11:31:31 -07:00
Kevin Sawicki
c59fab0179 Merge pull request #9242 from shiftkey/certificate-addition-windows
certificate trust API for Windows
2017-05-03 16:39:00 -07:00
Kevin Sawicki
110611f242 🎨 2017-05-03 16:22:56 -07:00
22222
042b511a27 Fix #8911 2017-05-03 12:47:00 -05:00
Samuel Attard
718dc732ad Add docs and add isSelected arg 2017-05-03 20:25:50 +10:00
Zeke Sikelianos
7956d63e99 tslint electron.d.ts 2017-05-02 16:31:46 -07:00
Kevin Sawicki
96ca623846 Merge pull request #9353 from kainjow/patch-1
Add missing word
2017-05-02 09:08:06 -07:00
Kevin Wojniak
342a8fd577 Add missing word 2017-05-02 09:05:07 -07:00
Tse Kit Yam
58c3446e40 Change translation of license to 授權條款
The translation of `license` should not be `憑證`.
`憑證` means certificate but not license in Chinese.

For example, [Symantec](https://www.symantec.com/zh/tw/security_response/glossary/define.jsp?letter=d&word=digital-certificate) translated `digital certificate` as `數位憑證`; [Chrome Support](https://support.google.com/chrome/a/answer/3505249?hl=zh-Hant) used the teams `憑證授權單位` and `SSL 憑證` to describe `CA` and `SSL Certificate`. These are all proving that the word `憑證` is commonly used in the translation of `certificate`, but not `license`

I googled for a while, and found that the team `授權條款` is commonly used to describe `license` in Traditional Chinese. The user of the translation `授權條款` includes governments ([Taiwan Government](https://www.tipo.gov.tw/ct.asp?xItem=365132&ctNode=6885&mp=1), [Hong Kong government](http://www1.itfest.gov.hk/sc/event/supplements/0415_BIP_Asia_Seminar_Series_%28eDM%29.pdf)), communities ([Open Source Hong Kong](https://freehkfonts.opensource.hk/download/) and [OpenFoundry](https://www.openfoundry.org/of/download/openlegal/Analyses_and_applying_policies_of_FOSS_licenses_2parts_2/20131118_d.pdf)), and businesses ([Google](https://www.google.com/intl/zh-TW/chromebook/termsofservice.html)).

So I suggest we should use `授權條款`, which has been widely adopted  as translation of `license`, instead of a wrong translation `憑證`.
2017-05-02 17:59:15 +08:00
Brendan Forster
e5648072dc handle untrusted root as well as self-signed 2017-05-02 11:25:51 +10:00
Zeke Sikelianos
b9e6b188f7 🎨 2017-05-01 16:00:25 -07:00
Zeke Sikelianos
52d6e53001 preserve 46823f9 2017-05-01 15:59:00 -07:00
Zeke "Offline in April" Sikelianos
9fd1e2c8c4 Merge branch 'master' into felix-notification-docs 2017-05-01 15:56:14 -07:00
Kevin Sawicki
a748199833 Bump v1.6.8 2017-05-01 15:09:30 -07:00
Rafael Masson
410078bb54 Use actual Chromium l10n_util list in locales.md
I’m not sure where the locale list from the [original commit](bbaab9b355) came from, but it clearly wasn’t copied from `l10n_util`. It was missing Spanish, Portuguese, Polish, Vietnamese, to name a few…

This commit overwrite the whole list with [`l10n_util` as-is](61cfc2b0a8/ui/base/l10n/l10n_util.cc (L41-L175)).
2017-05-01 17:15:37 -04:00
Kevin Sawicki
98d17d64ef Merge pull request #9322 from electron/debugger-json-crash
Parse debugger protocol messages using v8 JSON parser
2017-05-01 10:44:14 -07:00
Kevin Sawicki
b639dd0c81 Remove unused include/require statement 2017-05-01 10:30:11 -07:00
Kevin Sawicki
f2f6415543 Use v8 to parse message as JSON 2017-05-01 10:30:11 -07:00
Kevin Sawicki
db6097ecec Add failing spec for invalid debugger message 2017-05-01 10:30:11 -07:00
Kevin Sawicki
f84c75aa1a Merge pull request #9301 from electron/post-message-origin-check
Use isSameOrigin helper when checking postMessage targetOrigin
2017-05-01 08:57:56 -07:00
Kevin Sawicki
56a4a69dee Add more non-matching target origins 2017-05-01 08:45:38 -07:00
Kevin Sawicki
efc62629ef Fix typo in fixture comment 2017-05-01 08:45:38 -07:00
Kevin Sawicki
fa4ec11a12 Use isSameOrigin helper when posting message 2017-05-01 08:45:38 -07:00
Kevin Sawicki
3c58d50f87 Add failing spec for targetOrigin handling 2017-05-01 08:45:38 -07:00
Thiago de Arruda
a8640fb8a3 Add test to verify memory is released after sandboxed popup is closed 2017-05-01 11:30:07 -03:00
Mustafa C. Izol
416cfeed40 update turkish community link 2017-05-01 15:44:39 +02:00
Mustafa C. Izol
1a2aaecd4b add auto-invite for turkish community(en-readme) 2017-05-01 15:33:25 +02:00
Thiago de Arruda
bbe21cce67 Expose more atom_bindings.cc functions to sandbox 2017-05-01 09:12:39 -03:00
Cheng Zhao
9e0c308b09 Merge pull request #9113 from electron/window_close_patch
browser: make destruction of webContents async
2017-05-01 17:45:58 +09:00
deepak1556
0476e2fd3d destroy browserView webContents asynchronously 2017-05-01 16:53:55 +09:00
deepak1556
c68f41b8d8 destroy new window webContents asynchronously 2017-05-01 16:53:55 +09:00
deepak1556
5e976be43b remove page-title-updated workaround for #3380 2017-05-01 16:53:55 +09:00
deepak1556
e4524ce42e add spec 2017-05-01 16:53:55 +09:00
deepak1556
9e3b8ade12 invoke WebContentsDestroyed manually when destruction path is async 2017-05-01 16:53:14 +09:00
deepak1556
f974a6bda9 browser: make destruction of webContents async 2017-05-01 16:53:14 +09:00
Cheng Zhao
ca7ca3ba1c Merge pull request #9314 from electron/fix-windowopen-memory-leak
Fix context leak in ObjectLifeMonitor.
2017-05-01 15:49:13 +09:00
Brendan Forster
541efc3b93 tidy up docs 2017-04-29 19:35:49 +10:00
Brendan Forster
14f29e1319 it's 2017 get with the times 2017-04-29 19:29:07 +10:00
Brendan Forster
1ccc2afb03 underscore case all the things 2017-04-29 19:28:42 +10:00
Thiago de Arruda
19b6ba044b Fix context leak in ObjectLifeMonitor.
The RemoteObjectFreer class is keeping the context alive even when the window is
closed. For electron applications that use sandbox, this will cause a memory
leak every time a new window is created with `window.open`.

Close #9191
2017-04-28 11:21:53 -03:00
Samuel Attard
225ccab3d2 Add mode prop to segmented touch bar control 2017-04-28 14:50:58 +10:00
Hari Krishna Reddy Juturu
07b53c0284 Return mate::Dictionary instead of v8::value 2017-04-27 21:07:35 -07:00
Kevin Sawicki
79b02ca71e Merge pull request #9310 from neilstuartcraig/patch-1
Show how to run the example in touch-bar.md
2017-04-27 14:23:13 -07:00
Kevin Sawicki
c26605c384 Minor edits to example guide 2017-04-27 14:22:56 -07:00
HariJ
88ad28b2a5 Removing describe.only 2017-04-27 14:06:53 -07:00
HariJ
81bd9fa3a2 fixing mac ut failure 2017-04-27 14:06:53 -07:00
Hari Krishna Reddy Juturu
3d12440a4a Fixing mac build 2017-04-27 14:06:53 -07:00
Hari Krishna Reddy Juturu
d77c1319f4 Fixing lint error 2017-04-27 14:06:53 -07:00
Hari Krishna Reddy Juturu
27aad902b8 Adding docs, specs and fixing object returned 2017-04-27 14:06:53 -07:00
Hari Krishna Reddy Juturu
bef7d5a520 API to get memory of all processes of the app 2017-04-27 14:06:53 -07:00
Neil Craig
c0669cb46e Update touch-bar.md
Add a simple example of running the example code as it might not be obvious to people who've not used Electron. Hopefully it makes sense :-)
2017-04-27 20:19:17 +01:00
Brendan Forster
5534181ebd rework docs 2017-04-27 15:12:30 +10:00
Brendan Forster
a1599cf881 focus on the self-signed certificate flow here 2017-04-27 15:06:23 +10:00
Brendan Forster
5151107c28 tighten up indenting 2017-04-27 15:01:55 +10:00
Brendan Forster
50af70a0e8 Merge branch 'master' into certificate-addition-windows 2017-04-27 14:47:50 +10:00
Brendan Forster
80212c0ab4 actually validate the chain before adding 2017-04-27 14:44:58 +10:00
Kevin Sawicki
dafd0b6c3c Merge pull request #9299 from electron/menu-item-doc-typos
Fix typos in MenuItem docs
2017-04-26 13:03:46 -07:00
Kevin Sawicki
f6bbcc6efa Fix typos 2017-04-26 13:03:15 -07:00
Kevin Sawicki
eabe7b9dce Merge pull request #9290 from electron/coerce-history-go-offset-to-number
Coerce window.history.go offset argument to number in renderer process
2017-04-26 13:02:53 -07:00
Kevin Sawicki
95ef422ab4 Coerce offset to number in renderer process 2017-04-26 12:37:16 -07:00
Kevin Sawicki
775753c3d7 Add spec for invalid window.history.go offset 2017-04-26 12:37:16 -07:00
Kevin Sawicki
8460a580b9 Merge pull request #9289 from electron/dont-allow-webpreferences-option-setting
Don't allow webPreferences to be overridden in features string
2017-04-26 12:36:51 -07:00
Kevin Sawicki
507f60e33e Don't allow webPreferences to be overrideden in features string 2017-04-26 10:56:53 -07:00
Kevin Sawicki
7726c7c6c4 Add spec for webPreferences in features string 2017-04-26 10:56:53 -07:00
Kevin Sawicki
0aa53f4af7 Merge pull request #9287 from electron/store-frames-to-guest-as-map
Store frames to guest as Map
2017-04-26 10:47:21 -07:00
Kevin Sawicki
91a1e5cdfe Store frame to guests in map 2017-04-26 10:14:11 -07:00
Kevin Sawicki
9643b2a5c5 Add specs for window.open frameName argument 2017-04-26 10:14:11 -07:00
Kevin Sawicki
b9b3abbeae Merge pull request #9286 from electron/to-string-renderer-errors
Throw string conversion errors in render process
2017-04-26 10:12:21 -07:00
Kevin Sawicki
2c48300daa Fix typos in comment 2017-04-26 09:09:42 -07:00
Kevin Sawicki
246937a372 Convert targetOrigin to string in render process 2017-04-26 09:08:47 -07:00
Kevin Sawicki
3894c1c625 Convert frameName/features to strings in render process 2017-04-26 09:08:47 -07:00
Kevin Sawicki
7e285711ca Add spec for window.open toString errors 2017-04-26 09:08:47 -07:00
Kevin Sawicki
4e7e9d1752 Merge pull request #9278 from electron/dont-override-argument-value
Disable node integration in chrome-devtools URLs
2017-04-26 09:08:24 -07:00
Kevin Sawicki
05b6d91bf4 Disable node integration in chrome-devtools: URLs 2017-04-25 13:36:08 -07:00
Kevin Sawicki
3f88eb2f86 Add spec for chrome-devtools URL with no node integration 2017-04-25 13:36:08 -07:00
Kevin Sawicki
c9ec45d9d8 Merge pull request #9250 from electron/inherit-javascript-option
Inherit javascript preference in opened windows
2017-04-25 13:33:53 -07:00
Kevin Sawicki
87db1b8aa7 Document other inherited web preferences 2017-04-25 12:57:53 -07:00
Kevin Sawicki
3e2a1034af Disable JavaScript on child when disabled on parent 2017-04-25 12:57:53 -07:00
Kevin Sawicki
cee0507090 Add failing spec for inheriting Javascript web preference 2017-04-25 12:57:53 -07:00
Kevin Sawicki
6ec74060b4 Enable setting javascript and contextIsolation via window.open 2017-04-25 12:57:53 -07:00
Kevin Sawicki
00a575c84a Merge pull request #9279 from electron/extract-default-app-script
Extract script tags to renderer.js file in default app
2017-04-25 12:55:58 -07:00
Kevin Sawicki
ca5a8b6166 Extract script tags to renderer.js file 2017-04-25 08:27:57 -07:00
Kevin Sawicki
7881376aff Merge pull request #9254 from electron/endsession-event
End session event on browser window
2017-04-24 12:02:05 -07:00
Hari Krishna Reddy Juturu
8458acff26 Removing #ifdef on endsession api 2017-04-24 11:58:08 -07:00
Hari Krishna Reddy Juturu
8a32826876 Removing #ifdef windows for endsession methods 2017-04-24 11:49:21 -07:00
Kevin Sawicki
b6192da757 Merge pull request #9255 from electron/emit-auto-updater-error
Emit auto updater error directly as Error
2017-04-24 10:26:00 -07:00
Hari Krishna Reddy Juturu
9e70372c1f change endsession event name to session-end 2017-04-24 10:16:11 -07:00
Kevin Sawicki
c2d4c93e12 Don't run error event on Linux 2017-04-24 09:47:30 -07:00
Kevin Sawicki
13e4582697 Emit autoUpdater error directly as Error object 2017-04-24 09:47:30 -07:00
Kevin Sawicki
423dd4d57a Add spec for remote autoUpdater error event 2017-04-24 09:47:30 -07:00
Kevin Sawicki
6c99d83b99 Merge pull request #9253 from electron/log-crashes-during-specs
Log all crashes during spec running
2017-04-24 09:47:05 -07:00
Kevin Sawicki
35a627fd60 Log all crashes during specs 2017-04-24 09:26:24 -07:00
Kevin Sawicki
2e223288d2 Merge pull request #9252 from electron/convert-to-string-in-render-process
Convert alert/confirm arguments to strings in render process
2017-04-24 09:26:00 -07:00
Kevin Sawicki
c90fd4dc88 Convert message/title to strings in render process 2017-04-24 09:15:01 -07:00
Kevin Sawicki
a00d36fb07 Add spec for alert/confirm toString errors 2017-04-24 09:15:01 -07:00
Kevin Sawicki
c146f8a308 Merge pull request #9249 from electron/document-write
Don't use document.write in default app
2017-04-24 09:14:29 -07:00
Kevin Sawicki
5f038cb3cb Don't use document.write in default app 2017-04-24 08:57:10 -07:00
Kevin Sawicki
d3ae1d8d23 Merge pull request #9246 from rreimann/master
Clarify requirements for resumable downloads
2017-04-24 08:50:55 -07:00
Kevin Sawicki
13eeb1d17f Minor wording tweaks 2017-04-24 08:50:40 -07:00
Kevin Sawicki
99985c0ed9 Wrap header names in backticks 2017-04-24 08:49:59 -07:00
Kevin Sawicki
9bb944f632 Merge pull request #9273 from electron/update_notification_docs
Updated documentation on desktop notifications on Windows 7
2017-04-24 08:48:44 -07:00
Kevin Sawicki
a26ae85017 Merge pull request #9262 from ArcticZeroo/patch-1
Fix a typo in faq.md
2017-04-24 08:48:20 -07:00
Ales Pergl
46823f944c Updated documentation on desktop notifications on Windows 7 2017-04-24 09:57:34 +02:00
Brendan Forster
f644ba56a3 clean up the code a bit 2017-04-24 11:49:55 +10:00
Brendan Forster
253a4b0114 Merge remote-tracking branch 'electron/master' into certificate-addition-windows 2017-04-24 11:13:34 +10:00
Brendan Forster
ac3385124a reload the current cert database if the certificate was added 2017-04-24 11:12:26 +10:00
ArcticZeroo
64cc537951 Update faq.md
Fix the most horrible typo of all time
2017-04-22 23:11:04 -04:00
rreimann
7ea6d01a8c Rephrase note for resume method 2017-04-22 18:15:07 +02:00
Hari Krishna Reddy Juturu
9e8252c1f9 Remove wm_state change 2017-04-21 14:35:30 -07:00
Hari Krishna Reddy Juturu
3c3e14b820 End session event on browser window 2017-04-21 14:22:11 -07:00
Kevin Sawicki
e9880e9c97 Merge pull request #8996 from swashcap/master
Add documentation note on dynamic Menu items
2017-04-21 13:44:01 -07:00
Kevin Sawicki
d1691e0a37 Merge pull request #9239 from pfrazee/patch-1
Make note about sync webview calls in docs
2017-04-21 13:40:17 -07:00
Kevin Sawicki
7177ea5e9a Bold note for emphasis 2017-04-21 13:39:51 -07:00
Kevin Sawicki
1256ab075c Merge pull request #9248 from electron/stream-test-output-on-windows
Stream test output on Windows CI
2017-04-21 09:15:41 -07:00
Kevin Sawicki
42ccb36df3 Stream test output on Windows CI 2017-04-21 08:53:40 -07:00
Kevin Sawicki
eee9ed2c5d Merge pull request #9241 from electron/doc-symstore
Document downloading debugging tools for windows
2017-04-21 08:50:33 -07:00
Kevin Sawicki
9acd9e878c Mention downloading debugging tools for windows 2017-04-21 08:37:01 -07:00
rreimann
7ce3571270 Clarify requirements for resumable downloads 2017-04-21 15:14:56 +02:00
Brendan Forster
304c8b9562 add some docs for Windows usage 2017-04-21 13:09:49 +10:00
Brendan Forster
c181a8269d and this is how we invoke the callback 2017-04-21 12:47:11 +10:00
Brendan Forster
1439a1e322 and the order here matters apparently 2017-04-21 12:23:50 +10:00
Brendan Forster
b3baf9976f coding style fixes 2017-04-21 12:17:01 +10:00
Kevin Sawicki
1a49374b4c Merge pull request #9237 from electron/root-modules-describe
Add root describe to modules spec
2017-04-20 15:11:27 -07:00
Kevin Sawicki
93603882b1 Add root describe to be able to run whole file 2017-04-20 14:17:58 -07:00
Kevin Sawicki
e95ba067a5 Merge pull request #9238 from electron/wait-for-stdout-close
Wait for close event instead of exit in spec
2017-04-20 14:17:07 -07:00
Paul Frazee
3068d7a43e Make note about sync webview calls in docs 2017-04-20 14:02:41 -05:00
Kevin Sawicki
361c3e0700 Wait for close event instead of exit so stdout done 2017-04-20 11:40:04 -07:00
Kevin Sawicki
a004cada7c Merge pull request #9095 from seanchas116/better-path-resolve
Search for module from app path when URL is not file protocol
2017-04-20 10:49:53 -07:00
Kevin Sawicki
dc8b43901b Merge pull request #9108 from yuya-oc/add-macos-sheet-events
Add sheet-begin and sheet-end events to macOS BrowserWindow
2017-04-20 10:33:31 -07:00
Kevin Sawicki
29a3e11893 Group sheet event methods with other macOS methods 2017-04-20 10:32:14 -07:00
Brendan Forster
5f1bcd2d16 a first pass at the script to import the certificate for Windows 2017-04-20 21:12:32 +10:00
Brendan Forster
dca08c208b and use the same signature for Windows 2017-04-20 14:21:08 +10:00
Brendan Forster
4f40b8a42c stub the windows source file 2017-04-20 14:21:08 +10:00
Kevin Sawicki
454dd00597 Merge pull request #9227 from electron/specs-on-new-ci-machines
Get specs passing on new macOS CI machines
2017-04-19 20:37:37 -07:00
Kevin Sawicki
fae0308861 Use app name in crash dir path on linux/macos 2017-04-19 20:19:17 -07:00
Kevin Sawicki
709d2933b7 🎨 2017-04-19 16:44:31 -07:00
Kevin Sawicki
de62f1ea6c Restart crash service in each spec 2017-04-19 16:37:24 -07:00
Kevin Sawicki
a7a92e1cd3 Still call done when stop server function is null 2017-04-19 09:52:28 -07:00
Kevin Sawicki
4d9cdad37a Close server and connections after each spec 2017-04-19 09:48:32 -07:00
Kevin Sawicki
ece4df0ac7 Increase timeout to 2 minutes 2017-04-19 09:30:03 -07:00
Kevin Sawicki
c05c324464 Remove extra space in description 2017-04-19 09:28:52 -07:00
Kevin Sawicki
6b13fab83a Wait for full screen event before leaving kiosk mode 2017-04-19 09:13:26 -07:00
Kevin Sawicki
5153c1f353 Disable media device specs on CI where they may not be available 2017-04-18 16:16:08 -07:00
Kevin Sawicki
f891df55d4 Call done callback with Error 2017-04-18 16:06:10 -07:00
Kevin Sawicki
4af44b1be6 Consolidate window closing 2017-04-18 16:04:27 -07:00
Kevin Sawicki
4a9383b50b Bump v1.6.7 2017-04-18 09:17:16 -07:00
Kevin Sawicki
6701a96216 Merge pull request #9211 from sindresorhus/patch-1
Add docs tip about testing Touch Bar usage
2017-04-18 12:10:45 -04:00
Kevin Sawicki
1fe10406ad Merge pull request #9194 from electron/external/cookie-flushstore-api
Adding cookie flush store api
2017-04-18 12:09:19 -04:00
Kevin Sawicki
8f0ac057e3 Add initial spec for cookies.flushStore 2017-04-18 09:08:27 -07:00
Hari Krishna Reddy Juturu
fe88697348 fixup! fixup! Adding cookie flush store api 2017-04-18 09:05:13 -07:00
Hari Krishna Reddy Juturu
efca0a6e07 fixup! Adding cookie flush store api 2017-04-18 09:05:13 -07:00
Hari Krishna Reddy Juturu
19709a50e9 Adding cookie flush store api 2017-04-18 09:05:13 -07:00
Kevin Sawicki
190fc46e77 Merge pull request #9208 from electron/touchbar-button-icon-pos
Add iconPosition property to touch bar buttons
2017-04-18 12:02:44 -04:00
Kevin Sawicki
ca46d52b0c Add button with icon to touch bar spec 2017-04-18 09:01:43 -07:00
Kevin Sawicki
c32a723e29 Only read iconPosition when icon is present 2017-04-18 08:58:54 -07:00
Samuel Attard
526d287d25 Make iconPosition non-breaking by defaulting to overlay 2017-04-18 08:56:39 -07:00
Samuel Attard
11c7c107a9 add iconPosition property to touch bar buttons 2017-04-18 08:56:39 -07:00
Kevin Sawicki
fa4e4eb3e0 Merge pull request #9195 from mcizol/master
add turkish quick-start file
2017-04-18 11:51:13 -04:00
Kevin Sawicki
f461a2f20b Merge pull request #9185 from sauber92/patch-2
Update protocol.md
2017-04-18 11:46:05 -04:00
Kevin Sawicki
bba3e866b7 Merge pull request #9180 from runinspring/patch-1
Update shell.md
2017-04-18 11:45:10 -04:00
Birunthan Mohanathas
4d9977dac1 Merge pull request #9219 from electron/update-libcc-dpi-scaling
Update libcc for electron/libchromiumcontent#285
2017-04-18 15:13:03 +03:00
Birunthan Mohanathas
3bcf5e0e9f Fix OverrideSiteInstanceForNavigation() signature 2017-04-18 11:51:38 +03:00
Birunthan Mohanathas
4a7125d9f8 Update libcc for electron/libchromiumcontent#285
This fixes non-client area DPI scaling on recent Windows 10 versions.
See discussion in #8786.
2017-04-18 11:11:26 +03:00
Birunthan Mohanathas
226c1c99a6 Merge pull request #9213 from electron/fix-autohide-menubar-layout
Actually hide menubar area when menu is autohidden
2017-04-17 12:34:23 +03:00
Birunthan Mohanathas
dcf6c52f51 Actually hide menubar area when menu is autohidden
This was a regression introduced in 638eae10.
2017-04-17 12:31:39 +03:00
Sindre Sorhus
39caa6ad23 📝 Add docs tip about testing Touch Bar usage
Disclosure: I made it.

Most devs don't have the new MacBook with Touch Bar, but would like to support it. I think it would be useful to point out how to easily develop and test Touch Bar usage in Electron apps.

[ci skip]
2017-04-17 14:39:37 +07:00
Birunthan Mohanathas
81879f8f8a Merge pull request #9204 from electron/upgrade-brightray-wmstate
Update Brightray for electron/brightray#289
2017-04-16 19:52:11 +03:00
Birunthan Mohanathas
dc914fdb28 Update Brightray for electron/brightray#289
This fixes #9197.
2017-04-16 18:01:32 +03:00
Yuya Ochiai
75184046f6 Add events to manage sheets of macOS BrowserWindow 2017-04-15 16:26:45 +09:00
Mustafa C. Izol
7b3f1b5d91 update link to turkish quick-start 2017-04-14 19:47:39 +02:00
Mustafa C. Izol
228517edde add turkish quick start file 2017-04-14 19:38:46 +02:00
Birunthan Mohanathas
3af50b92ca Merge pull request #9187 from electron/mac-messagebox-warning-icon
Fix missing warning icon with dialog.showMessageBox() on macOS
2017-04-14 19:27:49 +03:00
Birunthan Mohanathas
e7d71000ee Fix missing warning icon with dialog.showMessageBox() on macOS
Fixes #9183.
2017-04-14 19:27:25 +03:00
Junyoung Jung
eee0b35d19 Update protocol.md
오타 수정, Edit typo
2017-04-13 23:47:01 +09:00
Ryohei Ikegami
ea6890aa5c Use const 2017-04-13 23:26:42 +09:00
Birunthan Mohanathas
0c1d60381d Merge pull request #9167 from electron/frameless-overflow3
Fix frameless window overflow on Windows
2017-04-13 13:08:39 +03:00
Kevin Sawicki
108f246d89 Add SubSystem setting 2017-04-13 13:06:36 +03:00
Kevin Sawicki
4ca4eb01d4 Use MinimumRequiredVersion instead of argument 2017-04-13 13:03:46 +03:00
Kevin Sawicki
1a75bf8fb9 Add comment to subsystem linker option 2017-04-13 13:03:46 +03:00
Kevin Sawicki
fe8726d775 Use Chrome default client inset handling 2017-04-13 13:03:46 +03:00
Birunthan Mohanathas
7f4bd79b01 Merge pull request #9166 from electron/browserview
Implement initial, experimental BrowserView API
2017-04-13 11:00:16 +03:00
ZhangYu
ed20cc0af8 Update shell.md 2017-04-13 10:27:32 +08:00
Ryohei Ikegami
9d62b196d3 Use base::FilePath 2017-04-13 10:59:12 +09:00
Birunthan Mohanathas
000aedf2e7 Avoid insecure nodeIntegration in example 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
ccdeb4746e Destroy BrowserViews after each test 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
06fcf2c19d Add support for BrowserView autoresizing 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
638eae1080 Remove MenuLayout in favor of NativeWindowViews::Layout 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
8b9f7e5b00 Implement initial, experimental BrowserView API
Right now, `<webview>` is the only way to embed additional content in a
`BrowserWindow`. Unfortunately `<webview>` suffers from a [number of
problems](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Awebview%20).
To make matters worse, many of these are upstream Chromium bugs instead
of Electron-specific bugs.

For us at [Figma](https://www.figma.com), the main issue is very slow
performance.

Despite the upstream improvements to `<webview>` through the OOPIF work, it is
probable that there will continue to be `<webview>`-specific bugs in the
future.

Therefore, this introduces a `<webview>` alternative to called `BrowserView`,
which...

- is a thin wrapper around `api::WebContents` (so bugs in `BrowserView` will
  likely also be bugs in `BrowserWindow` web contents)

- is instantiated in the main process like `BrowserWindow` (and unlike
  `<webview>`, which lives in the DOM of a `BrowserWindow` web contents)

- needs to be added to a `BrowserWindow` to display something on the screen

This implements the most basic API. The API is expected to evolve and change in
the near future and has consequently been marked as experimental. Please do not
use this API in production unless you are prepared to deal with breaking
changes.

In the future, we will want to change the API to support multiple
`BrowserView`s per window. We will also want to consider z-ordering
auto-resizing, and possibly even nested views.
2017-04-13 01:27:27 +03:00
Kevin Sawicki
779e4e5889 Merge pull request #9168 from electron/win-7-notifications
Upgrade brightray for Windows 7 notifications
2017-04-12 13:26:40 -07:00
Kevin Sawicki
4f26424ace Upgrade brightray for Windows 7 notifications 2017-04-12 13:01:52 -07:00
Kevin Sawicki
1c44bcf654 Merge pull request #8786 from electron/per-monitor-dpi-aware
Enable per-monitor DPI for Win10
2017-04-12 12:27:41 -07:00
Ryohei Ikegami
c77e07bc15 Fix afterEach 2017-04-12 11:55:41 +09:00
Kevin Sawicki
efa28503a7 Merge pull request #9148 from electron/share-render-frame-observer-with-sandbox
Refactor: Share AtomRenderFrameObserver with AtomSandboxedRendererClient
2017-04-11 10:02:12 -07:00
Kevin Sawicki
964b210ce0 Merge pull request #9133 from electron/app-exit-failure
Fix app.exit() not closing all windows
2017-04-11 09:49:54 -07:00
Kevin Sawicki
e7b679ead6 Add IsEmpty helper and remove GetInstance public usage 2017-04-11 09:09:17 -07:00
Kevin Sawicki
da5d7d72b0 Add GetWindows helper that returns a vector 2017-04-11 09:09:17 -07:00
Kevin Sawicki
0883a9f966 Use CloseAllWindows helper 2017-04-11 09:09:17 -07:00
Kevin Sawicki
8311aa667c Add DestroyAllWindows helper that uses vector copy 2017-04-11 09:09:17 -07:00
Kevin Sawicki
bfb9388191 Add failing spec for app.exit with >2 windows 2017-04-11 09:09:17 -07:00
Kevin Sawicki
a30cf30e93 Merge pull request #9134 from electron/scroll-bounce-fix
Always set NSScrollViewRubberbanding scroll bounce pref
2017-04-11 09:08:30 -07:00
Kevin Sawicki
b2761ab7dc Merge pull request #9157 from electron/cifratila/remove-unused-dll
#9128: Removed unused dll from distribution.
2017-04-11 08:52:20 -07:00
Kevin Sawicki
29c68182df Always set NSScrollViewRubberbanding scroll bounce pref 2017-04-11 08:42:41 -07:00
Cheng Zhao
c59ef0efc5 Enable per-monitor DPI 2017-04-11 15:17:15 +09:00
Kevin Sawicki
e2a00e423c Merge pull request #9104 from electron/fix-crash-reporter-test
Fix sandboxed crashReporter for windows
2017-04-10 15:38:12 -07:00
Kevin Sawicki
f3072e3b2d Merge pull request #9158 from mcizol/patch-1
add electron slack channel for turkish community
2017-04-10 15:37:17 -07:00
Mustafa
2c6ef95923 add electron slack channel for turkish community 2017-04-10 18:41:52 +02:00
Kevin Sawicki
0caa35d33c Merge pull request #9155 from Hum4n01d/master
Add information about dragging not working with Dev tools open
2017-04-10 08:18:09 -07:00
Kevin Sawicki
676f02e001 Tweak GitHub spelling 2017-04-10 08:17:55 -07:00
Kevin Sawicki
3ec7900e6e Merge pull request #9154 from miniak/fix-api-docs
Fix api docs
2017-04-10 08:16:54 -07:00
Kevin Sawicki
cfb4010415 Merge pull request #9151 from mcizol/master
add turkish translation files
2017-04-10 08:16:20 -07:00
Kevin Sawicki
53884580cc Merge pull request #9149 from electron/link-session-docs
Link session properties to class docs
2017-04-10 08:15:29 -07:00
Kevin Sawicki
2933eef07e Merge pull request #9144 from electron/wait-util-server-closes
Wait until server closes in afterEach in net spec
2017-04-10 08:14:42 -07:00
Kevin Sawicki
575ece69e2 Merge pull request #9137 from runinspring/patch-3
add some document
2017-04-10 08:14:13 -07:00
Kevin Sawicki
ef7dbf8b51 Merge pull request #9136 from runinspring/patch-2
Update README.md
2017-04-10 08:13:47 -07:00
Catalin Fratila
d3953f7280 #9128: Removed unused dll from distribution. 2017-04-10 16:41:16 +02:00
Hum4n01d
0ce983363b Add information about dragging not working with Dev tools open 2017-04-09 23:05:56 -07:00
Milan Burda
fa0de5c2b4 Define filter argument type for WebRequest methods 2017-04-10 02:18:36 +02:00
Mustafa C. Izol
475620119e add turkish translation link to readme 2017-04-10 02:12:53 +02:00
Milan Burda
8f46137fda Fix session.setPermissionRequestHandler webContents argument type 2017-04-10 02:12:15 +02:00
Mustafa C. Izol
613c835eec add turkish readme file 2017-04-10 02:10:52 +02:00
Mustafa C. Izol
34beb52edb fix link to electron faq 2017-04-10 01:23:14 +02:00
Mustafa C. Izol
6a729f90e5 add translation files for application-distrubution and supported platforms 2017-04-10 00:47:00 +02:00
Kevin Sawicki
b7b7f28c5a Link properties to class docs 2017-04-08 18:50:55 -07:00
Thiago de Arruda
039aaba758 Move AtomRenderFrameObserver creation to RendererClientBase.
Also remove AtomSandboxedRenderFrameObserver class.
2017-04-08 11:54:58 -03:00
Thiago de Arruda
72781e38c8 Change AtomRenderFrameObserver.renderer_client_ type to RendererClientBase. 2017-04-08 11:27:19 -03:00
Thiago de Arruda
ef07e25f9d Make SetupMainWorldOverrides/isolated_world pure virtual.
Also implement stubs in AtomSandboxedRendererClient.
2017-04-08 11:12:18 -03:00
Thiago de Arruda
f751335bf9 Make DidCreateScriptContext/WillReleaseScriptContext pure virtual. 2017-04-08 10:58:13 -03:00
Thiago de Arruda
0227254774 Move DidClearWindowObject into RendererClientBase.
Also adapt AtomSandboxedRenderFrameObserver to forward DidClearWindowObject to
RendererClientBase.
2017-04-08 10:43:19 -03:00
Thiago de Arruda
91ee0ea740 Move AtomRenderFrameObserver into a separate module.
Also move SetupMainWorldOverrides into the AtomRendererClient class(since the
code there is specific to AtomRendererClient).
2017-04-08 10:29:05 -03:00
Kevin Sawicki
e2e9e8ae24 Wait until server closes in afterEach 2017-04-07 16:42:01 -07:00
Kevin Sawicki
8a324a9375 Bump v1.6.6 2017-04-07 09:01:28 -07:00
ZhangYu
b6481fde14 Create upload-raw-data.md 2017-04-07 10:48:07 +08:00
ZhangYu
ca584fcaf9 Create upload-file.md 2017-04-07 10:47:52 +08:00
ZhangYu
6089456c84 Create upload-file-system.md 2017-04-07 10:47:37 +08:00
ZhangYu
05d59185b2 Create upload-data.md 2017-04-07 10:47:23 +08:00
ZhangYu
6b44692b0d Create upload-blob.md 2017-04-07 10:47:09 +08:00
ZhangYu
3ba8a7516a Create thumbar-button.md 2017-04-07 10:46:53 +08:00
ZhangYu
a584785254 Create task.md 2017-04-07 10:46:34 +08:00
ZhangYu
39111b9e34 Create size.md 2017-04-07 10:46:19 +08:00
ZhangYu
e8f030af15 Create shortcut-details.md 2017-04-07 10:46:04 +08:00
ZhangYu
3475387d9c Create segmented-control-segment.md 2017-04-07 10:45:50 +08:00
ZhangYu
826932199b Create scrubber-item.md 2017-04-07 10:45:36 +08:00
ZhangYu
bffec5e68e Create remove-password.md 2017-04-07 10:45:19 +08:00
ZhangYu
6e36ec7770 Create remove-client-certificate.md 2017-04-07 10:45:00 +08:00
ZhangYu
7a552da192 Create rectangle.md 2017-04-07 10:44:41 +08:00
ZhangYu
30fe4a6f2b Create point.md 2017-04-07 10:44:26 +08:00
ZhangYu
b117f14c2a Create mime-typed-buffer.md 2017-04-07 10:44:09 +08:00
ZhangYu
32ee0f05e3 Create memory-usage-details.md 2017-04-07 10:43:51 +08:00
ZhangYu
aa37030211 Create jump-list-item.md 2017-04-07 10:43:05 +08:00
ZhangYu
913644504c Create jump-list-category.md 2017-04-07 10:42:39 +08:00
ZhangYu
1fb0a5f0da Create file-filter.md 2017-04-07 10:42:04 +08:00
ZhangYu
27a45009b3 Create display.md 2017-04-07 10:40:47 +08:00
ZhangYu
e811f809b5 Create desktop-capturer-source.md 2017-04-07 10:36:50 +08:00
ZhangYu
6a4e7225e2 Create crash-report.md 2017-04-07 10:25:22 +08:00
ZhangYu
9e33f2efeb Create cookie.md 2017-04-07 10:24:11 +08:00
ZhangYu
5986d36059 Create certificate.md 2017-04-07 10:16:32 +08:00
ZhangYu
202b8e40c4 Create certificate-principal.md 2017-04-07 10:14:51 +08:00
ZhangYu
a6f5c35fa6 Create bluetooth-device.md 2017-04-07 10:10:12 +08:00
ZhangYu
ad0a22af23 Update README.md 2017-04-07 10:03:21 +08:00
Kevin Sawicki
e3407bb99e Merge pull request #9132 from electron/fork-eval-node-fix
Cherry pick node fix for ChildProcess.fork --eval bug
2017-04-06 13:17:13 -07:00
Kevin Sawicki
588f699d56 🎨 2017-04-06 09:52:52 -07:00
Kevin Sawicki
c3798be9b8 Upgrade node for fork --eval cherry pick fix 2017-04-06 09:48:36 -07:00
Kevin Sawicki
7f28b7a151 Add failing spec for fork --eval message bug 2017-04-06 09:48:34 -07:00
Kevin Sawicki
4ec7cc913d Merge pull request #9117 from electron/fix_debug_checks
Fixed a couple of failing debug checks when calling Chromium APIs
2017-04-06 08:48:15 -07:00
Kevin Sawicki
b11afc8591 Merge pull request #9129 from runinspring/patch-1
Update accelerator.md
2017-04-06 08:47:21 -07:00
Kevin Sawicki
7ea1253aae Merge pull request #9126 from runinspring/master
Update menu.md and menu-item.md
2017-04-06 08:46:55 -07:00
Kevin Sawicki
931290bc59 Merge pull request #9125 from electron/fix-chrome-upgrade-link
Fix link to the Upgrading Chrome doc
2017-04-06 08:46:25 -07:00
Kevin Sawicki
11abdb6378 Merge pull request #9124 from TasukuUno/fix-docs
Fix document of MimeTypedBuffer Object
2017-04-06 08:45:48 -07:00
ZhangYu
a7d9230497 Update accelerator.md 2017-04-06 17:29:06 +08:00
ZhangYu
c305517957 Update menu-item.md 2017-04-06 15:06:46 +08:00
ZhangYu
0eed821788 Update menu.md 2017-04-06 15:06:02 +08:00
Vadim Macagon
95e782d26c Fix link to the Upgrading Chrome doc 2017-04-06 16:04:19 +10:00
Tasuku Uno
59fe7d3dbb 📝 Fix document of MimeTypedBuffer Object
[ci skip]
2017-04-06 11:38:59 +09:00
Kevin Sawicki
d857b71557 Merge pull request #9111 from electron/deliver-ipc-messages-to-handlers
Fix printing on Windows
2017-04-05 16:27:58 -07:00
Thiago de Arruda
ce1a5e3c9c Fix sandboxed crashReporter for windows.
- Use `path` module from browser process in sandboxed renderer. This is required
  because the return value of `path.join` is platform-specific, and this is an
  assumtion of crash-reporter.js which is shared between sandboxed and
  non-sandboxed renderers.
- Set `process.platform` and `process.execPath` in sandboxed renderer
  environment. This is required to spawn the windows crash service from
  sandboxed renderer.
- Use a single temporary directory for all crashReporter tests. This is required
  to make tests more deterministic across platforms(since mac's crashpad doesn't
  support changing the crash dump directory). Also make a few improvements/fixes
  to the `uploadToServer` test.
2017-04-05 18:09:24 -03:00
Ales Pergl
73e3fd01eb Fixed a couple of failing debug checks when calling Chromium APIs 2017-04-05 14:45:46 +02:00
Kevin Sawicki
b27b1c3b24 Append printed page to job 2017-04-04 20:47:05 -07:00
Kevin Sawicki
aa75e4562e Restore delivering IPC messages to utility handlers 2017-04-04 20:40:57 -07:00
Kevin Sawicki
7574c33ef1 Merge pull request #9028 from electron/fix-popover-items-not-updating
Fix popover items not updating
2017-04-04 14:09:59 -07:00
Kevin Sawicki
6a22c6645e Guard against missing popover identifier 2017-04-04 13:51:39 -07:00
Kevin Sawicki
9c73c991d7 Use const references for params 2017-04-04 13:51:39 -07:00
Samuel Attard
bea56bbdc8 Update as per feedback 2017-04-04 13:51:38 -07:00
Samuel Attard
2fd62d090a Allow items to be assigned to multiple popovers 2017-04-04 13:51:33 -07:00
Samuel Attard
f05dfc74da Store parent popover in popover touch bar items 2017-04-04 13:51:13 -07:00
Kevin Sawicki
8c8b737fa2 Merge pull request #9023 from electron/touchbar-set-escape-button
TouchBar - Method to set escape button
2017-04-04 13:35:55 -07:00
Kevin Sawicki
74a3a34caa Add spec for interaction event with escape item 2017-04-04 13:14:56 -07:00
Kevin Sawicki
bbadeb62ac Check that escape item is non-null before checking id 2017-04-04 13:12:29 -07:00
Kevin Sawicki
414540bfcb Support passing escape item to TouchBar constructor 2017-04-04 12:50:41 -07:00
Kevin Sawicki
b24b4212c5 Make escape item a property instead of setter 2017-04-04 12:50:41 -07:00
Kevin Sawicki
21c1ddffb3 Handle change and interaction events on escape items 2017-04-04 12:50:41 -07:00
Kevin Sawicki
591cd8d073 Update window via listener when escape item changes 2017-04-04 12:50:41 -07:00
Kevin Sawicki
0501a20fe6 Clear escape item 2017-04-04 12:50:41 -07:00
Kevin Sawicki
6eacec7dc3 replaceEscapeItem -> setEscapeItem 2017-04-04 12:50:41 -07:00
Kevin Sawicki
7f8e490839 Take const reference 2017-04-04 12:50:41 -07:00
Kevin Sawicki
d596d85288 🎨 2017-04-04 12:50:41 -07:00
Kevin Sawicki
df0f468dea Add escapeKeyReplacementItemIdentifier forward declaration 2017-04-04 12:50:41 -07:00
Samuel Attard
60cc862031 Make everything pointer like 2017-04-04 12:50:41 -07:00
Samuel Attard
2ba937289c Add smoke test for escape replacement 2017-04-04 12:50:41 -07:00
Samuel Attard
4d6b0fc01b Add a method to set the escape identifier on the touch bar 2017-04-04 12:50:41 -07:00
Kevin Sawicki
3c1a372157 Merge pull request #9101 from electron/wrap-remote-set-as-args
Support calling remote setters with remote objects
2017-04-04 12:50:15 -07:00
Kevin Sawicki
fdd36334e5 Match args style of other IPC handlers 2017-04-04 11:18:16 -07:00
Kevin Sawicki
746f636016 Add tests for setting remote property null/undefined 2017-04-04 11:18:16 -07:00
Kevin Sawicki
7065123266 Wrap remote value being set as an arg 2017-04-04 11:18:16 -07:00
Kevin Sawicki
e5f70f90a4 Add spec for remote setter with remote object 2017-04-04 11:18:16 -07:00
Kevin Sawicki
3e9014c371 Merge pull request #9099 from electron/certificate-trust
macOS: Add certificate trust API
2017-04-04 11:17:09 -07:00
Kevin Sawicki
2bd47eb672 Add specs for showCertificateTrustDialog option errors 2017-04-04 10:49:21 -07:00
Kevin Sawicki
2e32525e8f Make browser window optional 2017-04-04 10:49:10 -07:00
joshaber
2749ded062 Fix c&p error 2017-04-04 11:45:27 -04:00
Kevin Sawicki
af40a60937 Merge pull request #9072 from p-jackson/patch-1
Document passing null to Menu.setApplicationMenu
2017-04-04 08:42:08 -07:00
Kevin Sawicki
f64d82cf16 Merge pull request #9105 from miniak/fix-api-docs
Use point / size / rectangle structures consistently in API docs
2017-04-04 08:41:34 -07:00
joshaber
736d6afe73 As you wish linter 2017-04-04 09:23:30 -04:00
joshaber
146e1ed3ce Don't pass the result through
It's meaningless on macOS, at least.
2017-04-04 09:21:15 -04:00
joshaber
0cab8a3322 Put CertFromData in an anon namespace 2017-04-04 09:19:23 -04:00
Milan Burda
568454525d Use point / size / rectangle structures consistently in API docs 2017-04-04 08:31:09 +02:00
Philip Jackson
6169ccd1e2 📝 Document that setApplicationMenu(null) has no effect on macOS 2017-04-04 18:00:20 +12:00
Cheng Zhao
7265a0c1b4 Merge pull request #8528 from Anatzum/patch-1
Use kioclient for MoveItemToTrash on KDE
2017-04-04 12:15:21 +09:00
joshaber
8d465234e4 Appease our linty overlords 2017-04-03 21:40:46 -04:00
joshaber
e2bda3ca0f Use an options object for most of the params 2017-04-03 21:33:21 -04:00
joshaber
2badfbe04f Remove the intermediate function 2017-04-03 21:22:37 -04:00
joshaber
b3e865a478 Fix some style things 2017-04-03 21:22:14 -04:00
joshaber
398132cfe3 Fix file sorting 2017-04-03 21:19:00 -04:00
Ryohei Ikegami
24fedb2e20 No extra linebreak 2017-04-04 09:40:38 +09:00
Ryohei Ikegami
4a7eec8f2d Pass app path as command line argument 2017-04-04 09:36:01 +09:00
Ryohei Ikegami
9cb6bc098d Use beforeEach/afterEach 2017-04-04 09:08:27 +09:00
Kevin Sawicki
7860ea0227 Merge pull request #9097 from electron/handle-setter-errors
Surface errors setting remote properties
2017-04-03 13:30:39 -07:00
joshaber
370cf815d9 Get rid of intermediates and rehydrate from issuerCert 2017-04-03 16:27:53 -04:00
joshaber
74c0cbddae Linebreak to keep the linter happy 2017-04-03 16:07:02 -04:00
joshaber
b8ff4666c8 Remove stale includes 2017-04-03 15:48:47 -04:00
joshaber
da1b0aab3e Flesh out some docs 2017-04-03 15:39:45 -04:00
joshaber
b0ef7ddf44 Use better iteration 2017-04-03 15:28:51 -04:00
joshaber
06643e525a Const ref that message 2017-04-03 15:28:44 -04:00
joshaber
11f5c942ce Conditionalize 2017-04-03 15:25:09 -04:00
joshaber
0b7ffd094a Expose through the actual JS API too 2017-04-03 15:25:06 -04:00
Kevin Sawicki
e85e483c71 Parse setting response to surface thrown errors 2017-04-03 12:16:51 -07:00
Kevin Sawicki
f49e748020 Merge pull request #9096 from electron/upgrade-brightray-for-cpp-cleanup
Upgrade brightray to latest
2017-04-03 12:16:10 -07:00
joshaber
bcecba20e6 Fix indentation 2017-04-03 15:09:24 -04:00
joshaber
4ffaf2cd99 Remove old unnecssary change on app 2017-04-03 15:09:04 -04:00
joshaber
6e89cb9d7c Move it into dialog 2017-04-03 15:05:24 -04:00
joshaber
4bbbcd093b Handle the callback and cleanup properly 2017-04-03 14:01:48 -04:00
joshaber
1ed443ea29 Do the callback & release dance 2017-04-03 13:21:44 -04:00
Kevin Sawicki
257f6b142f Add spec for remote setter not surfacing error 2017-04-03 09:10:46 -07:00
Kevin Sawicki
0989fd7a1c Upgrade brightray to latest 2017-04-03 08:32:16 -07:00
Kevin Sawicki
f5a75c4e87 Merge pull request #9076 from electron/cleanup-cpp
Cleanup cpp codebase
2017-04-03 08:30:08 -07:00
Kevin Sawicki
2f692c1002 Merge pull request #9084 from runinspring/patch-1
Update web-contents.md
2017-04-03 08:20:06 -07:00
Ryohei Ikegami
001d03c859 Do not add search paths in devtools 2017-04-03 22:40:36 +09:00
Ryohei Ikegami
d1212d4a43 Fix JS style 2017-04-03 20:23:36 +09:00
Ryohei Ikegami
50c99e4507 Search for module under the app directory 2017-04-03 20:19:10 +09:00
Ryohei Ikegami
673f4f4d0c Add test for require to search under app dir 2017-04-03 20:11:19 +09:00
Haojian Wu
34a91434aa Remove extra spaces. 2017-04-01 22:01:29 +02:00
ZhangYu
671bcf2161 Update web-contents.md 2017-04-02 00:41:36 +08:00
Haojian Wu
f09e3f3835 Remove extra blank. 2017-04-01 15:09:53 +02:00
Zeke Sikelianos
c2230ca76a generate electron.d.ts during dist creation, not during build 2017-03-31 21:35:58 -07:00
Zeke Sikelianos
c00bac5c0b add a convenience script for manually generating API JSON 2017-03-31 21:09:23 -07:00
Zeke Sikelianos
9a10486514 generate and upload electron.d.ts with each release 2017-03-31 21:01:55 -07:00
joshaber
ee7389bb6d Rename to make VS happy 2017-03-31 22:57:56 -04:00
joshaber
4f3d3557cc Notify that the cert changed 2017-03-31 21:51:29 -04:00
Zeke Sikelianos
a686237d9b Merge pull request #9080 from electron/fixup-docs-5
Add missing finalUpdate prop
2017-03-31 18:29:16 -07:00
joshaber
bde2a597f3 Decode all the intermediates 2017-03-31 21:27:49 -04:00
joshaber
69defc5166 Encode all the intermediates 2017-03-31 21:27:33 -04:00
Samuel Attard
f757912f90 Add missing finalUpdate prop 2017-04-01 12:11:34 +11:00
Kevin Sawicki
372f209363 Merge pull request #9079 from electron/fix-dialog-args
Move normalizeAccessKeys docs to showMessageBox method
2017-03-31 16:35:31 -07:00
Kevin Sawicki
6d516fbae3 Move normalizeAccessKeys docs to right method 2017-03-31 15:08:03 -07:00
joshaber
302ca8669d Slightly better conversion 2017-03-31 15:44:47 -04:00
Kevin Sawicki
a724b6555f Bump v1.6.5 2017-03-31 12:10:09 -07:00
Kevin Sawicki
0faa15c6ca Merge pull request #9074 from electron/tabbing-mode-version-guard
Only define NSWindowTabbingModeDisallowed on pre-10.12 SDKs
2017-03-31 12:09:54 -07:00
Kevin Sawicki
08db63c3cc Only define NSWindowTabbingModeDisallowed on pre-10.12 2017-03-31 11:28:55 -07:00
Kevin Sawicki
8a01ebef63 Merge pull request #9053 from electron/enable-crash-reporter-upload-windows
Pass `uploadToServer` option to windows crash reporter
2017-03-31 11:28:35 -07:00
joshaber
141a5ad73f Maybe this is a valid conversion? 2017-03-31 14:16:26 -04:00
Haojian Wu
8ae91682cb Lines should be <= 80 characters. 2017-03-31 20:09:13 +02:00
joshaber
16cc79354c Errrrybody's a scoped_refptr now 2017-03-31 13:53:42 -04:00
joshaber
deae70de4d Dummy out the certificate FromV8 converter 2017-03-31 13:53:31 -04:00
Kevin Sawicki
d677a436ec 🎨 2017-03-31 10:42:43 -07:00
Thiago de Arruda
460fb9cdb9 Add tests for uploadToServer option. 2017-03-31 13:48:07 -03:00
Thiago de Arruda
f0d447cd68 Pass uploadToServer to windows crash reporter 2017-03-31 13:46:30 -03:00
Philip Jackson
1c80102218 📝 Document passing null to Menu.setApplicationMenu
[ci skip]
2017-03-31 16:42:03 +13:00
Kevin Sawicki
96407d9c17 Merge pull request #9057 from electron/upgrade-libcc-for-ffmpeg-linking-fix
Upgrade libcc for ffmpeg linking fix
2017-03-30 15:15:32 -07:00
Kevin Sawicki
39fdc26921 Time out after 5 minutes 2017-03-30 14:39:48 -07:00
Kevin Sawicki
c85d667e66 Upgrade libcc to latest master 2017-03-30 14:37:19 -07:00
Kevin Sawicki
90d0179fe9 Use correct dll name 2017-03-30 14:36:52 -07:00
Kevin Sawicki
b85ebb00aa Tweak logged messages 2017-03-30 14:36:52 -07:00
Kevin Sawicki
7873130019 Add comment to codecs app script 2017-03-30 14:36:52 -07:00
Kevin Sawicki
6b8f840da0 Add script to verify ffmpeg without proprietary codecs 2017-03-30 14:36:52 -07:00
Kevin Sawicki
740de02d6c builds -> Support 2017-03-30 14:36:52 -07:00
Kevin Sawicki
5b4f715d2e Add test page to check for proprietary codecs 2017-03-30 14:36:52 -07:00
Kevin Sawicki
c8951d0d4d Upgrade libcc for ffmpeg linking fix 2017-03-30 14:36:52 -07:00
Kevin Sawicki
76529b5065 Merge pull request #9067 from electron/check-name-param-directly
Check name directly instead of arguments length
2017-03-30 14:35:56 -07:00
joshaber
edf61d41ba Link against the Security frameworks 2017-03-30 17:26:11 -04:00
joshaber
7b044ffe0e Compile these lovely files 2017-03-30 17:26:03 -04:00
joshaber
653b2d15c3 Expose the certificate trust panel as part of app 2017-03-30 17:25:55 -04:00
joshaber
64369cd07f Show a certificate trust panel 2017-03-30 17:25:44 -04:00
Haojian Wu
328cf4789b Should override the virtual destructor. 2017-03-30 23:19:43 +02:00
Haojian Wu
e8abee9ca9 Replace C-style casts with static_cast. 2017-03-30 23:05:47 +02:00
Kevin Sawicki
fcb7cbc54a Check name directly instead of arguments length 2017-03-30 14:03:00 -07:00
Kevin Sawicki
a2588c1fd9 Merge pull request #9052 from tonyganch/native_tabs
Native tabs on macOS
2017-03-30 14:02:19 -07:00
Haojian Wu
ff745e1a82 Use prefix increment in for loops. 2017-03-30 22:56:21 +02:00
Haojian Wu
8d8c7ce6ad Correct type cast. 2017-03-30 22:53:20 +02:00
Kevin Sawicki
6f27d466a5 Move tabbingIdentifier out of webPreferences list 2017-03-30 13:49:00 -07:00
Kevin Sawicki
42300ae58e Make tabbing identifier var local 2017-03-30 13:47:11 -07:00
Kevin Sawicki
e699e88b4c Add initial tabbingIdentifier spec 2017-03-30 13:46:58 -07:00
Kevin Sawicki
c8b992fa39 Remove 10.12 check handled by respondsToSelector 2017-03-30 13:46:34 -07:00
Haojian Wu
bb51401c4c Use base::mac::NSToCast. 2017-03-30 22:33:09 +02:00
Haojian Wu
1b9780035c Remove redundant calls to smart pointer's get method. 2017-03-30 22:22:40 +02:00
Haojian Wu
d425b63b0d NULL => nullptr 2017-03-30 22:12:14 +02:00
Haojian Wu
00693ba075 Replace "size()" with "empty()". 2017-03-30 21:59:18 +02:00
Haojian Wu
6ef3be23fd Avoid copy in for range loop. 2017-03-30 21:56:28 +02:00
Kevin Sawicki
77994a7856 Merge pull request #9066 from electron/segment-style-enum-warnings
Add descriptions for each segmentStyle
2017-03-30 12:36:35 -07:00
Kevin Sawicki
4001ba038e Add descriptions for each segmentStyle 2017-03-30 12:36:20 -07:00
Kevin Sawicki
f805bbee9b Merge pull request #9062 from electron/stringify-headers-in-net-module
Fix net module to accept non-string header values
2017-03-30 12:35:53 -07:00
Zeke Sikelianos
f0e7a84627 Merge pull request #9065 from electron/roles
Improve docs for MenuItem Roles
2017-03-30 12:28:14 -07:00
Thiago de Arruda
b3cf00a19a Fix net module to accept non-string header values
This is required to be compatible with node.js http module.
2017-03-30 16:01:40 -03:00
Kevin Sawicki
3100463117 Merge pull request #8917 from bcomnes/patch-1
Clarify remote require of relative modules
2017-03-30 12:00:47 -07:00
Kevin Sawicki
55bf2239df Remove spaces around brackets 2017-03-30 11:58:09 -07:00
Zeke Sikelianos
d5bc8990fc link to roles list from Menu doc 2017-03-30 11:08:12 -07:00
Zeke Sikelianos
b24be19fac tighten up formatting of menu example 2017-03-30 11:07:59 -07:00
Zeke Sikelianos
d779ecf674 create a linkable heading for MenuItem roles 2017-03-30 11:07:25 -07:00
Kevin Sawicki
bdd08b8baa Merge pull request #9054 from ColinEberhardt/patch-3
Some minor copy edit on sandbox documentation
2017-03-30 10:52:46 -07:00
Tony Ganch
bd935b213f Fix compilation against macOS 10.10 SDK 2017-03-30 15:13:49 +02:00
Colin Eberhardt
bed32682b7 Clarification of the chromium sandbox support 2017-03-30 10:47:14 +01:00
Haojian Wu
5f724e57bc Avoid unnecessary copy of parameters. 2017-03-29 22:06:07 +02:00
Kevin Sawicki
57edc28b0d Merge pull request #8880 from mst128256/2814
Default menu items for 'Edit' and 'Window' #2814
2017-03-29 12:31:58 -07:00
Kevin Sawicki
8b4bf1f29e 🎨 2017-03-29 12:29:36 -07:00
Haojian Wu
99293dd57f Fix namespace comments. 2017-03-29 20:47:41 +02:00
Tony Ganch
a7565f0d57 Enable native tabs on macOS 2017-03-29 13:51:39 +02:00
Tony Ganch
9e02c60e22 Revert "Disable Show Tab Bar menu item on macOS Sierrra"
This reverts commit 24b9313958.
2017-03-29 13:50:56 +02:00
Tony Ganch
ed76e03730 Revert "Add forward declaration of NSWindow.allowsAutomaticWindowTabbing"
This reverts commit 770a3509cf.
2017-03-29 13:50:56 +02:00
mst128256
6ae198a625 Empty objects within default menu replaced by nulls 2017-03-29 12:50:31 +02:00
Cheng Zhao
6db827cc9a Use GetDesktopEnvironment to determien desktop env
Which can get a much more precise result for us.
2017-03-29 16:21:38 +09:00
Anatzum
f9dbdf4522 Updated MoveItemToTrash in platform_util_linux.cc
If ELECTRON_TRASH is null, first check the DESKTOP_SESSION variable and set trash accordingly. Additional desktop environments can be added easily this way with the fallback of ELECTRON_DEFAULT_TRASH.
2017-03-29 16:08:26 +09:00
Cheng Zhao
208182d8cf Merge pull request #9039 from electron/extract-renderer-base-class
Create base class to share code between sandbox and non-sandbox
2017-03-29 15:20:46 +09:00
Cheng Zhao
9ef1f8cd5d Merge pull request #9043 from electron/fix-uv-run-crash
Fix crash happened in UvRunOnce
2017-03-29 13:37:07 +09:00
Kevin Sawicki
4441d557a2 Merge pull request #9007 from electron/net_redirect_patch
net: allow controlling redirects
2017-03-28 09:31:05 -07:00
Kevin Sawicki
03b2167f6c Merge pull request #9001 from electron/net_source_stream_error_patch
net: catch source stream creation failure for content encoding
2017-03-28 09:24:18 -07:00
Kevin Sawicki
e0003021cf Merge pull request #9041 from runinspring/master
Update dialog.md
2017-03-28 09:15:09 -07:00
Kevin Sawicki
d196486cb4 Merge pull request #8652 from electron/no-api-docs-generation
create-dist: Adding argument to supress api docs generation.
2017-03-28 08:59:46 -07:00
deepak1556
b14c4dcdc0 address review comments 2017-03-28 19:05:44 +05:30
deepak1556
8db1eacd1c [skip ci] add docs 2017-03-28 18:46:21 +05:30
deepak1556
3ae62615f4 net: allow controlling redirects 2017-03-28 18:46:21 +05:30
Cheng Zhao
2ef1b70897 Fix crash happened in UvRunOnce 2017-03-28 17:19:14 +09:00
Cheng Zhao
637bdc239b Merge pull request #8923 from electron/geolocation_request_context_patch
browser: Create separate request context for geolocation service.
2017-03-27 22:45:46 -07:00
ZhangYu
3004f3c762 Update dialog.md 2017-03-28 11:49:47 +08:00
Kevin Sawicki
8164ede297 Merge pull request #9037 from electron/upgrade-libcc-for-webview-drag-fix
Upgrade libcc for webview dnd fix
2017-03-27 17:18:17 -07:00
Thiago de Arruda
d1f08beddf Make AtomSandboxedRendererClient a RendererClientBase subclass. 2017-03-27 18:49:55 -03:00
Thiago de Arruda
c3a8f665f2 Extract base class from AtomRendererClient
The new `RendererClientBase` class contains code that is not specific to node.js
integration with the renderer.
2017-03-27 18:49:55 -03:00
Kevin Sawicki
3028bffa73 Upgrade libcc for webview dnd fix 2017-03-27 14:06:00 -07:00
Kevin Sawicki
9249228ac3 Merge pull request #9034 from electron/disable-flaky-appveyor-spec
Disable flaky post navigation spec on AppVeyor
2017-03-27 14:05:42 -07:00
Kevin Sawicki
f24baffc79 Expect count to be 0 2017-03-27 10:21:01 -07:00
Kevin Sawicki
ad5a48d255 Merge pull request #8983 from electron/sandbox-initial-documentation
Add initial documentation for `sandbox` option.
2017-03-27 10:16:24 -07:00
Kevin Sawicki
870dcb9071 Remove old sandbox option in list and mark as experimental 2017-03-27 10:14:47 -07:00
Kevin Sawicki
6a2cdcf32f Merge pull request #8956 from electron/expose-crash-reporter-to-sandbox
Expose crash reporter to sandbox
2017-03-27 10:09:36 -07:00
Kevin Sawicki
f979bbf9d3 Merge pull request #8897 from electron/versioning-doc
update versioning doc
2017-03-27 09:54:11 -07:00
Kevin Sawicki
b1275a8ef0 Merge pull request #8984 from hansenzhang/display-menuitem-label
Fix '&'  not showing in MenuItem label
2017-03-27 09:47:50 -07:00
Kevin Sawicki
9a4783bf34 Disable flaky post navigation spec on AppVeyor 2017-03-27 09:15:40 -07:00
Kevin Sawicki
2dabe8d6fa Merge pull request #9021 from owwo/master
Fix translation error
2017-03-27 09:11:24 -07:00
Kevin Sawicki
fecd018a35 Merge pull request #9024 from runinspring/patch-1
add getFileIcon method
2017-03-27 09:11:04 -07:00
Kevin Sawicki
10dc08b39b Merge pull request #9006 from electron/fix-thumbnailSize-doc
fix docs for thumbnailSize
2017-03-27 09:10:40 -07:00
ZhangYu
dccfadd2bc add getFileIcon method 2017-03-27 11:16:05 +08:00
Zeke Sikelianos
4d29392217 Merge pull request #9014 from electron/MarshallOfSound-patch-1
Fix return syntax in docs
2017-03-26 19:53:33 -07:00
owwo
4e1b237649 Fix translation error 2017-03-26 18:42:07 -05:00
Samuel Attard
168c47bf10 Update web-contents.md 2017-03-25 18:27:43 +11:00
Zeke Sikelianos
79346f1ac5 Merge pull request #9012 from electron/fixup-docs-4
Add missing property types on the process docs
2017-03-25 00:10:09 -07:00
Samuel Attard
b62f1fd022 Add missing return type on executeJavaScript 2017-03-25 14:59:48 +11:00
Samuel Attard
a80148aa29 Add missing property types on the process docs 2017-03-25 14:51:23 +11:00
Zeke Sikelianos
d39207f83a Merge pull request #9010 from electron/fixup-docs-3
Generic doc fixes
2017-03-24 20:30:53 -07:00
Samuel Attard
aa5c778ca2 Generic doc fixes 2017-03-25 12:37:07 +11:00
Hari Juturu
d95114016d V8 dev resources (#9008)
* Adding V8 documentation links

* Removing extra space

* use electron markdown conventions

* cross-link v8 and chromium dev docs

* fix v8 link
2017-03-24 15:40:23 -07:00
Zeke Sikelianos
32f278d92b Merge pull request #8988 from electron/chromium-dev-resources
document resources for tracking chromium development
2017-03-24 11:21:29 -07:00
Zeke Sikelianos
095df457b2 fix docs for thumbnailSize 2017-03-24 11:14:43 -07:00
mst128256
6a7b4feb35 Fixed for linting 2017-03-24 12:31:49 +01:00
mst128256
9e471d8f1c Added specs 2017-03-24 12:14:08 +01:00
Thiago de Arruda
437f1192d9 Add initial documentation for sandbox option. 2017-03-23 21:42:25 -03:00
Felix Rieseberg
d5c4ad5e2c 📝 Improve notification docs 2017-03-23 14:12:35 -07:00
Cory Reed
a92f639b64 📝 Add note regarding dynamic addition/removal of menu items.
Closes #8928.

[ci skip]
2017-03-23 11:57:44 -07:00
deepak1556
93b444eef9 net: catch source stream creation failure for content encoding 2017-03-23 23:36:05 +05:30
Thiago de Arruda
a5eef516a7 Fix indent in api-crash-reporter-spec.js 2017-03-23 10:01:02 -03:00
Thiago de Arruda
5ee6205c0a Run the crash reporter specs with sandbox option.
- Create a function that accepts BrowserWindow options and generates a suite
  that contains the renderer-specific tests.
- Run the function twice to execute the tests with and without sandbox option.
2017-03-23 10:01:02 -03:00
Thiago de Arruda
3a97cfc359 Expose crashReporter to sandbox 2017-03-23 10:01:02 -03:00
Thiago de Arruda
bf756e3c00 Prevent browserify from leaking the require function
Define a "require" argument in the wrapper functions that runs browserify
bundles, which will prevent browserify from leaking the require function.

Note that this doesn't affect the isolated renderer script, only when `-r` flag
is passed to browserify command it will export a require function. It is still
added to isolated renderer script to prevent future mistakes(doesn't hurt
defining a "require" local).
2017-03-23 10:01:02 -03:00
Thiago de Arruda
e1aebef57c Make sandbox APIs more compatible with normal renderers
- Expose remote shortcuts for the `fs`, `os` and `child_process` modules.
- Expose the `url` and `timers` modules(the browserify versions)
- Add `process.crash` and `process.platform`
2017-03-23 10:01:02 -03:00
Zeke Sikelianos
360d2b45f4 document resources for tracking chromium development 2017-03-22 22:59:11 -07:00
Zeke Sikelianos
d22910f554 mention tilde 2017-03-22 16:13:24 -07:00
Kevin Sawicki
46aed5ff6f Bump v1.6.4 2017-03-22 09:16:08 -07:00
Cheng Zhao
e539129db2 Merge pull request #8852 from electron/web-worker-hook
Add Node.js integration to WebWorker
2017-03-22 09:01:42 -07:00
Cheng Zhao
c1a478179e Merge pull request #8971 from electron/fix-freeenvironment-crash
node::Environment should be destroyed before AtomBindings
2017-03-22 09:00:38 -07:00
Hansen Zhang
426563a843 #8881 - Display '&' in MenuItem label 2017-03-22 11:52:25 -04:00
deepak1556
4ab2c92418 CommonWebContentsDelegate::DestroyWebContents => ResetManagedWebContents 2017-03-22 07:30:36 +05:30
Kevin Sawicki
f7e3f9035d Merge pull request #8974 from electron/default-popup-async-value
Default async to false when object is specified
2017-03-21 06:36:29 -07:00
Kevin Sawicki
23b235c9c7 Default async to false when object is specified 2017-03-20 20:37:52 -07:00
Cheng Zhao
99d3fce3c7 node::Environment should be destroyed before AtomBindings
The shutdown code may still uses the APIs provieded by AtomBindings.
2017-03-20 13:01:28 -07:00
Cheng Zhao
71c3e97e81 Fix docs lint warnings 2017-03-20 12:52:46 -07:00
Cheng Zhao
0287f23e3b Fix cpplint warning 2017-03-20 12:52:46 -07:00
Cheng Zhao
40b35a991f Fix js lint 2017-03-20 12:52:46 -07:00
Cheng Zhao
940d77b9a0 Fix typos and adjust sentences 2017-03-20 12:52:46 -07:00
Cheng Zhao
033aa16e04 test: Node integration in web workers 2017-03-20 12:52:46 -07:00
Cheng Zhao
ab83aa0bfd docs: Multithreading 2017-03-20 12:52:46 -07:00
Cheng Zhao
a49af26e39 Add nodeIntegrationInWorker option 2017-03-20 12:52:46 -07:00
Cheng Zhao
e496e18f6e Make Archive thread safe 2017-03-20 12:52:46 -07:00
Cheng Zhao
c068285ff8 AtomBindings should not use default uv loop 2017-03-20 12:52:46 -07:00
Cheng Zhao
9c9c8ec5f1 WebWorkerObserver should be destroyed on exit 2017-03-20 12:52:46 -07:00
Cheng Zhao
d2f185bea5 Create new uv loop in each worker 2017-03-20 12:52:46 -07:00
Cheng Zhao
69df934710 Converter for base::Callback is not thread safe 2017-03-20 12:52:45 -07:00
Cheng Zhao
bb5ad4ac05 Correctly initialize Node environment in worker 2017-03-20 12:52:45 -07:00
Cheng Zhao
b467c3939e Add a new type of NodeBindings 2017-03-20 12:52:45 -07:00
Cheng Zhao
aac934b34e Update native_mate: Make Wrappable thread safe 2017-03-20 12:52:45 -07:00
Cheng Zhao
2cbdb6bac3 Wrap ContextCreated with context scope 2017-03-20 12:52:45 -07:00
Cheng Zhao
e017e157ba Insert node integrations into WebWorker 2017-03-20 12:52:45 -07:00
Kevin Sawicki
253caf35ab Merge pull request #8955 from babanesma/feat/new-clean-command
Feat/new clean command
2017-03-20 10:36:19 -07:00
Kevin Sawicki
2d638e5da7 Add option to clean.py to only remove dist and out dirs 2017-03-20 10:33:04 -07:00
Kevin Sawicki
6ded27f3a9 Merge pull request #8878 from TanninOne/patch-1
Update browser-window.md
2017-03-20 10:14:23 -07:00
Kevin Sawicki
caae03f954 Use rendered language in both ready-to-show docs 2017-03-20 10:13:45 -07:00
Kevin Sawicki
286f529968 Merge pull request #8890 from twolfson/dev/proxy.to.string.sqwished
🐛 Add toString support to remote functions
2017-03-20 09:35:51 -07:00
Kevin Sawicki
75d934e4a2 Merge pull request #8962 from feserafim/patch-1
Update README.md
2017-03-20 09:35:09 -07:00
deepak1556
72adbf7a2f destroy guest webcontents before embedder 2017-03-19 10:25:13 +05:30
Felipe Serafim
deef2da87c Update README.md
Correcting some Spanish words mistakes.
2017-03-18 23:23:14 +01:00
deepak1556
16f9754445 Create separate request context for geolocation service.
* Geolocation service cannot hold reference to browser context,
    since it is destroyed at the end of everything and this will
    confuse the shutdown path of browser context.
  * Geolocation service run on its own thread.
2017-03-19 01:11:55 +05:30
Adham Saad
8060b0966f 🐛 #8919 - fix typo 2017-03-17 20:47:20 +02:00
Adham Saad
487a195320 🐛 #8919 - add new command to the docs 2017-03-17 20:44:18 +02:00
Kevin Sawicki
a215e8fb82 Merge pull request #8954 from electron/mark-touchbar-apis-with-experimental-label
Mark touch bar apis with _Experimental_ in docs
2017-03-17 11:02:46 -07:00
Kevin Sawicki
6f047fd4b7 Mark touch bar apis with _Experimental_ 2017-03-17 10:56:41 -07:00
Kevin Sawicki
64984ac23b Merge pull request #8942 from electron/read-binary-data-from-clipboard
Add clipboard.readBuffer(format)
2017-03-17 10:56:24 -07:00
Kevin Sawicki
f119bc0944 Remove unused args param 2017-03-17 10:35:54 -07:00
Kevin Sawicki
c50b518493 Check toString after loading remote properties 2017-03-17 10:29:07 -07:00
Kevin Sawicki
648d3324fb Add spec for remote function with toString property 2017-03-17 10:28:23 -07:00
Kevin Sawicki
11a4c7e408 🎨 2017-03-17 09:57:17 -07:00
Kevin Sawicki
3ae034deab Change data -> format in clipboard docs 2017-03-17 09:57:17 -07:00
Kevin Sawicki
ab05346572 Add clipboard.readBuffer 2017-03-17 09:57:17 -07:00
Kevin Sawicki
0e55e5cbb5 Add initial spec for clipboard.readBuffer 2017-03-17 09:57:17 -07:00
Kevin Sawicki
fe5db82d47 Merge pull request #8926 from electron/upgrade-libcc-for-heap-snapshot-patch
Upgrade libcc and brightray to latest
2017-03-17 09:55:39 -07:00
Kevin Sawicki
f71353a4c5 Merge pull request #8939 from electron/expose-remote-to-sandbox
Expose remote module to sandbox
2017-03-17 09:41:59 -07:00
Kevin Sawicki
9642381c02 Upgrade to libcc 44448acf 2017-03-17 09:37:28 -07:00
Kevin Sawicki
a35cce5f7a Enable takeHeapSnapshot spec 2017-03-17 09:14:17 -07:00
Kevin Sawicki
469ab8b509 Upgrade libcc for heap snapshot patch 2017-03-17 09:14:17 -07:00
Todd Wolfson
818738ce84 🐛 Add toString support to remote functions 2017-03-17 08:21:37 -07:00
Thiago de Arruda
e9b955b9ec Use remote/fs to read preload script during sandboxed setup
Also expose the "fs" module to preload scripts, as a shortcut to
`require('electron').remote.require('fs')`
2017-03-16 14:23:00 -03:00
Thiago de Arruda
f6befbe764 Expose lib/renderer/api/remote.js to sandboxed renderer 2017-03-16 14:21:23 -03:00
Kevin Sawicki
6d45052eea Merge pull request #8900 from electron/handle-buffer-instances-in-sandbox
Handle Buffer deserialization in sandboxed renderers
2017-03-16 10:12:09 -07:00
Thiago de Arruda
a6e4867111 Handle Buffer deserialization in sandboxed renderers
In sandboxed renderers we use browserify to provide a node-like environment. The
Buffer class used by browserify is actually just a wrapper around Uint8Array,
but to deserialize Buffer correctly we must expose the class as a hidden value
and use it in V8ValueConverter.
2017-03-16 13:20:09 -03:00
Kevin Sawicki
da0d0e7aac Merge pull request #8910 from electron/touchbar-scrubber
Touchbar NSScrubber
2017-03-16 09:10:59 -07:00
Adham Saad
713e256843 🐛 #8919 - add new command that cleans only out & dist dirs 2017-03-16 13:34:53 +02:00
Kevin Sawicki
e98ac94d51 🎨 2017-03-15 11:22:31 -07:00
Kevin Sawicki
bc31f05404 highlightedStyle -> overlayStyle 2017-03-15 09:47:07 -07:00
Kevin Sawicki
f41db87e47 Use NSZeroRect for scrubber frame 2017-03-15 09:45:50 -07:00
Kevin Sawicki
466c39ed19 Use icon for consistency with other touch bar APIs 2017-03-15 09:33:11 -07:00
Kevin Sawicki
019883f2fa Merge pull request #8899 from electron/dynamically-generate-browserify-dep-list
Dynamically generate dependencies of browserify build actions
2017-03-15 09:12:31 -07:00
Cheng Zhao
5200b1a1ab Merge pull request #8435 from electron/pdf_rendering
browser: implement native pdf rendering
2017-03-15 18:36:50 +09:00
Kevin Sawicki
49d48a4eb0 Add more non-default options to scrubber spec 2017-03-14 14:15:04 -07:00
Kevin Sawicki
87c219748d Document more constructor options 2017-03-14 14:12:41 -07:00
Kevin Sawicki
2e0e4e69bb Drop on prefix from property names 2017-03-14 14:02:48 -07:00
Kevin Sawicki
6175ee05e2 Remove unneeded long cast 2017-03-14 13:59:29 -07:00
Kevin Sawicki
8b7675baee Add more forward declarations for scrubber APIs 2017-03-14 13:57:39 -07:00
Kevin Sawicki
eeccdf967c Merge pull request #8924 from electron/update-appveyor-badge
Update AppVeyor badge URL
2017-03-14 13:18:04 -07:00
Bret Comnes
b67c81226c fix linting 2017-03-14 10:48:44 -07:00
Kevin Sawicki
069baf8cd8 Update AppVeyor badge URL 2017-03-14 10:13:53 -07:00
Samuel Attard
a55cddaa53 Add more options 2017-03-14 18:57:57 +11:00
Bret Comnes
85c48a2336 make main process example shorter 2017-03-13 17:20:11 -07:00
Bret Comnes
2276357f72 update with a tree 2017-03-13 17:18:23 -07:00
Bret Comnes
f82590b9ab Wrap at 80 2017-03-13 15:48:42 -07:00
Bret Comnes
46af3cefec Clarify remote require of relative modules
The docs for the `remote.require(module)` method were a little too terse for me to understand the behavior of relative module loading for `remote.require` and I had to run an experiment to understand the behavior (e.g. is the relative path relative to caller of `remote.require` or relative to some other path in the project related to the main process?).   I think this is correct but someone please double check my understanding.

Adding an example and additional explanation should help clarify this.  Feel free to edit the copy as needed.
2017-03-13 15:42:26 -07:00
deepak1556
15e2b2335f address review comments 2017-03-14 00:26:27 +05:30
deepak1556
80ce60f644 spec: check if pdf has loaded 2017-03-14 00:26:27 +05:30
deepak1556
6e02d18a40 update submodules 2017-03-14 00:26:27 +05:30
deepak1556
6be779c777 update spec with new asset 2017-03-14 00:26:27 +05:30
deepak1556
d022d108a3 Dont intercept pdf request for subframes
Will not work without OOPIF support
2017-03-14 00:26:27 +05:30
deepak1556
4381e0895f propagate zoom changes to pdf plugin 2017-03-14 00:26:27 +05:30
deepak1556
eda413861a update spec 2017-03-14 00:26:27 +05:30
deepak1556
093cff5548 update libcc commit 2017-03-14 00:26:27 +05:30
deepak1556
b28e686228 code cleanup 2017-03-14 00:26:27 +05:30
deepak1556
b1b6573bcd build pdf resource in vendor/pdf_viewer 2017-03-14 00:26:27 +05:30
deepak1556
e5100cd103 Remove grit submodule 2017-03-14 00:26:27 +05:30
deepak1556
5a8e522526 StreamManager class is no longer required.
Stream lifetime is managed by webui
2017-03-14 00:26:27 +05:30
deepak1556
c982af991d request for pdf resource from the webui 2017-03-14 00:26:27 +05:30
Cheng Zhao
210f40dd53 Convert "\" to "/" in file:// url 2017-03-14 00:26:27 +05:30
Cheng Zhao
422b7acece Do not store resource_path as FilePath
On Windows the path value returned by PathWithoutParams also uses "/" as
separator, so there is no need to use the FilePath class.
2017-03-14 00:26:27 +05:30
Cheng Zhao
cca1db47ee Print error when path is not found 2017-03-14 00:26:27 +05:30
deepak1556
528853efbf handle reload api call from pdf ui 2017-03-14 00:26:27 +05:30
deepak1556
010193ef44 remove unused header 2017-03-14 00:26:27 +05:30
deepak1556
e4b97a3c93 update submodules to latest 2017-03-14 00:26:27 +05:30
deepak1556
6987e3ecd0 check if target stream is intercepted for correct request 2017-03-14 00:26:27 +05:30
deepak1556
ed89a603f3 update pdf_viewer to chrome 56.0.2924.87 2017-03-14 00:26:27 +05:30
deepak1556
b9710532e1 update api changes 2017-03-14 00:26:27 +05:30
deepak1556
07835bf4e6 update libcc commit 2017-03-14 00:26:27 +05:30
deepak1556
6e241c5e0d update submodule 2017-03-14 00:26:27 +05:30
deepak1556
bd9a9657aa disable node integration for chrome scheme 2017-03-14 00:26:27 +05:30
deepak1556
a4400dc549 add basic spec 2017-03-14 00:26:27 +05:30
deepak1556
3aba23b471 view_id=>stream_id and add some code comments. 2017-03-14 00:26:27 +05:30
deepak1556
e90fd1444f move constants to atom_constants.h 2017-03-14 00:26:27 +05:30
deepak1556
671a8a2cd6 address review comments 2017-03-14 00:26:27 +05:30
deepak1556
6cb626db88 use existing ipc message generator 2017-03-14 00:26:27 +05:30
deepak1556
56c0eb74ff update submodule 2017-03-14 00:26:27 +05:30
deepak1556
cc09b9ac7d BINDINGS_POLICY_WEB_UI is not required 2017-03-14 00:26:27 +05:30
Paul Betts
846d516584 Get us compiling on macOS 2017-03-14 00:26:27 +05:30
Paul Betts
8580a34f9f Get us compiling on Win32 2017-03-14 00:26:27 +05:30
deepak1556
2b64452d9c fix build config 2017-03-14 00:26:27 +05:30
deepak1556
3baa186c0a fix failing download spec 2017-03-14 00:26:27 +05:30
deepak1556
e767c59da2 enable pdf plugin by default 2017-03-14 00:26:27 +05:30
deepak1556
c15f6af892 fix crash when pdf viewer is reloaded 2017-03-14 00:25:59 +05:30
deepak1556
ddc2e0df71 code cleanup 2017-03-14 00:25:59 +05:30
deepak1556
de7dcdedba setup strings for ui 2017-03-14 00:25:59 +05:30
deepak1556
0c7bb72891 listen to ipc messages from plugin to perform SaveAs op 2017-03-14 00:25:59 +05:30
deepak1556
fd8c450ef3 move pdfviewer ui data source to separate file 2017-03-14 00:25:59 +05:30
deepak1556
008497500b update pdf_viewer submodule to use stream url 2017-03-14 00:25:59 +05:30
deepak1556
945e26750e manage the lifetime of streams created 2017-03-14 00:25:59 +05:30
deepak1556
0ab37da785 replace redundant mimetype helper with net utility 2017-03-14 00:25:59 +05:30
deepak1556
578b717b5f fix cpplint error 2017-03-14 00:25:59 +05:30
deepak1556
c8b932fce4 build pdf resources from submodule 2017-03-14 00:25:59 +05:30
deepak1556
c4dd2f4f56 add pdf webui as submodule 2017-03-14 00:25:59 +05:30
deepak1556
3c90fabab7 update pdf ui to work with webui 2017-03-14 00:25:59 +05:30
deepak1556
41c1623824 handle more messages from webui 2017-03-14 00:25:59 +05:30
deepak1556
a2db14476a create webui message handler 2017-03-14 00:25:59 +05:30
deepak1556
8a2b9c893e initialize webui with message handlers 2017-03-14 00:25:59 +05:30
deepak1556
a7ed7068f6 remove grit 2017-03-14 00:25:59 +05:30
deepak1556
be480fb634 import pdf ui 2017-03-14 00:25:59 +05:30
deepak1556
fdd574cea5 browser: implement pdf renderer as webui 2017-03-14 00:25:59 +05:30
Kevin Sawicki
5e70adb511 Guard against only specifying select or highlight handler 2017-03-13 11:23:27 -07:00
Kevin Sawicki
0dcdd60010 Add initial TouchBarScrubber spec 2017-03-13 11:17:55 -07:00
Kevin Sawicki
268dd1a6c2 Remove unneeded include 2017-03-13 11:15:36 -07:00
Kevin Sawicki
e52ece1a1e Implement NSScrubberDataSource in AtomTouchBar 2017-03-13 11:06:41 -07:00
Kevin Sawicki
4f31a5c452 Fix duplicate protocol method declaration 2017-03-13 10:39:42 -07:00
Kevin Sawicki
d7f458d232 Add protocol methods 2017-03-13 10:31:51 -07:00
Kevin Sawicki
2fe21ecdd0 🎨 2017-03-13 10:28:30 -07:00
Kevin Sawicki
37c9d76cd5 Take const references 2017-03-13 10:25:30 -07:00
Kevin Sawicki
dac6e0ce66 Sort filenames 2017-03-13 10:09:09 -07:00
Kevin Sawicki
634bd7b17f Add NSScrubber forward declarations 2017-03-13 10:07:48 -07:00
Kevin Sawicki
48152a813b Merge pull request #8907 from electron/plugin_list_patch
renderer: reset plugin cache when render frame is created
2017-03-13 09:22:21 -07:00
Kevin Sawicki
84e7387b17 Merge pull request #8906 from roramirez/docs-es
Add translated CODE_OF_CONDUCT.md and README.md for spanish language.
2017-03-13 09:11:30 -07:00
mst128256
76ee7fda2b Fixed linting 2017-03-13 14:26:34 +01:00
Samuel Attard
cfb3798703 Add docs for TouchBarScrubbber 2017-03-13 11:00:25 +11:00
Samuel Attard
a85ae27d68 Fix linting 2017-03-13 11:00:10 +11:00
Samuel Attard
25a231fc50 Initial NSScrubber implementation 2017-03-13 10:51:12 +11:00
Adham Saad
3b265747fe updating README 2017-03-12 14:17:03 +02:00
deepak1556
4281c73cf2 renderer: reset plugin cache when render frame is created 2017-03-12 00:53:39 +05:30
Rodrigo Ramírez Norambuena
eed098277c Add translated CODE_OF_CONDUCT.md and README.md for spanish language. 2017-03-10 22:24:00 -03:00
Kevin Sawicki
280337bf46 Merge pull request #8887 from electron/touchbar-segmneted-control
Touchbar segmented control
2017-03-10 14:43:12 -08:00
Thiago de Arruda
da023b72ee Dynamically generate dependencies of browserify build actions
Instead of having to list in filenames.gypi every javascript file that may go
into a browserify build, generate this list dynamically when the build files are
created by gyp.
2017-03-10 16:30:23 -03:00
Kevin Sawicki
5b1d5b39a2 Set automatic via else block 2017-03-10 10:11:56 -08:00
Kevin Sawicki
3349e32196 Verify selectedIndex to prevent NSRangeException 2017-03-10 10:09:18 -08:00
Kevin Sawicki
3b2faf7b89 Add initial TouchBarSegmentedControl spec 2017-03-10 10:04:22 -08:00
Kevin Sawicki
458e4be77c Add forward declaration for 10.12 API 2017-03-10 09:53:47 -08:00
Kevin Sawicki
7ef69a5af5 Merge pull request #8815 from tarruda/improve-sandbox-expose-more-modules
Improvements to sandbox mode
2017-03-10 09:23:31 -08:00
Zeke Sikelianos
582662e40f fix markdown link 2017-03-10 09:03:04 -08:00
Zeke Sikelianos
7fefb75de5 update versioning doc 2017-03-10 08:08:23 -08:00
Samuel Attard
bfe63d7a88 Fix linting 2017-03-10 17:56:26 +11:00
Samuel Attard
e6a66b6006 Add docs for segmented control touch bar item 2017-03-10 17:50:23 +11:00
Samuel Attard
1c027c526b Add segmented control implementation 2017-03-10 17:40:39 +11:00
Thiago de Arruda
dda2288541 Remove lib/renderer/api/ipc-renderer-setup.js
This file is no longer required since sandboxed renderer directly imports
ipc-renderer.js.
2017-03-09 20:40:32 -03:00
Thiago de Arruda
cd05834d96 Refactor sandboxed renderer init scripts
This change gives sandboxed renderer scripts a similar structure to what already
exists in the lib/{browser,renderer,common} directories.

It also allows sandboxed renderer initialization to share more code with
non-sandboxed renderers (ipcRenderer is now imported directly from
lib/renderer/api/ipc-renderer).
2017-03-09 20:39:14 -03:00
Thiago de Arruda
2b8203e383 Make sandboxed ipcRenderer API compatible with non-sandboxed version 2017-03-09 20:39:14 -03:00
Thiago de Arruda
d78f3cae7b Expose builtin v8 modules to AtomSandboxedRendererClient
- Adapt node.cc code that implements `process.binding` to create a similar
  object in AtomSandboxedRendererClient.
- Replace the ipc binding object passed to `lib/sandboxed_renderer/init.js` by
  the new binding object.
- Refactor the initialization script to use this new object to fetch the ipc
  binding and store as a hidden value using the `v8_util` module.

This change also required applying a patch to node.js, so the submodule commit
was updated.
2017-03-09 20:39:14 -03:00
Kevin Sawicki
85d66d2413 Merge pull request #8882 from electron/list-modules-in-separate-files
Refactor electron exports to keep module list in separate files
2017-03-09 15:36:02 -08:00
Thiago de Arruda
44bd93589a Refactor electron exports to keep module list in separate files 2017-03-09 19:08:01 -03:00
Kevin Sawicki
e79a22da5d Merge pull request #8883 from electron/pass-crash-reporter-upload-parameter
Pass `uploadToServer` parameter to linux crash reporter
2017-03-09 12:59:35 -08:00
Thiago de Arruda
e03e37e984 Pass uploadToServer parameter to linux crash reporter 2017-03-09 17:23:52 -03:00
Kevin Sawicki
14e8e463b3 Merge pull request #8864 from electron/zoom_controller_webview_patch
browser: track origin zoom with HostZoomMap
2017-03-09 11:27:34 -08:00
Kevin Sawicki
14b548f27a Merge pull request #8858 from electron/native-image-add-representation
Add nativeImage.addRepresentation API
2017-03-09 10:49:19 -08:00
Kevin Sawicki
f19998ef4c Add more default values 2017-03-09 10:26:44 -08:00
Kevin Sawicki
2946f624ac Add spec for adding representation to existing image 2017-03-09 09:56:42 -08:00
Kevin Sawicki
089bfd2cd2 Document nativeImage.addRepresentation(options) 2017-03-09 09:56:42 -08:00
Kevin Sawicki
6e977cbc3a Assert emptiness and size of built up images 2017-03-09 09:56:42 -08:00
Kevin Sawicki
7e039d92ec Support adding representation from data URL 2017-03-09 09:56:42 -08:00
Kevin Sawicki
d67863aa9f Add addRepresentation buffer support 2017-03-09 09:56:42 -08:00
Kevin Sawicki
17b70670f8 Add initial NativeImage.addRepresentation specs 2017-03-09 09:56:42 -08:00
Kevin Sawicki
783b5e84f4 Merge pull request #8866 from jkleinsc/master
Add WebRTCIPPolicy setting to webContents
2017-03-09 09:55:08 -08:00
Kevin Sawicki
ff5081816f Remove unneeded done call 2017-03-09 09:53:01 -08:00
mst128256
8aba640250 added default menu items for 'Edit' and 'Window' #2814 2017-03-09 16:01:33 +01:00
John Kleinschmidt
3c74404a3e Updated docs. 2017-03-09 09:54:09 -05:00
TanninOne
410e80682a Update browser-window.md
Notes that maximize will also show the window and that ready-to-show won't fire if the window is already being displayed. (See issue #8861)
2017-03-09 15:41:31 +01:00
John Kleinschmidt
d5a658bbe4 Fixed pass by reference and added spec 2017-03-08 22:06:26 -05:00
Kevin Sawicki
c004cf0894 Merge pull request #8870 from electron/touch-bar-links
Add more links to touch bar docs
2017-03-08 13:16:09 -08:00
Kevin Sawicki
dcfab1b6a0 Link more touch bar params 2017-03-08 13:04:55 -08:00
John Kleinschmidt
950e3436c2 Removed webrtcippolicy attribute from webview 2017-03-08 13:52:04 -05:00
John Kleinschmidt
1c2a78a896 Add WebRTCIPPolicy setting to webContents and webview
Resolves #8777
Code to set and get the policy come from the muon framework code:
https://github.com/brave/muon/blob/master/atom/browser/api/atom_api_web_
contents.cc#L1324...L1343
2017-03-08 10:15:48 -05:00
deepak1556
224ffe44aa add spec 2017-03-08 19:16:55 +05:30
deepak1556
b5cfa2e92d track host zoom levels with HostZoomMap 2017-03-08 19:03:43 +05:30
Kevin Sawicki
4f817873f1 Merge pull request #8849 from electron/to-data-url-scale-factor
Support scale factor in more NativeImage APIs
2017-03-07 12:55:56 -08:00
Kevin Sawicki
31cae8e1aa Add more scale factor specs 2017-03-07 12:34:31 -08:00
Kevin Sawicki
8852b128ec Add GetScaleFactorFromOptions helper 2017-03-07 12:27:55 -08:00
Kevin Sawicki
6d5fbe6be2 Document scale factor option 2017-03-07 12:27:55 -08:00
Kevin Sawicki
82a81bb26e Support scale factor to buffer APIs 2017-03-07 12:27:55 -08:00
Kevin Sawicki
e4ead6d018 Remove hasRepresentation and just use 1x png result 2017-03-07 12:27:55 -08:00
Kevin Sawicki
c11cdf321b Support toPNG on image without 1x representation 2017-03-07 12:27:55 -08:00
Kevin Sawicki
8bc65ef495 Add failing spec for toPNG with scale factor 2017-03-07 12:27:55 -08:00
Kevin Sawicki
86babdd412 Remove unused include 2017-03-07 12:27:55 -08:00
Kevin Sawicki
50ade57700 Add more hasRepresentation asserts 2017-03-07 12:27:55 -08:00
Kevin Sawicki
0bbbeb307e Support toDataURL without 1x representation 2017-03-07 12:27:55 -08:00
Kevin Sawicki
8eaf48e552 Add spec for 1x1 PNG data URL 2017-03-07 12:27:55 -08:00
Kevin Sawicki
b46e48cae1 Add failing toDataURL spec 2017-03-07 12:27:55 -08:00
Kevin Sawicki
c0d57d609e Merge pull request #8845 from electron/promise-resolve-assignment
Assign Promise.resolve to constant
2017-03-07 12:27:40 -08:00
Kevin Sawicki
dbe9893d29 Assign Promise.resolve to constant 2017-03-07 12:10:09 -08:00
Kevin Sawicki
e0260d6f53 Bump v1.6.3 2017-03-07 09:49:39 -08:00
Kevin Sawicki
5b8fcb740c Merge pull request #8856 from electron/touch-bar-experimental
Mark TouchBar API as experimental
2017-03-07 09:48:59 -08:00
Kevin Sawicki
bb8d42f1e1 Mark TouchBar as experimental 2017-03-07 09:42:45 -08:00
Kevin Sawicki
8d512de157 Merge pull request #8851 from joaomoreno/joaomoreno-patch-1
Update `ses.resolveProxy` return type
2017-03-07 09:35:29 -08:00
Samuel Attard
f97066511f Capitalize type 2017-03-07 21:25:40 +11:00
João Moreno
5a4d9807ee Update ses.resolveProxy return type
As far as I'm aware, after using the `ses.resolveProxy` API, it seems to return a string in the shape of `PROXY foopy:80;SOCKS5 bar.com:1080`, not an object. Correct me if I'm wrong.
2017-03-07 11:21:51 +01:00
Kevin Sawicki
9547ff135f Merge pull request #8744 from electron/MarshallOfSound-patch-1
Ensure userGesture is boolean when calling executeJavaScript
2017-03-06 11:19:23 -08:00
Kevin Sawicki
6bc464d4b0 Mention userGesture default 2017-03-06 10:51:48 -08:00
Kevin Sawicki
6240e30be1 Default hasUserGesture to false when null 2017-03-06 10:51:17 -08:00
Kevin Sawicki
6fcb784f6e Add failing spec for no callback 2017-03-06 10:49:23 -08:00
Samuel Attard
095e79b043 Ensure the callback is a function when executing JS 2017-03-06 10:46:20 -08:00
Kevin Sawicki
f549bda9fc Merge pull request #8799 from nitsakh/baseURLForDataURL
Support base URL option to loadURL for data URLs
2017-03-06 10:25:53 -08:00
Kevin Sawicki
886b47e713 Merge pull request #8724 from electron/defer_load_url
webContents: defer url load when there is a pending navigation entry
2017-03-06 10:18:36 -08:00
Kevin Sawicki
479af3c9e2 Merge pull request #8678 from liusy182/download-item
only emit `download-item done` event once
2017-03-06 10:11:22 -08:00
Kevin Sawicki
94b7fef30f Merge pull request #8604 from electron/groundwater-patch-1
Emphasize asking for repo URL in bug reports
2017-03-06 09:48:36 -08:00
Kevin Sawicki
e485ff6cea Incorporate feedback 2017-03-06 09:48:11 -08:00
Kevin Sawicki
d26e4a4abf Merge pull request #8800 from electron/https-website
Update website URLs to use HTTPS
2017-03-06 09:32:20 -08:00
Kevin Sawicki
cb66a769d4 Merge pull request #8795 from electron/rename-shortcuts-to-keyboard-shortcuts
Rename shortcuts to keyboard shortcuts
2017-03-06 09:30:55 -08:00
Kevin Sawicki
8b53ff3900 Merge pull request #8840 from Yarkhan/patch-1
Correcting typo
2017-03-06 09:27:38 -08:00
Kevin Sawicki
c7d3d48875 Merge pull request #8837 from rhysd/fix-touchbar-doc
Fix TouchBarSpacer class name in doc
2017-03-06 09:25:57 -08:00
Kevin Sawicki
9234bddc38 Merge pull request #8834 from electron/tb-doc-fixups
Add more explicit types to docs for TouchBar
2017-03-06 09:25:29 -08:00
Cheng Zhao
aaa8e81cd4 Merge pull request #8811 from electron/clean-node-on-exit
Clean up node Environment on exit
2017-03-06 20:36:59 +09:00
Yarkhan
ef5c2bbded Correcting typo 2017-03-05 20:40:18 -03:00
deepak1556
90885d1d8c simply spec 2017-03-06 00:22:20 +05:30
deepak1556
e936143da2 listen for browser initiated pending nav entries too 2017-03-06 00:21:52 +05:30
deepak1556
eb827eb020 update spec 2017-03-06 00:10:46 +05:30
deepak1556
dead1ae1ba webContents: defer url load when there is a pending navigation entry 2017-03-06 00:10:46 +05:30
rhysd
c209b886bf fix TouchBarSpacer class name in doc 2017-03-05 15:09:57 +09:00
Samuel Attard
f97ee56c9f Add more explicit types to docs for TouchBar 2017-03-04 16:14:41 +11:00
Kevin Sawicki
e315116336 Merge pull request #8830 from electron/touchbar-label-color
Support setting TouchBarLabel text color
2017-03-03 15:51:16 -08:00
Kevin Sawicki
4d6c779839 identList -> identifiers 2017-03-03 15:28:32 -08:00
Kevin Sawicki
b879872317 Always set properties in update calls 2017-03-03 15:24:32 -08:00
Kevin Sawicki
2680ee9f8f Add support for setting TouchBarLabel text color 2017-03-03 15:14:51 -08:00
Kevin Sawicki
0098822fcf Merge pull request #8095 from electron/touchbar
Add TouchBar Support
2017-03-03 14:37:56 -08:00
Kevin Sawicki
9f323104e7 Remove unused include 2017-03-03 14:11:09 -08:00
Kevin Sawicki
edebb32014 Drop nullable for consistency 2017-03-03 14:07:59 -08:00
Kevin Sawicki
fde310f50d Mention it only effects 10.12.1 with touch bar 2017-03-03 14:04:55 -08:00
Kevin Sawicki
d9a8c15c69 Add clover to possible values 2017-03-03 14:00:39 -08:00
Kevin Sawicki
ca2898a60e Check that window responds to touchBar selector for pre-10.12.1 compat 2017-03-03 14:00:39 -08:00
Kevin Sawicki
c349aeff80 Add initial touch bar specs 2017-03-03 14:00:39 -08:00
Kevin Sawicki
002369576f Add initial touch bar docs 2017-03-03 14:00:39 -08:00
Kevin Sawicki
81ecd4499c Make exported properties match class names 2017-03-03 14:00:39 -08:00
Kevin Sawicki
eb03ab561d Make config optional 2017-03-03 14:00:39 -08:00
Kevin Sawicki
ce12dcd3b4 Add live popover icon property 2017-03-03 14:00:39 -08:00
Kevin Sawicki
a34f9d3583 Support icon property to match MenuItem 2017-03-03 14:00:39 -08:00
Kevin Sawicki
506b42b563 🎨 2017-03-03 14:00:39 -08:00
Kevin Sawicki
ecc0478e3c Match Popover casing in macOS APIs 2017-03-03 14:00:39 -08:00
Kevin Sawicki
79b17c2cd9 Expose TouchBar on remote module 2017-03-03 14:00:39 -08:00
Kevin Sawicki
d1edd80ef8 Use NSTouchBar itemForIdentifier to lookup existing item 2017-03-03 14:00:39 -08:00
Kevin Sawicki
8d716e8b17 Register item after validating 2017-03-03 14:00:39 -08:00
Kevin Sawicki
93bbe8e70b Use device NS colors consistently 2017-03-03 14:00:39 -08:00
Kevin Sawicki
70d61869a5 Use array to create empty NSMutableArray 2017-03-03 14:00:39 -08:00
Kevin Sawicki
76f112ffc5 Only export TouchBar to start 2017-03-03 14:00:39 -08:00
Kevin Sawicki
5fe3ac60fa Check that atom_touch_bar_ is set 2017-03-03 14:00:39 -08:00
Kevin Sawicki
708ed9d1cd Store ordered settings in AtomTouchBar 2017-03-03 14:00:39 -08:00
Kevin Sawicki
5f9e9d4b36 Add move live updating properties 2017-03-03 14:00:39 -08:00
Kevin Sawicki
61aa9bbff4 Add support for spacer items 2017-03-03 14:00:39 -08:00
Kevin Sawicki
f153d08297 Support setting the initial/available colors 2017-03-03 14:00:39 -08:00
Kevin Sawicki
f9dd91d54d Add static helper to bind touch bar to window 2017-03-03 14:00:39 -08:00
Kevin Sawicki
51f1c5a557 Use SetTouchBar withe empty vector instead of DestroyTouchBar 2017-03-03 14:00:39 -08:00
Kevin Sawicki
d5dbe3676e Add window helpers to TouchBar class 2017-03-03 14:00:39 -08:00
Kevin Sawicki
347d472841 Remove unused clear method 2017-03-03 14:00:39 -08:00
Kevin Sawicki
b959f782f6 Rename instance variable maps 2017-03-03 14:00:39 -08:00
Kevin Sawicki
ec500b2852 Use scoped_nsobject to match Chrome implementation 2017-03-03 14:00:38 -08:00
Kevin Sawicki
812beb240b Remove unneeded includes 2017-03-03 14:00:38 -08:00
Kevin Sawicki
823b3baed0 Use vector of dictionaries instead of mate::Arguments 2017-03-03 14:00:38 -08:00
Kevin Sawicki
98f5858b11 Initial support for dynamic properties 2017-03-03 14:00:38 -08:00
Kevin Sawicki
cbb6f8c33e Store event listeners in each TouchBar class 2017-03-03 14:00:38 -08:00
Kevin Sawicki
1972e2eff9 Update renamed variable 2017-03-03 14:00:38 -08:00
Kevin Sawicki
28f2a4951b touch_bar_helper_ -> atom_touch_bar_ 2017-03-03 14:00:38 -08:00
Kevin Sawicki
b39b49a15a Rename to touch_bar_helper_ to differentiate from touchBar property 2017-03-03 14:00:38 -08:00
Kevin Sawicki
14ef5c5957 Reset helper when makeTouchBar is called 2017-03-03 14:00:38 -08:00
Kevin Sawicki
ca29ec0101 Use reference 2017-03-03 14:00:38 -08:00
Kevin Sawicki
f297ba987e touchBarFromMutatableArray -> touchBarFromItemIdentifiers 2017-03-03 14:00:38 -08:00
Kevin Sawicki
b30f7c3c94 Use std::string ctor 2017-03-03 14:00:38 -08:00
Kevin Sawicki
8500538793 Use base::SysUTF8ToNSString helper 2017-03-03 14:00:38 -08:00
Kevin Sawicki
cf7cd1f32b hasTBDict -> hasItemWithID 2017-03-03 14:00:38 -08:00
Kevin Sawicki
48515d9ecc Ignore objective-c header lint 2017-03-03 14:00:38 -08:00
Kevin Sawicki
b632cdd37d Extract helper class to encapsulate touch bar items 2017-03-03 14:00:38 -08:00
Kevin Sawicki
1b5149ae7a Few memory and scope tweaks 2017-03-03 14:00:38 -08:00
Kevin Sawicki
b16d649819 Use skia color helpers 2017-03-03 14:00:38 -08:00
Kevin Sawicki
eff49ad19c Return early when touchBar is null 2017-03-03 14:00:38 -08:00
Kevin Sawicki
69638a399c Make touchBar readwrite/nullable 2017-03-03 14:00:38 -08:00
Kevin Sawicki
d4d3c78701 Ignore lint warnings in Objective-C header 2017-03-03 14:00:38 -08:00
Kevin Sawicki
9bdca3bbfb Remove linter warnings 2017-03-03 14:00:38 -08:00
Kevin Sawicki
9272582bd6 Revert default_app changes 2017-03-03 14:00:38 -08:00
Kevin Sawicki
52905ae9b3 Get compiling against 10.10 SDK 2017-03-03 14:00:38 -08:00
Kevin Sawicki
2a00bb30c5 Use new NativeWindowObserver helper 2017-03-03 14:00:38 -08:00
Samuel Attard
ba3fbc9d1b Fix Group items 2017-03-03 14:00:38 -08:00
Samuel Attard
28d5c8bbde Add updateConfig ability to other items 2017-03-03 14:00:38 -08:00
Samuel Attard
dd09c91cf2 initial work on updating touch bar item config without rerender 2017-03-03 14:00:38 -08:00
Samuel Attard
61949657f0 Some docs for touch bar 2017-03-03 14:00:38 -08:00
Samuel Attard
15dcc314d3 Export the TouchBar items as their own props on the electron main export 2017-03-03 14:00:38 -08:00
Samuel Attard
d1b3ba39bd Fix cpp linting 2017-03-03 14:00:38 -08:00
Samuel Attard
4f0caffc3b Fix JS linting 2017-03-03 14:00:38 -08:00
Samuel Attard
257b32b84b Remove unused ident 2017-03-03 14:00:38 -08:00
Samuel Attard
43cc5079d8 Implement group item 2017-03-03 14:00:38 -08:00
Samuel Attard
269d899a99 Implement popOver item type (woo hoo it worked) 2017-03-03 14:00:38 -08:00
Samuel Attard
2bc45c8665 Change demo touchbar values 2017-03-03 14:00:38 -08:00
Samuel Attard
c92c4138a8 Add Slider item type and add options to the button type 2017-03-03 14:00:38 -08:00
Samuel Attard
18c7c3ece8 Make label and colorpicker types work 2017-03-03 14:00:38 -08:00
Samuel Attard
7857c83ea1 Make dynamic buttons work along with click events 2017-03-03 14:00:38 -08:00
Samuel Attard
703b5738c8 Initial TouchBar Magic
* Make the AtomNSWindow also a NSTouchbarDelegate
* Implement basic makeTouchBar and makeItemForIdentifier methods
* Initial sending of touch / update events through IPC to BrowserWindowObjects

TODO:
* JS API
* JS Object Converters
* Generalize methods so that popovers can work
2017-03-03 14:00:38 -08:00
Zeke Sikelianos
e027f4aacf Merge pull request #8816 from electron/webview-docs-fixes
Fix API docs for webview tag
2017-03-03 11:23:52 -08:00
Zeke Sikelianos
67dc1b1070 use updated docs linter with webview support 2017-03-03 10:53:30 -08:00
Nitish Sakhawalkar
d75db0ea1a Fixed js lint issues. 2017-03-02 14:37:09 -08:00
Zeke Sikelianos
ffc7a4c8a0 move platform labels to end of description for consistency 2017-03-02 13:57:04 -08:00
Zeke Sikelianos
23eecac288 document arguments for webview methods 2017-03-02 13:29:46 -08:00
Zeke Sikelianos
5ee7434a54 fix indentation of app.setLoginItemSettings arguments 2017-03-02 13:28:58 -08:00
Zeke Sikelianos
01423f79b3 denote webview process so linter will recognize it as an API 2017-03-02 13:27:04 -08:00
Nitish Sakhawalkar
370562b129 Moving data url test outside post navigation block. Trailing separator comment in the docs. 2017-03-02 12:14:18 -08:00
Nitish Sakhawalkar
e8c0813f46 Changes based on review. 2017-03-02 10:58:39 -08:00
Nitish Sakhawalkar
bcda67b8eb No more extra whitespace. 2017-03-02 10:50:48 -08:00
Kevin Sawicki
8f7785bb05 Merge pull request #8806 from electron/felix-winstore-moved
Fix init check for process.windowsStore
2017-03-02 10:35:08 -08:00
Kevin Sawicki
e51a4f0af1 Merge pull request #8804 from electron/isolated-world-origin
Set context isolation origin policy
2017-03-02 09:16:51 -08:00
Kevin Sawicki
7fb77ee1cb Set isolated world security origin 2017-03-02 08:49:18 -08:00
Kevin Sawicki
7f6283352f Add failing spec for fetch from isolated world 2017-03-02 08:49:18 -08:00
Cheng Zhao
cf198904a4 Fix cpplint warnings 2017-03-02 17:26:15 +09:00
Cheng Zhao
1709e74958 Fix crash when the main frame is replaced 2017-03-02 17:19:00 +09:00
Cheng Zhao
24574f7299 Avoid touch an Environemnt after it gets destroyed 2017-03-02 17:19:00 +09:00
Cheng Zhao
29278e500b Destroy node environment when a JS context in renderer is destroyed 2017-03-02 17:19:00 +09:00
Cheng Zhao
d379b05890 async handles should be closed on exit 2017-03-02 17:19:00 +09:00
Cheng Zhao
a0605275b9 Clean up node environment on exit in main process 2017-03-02 17:19:00 +09:00
Nitish Sakhawalkar
c06c4c0ccb Reverting formatting changes made by clang format. 2017-03-01 14:04:41 -08:00
Felix Rieseberg
4aaa936803 Fix init check for process.windowsStore
Windows now allows users to move their `WindowsApps` folder, meaning that it can end up on a different drive (and outside of `Program Files`).
2017-03-01 11:48:51 -08:00
Kevin Sawicki
d009b3267a Bump v1.6.2 2017-03-01 09:11:05 -08:00
Kevin Sawicki
59e656586d Merge pull request #8801 from tomfloyer/patch-1
Fixed typo
2017-03-01 09:05:04 -08:00
Tom Floyer
34e21cb91f Fixed typo 2017-03-01 12:03:00 +03:00
Zeke Sikelianos
15bf7ed536 use https URLs for images 2017-02-28 21:24:31 -08:00
Zeke Sikelianos
166bf7ab8c link to default docs URL from default app nav 2017-02-28 21:21:34 -08:00
Zeke Sikelianos
69f0cb26e7 use https for all Electron website URLs 2017-02-28 21:19:55 -08:00
Nitish Sakhawalkar
879082b1a6 Issue #8735:Support base URL option to loadURL for data URLs 2017-02-28 16:49:03 -08:00
Kevin Sawicki
dba154b062 Merge pull request #8766 from electron/browser-require-in-renderer-process
Don't require browser process API in renderer process
2017-02-28 09:19:30 -08:00
Kevin Sawicki
7a99f0435b Fix typo in comment 2017-02-28 08:45:39 -08:00
Kevin Sawicki
bb1a981a01 Mention variable name to update 2017-02-28 08:45:39 -08:00
Kevin Sawicki
ca8983bf6c Add initial spec for remote modules 2017-02-28 08:45:39 -08:00
Kevin Sawicki
e8a79cb88d Don't require browser process module from renderer
This can cause issues when it is accessed from the
require cache or module tree since the getters throw
errors when called.
2017-02-28 08:45:39 -08:00
Kevin Sawicki
51d6a55061 Merge pull request #8742 from electron/webview-visibility
Route webview window visibility change events in browser process
2017-02-28 08:45:15 -08:00
Zeke Sikelianos
8e7a26ec25 link to keyboard shortcuts from docs README 2017-02-28 08:44:28 -08:00
Zeke Sikelianos
61bce3ef39 rename shortcuts to keyboard-shortcuts for clarity 2017-02-28 08:44:12 -08:00
Kevin Sawicki
54232ee21a Emit event after listener is registered 2017-02-28 08:23:00 -08:00
Kevin Sawicki
1d84d83fd4 Forward webview visibility change events from browser process 2017-02-28 08:23:00 -08:00
Kevin Sawicki
7564a9973b Use const instead of var 2017-02-28 08:23:00 -08:00
Kevin Sawicki
f4717b34e9 Register visibility change listener when attached 2017-02-28 08:23:00 -08:00
Kevin Sawicki
2f5f7721fc Merge pull request #8792 from LasseJacobs/master
Pull request, for dutch translation of glossary.md
2017-02-28 08:18:17 -08:00
Rik Theunis
5fe62d23d9 📝 Fix typos and grammatical errors.
[ci skip]
2017-02-27 23:23:39 +01:00
Lasse Jacobs
76e1f882c0 📝 Fix some grammar mistakes
[ci-skip]
2017-02-27 23:23:05 +01:00
Lasse Jacobs
19a948298b 📝 Fix some spelling mistakes
[ci-skip]
2017-02-27 23:15:51 +01:00
Zeke Sikelianos
5a173965ed Merge pull request #8775 from electron/shortcuts
add a guide to keyboard shortcuts
2017-02-27 09:48:49 -08:00
Zeke Sikelianos
250c656aa7 lint 2017-02-27 09:34:35 -08:00
Kevin Sawicki
776fd56e41 Merge pull request #8787 from serant/translation-doc-typo
Fix typo in translation doc for BrowserWindow
2017-02-27 08:54:02 -08:00
Kevin Sawicki
368da3300e Merge pull request #8783 from thesbros/docs/blink-features-link
📝 Update link to Blink features.
2017-02-27 08:53:34 -08:00
Kevin Sawicki
20a9cf834b Merge pull request #8769 from jwheare/docs-cancel-id
Clarify docs for dialog.showMessageBox cancelId
2017-02-27 08:52:59 -08:00
Zeke Sikelianos
f774ea857e remove electron-localshortcut recommendation 2017-02-27 08:20:23 -08:00
serant
6b138e0215 Fixed typo in translation doc for BrowserWindow 2017-02-27 11:01:44 -05:00
Oden
c10f1210bc 📝 Update link to Blink features. 2017-02-26 20:34:00 -08:00
Zeke Sikelianos
ba4a2d7c30 describe local shortcuts before global 2017-02-25 19:21:33 -08:00
Zeke Sikelianos
5c64075032 add section for browser window events 2017-02-25 19:07:09 -08:00
Zeke Sikelianos
32f44d7917 add a guide to keyboard shortcuts 2017-02-25 18:59:13 -08:00
Zeke Sikelianos
dd5fa2df85 Merge pull request #8746 from electron/clarify-app-activation
clarify actions that cause app.activate event to be emitted
2017-02-25 18:20:43 -08:00
James Wheare
cdc6b13fc8 Clarify docs for dialog.showMessageBox cancelId 2017-02-24 23:56:47 +00:00
Kevin Sawicki
8e4bdec6b6 Merge pull request #8758 from electron/use-local-buffer
Use local Buffer variable in module.js require wrapper
2017-02-24 10:35:35 -08:00
Kevin Sawicki
6c40b1eead Verify global.Buffer is undefined 2017-02-24 09:57:32 -08:00
Kevin Sawicki
ad03ba73a4 Upgrade node for Buffer wrapper fix 2017-02-24 09:57:32 -08:00
Kevin Sawicki
e6fec57bd8 Add failing spec for Buffer from preload required module 2017-02-24 09:57:32 -08:00
Kevin Sawicki
b936221b63 Merge pull request #8733 from electron/macos-cancel-id
Support explicit cancelId on macOS
2017-02-24 09:32:07 -08:00
Kevin Sawicki
be16e75be2 Support explicit cancelId on macOS 2017-02-24 09:05:55 -08:00
Kevin Sawicki
d01250eceb Merge pull request #8739 from electron/pepper-context-menu
Use owner browser window in pepper context menu
2017-02-24 09:05:33 -08:00
Kevin Sawicki
739f3ed102 Popup pepper menu in owner browser window 2017-02-24 08:39:22 -08:00
Kevin Sawicki
c951e253c6 Default to focused window whenever param is null/undefined 2017-02-24 08:39:22 -08:00
Kevin Sawicki
3e05350d6b Check that window is non-null before accessing constructor prop 2017-02-24 08:39:22 -08:00
Kevin Sawicki
5819acbc20 Merge pull request #8745 from electron/async-web-dialog-helper
Use callback dialog methods in RunFileChooser
2017-02-24 08:38:19 -08:00
Kevin Sawicki
ef085a1f15 Remove unneeded AddRef/Release calls handled by base::Bind 2017-02-24 08:15:02 -08:00
Kevin Sawicki
6837ec8576 Check render frame host before getting context 2017-02-24 07:49:26 -08:00
Kevin Sawicki
a62c2f9e2e Remove unused include 2017-02-24 07:37:28 -08:00
Kevin Sawicki
29f92bfb53 Extend RefCounted and add private destructor 2017-02-24 07:37:28 -08:00
Kevin Sawicki
a33ffd621f Use callback dialog methods in RunFileChooser 2017-02-24 07:37:28 -08:00
liusi
ff513f2a84 remove the call to download_item_->Remove() on cancel 2017-02-24 14:08:21 +08:00
Kevin Sawicki
cc688d7fa6 Merge pull request #8760 from popod/popod-startDrag-doc
update startDrag(item) doc
2017-02-23 13:45:22 -08:00
Kevin Sawicki
eb260c3593 Update parameter prefix 2017-02-23 13:03:22 -08:00
popod
ea3b14f0bb update startDrag(item) doc
add doc for `files` option
2017-02-23 21:28:36 +01:00
Zeke Sikelianos
7c4529a01a clarify actions that cause app.activate event to be emitted 2017-02-22 16:42:34 -08:00
Kevin Sawicki
62f4a77755 Merge pull request #8702 from electron/async-menu-popup
Add async menu.popup option
2017-02-22 12:50:57 -08:00
Kevin Sawicki
211bedf910 Invoke close callback after itemSelected runs 2017-02-22 11:47:58 -08:00
Kevin Sawicki
d0b07d5c36 Check that x is non-null 2017-02-22 10:49:25 -08:00
Kevin Sawicki
a8d1a7aed4 Make variables private instead of protected 2017-02-22 10:30:28 -08:00
Kevin Sawicki
2006e22aa4 🎨 2017-02-22 10:30:28 -08:00
Kevin Sawicki
6c6506e5aa Document menu.closePopup 2017-02-22 10:30:28 -08:00
Kevin Sawicki
ce5ac1b056 Implement ClosePopupAt on Windows/Linux 2017-02-22 10:30:28 -08:00
Kevin Sawicki
91d1af053f Implement Menu.closePopup on Windows/Linux 2017-02-22 10:30:28 -08:00
Kevin Sawicki
0a5ccdccb4 Add spec for async Menu.popup 2017-02-22 10:30:28 -08:00
Kevin Sawicki
6a023dc4fe Add Menu.closePopup API on macOS 2017-02-22 10:30:28 -08:00
Kevin Sawicki
947556a23f Move MenuItem spec into root describe 2017-02-22 10:30:28 -08:00
Kevin Sawicki
55f90b4a4b Add new menu.popup signature to planned breaking changes 2017-02-22 10:30:28 -08:00
Kevin Sawicki
d686cf77e9 Update menu.popup docs to take options object 2017-02-22 10:30:28 -08:00
Kevin Sawicki
66b6b4f1cb Map async option to MenuRunner::ASYNC flag 2017-02-22 10:30:28 -08:00
Kevin Sawicki
4430927f98 Add async option to menu.popup 2017-02-22 10:30:28 -08:00
Kevin Sawicki
b091d104f5 Add async menu.popup on Windows/Linux 2017-02-22 10:30:28 -08:00
Kevin Sawicki
636ef0fd29 Add async menu.popup on macOS 2017-02-22 10:30:28 -08:00
Kevin Sawicki
85bdce0722 Merge pull request #8731 from herrmannplatz/patch-1
update setCertificateVerifyProc example
2017-02-22 08:22:21 -08:00
Kevin Sawicki
91bd95a0b2 Add space after if 2017-02-22 08:11:21 -08:00
René Herrmann
c4280612c1 update setCertificateVerifyProc example
setCertificateVerifyProc example should reflect new api
2017-02-22 11:49:14 +01:00
Lasse Jacobs
e5d82edf5d 📝 Add glossary.md to dutch translations part1
[ci skip] Add glossary.md with the first 8 topics.
2017-02-21 14:54:00 -08:00
Kevin Sawicki
92092bed41 Bump v1.6.1 2017-02-21 08:49:50 -08:00
Kevin Sawicki
f80af6e3ed Merge pull request #8718 from demopark/master
add translations files for zh-CN
2017-02-21 08:48:15 -08:00
Kevin Sawicki
1dd37eaab7 Merge pull request #8717 from gerhardberger/vibrancy-version-fix
Fix OS version check of vibrancy
2017-02-21 08:45:10 -08:00
DemoPark
c78d7fc125 add translations files for zh-CN
add zh-CN translations file - debug-instructions-windows.md
add zh-CN translations file - debugging-instructions-macos.md
update zh-CN translations file - README.md
2017-02-19 21:38:37 +08:00
gellert
a1ede4a4b0 fixes os version check of vibrancy 2017-02-18 20:25:03 +01:00
Kevin Sawicki
1f75df0253 Merge pull request #8693 from electron/zoom_specs
webContents: add basic zoom specs
2017-02-17 12:50:26 -08:00
deepak1556
a57af31b99 add zoom specs based on standard protocols 2017-02-18 01:41:39 +05:30
deepak1556
0c022fdc36 set zoom changes for in page navigaitons 2017-02-18 01:34:32 +05:30
deepak1556
403e7681c1 add basic webview zoom specs 2017-02-18 01:34:32 +05:30
deepak1556
c71b44048c address review comments 2017-02-18 01:34:32 +05:30
deepak1556
dfc2e6c4a8 add temporary zoom api spec 2017-02-18 01:34:32 +05:30
deepak1556
71fd3e807c use sync zoom api with guest view manager webpreferences 2017-02-18 01:34:32 +05:30
deepak1556
763b9ab8d8 add zoom spec 2017-02-18 01:34:32 +05:30
deepak1556
203a920c64 fix signature of zoom getter apis 2017-02-18 01:34:32 +05:30
Kevin Sawicki
5e30ccd891 Merge pull request #8709 from electron/upgrade-native-mate
Upgrade native_mate
2017-02-17 10:57:39 -08:00
Kevin Sawicki
e60601898d Upgrade native_mate 2017-02-17 10:25:20 -08:00
Kevin Sawicki
440e48fe19 Merge pull request #8707 from demopark/master
add translations files for zh-CN
2017-02-17 08:22:05 -08:00
Kevin Sawicki
91677ade89 Merge pull request #8704 from YurySolovyov/update-icon-fetch-impl
Update icon loading API implementation
2017-02-17 08:21:10 -08:00
DemoPark
529b84ff9c add translations files for zh-CN
add zh-CN translations file - clang-format.md
add zh-CN translations file - styleguide.md
update zh-CN translations file - README.md
2017-02-17 17:28:55 +08:00
deepak1556
5687f8b3b7 Destroy icon manager after file thread is destroyed 2017-02-17 14:16:18 +05:30
Yury Solovyov
977abc6458 Update icon loading API implementation 2017-02-16 23:16:34 +03:00
Kevin Sawicki
8fe025d6c9 Merge pull request #8695 from ericbrumer/master
[Win] Allow favicon.png to be on the root of any drive letter
2017-02-16 11:56:52 -08:00
Eric Brumer
87e606627c Smaller regex now that it's case insensitive 2017-02-16 09:26:20 -08:00
Eric Brumer
7cb101b566 Case insensitive filepath 2017-02-16 09:17:37 -08:00
Kevin Sawicki
19b686c90b Merge pull request #8696 from demopark/master
add translations files for zh-CN
2017-02-16 08:12:18 -08:00
DemoPark
6dd18678a9 add translations files for zh-CN
add zh-CN translations file - security.md
add zh-CN translations file - repl.md
add zh-CN translations file - windows-store-guide.md
update zh-CN translations file - glossary.md
update zh-CN translations file - README.md
2017-02-16 16:31:55 +08:00
Eric Brumer
d97585d06d Allow favicon.png to be on the root of any drive letter 2017-02-15 19:02:11 -08:00
Kevin Sawicki
a00bb332ca Merge pull request #8686 from demopark/master
Optimize zh-CN language logic and grammar
2017-02-15 12:27:06 -08:00
Kevin Sawicki
9a7ac5326c Merge pull request #8676 from electron/focus-delegate
Prevent invisible windows from being activated
2017-02-15 11:22:00 -08:00
Kevin Sawicki
70849de8c4 Mark constructor as explicit 2017-02-15 08:28:55 -08:00
Kevin Sawicki
52801c4a41 Use internal IsVisible method 2017-02-15 08:28:55 -08:00
Kevin Sawicki
db79f4f450 Implement Activate instead of CanFocus 2017-02-15 08:28:55 -08:00
Kevin Sawicki
bda8af8dd3 Just use visible state in CanFocus delegate 2017-02-15 08:28:55 -08:00
Kevin Sawicki
86007fe61d Update blur parent window spec 2017-02-15 08:28:55 -08:00
Kevin Sawicki
35908ac398 Add webContents.focus() spec 2017-02-15 08:28:55 -08:00
Kevin Sawicki
be79417a03 Include CanFocus on Windows and map to state 2017-02-15 08:28:55 -08:00
Kevin Sawicki
0ac3969c6a Merge pull request #8682 from electron/use-electron-version-in-chromedriver-asset-name
Use electron version in Chromedriver asset name
2017-02-15 08:28:43 -08:00
Kevin Sawicki
a0fc5ae63d Use electron version in Chromedriver asset name 2017-02-15 08:17:40 -08:00
DemoPark
1170ecb269 add zh-CN translations for offscreen-rendering.md
add zh-CN translations for offscreen-rendering.md
2017-02-15 17:45:52 +08:00
DemoPark
f79ce38a57 add zh-CN translations for electron-versioning.md
add zh-CN translations for 'electron-versioning.md'
2017-02-15 17:21:20 +08:00
Jonas Zhang
20aeec7cf5 Merge pull request #1 from demopark/demopark-patch-1
Optimize zh-CN language logic and grammar
2017-02-15 14:21:37 +08:00
Jonas Zhang
b3ab426a5e Optimize zh-CN language logic and grammar
Optimize zh-CN language logic and grammar.
2017-02-15 14:20:48 +08:00
Cheng Zhao
c127ce3e46 Merge pull request #8679 from electron/disable-active-tracker
Disable the ActiveVerifier
2017-02-15 11:04:36 +09:00
Kevin Sawicki
fe59f413f6 Merge pull request #8684 from electron/compiler-error
Rename variable for compiler error
2017-02-14 12:40:21 -08:00
Kevin Sawicki
36e6501c44 Rename variable for compiler error 2017-02-14 12:30:23 -08:00
Kevin Sawicki
9be42db8d5 Merge pull request #8628 from Spacetech/master
Implement invalidate for non-offscreen mode
2017-02-14 11:41:16 -08:00
Kevin Sawicki
52d989f908 Update docs for non-offscreen invalidate 2017-02-14 11:17:39 -08:00
Kevin Sawicki
643cb5d6de Remove unused variable 2017-02-14 11:13:23 -08:00
Kevin Sawicki
5cb6648686 Use underscore variable name for consistency 2017-02-14 11:12:30 -08:00
Kevin Sawicki
82f452568c 🎨 Minor formatting tweaks 2017-02-14 11:09:15 -08:00
Kevin Sawicki
897d58bde1 Merge pull request #8648 from electron/set-extra-crash-reporter-data
Support updating crash reporter extra parameters
2017-02-14 10:09:02 -08:00
Kevin Sawicki
272a0824e8 Fix darwin platform name 2017-02-14 09:37:09 -08:00
Kevin Sawicki
af7702d0f2 🎨 2017-02-14 09:37:09 -08:00
Kevin Sawicki
07173cdd9d Tweak setExtraParameter description 2017-02-14 09:37:09 -08:00
Kevin Sawicki
b51adf8ae5 Add spec for updated extra parameters 2017-02-14 09:37:09 -08:00
Kevin Sawicki
a4bbad03c2 autoSubmit -> uploadToServer 2017-02-14 09:37:09 -08:00
Kevin Sawicki
f3756ccf29 Run crash reporter specs on all platforms 2017-02-14 09:37:09 -08:00
Kevin Sawicki
3b7207da9f Support removing extra parameters 2017-02-14 09:37:09 -08:00
Kevin Sawicki
41fef3999c Document setExtraParameter 2017-02-14 09:37:09 -08:00
Kevin Sawicki
9a434af03e Clear crash keys in InitBreakpad 2017-02-14 09:37:09 -08:00
Kevin Sawicki
ba975d552a Add setExtraParameter support on macOS 2017-02-14 09:37:09 -08:00
Kevin Sawicki
cfe3ae234b Correct , -> . typo 2017-02-14 09:37:09 -08:00
Kevin Sawicki
3e18d8baf5 Remove _ prefix on binding methods 2017-02-14 09:37:09 -08:00
Kevin Sawicki
e4c54fd0d8 Merge pull request #8662 from oukan/feature/translate-zh-CN
Modules for the Main Process to zh-CN
2017-02-14 09:33:27 -08:00
Kevin Sawicki
e9e8595605 Merge pull request #8673 from electron/scroll-touch-end
Call OnWindowScrollTouchEnd instead of Edge
2017-02-14 09:32:56 -08:00
Kevin Sawicki
c54ae66fb9 Call OnWindowScrollTouchEnd instead of Edge 2017-02-14 09:13:07 -08:00
Kevin Sawicki
624e44dd6f Merge pull request #8605 from electron/no-more-global-buffer
Delete Buffer global when node integration is disabled
2017-02-14 09:07:24 -08:00
Kevin Sawicki
fdc1d3d763 Add Buffer typeof assertion 2017-02-14 08:42:34 -08:00
Kevin Sawicki
8e09fcd2a9 Upgrade node for require wrapper Buffer change 2017-02-14 08:42:34 -08:00
Kevin Sawicki
2a18e3f9ea Remove Buffer global on load 2017-02-14 08:42:34 -08:00
Kevin Sawicki
1933a4fc9f Remove global Buffer mention now handled as require wrapper 2017-02-14 08:42:34 -08:00
Kevin Sawicki
7e138083ef Add declared const Buffer spec 2017-02-14 08:42:34 -08:00
Kevin Sawicki
70010fdb8e Add spec for Buffer global 2017-02-14 08:42:34 -08:00
Kevin Sawicki
80dad58a59 Merge pull request #8654 from electron/context-shutdown-crash
Upgrade brigthray for context crash fix
2017-02-14 08:41:55 -08:00
Kevin Sawicki
1f0bc7fe86 Upgrade brigthray for context crash fix 2017-02-14 08:25:27 -08:00
Cheng Zhao
bad6954911 Disable the ActiveVerifier 2017-02-14 17:23:20 +09:00
liusi
d56c1909df only emit download-item done event once. 2017-02-14 14:39:33 +08:00
Gary Wilber
f19924bcb0 Add Invalidate method to NativeWindow and add Mac implementation 2017-02-13 19:41:24 -08:00
Kevin Sawicki
d3c967401d Merge pull request #8672 from electron/reorder-compiler-error-in-zoom-controller
Call content::WebContentsObserver first
2017-02-13 09:24:38 -08:00
Kevin Sawicki
d7ab142e10 Call content::WebContentsObserver first 2017-02-13 09:09:42 -08:00
Kevin Sawicki
8c2cf03f37 Merge pull request #8617 from electron/resolves-aliases-nsopen
Add resolvesAliases option to openDialog
2017-02-13 08:29:18 -08:00
Kevin Sawicki
a746651d1c Use dialog setter for consistency with other properties 2017-02-13 08:23:53 -08:00
Samuel Attard
17fe5efa13 Fix linting 2017-02-13 08:23:53 -08:00
Samuel Attard
7c33f3ee65 Document the noResolveAliases property 2017-02-13 08:23:53 -08:00
Samuel Attard
e45d8079b8 Add support for a noResolveAliases property 2017-02-13 08:23:53 -08:00
Kevin Sawicki
266c78b861 Merge pull request #8669 from poppinlp/patch-1
Fix typo
2017-02-13 08:18:19 -08:00
Kevin Sawicki
c9e5d7d1e2 Merge pull request #8660 from fab1an/patch-3
Update session.md
2017-02-13 08:17:23 -08:00
Kevin Sawicki
070cc40af4 Merge pull request #8659 from fab1an/patch-2
Update web-contents.md
2017-02-13 08:16:55 -08:00
Cheng Zhao
16382162f8 Update brightray for electron/brightray#275. 2017-02-13 19:27:21 +09:00
Cheng Zhao
7f7df5a6dd Merge pull request #8537 from deepak1556/webcontents_zoom_patch
webContents: manage zoom changes on the browser side with HostZoomMap
2017-02-13 17:24:33 +09:00
PoppinL
9b8e4eb6cb Fix typo
Fix typo
2017-02-13 16:14:49 +08:00
Cheng Zhao
593b7cc92a Merge pull request #8668 from electron/fix-mas
Update libchromiumcontent: fix usage of private API in MAS build
2017-02-13 17:03:37 +09:00
Cheng Zhao
51d5706b48 Update libchromiumcontent: fix usage of private API in MAS build 2017-02-13 16:45:43 +09:00
Weiqiang Lin
e262f6c63e webContents to zh-CN 2017-02-12 23:12:33 +08:00
Weiqiang Lin
b7551b5d84 Class: Tray to zh-CN 2017-02-12 22:51:36 +08:00
Weiqiang Lin
dddb6458da systemPreferences to zh-CN 2017-02-12 22:38:24 +08:00
Weiqiang Lin
c9dd59eb86 session to zh-CN 2017-02-12 22:36:08 +08:00
Weiqiang Lin
9fd9b39448 protocol to -zh-CN 2017-02-12 22:35:03 +08:00
Weiqiang Lin
6a0738aa88 powerSaveBlocker to zh-CN 2017-02-12 22:07:24 +08:00
Weiqiang Lin
50fbd5266a powerMonitor to zh-CN 2017-02-12 22:00:09 +08:00
Fabian Zeindl
46c65ae5fc Update session.md 2017-02-12 10:06:24 +01:00
Fabian Zeindl
5efa34ce6d Update web-contents.md 2017-02-12 10:03:33 +01:00
deepak1556
7a0aff2bae code cleanup 2017-02-12 01:48:24 +05:30
deepak1556
cbeaa6be87 simply handling temporary zoom levels of webview 2017-02-12 00:49:17 +05:30
deepak1556
e3fe3cc490 map webframe zoom api to use HostZoomMap 2017-02-12 00:49:17 +05:30
deepak1556
63c0e4cbb1 Add ZoomController to manager zoom changes for webcontents 2017-02-12 00:49:17 +05:30
deepak1556
07794a58aa use zoom factor webpreference option when required.
* When setzoomlevel is not called for the host.
* When there is no zoom preference for the host.
2017-02-12 00:49:17 +05:30
deepak1556
b27c94368d webContents: set zoom levels with HostZoomMap 2017-02-12 00:49:17 +05:30
Kevin Sawicki
5e78330c6d Merge pull request #8540 from electron/SECURITY.md
Add SECURITY.md
2017-02-10 13:27:50 -08:00
Kevin Sawicki
9b6b8752d4 Merge pull request #8655 from electron/thai-translations
Add Thai translations
2017-02-10 12:18:43 -08:00
Kevin Sawicki
4d7d72256d Remove doc linter warnings 2017-02-10 12:18:24 -08:00
Kevin Sawicki
9dd960fc97 Remove untranslated files 2017-02-10 12:06:06 -08:00
ThePooE
c49363f521 📝 Thai: translated accessibility.md 2017-02-10 11:54:51 -08:00
ThePooE
45a1ffef8f 📝 Thai: fix small line breaking, word warpping in glossary.md 2017-02-10 11:54:51 -08:00
ThePooE
43b09b7360 📝 Thai: translated glossary.md 2017-02-10 11:54:51 -08:00
ThePooE
d3bf36e12a 📝 Thai: translated styleguide.md 2017-02-10 11:54:51 -08:00
wit543
0f55468042 📝 Thai: translate the header ++
translate the header and opening statement
2017-02-10 11:54:51 -08:00
wit543
f4ea70d2c2 Update about.md 2017-02-10 11:54:51 -08:00
ThePooE
9ce93e6cac 📝 Thai: add English placeholders for files to be translated 2017-02-10 11:54:51 -08:00
ThePooE
a78cd79a58 📝 Thai: add link from README.md to the translated version 2017-02-10 11:54:51 -08:00
ThePooE
e008d86e76 📝 Thai: added electron-faq.md 2017-02-10 11:54:51 -08:00
ThePooE
7fdfaa13e7 📝 Thai: fully translated README.md 2017-02-10 11:54:51 -08:00
ThePooE
888dc5702f 📝 Thai: add prelude translation to README.md 2017-02-10 11:54:51 -08:00
Kevin Sawicki
b92c4f6ce5 Merge pull request #8651 from electron/new-window-docs
[ci skip] Improve docs for `new-window` event
2017-02-10 10:29:07 -08:00
Kevin Sawicki
e85d2f00dd Fix linting errors around spacing and semicolons 2017-02-10 08:49:13 -08:00
Kevin Sawicki
5d0da398bf Merge pull request #8650 from electron/will-attach-webview-docs
[ci skip] Improve docs for `will-attach-webview` event
2017-02-10 08:45:40 -08:00
Catalin Ionut Fratila
19d7f0733e create-dist: Adding argument to supress api docs generation. 2017-02-10 14:26:53 +01:00
Vadim Macagon
035d9df29b Fix example code 2017-02-10 18:02:03 +07:00
Vadim Macagon
197ad915b7 [ci skip] Improve docs for new-window event
This should help clarify the purpose of `event.newGuest` as per the recent discussion in #7407.
2017-02-10 17:57:55 +07:00
Cheng Zhao
e8f689ecd3 Merge pull request #8640 from electron/fix-debug-symbols
Update libchromiumcontent: Fix debug symbols not generated
2017-02-10 19:11:31 +09:00
Vadim Macagon
e8f0331aeb Improve docs for will-attach-webview event 2017-02-10 10:33:33 +07:00
Kevin Sawicki
acedc3e726 Merge pull request #8584 from electron/new-webview-event
Add will-attach-webview event
2017-02-09 12:40:11 -08:00
Kevin Sawicki
81addbdcbf Remove only call 2017-02-09 11:49:14 -08:00
Kevin Sawicki
941f6c63e3 🎨 Use embedder var for clarity 2017-02-09 11:48:45 -08:00
Kevin Sawicki
a7c050107b Remove guest from will-attach-webview event 2017-02-09 11:47:45 -08:00
Kevin Sawicki
acff2f6baf Adjust src from will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
8b0d3a2567 Emit attach params as well in event 2017-02-09 11:45:07 -08:00
Kevin Sawicki
792f3c3030 Document will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
46f1a49594 new-webview -> will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
7eda8fbdfb Add new-webview event that can be prevented 2017-02-09 11:45:07 -08:00
Kevin Sawicki
706b9f6cbf Add new-webview specs 2017-02-09 11:45:07 -08:00
Kevin Sawicki
5bf60ad8e8 Merge pull request #8556 from yamgent/macos-open-save-panel
Support message, nameFieldLabel and showsTagField for macOS dialog
2017-02-09 11:34:19 -08:00
Kevin Sawicki
5130ad24eb 🎨 2017-02-09 11:30:17 -08:00
Kevin Sawicki
35654d872b Document new settings 2017-02-09 11:29:10 -08:00
Kevin Sawicki
f7f4de36af Merge remote-tracking branch 'origin/master' into macos-open-save-panel 2017-02-09 11:25:05 -08:00
Kevin Sawicki
c3f3a6f133 Merge pull request #8623 from electron/dialog-options-helper
Add DialogSettings helper
2017-02-09 11:07:02 -08:00
Kevin Sawicki
867bb5a94e Add DialogSettings helper struct 2017-02-09 10:13:11 -08:00
Kevin Sawicki
e7410976f0 Merge pull request #8590 from electron/showmessagebox-checkbox
Add support for checkbox with dialog.showMessageBox
2017-02-09 10:07:03 -08:00
Kevin Sawicki
7994acf0ea Use CHROMEGTK_CALLBACK_0 and ignore gpointer data 2017-02-09 09:49:09 -08:00
Birunthan Mohanathas
c8c11e68c6 Add support for checkbox with dialog.showMessageBox
This adds the `checkboxLabel` and `checkboxChecked` options to display a
checkbox in the message box. Fixes #6048.
2017-02-09 09:03:54 -08:00
Tan Wang Leng
347dc835b5 Fix code formatting 2017-02-09 21:51:11 +08:00
Tan Wang Leng
a4a71a1dc9 Change qualifier of ShowSaveDialog() parameter
The normal convention in the codebase is to not use references
or 'const' for primitives like 'bool' and 'int'.
2017-02-09 21:50:55 +08:00
Tan Wang Leng
72723646dd Add tests to check errors in parameters 2017-02-09 21:23:02 +08:00
Tan Wang Leng
9423143211 Change the default value of showsTagField to true
The default value of showsTagField in macOS's NSSavePanel is true.

Therefore, in order to follow the standard behavior and not break
backwards-compatibility, let's change the default value of
showsTagField to true.

Reference:
https://developer.apple.com/reference/appkit/nssavepanel/1525589-showstagfield?language=objc
2017-02-09 21:01:40 +08:00
Tan Wang Leng
b0487b7d84 Fix wrong signature for gtk's ShowSaveDialog() 2017-02-09 20:10:57 +08:00
Tan Wang Leng
1bf8270c0d 🏁 Fix dialog method calls for Windows 2017-02-09 20:10:57 +08:00
Tan Wang Leng
8843fef065 📝 Update docs for new attributes in showOpenDialog() 2017-02-09 20:10:57 +08:00
Tan Wang Leng
36209ddd90 🍎 Add additional options for Mac's open dialog
Support an additional attributes available in macOS's NSOpenPanel:
message.
2017-02-09 20:10:57 +08:00
Tan Wang Leng
cc22149beb 📝 Update docs for new attributes in showSaveDialog() 2017-02-09 20:10:57 +08:00
Tan Wang Leng
1d612a12a1 🍎 Add additional options for Mac's save dialog
Support additional attributes available in macOS's NSSavePanel: message,
nameFieldLabel and showsTagField
2017-02-09 20:10:57 +08:00
Weiqiang Lin
e267a0dd41 Class: MenuItem to zh-CN 2017-02-09 17:57:27 +08:00
Weiqiang Lin
eba65eb4d3 Class: Menu to zh-CN 2017-02-09 17:34:45 +08:00
Weiqiang Lin
c7b639e282 ipcMain to zh-CN 2017-02-09 17:16:27 +08:00
Weiqiang Lin
8f542b1d69 globalShortcut to zh-CN 2017-02-09 17:08:58 +08:00
Weiqiang Lin
4a78490a6a dialog to zh-CN 2017-02-09 17:01:30 +08:00
Weiqiang Lin
db4ad8c692 contentTracing to zh-CN 2017-02-09 16:57:41 +08:00
Weiqiang Lin
f949f83a57 BrowserWindow to zh-CN 2017-02-09 16:17:38 +08:00
Cheng Zhao
a3c5eafb16 Update libchromiumcontent to include debug symbols 2017-02-09 16:52:19 +09:00
Cheng Zhao
90492df1cb Fix exception when executing create-dist directly 2017-02-09 16:52:19 +09:00
Weiqiang Lin
6adf1640e5 autoUpdater to zh-CN 2017-02-09 15:51:48 +08:00
Weiqiang Lin
5d35d2476d window.open Function to zh-cn 2017-02-09 15:24:29 +08:00
Kevin Sawicki
9163b601a4 Merge pull request #8636 from electron/update-certificate-verifier-specs-for-linux-ci
Allow multiple verification results in specs
2017-02-08 13:56:59 -08:00
Kevin Sawicki
22b9c6e539 Allow multiple verification results 2017-02-08 13:33:07 -08:00
Kevin Sawicki
bad130f623 Merge pull request #7955 from deepak1556/veto-ssl-verify
session: provide chromium cert verification result to setCertificateVerifiy callback
2017-02-08 13:12:24 -08:00
Kevin Sawicki
18e15a1e53 Add spec for rejecting using old signature 2017-02-08 12:51:24 -08:00
Kevin Sawicki
1e581d6814 Use unique_ptr for passing VerifyRequestParams 2017-02-08 11:59:43 -08:00
Kevin Sawicki
70178adb6e Use object for verification request 2017-02-08 11:59:43 -08:00
Kevin Sawicki
5245d42d15 Only document deprecation for now 2017-02-08 11:59:43 -08:00
Kevin Sawicki
9c134e7bf3 Assert certificate error 2017-02-08 11:59:43 -08:00
Kevin Sawicki
6b56dfd94b Add spec for remote callback length 2017-02-08 11:59:43 -08:00
Kevin Sawicki
37db804099 Use NetLogWithSource since BoundNetLog no longer exists 2017-02-08 11:59:43 -08:00
Greg Nolle
e29b64a18a modify CertVerifier Class
* respond to multiple similar verification requests.
* accept net error result as callback response.
2017-02-08 11:59:43 -08:00
Kevin Sawicki
d00a96ce35 Merge pull request #8618 from electron/forward-this-in-require-wrapper
Forward `this` in require wrapper
2017-02-08 10:33:48 -08:00
Kevin Sawicki
e9226aa354 Assert test.coffee outside of doesNotThrow 2017-02-08 09:02:46 -08:00
Kevin Sawicki
c1773a2c94 Add coffee-script dependency to specs 2017-02-08 09:00:14 -08:00
Kevin Sawicki
090255c3f4 Upgrade node for require wrapper this fix 2017-02-08 09:00:14 -08:00
Kevin Sawicki
84f8bfbdef Add spec for registering/requiring Coffeescript 2017-02-08 09:00:14 -08:00
Kevin Sawicki
83d31cefeb Merge pull request #8626 from dengyaolong/master
complete download-item translation docs
2017-02-08 08:50:26 -08:00
Gary Wilber
11e1f6b56c Fix lint errors 2017-02-08 00:05:16 -08:00
Gary Wilber
ed44b32ff5 Convert indentation to spaces 2017-02-07 23:08:03 -08:00
Gary Wilber
148898fb75 Implement invalidate for non-offscreen mode 2017-02-07 23:03:42 -08:00
Cheng Zhao
5cd18fe32a Merge pull request #8619 from electron/mac-os-version-checks
Use IsAtLeastOS10_* version checks
2017-02-08 13:58:26 +09:00
dengyaolong
0748f4fef2 complete download-item translation docs 2017-02-08 12:38:08 +08:00
Kevin Sawicki
f9b319e4f8 Merge pull request #8624 from electron/disable-file-icon-specs-on-linux
Disable getFileIcon specs on Linux CI
2017-02-07 18:30:00 -08:00
Kevin Sawicki
ba03f04017 Disable getFileIcon specs on Linux CI 2017-02-07 18:24:35 -08:00
Cheng Zhao
0643d98d99 Merge pull request #8616 from electron/renew-symbol-trick
Simplify the trick used for referencing symbols
2017-02-08 07:56:28 +09:00
Kevin Sawicki
4630f4488e Merge pull request #7851 from YurySolovyov/image-from-icon
Add an API to fetch file icon
2017-02-07 11:37:06 -08:00
Kevin Sawicki
82ac4ddf19 Large is only 48x48 on Linux 2017-02-07 11:20:27 -08:00
Kevin Sawicki
fc1b7431c7 Tweak optional syntax 2017-02-07 10:35:31 -08:00
Kevin Sawicki
a4277bb616 Document sizes 2017-02-07 10:33:44 -08:00
Kevin Sawicki
dddc6aec49 Tweak spec descriptions 2017-02-07 10:21:20 -08:00
Kevin Sawicki
683a758dab Call done instead of skip 2017-02-07 10:16:09 -08:00
Kevin Sawicki
ee66776450 Update IconManager for Chrome 56 upgrade 2017-02-07 10:15:46 -08:00
Yury Solovyov
a9dae243b4 Fix large icon spec 2017-02-07 09:55:18 -08:00
Yury Solovyov
c810e64fda Fix doc lint 2017-02-07 09:55:18 -08:00
Yury Solovyov
bcf0964c61 Fix more review 2017-02-07 09:55:18 -08:00
Yury Solovyov
2b60df3d8b Fix some feedback 2017-02-07 09:55:18 -08:00
Yury Solovyov
29452364f3 Use isolate() method to get isolate 2017-02-07 09:54:22 -08:00
Yury Solovyov
c36cdb8580 Properly skip large size test on macOS 2017-02-07 09:54:22 -08:00
Yury Solovyov
1aa4fcae08 Lint tests 2017-02-07 09:54:22 -08:00
Yury Solovyov
00748889f9 Add tests 2017-02-07 09:54:22 -08:00
Yury Solovyov
c2bf5bb986 Put locker and handle scope to the top of the function. Remove unneeded header 2017-02-07 09:53:34 -08:00
Yury Solovyov
11ef2c539b Update docs 2017-02-07 09:53:34 -08:00
Yury Solovyov
5794138ed4 Normalize path 2017-02-07 09:53:34 -08:00
Yury
1b4ee6e0d8 Image from icon node-style callback (#2)
* Try implementing node-style callbacks

* Add locker and handle scope
2017-02-07 09:53:34 -08:00
deepak1556
2e85ff1f57 Fix code style 2017-02-07 09:53:34 -08:00
Yury Solovyov
3d47c9b71d Fix lint 2017-02-07 09:53:34 -08:00
Yury Solovyov
fe99b255c4 Add docs 2017-02-07 09:53:34 -08:00
Yury Solovyov
05cb26a174 Use object for options 2017-02-07 09:53:34 -08:00
Yury Solovyov
bec671bac8 Make size optional 2017-02-07 09:52:11 -08:00
deepak1556
ff3aaa55f7 define icon loader for liunx as separate target 2017-02-07 09:52:11 -08:00
Robo
b25b141642 create iconmanager as singleton class and cleanup code (#1)
* create iconmanager as singleton class and cleanup code
2017-02-07 09:52:11 -08:00
Yury Solovyov
1b3cd87fc9 Add icon manager to browser process 2017-02-07 09:50:17 -08:00
Yury Solovyov
602aba8723 Include proper header 2017-02-07 09:48:12 -08:00
Yury Solovyov
eb889b9b86 Get it compiling, linking till fails though 2017-02-07 09:48:12 -08:00
Yury Solovyov
d118fed5c2 Try my own class 2017-02-07 09:48:12 -08:00
Yury Solovyov
8e4ed664d9 Add icon fetching sources 2017-02-07 09:48:12 -08:00
Yury Solovyov
1d24a3a175 Add callback converters 2017-02-07 09:48:12 -08:00
Yury Solovyov
be5b907179 WIP 2017-02-07 09:48:12 -08:00
Kevin Sawicki
0f98c9d3fb Use at least OS version checks 2017-02-07 09:32:40 -08:00
Kevin Sawicki
c3c5470a7c Merge pull request #8542 from yamgent/webpref-numeric
Fix webpreferences not accepting numeric options
2017-02-07 09:15:55 -08:00
Kevin Sawicki
4de637779b Make int converter helper an instance method 2017-02-07 09:13:42 -08:00
Tan Wang Leng
7ec88d16a6 Use base::StringToInt() instead of std::stringstream 2017-02-07 09:05:55 -08:00
Tan Wang Leng
42f65c52fb 🐛 Fix webpreferences not accepting numeric options
The webpreferences attribute values are parsed as strings instead
of numbers. Therefore, a conversion is required.
2017-02-07 09:05:55 -08:00
Cheng Zhao
84c180ac69 Simplify the trick used for referencing symbols 2017-02-07 17:09:43 +09:00
Kevin Sawicki
852519a826 Bump v1.6.0 2017-02-06 16:42:00 -08:00
Kevin Sawicki
e6fe2a93f2 Merge pull request #8607 from electron/fix-win32-link
Fix missing of symbols when linking win32 build
2017-02-06 16:41:22 -08:00
Cheng Zhao
85e84cc0da Fix missing of symbols when linking win32 build 2017-02-07 09:14:50 +09:00
Kevin Sawicki
a2ecef26a2 Merge pull request #8606 from electron/fix-broken-link
Fix broken Squirrel.Windows link
2017-02-06 16:01:40 -08:00
Charlie Hess
a35424ef25 Fix broken Squirrel.Windows link. 2017-02-06 15:54:05 -08:00
Jacob Groundwater
b8e12a0d21 Update ISSUE_TEMPLATE.md 2017-02-06 14:57:04 -08:00
Kevin Sawicki
8359c72347 Merge pull request #8501 from electron/chrome56
Upgrade to Chrome 56
2017-02-06 11:17:20 -08:00
Kevin Sawicki
dbb81e34e8 Upgrade node for modules version bump 2017-02-06 10:34:30 -08:00
Kevin Sawicki
997799ad68 Update libcc to e0da1e9 2017-02-06 10:34:30 -08:00
Cheng Zhao
ec650b3773 Update to Chrome 56.0.2924.87 2017-02-06 10:34:30 -08:00
Cheng Zhao
864a23f72b Fix print() not working 2017-02-06 10:34:30 -08:00
Cheng Zhao
86215d4300 Allow filter to use any scheme 2017-02-06 10:34:30 -08:00
Cheng Zhao
e0c021bfef Fix compilation waring on Mac 2017-02-06 10:34:29 -08:00
Cheng Zhao
1ed8743da8 Update Windows printing code to latest 2017-02-06 10:34:29 -08:00
Cheng Zhao
d483352f78 Fix PrintToPDF not receiving results 2017-02-06 10:34:29 -08:00
Cheng Zhao
3024d0563f There were new defaultPrintingSetting fields added 2017-02-06 10:34:29 -08:00
Cheng Zhao
ab783413a2 Update printing code to latest 2017-02-06 10:34:29 -08:00
Cheng Zhao
75627ba6ad Fix sync printing not working 2017-02-06 10:34:29 -08:00
Cheng Zhao
85961a0dd9 Update libchromiumcontent to fix duplicate main functions 2017-02-06 10:34:29 -08:00
Cheng Zhao
c69626336d Link with xcb on Linux 2017-02-06 10:34:29 -08:00
Cheng Zhao
82d796ded4 Fix missing of symbols issue on Release build 2017-02-06 10:34:29 -08:00
Cheng Zhao
41f356a94d icu's namespace has become icu_58 2017-02-06 10:34:29 -08:00
Cheng Zhao
a98e69a80d Work around the compilation error of v8_value_converter.cc
We should apply this patch in future:
0232f57400%5E%21/
2017-02-06 10:34:29 -08:00
Cheng Zhao
be29ea4dad libgtk2ui => libgtkui 2017-02-06 10:34:29 -08:00
Cheng Zhao
820c0827c0 Fix cpplint warnings 2017-02-06 10:34:29 -08:00
Cheng Zhao
55d4d44f02 Fix Debug building on Windows 2017-02-06 10:34:29 -08:00
Cheng Zhao
6165d36351 There is a new INSERTED type of ChangeCause
For the purpose of compatibility, we treat it as "explicit".
2017-02-06 10:34:29 -08:00
Cheng Zhao
09fcb7fb27 Fix crash when using webview 2017-02-06 10:34:29 -08:00
Cheng Zhao
c72438f09f WebInspector has been split up 2017-02-06 10:34:29 -08:00
Cheng Zhao
0a7c51b9aa Fix linking on Mac 2017-02-06 10:34:29 -08:00
Cheng Zhao
fa4b8cff45 Fix error due to search for openssl headers 2017-02-06 10:34:29 -08:00
Cheng Zhao
eb3b77f43b ScopedTempDir::path is replaced with GetPath 2017-02-06 10:34:29 -08:00
Cheng Zhao
6763977316 Update URLPattern to its latest version 2017-02-06 10:34:29 -08:00
Cheng Zhao
81784827ff PrintWebViewHelper is attached to RenderFrame 2017-02-06 10:34:29 -08:00
Cheng Zhao
234e1bb811 base::Bind now prevents the case with no arguments 2017-02-06 10:34:29 -08:00
Cheng Zhao
411696ca19 Clear is replaced with ClearEntriesAddedWithin 2017-02-06 10:34:29 -08:00
Cheng Zhao
8a6fd685e3 Interface of crashpad_client.StartHandler has changed
Refs:
7b9234c4b2%5E%21/
2017-02-06 10:34:29 -08:00
Cheng Zhao
4a14b17255 WindowOpenDisposition has become enum class 2017-02-06 10:34:29 -08:00
Cheng Zhao
6d5339b74e insertText is deprecated 2017-02-06 10:34:29 -08:00
Cheng Zhao
5e43ea227e purgedSize and purgeableSize are removed by Chrome 2017-02-06 10:34:29 -08:00
Cheng Zhao
6d323dd6fe web/WebInputEvent.h is moved to platform/WebInputEvent.h 2017-02-06 10:34:29 -08:00
Cheng Zhao
53bf82dd7c Update URLRequestFetchJob 2017-02-06 10:34:29 -08:00
Cheng Zhao
e7f3a25626 Update OffScreenRenderWidgetHostView 2017-02-06 10:34:29 -08:00
Cheng Zhao
2e0780308c allowDisplayingInsecureContent is removed by Chrome 2017-02-06 10:34:29 -08:00
Cheng Zhao
47c1bc9f66 Update ResponsePiper 2017-02-06 10:34:29 -08:00
Cheng Zhao
5cf2873b77 net::FtpProtocolHandler has changed its constructor 2017-02-06 10:34:29 -08:00
Cheng Zhao
5162905fe4 Update widevine_cdm_messages.h 2017-02-06 10:34:29 -08:00
Cheng Zhao
1a15b45736 --cipher-suite-blacklist is also removed 2017-02-06 10:34:29 -08:00
Cheng Zhao
dc9000f344 --ssl-version-fallback-min is removed by Chrome 2017-02-06 10:34:28 -08:00
Cheng Zhao
3ea6d88763 Update AtomCertVerifier 2017-02-06 10:34:28 -08:00
Cheng Zhao
c0697d8abe SetupFilter is replaced with SetUpSourceStream 2017-02-06 10:34:28 -08:00
Cheng Zhao
9882e87fbd Update OffScreenOutputDevice 2017-02-06 10:34:28 -08:00
Cheng Zhao
c2f3bbb3e6 Update OffScreenWebContentsView 2017-02-06 10:34:28 -08:00
Cheng Zhao
a95bd227c3 Update atom::Browser 2017-02-06 10:34:28 -08:00
Cheng Zhao
e91eed6758 FOR_EACH_OBSERVER is removed 2017-02-06 10:34:28 -08:00
Cheng Zhao
85749e4dbd Update AtomJavaScriptDialogManager 2017-02-06 10:34:28 -08:00
Cheng Zhao
6eaa30e94c Update AtomResourceDispatcherHostDelegate 2017-02-06 10:34:28 -08:00
Cheng Zhao
13a1d79ca6 Deperecate AtomSecurityStateModelClient with SecurityStateTabHelper 2017-02-06 10:34:28 -08:00
Cheng Zhao
3224c39371 Mac's version checking function has changed 2017-02-06 10:34:28 -08:00
Cheng Zhao
1d29b23662 Update api::WebContents 2017-02-06 10:34:28 -08:00
Cheng Zhao
231173aa90 Namespace of ChangeCause has changed 2017-02-06 10:34:28 -08:00
Cheng Zhao
d4e3dade39 WindowCapturer and ScreenCapturer are merged to DesktopCapturer 2017-02-06 10:34:28 -08:00
Cheng Zhao
7a7b72ce04 SimpleMenuModel::MenuClosed renamed to MenuWillClose 2017-02-06 10:34:28 -08:00
Cheng Zhao
c10eb73166 Signature of OnCreateWindow has changed 2017-02-06 10:34:28 -08:00
Cheng Zhao
d8e9432b0d contentTracing.setWatchEvent/cancelWatchEvent is removed 2017-02-06 10:34:28 -08:00
Cheng Zhao
0a91779dfa Node also defines LIKELY 2017-02-06 10:34:28 -08:00
Cheng Zhao
074cad9146 A few new V8 defines 2017-02-06 10:34:28 -08:00
Cheng Zhao
406224edff enable_pepper_cdms is now a feature flag
So we should not define it anymore.
2017-02-06 10:34:28 -08:00
Cheng Zhao
c1df762656 Update crashpad to 556c4e4 2017-02-06 10:34:28 -08:00
Cheng Zhao
b83676f9e9 Update to Chrome 56 2017-02-06 10:34:28 -08:00
Kevin Sawicki
1518ff5ddf Bump v1.5.1 2017-02-06 08:56:48 -08:00
Kevin Sawicki
18357512f3 Merge pull request #8515 from electron/auto-launch-squirrel-support
Support custom launch path in app.setLoginItemSettings
2017-02-06 08:55:32 -08:00
Kevin Sawicki
1b3d3b6b75 Use return value of GetProcessExecPath 2017-02-06 08:34:35 -08:00
CharlieHess
1178915f30 Ensure backwards compatibility with getLoginItemSettings.
We need to make sure the executable path is not quoted.
2017-02-06 08:34:35 -08:00
Kevin Sawicki
b7b200c874 Fix typo in getLoginItemSettings doc 2017-02-06 08:34:35 -08:00
Kevin Sawicki
1c6a07c68d Clear Update.exe login item settings in afterEach 2017-02-06 08:34:35 -08:00
Kevin Sawicki
3c2539eced Update example to use new option keys 2017-02-06 08:34:35 -08:00
Kevin Sawicki
e2501a80e4 Add path and args to LoginItemSettings struct 2017-02-06 08:34:35 -08:00
Charlie Hess
29d0a30d63 Oh, browser_linux is a thing too. 2017-02-06 08:34:35 -08:00
CharlieHess
25bc02f332 Don't append "%1" in the Run registry key.
It's only necessary for the protocol launch path.
2017-02-06 08:34:35 -08:00
Charlie Hess
d2ffd87668 I will never appreciate standard. 2017-02-06 08:34:35 -08:00
CharlieHess
852e158cc6 Make sure the spec takes arguments into account. 2017-02-06 08:34:35 -08:00
Charlie Hess
4fce00148d Add a spec for this behavior on Windows. 2017-02-06 08:34:35 -08:00
Charlie Hess
26d4a3b0ba Fix method signature on macOS. 2017-02-06 08:34:35 -08:00
CharlieHess
02dfdf75a0 Line Lengths! 2017-02-06 08:34:35 -08:00
CharlieHess
45e2f35eff Provide guidance in the docs. 2017-02-06 08:34:35 -08:00
CharlieHess
62c8a00347 This is rubbish let's pull the escape hatch.
Make all these arguments user-provided instead.
2017-02-06 08:34:35 -08:00
CharlieHess
0a6a8192b6 Close to a working Squirrel shortcut. 2017-02-06 08:34:35 -08:00
Charlie Hess
39b6bcb621 First pass at auto-launch supporting Squirrel. 2017-02-06 08:34:35 -08:00
Kevin Sawicki
093b844859 Merge pull request #8509 from electron/upgrading-chrome-doc
Add initial upgrading chrome checklist
2017-02-03 09:58:29 -08:00
Zeke Sikelianos
6df446baba Merge pull request #8583 from crowchirp/docs-typo-fixes
Docs typo fixes
2017-02-03 09:55:43 -08:00
Kevin Sawicki
de18f09588 Add initial upgrading chrome checklist 2017-02-03 09:54:34 -08:00
Kevin Sawicki
2f3578679f Merge pull request #8572 from electron/content-tracing-app-ready
Document using content tracing after app ready
2017-02-03 09:53:53 -08:00
Kevin Sawicki
7b3e998cc6 Use content tracing after app ready 2017-02-03 09:45:18 -08:00
Kevin Sawicki
cf694ef32b Merge pull request #8570 from electron/force-refresh-menu-role
Add forcereload menu item role
2017-02-03 09:44:57 -08:00
Kevin Sawicki
b1f260ac87 Add forcereload to MenuItem doc 2017-02-03 09:39:41 -08:00
Kevin Sawicki
fb08f56fc8 Add forcereload menu item role 2017-02-03 09:39:41 -08:00
Kevin Sawicki
555347e726 Merge pull request #8569 from electron/webview-default-node-integration
Mention presence of webview attributes enables them
2017-02-03 09:39:22 -08:00
Kevin Sawicki
50b9dfa61a Use querySelector to make examples more portable 2017-02-03 09:32:15 -08:00
Kevin Sawicki
4539a6f4d5 Change wording from on to present 2017-02-03 09:32:15 -08:00
Kevin Sawicki
4abbd65628 Merge pull request #8568 from electron/initialize-color-listener-after-app-is-ready
Initialize color listener after app is ready
2017-02-03 09:31:58 -08:00
Kevin Sawicki
5973aa36ad Initialize color listener after app is ready 2017-02-03 09:00:18 -08:00
Kevin Sawicki
62a400b7d6 Merge pull request #8566 from electron/prompt-to-create-property
Support returning non-existent file paths from Windows open dialog
2017-02-03 08:58:52 -08:00
Chandan Rai
75ec73d6fe Merge remote-tracking branch 'origin/patch-3' into docs-typo-fixes 2017-02-03 22:23:35 +05:30
Chandan Rai
1a3abb61ed Merge remote-tracking branch 'origin/patch-2' into docs-typo-fixes 2017-02-03 22:23:21 +05:30
Chandan Rai
4a6cbd76c8 corrected typo 2017-02-03 19:26:37 +05:30
Chandan Rai
9e7bcda07d corrected typo 2017-02-03 19:11:37 +05:30
Chandan Rai
93b0a2caa1 corrected typo 2017-02-03 18:58:21 +05:30
Kevin Sawicki
930a5c6de2 Merge pull request #8565 from electron/protocol-client-specs
Add protocol client specs on Windows
2017-02-02 12:48:19 -08:00
Kevin Sawicki
daff671afc Add protocol constant 2017-02-02 12:48:09 -08:00
Kevin Sawicki
a60f341968 Add procotol client specs on Windows 2017-02-02 12:48:09 -08:00
Kevin Sawicki
604c2470bc Merge pull request #8561 from liusy182/!-liusy182-br
add 'code' property in 'before-input-event''s 'input' argument
2017-02-02 10:33:20 -08:00
Kevin Sawicki
9fef6a1fd7 Add support for FOS_CREATEPROMPT option 2017-02-02 08:51:10 -08:00
liusy182
2cf6a026d8 fix linting error 2017-02-02 21:16:30 +08:00
liusi
87392ff046 'before-input-event' is missing the code property #8471 2017-02-02 16:23:07 +08:00
Kevin Sawicki
dc1c11a841 Merge pull request #8487 from leethomas/feature/osx-relative-window-levels
Feature/macOS relative window levels
2017-01-30 15:34:24 -08:00
Kevin Sawicki
9b2b6da3a3 Wrap params at 80 characters 2017-01-30 15:32:05 -08:00
Kevin Sawicki
2cacaa443a Indent relativeLevel docs 2017-01-30 15:27:51 -08:00
Zeke Sikelianos
f0882a5058 use consistent headings 2017-01-30 10:57:53 -08:00
Zeke Sikelianos
1945771f37 Add SECURITY.md 2017-01-30 10:49:17 -08:00
Kevin Sawicki
37eebb1dd0 Merge pull request #8539 from electron/require-wrapper
Update require wrapper to allow redefinition of process and global
2017-01-30 10:36:15 -08:00
Kevin Sawicki
94cb605993 Use strictEqual for global variable asserts 2017-01-30 10:08:12 -08:00
Kevin Sawicki
e99b1709d9 Redeclare process/global as strings 2017-01-30 09:58:44 -08:00
Kevin Sawicki
4e5b8ac3ee Remove throws and assert object directly 2017-01-30 09:38:15 -08:00
James Ide
0430380de1 Update the Node submodule to use the new module wrapper
See the fixed issue for the context. This pulls in a vendored copy of Node that includes the described patch.

Fixes #8358

Test Plan: Built Electron and verified it loaded the sample app correctly and that the module wrapper is the new one by viewing Node's source code in the Blink Inspector.

Added specs and tested with `npm test -- --grep "global variables"`
2017-01-30 09:37:14 -08:00
leethomas
edbb786fb4 use kCGMinimumWindowLevelKey to get the minimum level 2017-01-26 19:12:10 -08:00
Kevin Sawicki
6e2f977f7a Merge pull request #8511 from electron/start-drag-crash
Fix startDrag crash on macOS with empty image
2017-01-26 17:10:21 -08:00
Kevin Sawicki
76e5589a31 Schedule function after executeJavaScript completes 2017-01-26 16:15:10 -08:00
Kevin Sawicki
651ea7ef02 Merge pull request #8421 from oukan/feature/translate-zh-CN
translate zh cn
2017-01-26 15:48:57 -08:00
Kevin Sawicki
eb6d92d427 Mention image cannot be empty on macOS 2017-01-26 15:46:04 -08:00
Kevin Sawicki
e683f28e32 Require a non-empty drag image to prevent crash 2017-01-26 15:46:04 -08:00
Kevin Sawicki
8ce1930f0d Add specs for missing startDrag options 2017-01-26 15:46:04 -08:00
Kevin Sawicki
2ee5f6f358 Merge pull request #8507 from electron/fix-node-upgrade-patches
Redo node 7.4 error handling patch
2017-01-26 15:43:58 -08:00
Kevin Sawicki
06c025050e Fix typo in spec description 2017-01-26 14:46:51 -08:00
Kevin Sawicki
ff718b19db Upgrade node for new 7.4 patches and changes 2017-01-26 14:46:50 -08:00
Kevin Sawicki
1004d205d8 Add spec for unhandledRejection event in main process 2017-01-26 14:46:50 -08:00
Kevin Sawicki
24fb560a9d Add failing spec for uncaught main process errors 2017-01-26 14:46:50 -08:00
Kevin Sawicki
a4e25a8917 Merge pull request #8519 from electron/consolidate-panel-showing
Use helper function to show last dev tools panel
2017-01-26 14:44:45 -08:00
Kevin Sawicki
2cfa67bdff Remove linter warning 2017-01-26 09:59:07 -08:00
Kevin Sawicki
a851695bb9 Clear interval before setting new one 2017-01-26 09:57:53 -08:00
Kevin Sawicki
e2e33a8cf0 Guard against destroyed window or web contents 2017-01-26 09:57:00 -08:00
Kevin Sawicki
515f689814 Use helper function to show last dev tools panel 2017-01-26 09:42:45 -08:00
Kevin Sawicki
640b03f7d0 Merge pull request #8510 from electron/empty-image-crashes
Fix empty image crashes
2017-01-26 09:08:52 -08:00
leethomas
b67d515a76 fix signature for SetAlwaysOnTop in native window views 2017-01-26 07:24:20 -08:00
leethomas
9e189b9d2d fix js lint errors 2017-01-26 07:14:47 -08:00
leethomas
1234b61fa6 spec to ensure an error is thrown when relativeLevel is set out of bounds 2017-01-25 19:39:57 -08:00
Kevin Sawicki
104cae8f68 Only call getNativeHandle on macOS 2017-01-25 14:26:05 -08:00
Kevin Sawicki
e1281342f6 Return empty buffers when image is empty 2017-01-25 14:26:05 -08:00
Kevin Sawicki
2ad46f1842 Add failing spec for empty image crashes 2017-01-25 14:26:05 -08:00
Kevin Sawicki
8e69f94df0 Merge pull request #8357 from electron/remote-events-error-message
Don't crash when calling stale remote listeners
2017-01-25 14:23:57 -08:00
Kevin Sawicki
330ac5f266 Fix standard linting error 2017-01-25 12:36:55 -08:00
Kevin Sawicki
56a8eb3a94 Check that sender is a WebContents instance 2017-01-25 12:36:55 -08:00
Charlie Hess
ddedcf22d1 Move console.warn inside the helper method. 2017-01-25 12:36:55 -08:00
Charlie Hess
f6410d3b77 Assert that listener count decreases after a remove event. 2017-01-25 12:36:55 -08:00
Charlie Hess
c213971a2d Write a warning instead of crashing. 2017-01-25 12:36:55 -08:00
Charlie Hess
bc2f1e8199 Argh. 2017-01-25 12:36:55 -08:00
Charlie Hess
63d8137da2 Use EventEmitter public methods instead of _events. 2017-01-25 12:36:55 -08:00
Kevin Sawicki
45986405b8 Assert remote event names 2017-01-25 12:36:55 -08:00
Charlie Hess
b04db2e546 Add a spec for the "renderer window closed" error. 2017-01-25 12:36:55 -08:00
Charlie Hess
a0b24bd155 Simplify. 2017-01-25 12:36:55 -08:00
Charlie Hess
67f7a60524 Review CommentZ 2017-01-25 12:36:55 -08:00
Charlie Hess
41ea169784 L I N T I N G P T I I 2017-01-25 12:36:55 -08:00
Charlie Hess
49c6446267 L I N T I N G 2017-01-25 12:36:55 -08:00
Charlie Hess
26e3ad3c2e Display more information about remote event crashes.
If possible, we'll dig into the function args and print the ones that are attached remotely.
2017-01-25 12:36:55 -08:00
Kevin Sawicki
c13ea6eb36 Merge pull request #8497 from electron/enable-crash-reporter-specs-on-ci
Run crash reporter server specs on CI
2017-01-25 10:54:56 -08:00
Kevin Sawicki
f104e019be Run crash reporter server specs on CI 2017-01-25 10:36:16 -08:00
Kevin Sawicki
8e39aea34a Merge pull request #8478 from deepak1556/load_url_max_char_patch
WebContents: emit did-fail-load event when url exceeds character limit
2017-01-25 09:46:40 -08:00
deepak1556
d8a16a8ffb fix spec 2017-01-25 14:20:33 +05:30
leethomas
1f5518b91e throw an error for out of bounds window levels 2017-01-24 20:14:09 -08:00
Kevin Sawicki
90470617ab Merge pull request #8430 from ramya-rao-a/crash-for-children-docs
Updated docs for crash reporter to support child processes
2017-01-24 14:08:36 -08:00
Kevin Sawicki
ce6a46ee59 Use template strings 2017-01-24 14:08:10 -08:00
Kevin Sawicki
108a3473ed Use crashesDirectory in example 2017-01-24 14:07:00 -08:00
Kevin Sawicki
4985e073c4 Mention how to test 2017-01-24 14:04:56 -08:00
Kevin Sawicki
7b03c05b4e Capitalize Electron, fence as JS 2017-01-24 14:03:54 -08:00
Kevin Sawicki
ce472315f4 Merge pull request #8109 from ramya-rao-a/crash-for-children
Expose crash reporter start for child node processes
2017-01-24 14:02:47 -08:00
Kevin Sawicki
43ef4faf79 🎨 2017-01-24 14:00:03 -08:00
Kevin Sawicki
795b674996 Add StartInstance helper on CrashReporter 2017-01-24 13:54:46 -08:00
Kevin Sawicki
170c51ae85 Add spec for crashing node process 2017-01-24 13:49:45 -08:00
Ramya Achutha Rao
241773f2f0 Clean up testing code written for crash for children 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
d453dbdb40 Support crash reporting from child process in Windows 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
2814e04e7d Getting rid of linting errors 2017-01-24 12:44:39 -08:00
Kevin Sawicki
f1cd1c6dff Use mate::Dictionary::CreateEmpty 2017-01-24 12:44:39 -08:00
Kevin Sawicki
4107174cfd Group includes 2017-01-24 12:44:39 -08:00
Kevin Sawicki
91f8d6092b Take options object in process.crashReporter.start 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
1f07cf2545 Add crashReporter property to process 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
d4b44d8b69 Expose crash reporter start for child node processes 2017-01-24 12:44:39 -08:00
Kevin Sawicki
61aff5ed35 Merge pull request #8495 from electron/fullscreen-spec
Wait for window to transition before leaving full screen
2017-01-24 12:32:14 -08:00
Kevin Sawicki
6bb331356e Finish spec when full screen is left 2017-01-24 11:55:13 -08:00
Kevin Sawicki
284ca3114b Wait for window to transition before leaving full screen 2017-01-24 11:55:13 -08:00
Kevin Sawicki
e1fe5f4fbf Merge pull request #8496 from electron/upgrade-ffi
Upgrade to ffi@2.2.0
2017-01-24 11:54:59 -08:00
Kevin Sawicki
2762ead5a4 Upgrade to ffi@2.2.0 2017-01-24 11:25:21 -08:00
Kevin Sawicki
0ca5ad754e Merge pull request #8452 from electron/document-build
Document toolchains used for building official Electron releases
2017-01-24 10:53:33 -08:00
Kevin Sawicki
4f6750a460 Update build doc to Xcode 8.2.1 2017-01-24 10:49:42 -08:00
Kevin Sawicki
1960327918 Bump v1.5.0 2017-01-24 08:27:37 -08:00
Kevin Sawicki
8c9ebbeec2 Merge pull request #8483 from electron/upgrade-libcc
Upgrade libcc to b4dd78df
2017-01-24 08:26:42 -08:00
Kevin Sawicki
9f03a166f7 Upgrade libcc to b4dd78df 2017-01-24 08:01:22 -08:00
leethomas
fb741285c6 update documentation 2017-01-23 23:42:38 -08:00
leethomas
7a0a87a6f3 implement relative window levels, closes #8153 2017-01-23 23:42:33 -08:00
Kevin Sawicki
034230e2ae Merge pull request #8475 from milkit/fix-translation-jp
Fix Japanese translation
2017-01-23 09:35:01 -08:00
Kevin Sawicki
68ca873fa8 Merge pull request #8472 from javan/patch-1
Remove note in "did-fail-load" about redirect responses
2017-01-23 09:34:42 -08:00
Kevin Sawicki
3312f98121 Merge pull request #8467 from electron/upgrade-multiparty
Upgrade multiparty for os.tmpdir fix
2017-01-23 09:27:34 -08:00
Kevin Sawicki
33820ffb85 Upgrade multiparty for os.tmpdir fix 2017-01-23 09:22:08 -08:00
deepak1556
593a3de850 add spec 2017-01-23 19:57:47 +05:30
Shunki Tan
05b6f95ab8 Fix Japanese translation 2017-01-23 11:35:06 +09:00
Javan Makhmali
68eaf1fb9f Remove note in "did-fail-load" about redirect responses
ERR_ABORTED is suppressed now (https://github.com/electron/electron/pull/6201)
2017-01-22 16:39:42 -05:00
Weiqiang Lin
851a7578fa <webview> Tag to zh-CN 2017-01-22 14:18:34 +08:00
Weiqiang Lin
0d259a6eb0 File Object to zh-CN 2017-01-22 14:17:59 +08:00
Weiqiang Lin
86521f325b Synopsis to zh-CN 2017-01-22 14:17:29 +08:00
Weiqiang Lin
64a1b1c474 Supported Chrome Command Line Switches to zh-CN 2017-01-22 14:16:59 +08:00
Weiqiang Lin
cf54c4cbb2 testing-on-headless-ci.md to zh-CN 2017-01-22 14:15:51 +08:00
Kevin Sawicki
91ed9aeeee Merge pull request #8464 from schwalbe10/translation_jp
Fix a typo
2017-01-21 10:41:30 -08:00
Kevin Sawicki
bc001f8816 Merge pull request #8463 from electron/patch-about-md
Fixing missing link
2017-01-21 10:41:14 -08:00
schwalbe10
56882c31bd Fix a typo 2017-01-21 23:12:37 +09:00
Samuel Attard
8fe8dfa410 Fixing missing link 2017-01-22 00:12:43 +11:00
deepak1556
f9dc08baf6 emit did-fail-load event when the url char length exceeds limit 2017-01-21 14:59:20 +05:30
deepak1556
54559f99a0 Fix dereferencing nullptr
RenderWidgetHostView might not be available when
the navigator fails to load a url.
2017-01-21 14:56:58 +05:30
Kevin Sawicki
91c70a66cb Link to Xcode 7.3.1 DMG 2017-01-20 08:16:17 -08:00
Kevin Sawicki
edcea3e800 Merge pull request #8456 from yuya-oc/docs-security
Add to security checklist about permission requests
2017-01-20 08:04:01 -08:00
Yuya Ochiai
11f2574fda 📝 Add to security checklist about permission requests
If the handler is not set, remote content can access to user's
information without allowing the permission. e.g. UserMedia
[ci skip]
2017-01-20 23:58:21 +09:00
Yuya Ochiai
a7a3aa848e 📝 Fix typo
[ci skip]
2017-01-20 23:45:48 +09:00
Birunthan Mohanathas
b145131505 Mention VS2015 Update 3 to match CI environment 2017-01-20 07:19:43 +02:00
Birunthan Mohanathas
410f3c03d4 Document use of Xcode 7.3.1 with 10.10 SDK for release builds 2017-01-20 07:19:07 +02:00
Kevin Sawicki
8a22139d57 Merge pull request #8451 from electron/upgrade-clang
Upgrade to clang 278861
2017-01-19 15:56:38 -08:00
Kevin Sawicki
6a80cd2b7e Upgrade to clang 278861 2017-01-19 15:32:03 -08:00
Kevin Sawicki
22b21d04bd Merge pull request #8406 from electron/use_gn-chrome54
Use gn chrome54
2017-01-19 13:33:48 -08:00
Kevin Sawicki
2cddb5bb4e Bump v1.4.15 2017-01-19 08:32:42 -08:00
Birunthan Mohanathas
a560df3327 Update node to pick up Windows compilation fix 2017-01-19 09:05:59 +02:00
Kevin Sawicki
14d48e9653 Update .node-version to 7.4 2017-01-19 09:05:59 +02:00
Kevin Sawicki
c374e37cc4 Leak IsolateData since Environment is also leaked 2017-01-19 09:05:59 +02:00
Kevin Sawicki
54e2c480cb Upgrade to node 7.4 2017-01-19 09:05:59 +02:00
Kevin Sawicki
43067e01e9 Upgrade to latest libcc 2017-01-19 09:05:59 +02:00
Birunthan Mohanathas
ab4a055c05 Correct version in chrome_version.h 2017-01-19 09:05:59 +02:00
Cheng Zhao
c774bb47c5 Update to latest libchromiumcontent 2017-01-19 09:05:59 +02:00
Ales Pergl
a52d780e7a Update brightray and crashpad 2017-01-19 09:05:59 +02:00
Kevin Sawicki
b6d0201c73 Upgrade to Chrome 54.0.2840.101 2017-01-19 09:05:59 +02:00
Kevin Sawicki
1b036a284d Add basic inspectElement spec 2017-01-19 09:05:59 +02:00
Kevin Sawicki
602db2e04f 🎨 2017-01-19 09:05:59 +02:00
Kevin Sawicki
f0ceb4f065 Use SetNeedsBeginFrames from IPC handler 2017-01-19 09:05:59 +02:00
Kevin Sawicki
d71f10c5a3 Implement GetScreenInfo 2017-01-19 09:05:59 +02:00
Kevin Sawicki
39ddeff5c3 Implement SetNeedsBeginFrames 2017-01-19 09:05:59 +02:00
Kevin Sawicki
cc183524fd Only remove webview when non-null 2017-01-19 09:05:59 +02:00
Kevin Sawicki
b0ee46f862 Use === in specs 2017-01-19 09:05:59 +02:00
Kevin Sawicki
443040e8d7 Call InspectElement directly on InspectableWebContents 2017-01-19 09:05:59 +02:00
Kevin Sawicki
d6eb0d6629 Implement insertCSS on webFrame 2017-01-19 09:05:59 +02:00
Kevin Sawicki
017df93ffa Add failing spec for insertCSS 2017-01-19 09:05:59 +02:00
Kevin Sawicki
2f5acfedcd Add spec for denying perm requests when handler is cleared 2017-01-19 09:05:59 +02:00
Kevin Sawicki
18675cc6c1 Implement RequestPermissions using request handler 2017-01-19 09:05:59 +02:00
Kevin Sawicki
977680d00b Add spec for midi without sysex permission 2017-01-19 09:05:59 +02:00
Kevin Sawicki
2f26dbf39e Update type to level in debugger message spec 2017-01-19 09:05:59 +02:00
Kevin Sawicki
873e6e5e6b Append form to body before submitting 2017-01-19 09:05:59 +02:00
Cheng Zhao
20b70b367e Update to latest libchromiumcontent 2017-01-19 09:05:59 +02:00
Cheng Zhao
f2a30afcf1 Fix linking for arm build 2017-01-19 09:05:59 +02:00
Cheng Zhao
ec134e7536 Fix building error for arm linux 2017-01-19 09:05:59 +02:00
Cheng Zhao
0568fa30ca Fix linking for Windows 2017-01-19 09:05:59 +02:00
Cheng Zhao
6e0762a540 Fix building on Windows 2017-01-19 09:05:59 +02:00
Cheng Zhao
af212a9f67 Update libchromiumcontent for the rebase 2017-01-19 09:05:59 +02:00
Cheng Zhao
ebb4c93994 Fix linking error for x64 Linux build 2017-01-19 09:05:59 +02:00
Cheng Zhao
fd2fdb5475 Fix linking problem with libgtk2ui 2017-01-19 09:05:59 +02:00
Cheng Zhao
88f6f5d1b2 Fix compilation errors for Linux 2017-01-19 09:05:59 +02:00
Cheng Zhao
93a27fd3a9 Fix linking errors on Mac 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
Cheng Zhao
bdc334d797 Update brightray and libchromiumcontent to Chrome 54 2017-01-19 09:05:59 +02:00
Jacob Groundwater
6520396466 update atom_browser_client.h 2017-01-19 09:05:44 +02:00
Jacob Groundwater
9716e2745b WIP: chrome 54 update 2017-01-19 09:05:44 +02:00
Ales Pergl
5b3d0f86f7 Adjustments after migrating libchromiumcontent to GN 2017-01-19 09:05:44 +02:00
Kevin Sawicki
b90e23306e Merge pull request #8428 from electron/upgrade-libcc-for-webm-muxer-fix
Upgrade libcc for webm muxer patch
2017-01-18 21:15:58 -08:00
Kevin Sawicki
8cc29c2e22 Upgrade libcc for webm muxer patch 2017-01-18 20:56:44 -08:00
Kevin Sawicki
a3af6bd9f5 Merge pull request #8441 from watilde/feature/tweak-kiosk
do not call SetFullScreen in SetKiosk if it's already fullscreen mode
2017-01-18 16:17:31 -08:00
Daijiro Wachi
a23d8ed702 do not call SetFullScreen in SetKiosk if it's already fullscreen mode 2017-01-19 00:40:34 +01:00
Kevin Sawicki
3766fb6652 Merge pull request #8437 from electron/set-version-for-electron-api-json
set version arg when creating electron-api.json
2017-01-18 15:13:30 -08:00
Kevin Sawicki
a7891e584a Merge pull request #8438 from electron/restore-thick-frame-fullscreen-handler
Restore thick frame full screen code path
2017-01-18 15:12:50 -08:00
Kevin Sawicki
e82b41724d Restore thick frame full screen case 2017-01-18 14:40:42 -08:00
Zeke Sikelianos
6af7cfff33 fix syntax and use relative path to electron-api.json target 2017-01-18 11:52:09 -08:00
Zeke Sikelianos
057fda5352 set version arg when creating electron-api.json 2017-01-18 11:00:13 -08:00
Kevin Sawicki
71512ad244 Merge pull request #8432 from hrubilov/patch-1
Typo fixed
2017-01-18 09:02:18 -08:00
hrubilov
edb3967a0f Typo fixed 2017-01-18 14:12:27 +03:00
Ramya Achutha Rao
dc5129f32e Updated docs for crash reporter to support child processes 2017-01-17 21:59:23 -08:00
Zeke Sikelianos
ade16a7823 Merge pull request #8365 from destan/patch-3
printToPDF: `landscape` ignored if `@page` is used
2017-01-17 13:50:37 -08:00
Kevin Sawicki
f7bdf5d04e Merge pull request #8399 from watilde/feature/fixes-8338
save a fullscreen state when Kiosk mode is called
2017-01-17 13:03:51 -08:00
Kevin Sawicki
dcbc10ac38 Merge pull request #8417 from electron/flaky-travis-specs
Disable flaky specs on Travis
2017-01-17 08:48:59 -08:00
Kevin Sawicki
feac8685f4 Merge pull request #8348 from electron/isolated-world
Add context isolation option to windows and webview tags
2017-01-17 08:47:44 -08:00
Weiqiang Lin
11259b0ea2 Online/Offline Event Detection to zh-CN 2017-01-17 17:50:16 +08:00
Weiqiang Lin
ac0ba74e87 Desktop Environment Integration to zh-CN 2017-01-17 17:49:18 +08:00
Weiqiang Lin
96b7d3653c Quick Start to zh-CN 2017-01-17 17:48:51 +08:00
Kevin Sawicki
9ccc78c62f Use options constants for keys 2017-01-16 13:09:38 -08:00
Kevin Sawicki
1d824d4645 Assert document visibility in main context 2017-01-16 13:03:38 -08:00
Kevin Sawicki
b26428c43c 🎨 2017-01-16 12:38:16 -08:00
Kevin Sawicki
815cb1b31c Include atom_natives after builtin includes 2017-01-16 12:38:16 -08:00
Kevin Sawicki
dcf9a395c2 Only create isolated context in main frame 2017-01-16 12:38:16 -08:00
Kevin Sawicki
2e62d81c24 Access getter instead of variable 2017-01-16 12:38:16 -08:00
Kevin Sawicki
13acf7a6a3 Mention accessing context in dev tools 2017-01-16 12:38:16 -08:00
Kevin Sawicki
f35224b0e4 🎨 2017-01-16 12:38:16 -08:00
Kevin Sawicki
6bcfd0630c Document implemented APIs at the top 2017-01-16 12:38:16 -08:00
Kevin Sawicki
f4f0174746 Parse guestInstanceId and opener as ints 2017-01-16 12:38:16 -08:00
Kevin Sawicki
37b7dda3c5 Remove use of now private guestId 2017-01-16 12:38:16 -08:00
Kevin Sawicki
fbcbfbda6a Add back BrowserWindowProxy location property 2017-01-16 12:38:16 -08:00
Kevin Sawicki
de4be56b09 Use internal open event name with fully parsed options 2017-01-16 12:38:16 -08:00
Kevin Sawicki
f3852c57fc Use empty string for comparison 2017-01-16 12:38:16 -08:00
Kevin Sawicki
2e6d08c652 Remove unneeded this prefix 2017-01-16 12:38:16 -08:00
Kevin Sawicki
bb260343de Move more functions to outer scope 2017-01-16 12:38:16 -08:00
Kevin Sawicki
3f7b3c4bd7 Implement window overrides in main context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
95054f443f Enable context isolation on child windows 2017-01-16 12:38:16 -08:00
Kevin Sawicki
eef72647b4 Set human readable context name 2017-01-16 12:38:16 -08:00
Kevin Sawicki
33b6ab11f2 Assert context state after reload 2017-01-16 12:38:16 -08:00
Kevin Sawicki
dacfb2f596 Mention contextIsolation is experimental 2017-01-16 12:38:16 -08:00
Kevin Sawicki
3ac6019f42 Mention context isolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
0f7af8043a Upgrade libcc for world context patch 2017-01-16 12:38:16 -08:00
Kevin Sawicki
14a1e673c6 Add spec for webview context isolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
802ed62d5b Remove trailing comma 2017-01-16 12:38:16 -08:00
Kevin Sawicki
572fc058d3 Document contextIsolation option 2017-01-16 12:38:16 -08:00
Kevin Sawicki
b348cdeae8 Set page variable using webFrame.executeJavaScript 2017-01-16 12:38:16 -08:00
Kevin Sawicki
ea2273dde5 Assert built-in prototype isolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
ad3b837ad5 Rename option to contextIsolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
b56bdc83af 🎨 2017-01-16 12:38:16 -08:00
Kevin Sawicki
2e7dbe6c6b Use patch worldScriptContext to get isolated context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
309ac75284 Upgrade libcc for worlds patch 2017-01-16 12:38:16 -08:00
Kevin Sawicki
4f5c725dde 🎨 Use enum for world ids 2017-01-16 12:38:16 -08:00
Kevin Sawicki
5b6397aaa6 Store context that API is running in to deliver IPC events 2017-01-16 12:38:16 -08:00
Kevin Sawicki
2928fe5c43 Add initial isolated world spec 2017-01-16 12:38:16 -08:00
Kevin Sawicki
5da4f032c3 Notify client each time main context is created 2017-01-16 12:38:16 -08:00
Kevin Sawicki
c5e68ec165 🎨 2017-01-16 12:38:16 -08:00
Kevin Sawicki
78e0b80dc7 Support IPC messages in isolated context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
073d8c2177 Add world id constants 2017-01-16 12:38:16 -08:00
Kevin Sawicki
d194a84ae4 Setup isolated context from AtomRenderFrameObserver 2017-01-16 12:38:16 -08:00
Kevin Sawicki
4bca6fe672 Add isolated world web preference option 2017-01-16 12:38:15 -08:00
Kevin Sawicki
cdf33ff3dc Add null guards 2017-01-16 12:38:15 -08:00
Kevin Sawicki
08b203fed1 Match extension name to class name 2017-01-16 12:38:15 -08:00
Kevin Sawicki
736befe90f Add initial support for loading into isolated world 2017-01-16 12:38:15 -08:00
Kevin Sawicki
b6c5e9a126 Disable disableguestresize spec that times out on Travis 2017-01-16 11:48:20 -08:00
Kevin Sawicki
4ebe54043a Merge pull request #8395 from Arcath/patch-1
Add Squirrel Release Server to the update server list.
2017-01-16 11:41:43 -08:00
Kevin Sawicki
e6f5f60f3a Merge pull request #8355 from oukan/feature/translate-zh-CN
translate to zh-CN
2017-01-16 11:40:19 -08:00
Kevin Sawicki
48facf6343 Add space after // 2017-01-16 11:38:58 -08:00
Kevin Sawicki
170f2f61f9 Merge pull request #8404 from bsclifton/fix-dpi-borders
Properly handle borders on frameless window for DPI > 100% (Windows only)
2017-01-16 11:24:39 -08:00
Kevin Sawicki
0244a73c49 Fix cpp linter errors 2017-01-16 09:26:07 -08:00
Kevin Sawicki
9089d55342 Merge pull request #8409 from javan/add-context-menu-event-to-webview
Add "context-menu" DOM event to <webview>
2017-01-16 09:04:32 -08:00
Brian Clifton
9e0547b98f Fix the rendering for the rounded edges 2017-01-14 01:15:22 -08:00
Daijiro Wachi
b97db68f0c add tests to fullScreen and Kiosk 2017-01-14 00:05:04 +01:00
Daijiro Wachi
436a6d5c0f Save a fullScreen state for Kiosk mode 2017-01-14 00:04:51 +01:00
Javan Makhmali
a64bdbd306 Add "context-menu" DOM event to <webview> 2017-01-13 17:04:09 -05:00
Kevin Sawicki
ac6aeae915 Merge pull request #8390 from electron/upgrade-brightray-for-devtools-fix
Upgrade brightray for dev tools fix
2017-01-13 10:57:57 -08:00
Kevin Sawicki
f92f851f11 Upgrade brightray for dev tools fix 2017-01-13 09:19:17 -08:00
Kevin Sawicki
99e21a2235 Merge pull request #8401 from czipperz/BrowserProcess_constructor
Reorder BrowserProcess constructor to avoid invalid memory
2017-01-13 09:12:51 -08:00
Kevin Sawicki
f7d3dc742d Merge pull request #8400 from electron/keyboardevent-link
Switch to footer link syntax for keyboard event docs
2017-01-13 09:09:44 -08:00
Brian Clifton
cf6e215a66 Properly handle borders for DPI > 100% on Windows
Fixes https://github.com/electron/electron/issues/4573

cc: @zcbenz, @kevinsawicki, @zeke
2017-01-13 00:18:42 -07:00
Czipperz
e4688f1c5a Reorder BrowserProcess constructor to avoid invalid memory 2017-01-12 16:55:26 -08:00
Kevin Sawicki
315daf1a10 Switch to footer link syntax 2017-01-12 16:54:07 -08:00
Zeke Sikelianos
75e81f00e2 Merge pull request #8381 from electron/lint-without-side-effects
create electron-api.json in dist, not as a side-effect of linting
2017-01-12 14:58:55 -08:00
Kevin Sawicki
ec71440f09 Merge pull request #8391 from electron/read-only-versions
Make process.versions.electron/chrome read-only
2017-01-12 14:58:01 -08:00
Zeke Sikelianos
2a825310ea use one line 2017-01-12 14:37:18 -08:00
Kevin Sawicki
323edb9d53 Add read-only version to planned 2.0 API 2017-01-12 13:51:35 -08:00
Kevin Sawicki
726bab0293 Add specs for process.versions.electron/chrome 2017-01-12 13:50:19 -08:00
Kevin Sawicki
b52367e3b2 Update native-mate to electron org 2017-01-12 13:50:19 -08:00
Kevin Sawicki
9ff1f6bbde Merge pull request #8377 from electron/sandbox-open-crash
Destroy web contents if new-window event is prevented
2017-01-12 11:43:35 -08:00
Kevin Sawicki
97dd680b32 Remove linter errors 2017-01-12 10:28:08 -08:00
Kevin Sawicki
8098ca3b66 Remove unneeded nextTick and assert array 2017-01-12 10:28:08 -08:00
Kevin Sawicki
8f63fdb278 Destroy web contents when preventing default 2017-01-12 10:28:08 -08:00
Kevin Sawicki
c5da330cdf Add failing spec for sandboxed window.open 2017-01-12 10:28:08 -08:00
Adam Laycock
9e89ec041e Add Squirrel Release Server to the update server list. 2017-01-12 13:40:14 +00:00
Kevin Sawicki
070bbcfc3d Merge pull request #8380 from electron/auto-submit-rename
Rename autoSubmit to uploadToServer in example
2017-01-11 08:42:33 -08:00
Zeke Sikelianos
cef9cd3cfc create electron-api.json in dist, not as a side-effect of linting 2017-01-10 18:17:08 -08:00
Kevin Sawicki
ed4f4b3954 Rename autoSubmit to uploadToServer in example 2017-01-10 16:07:10 -08:00
Kevin Sawicki
cfb6069b83 Bump v1.4.14 2017-01-10 11:01:39 -08:00
Kevin Sawicki
caacc4580f Merge pull request #8376 from electron/revert-8354-vibrancy-corner-fix
Revert "Smooth corners for vibrancy view"
2017-01-10 10:36:47 -08:00
Kevin Sawicki
f3b03908f9 Revert "Smooth corners for vibrancy view" 2017-01-10 10:34:55 -08:00
Kevin Sawicki
c6ccf9f2b5 Merge pull request #8371 from electron/upgrade-brightray-for-emulation-fix
Upgrade brightray for network emulation fix
2017-01-09 11:22:10 -08:00
Kevin Sawicki
5204d6ce45 Merge pull request #8354 from gerhardberger/vibrancy-corner-fix
Smooth corners for vibrancy view
2017-01-09 11:12:02 -08:00
Kevin Sawicki
24b5abcc39 Upgrade brightray for network emulation fix 2017-01-09 10:42:48 -08:00
Kevin Sawicki
8ada7fe30b Merge pull request #8370 from electron/resizable-specs
Add spec for resizable frameless window
2017-01-09 10:41:51 -08:00
Kevin Sawicki
d8366115f5 Add spec for resizable frameless window 2017-01-09 10:01:38 -08:00
Kevin Sawicki
e5aad9857d Merge pull request #7765 from liusy182/maximize-fix
fix for Window hidden behind taskbar after maximize #7672
2017-01-09 09:47:39 -08:00
Kevin Sawicki
75a05c2814 Merge pull request #8369 from electron/start-executable
Make start script executable
2017-01-09 09:28:37 -08:00
Kevin Sawicki
64a36170a9 Make start script executable 2017-01-09 09:27:20 -08:00
Kevin Sawicki
871c3fc11e Merge pull request #8341 from electron/dialog-manager
Implement alert/confirm through Chrome's dialog manager
2017-01-09 09:17:40 -08:00
Kevin Sawicki
6ef1a9150c Add OK button to alert 2017-01-09 08:30:13 -08:00
Kevin Sawicki
222734b5f5 Use correct param ordering in header file 2017-01-09 08:30:13 -08:00
Kevin Sawicki
1f08634d62 Implement alert/confirm through dialog manager 2017-01-09 08:30:13 -08:00
Kevin Sawicki
52390120ae Merge pull request #8340 from electron/options-cycle
Handle cycles when merging browser window options
2017-01-09 08:29:56 -08:00
Destan Sarpkaya
fb35f06114 printToPDF: landscape ignored if @page is used
This is very frustrating to find out via debugging, I think it should be in docs.
2017-01-09 02:31:34 +02:00
gellert
bfafc6d5fd indentation fix 2017-01-06 23:54:24 +01:00
Kevin Sawicki
1f07977f09 Remove lint errors 2017-01-06 09:58:40 -08:00
Kevin Sawicki
fd23c7bf76 Assert duplicate objects are supported 2017-01-06 09:58:40 -08:00
Kevin Sawicki
1944fdc962 Track visited parents and null out cycles 2017-01-06 09:58:40 -08:00
Kevin Sawicki
12382f064b Add failing spec for cycle in options 2017-01-06 09:58:40 -08:00
Kevin Sawicki
b942c54bea Use closeWindow helper 2017-01-06 09:58:40 -08:00
Kevin Sawicki
0a7dccbad8 Merge pull request #8308 from electron/normalize-access-keys
Support normalizing access keys in dialog buttons
2017-01-06 09:55:06 -08:00
Kevin Sawicki
5f862effaa Access directly on options object 2017-01-06 09:17:32 -08:00
Kevin Sawicki
d200cf2e77 Document normalizeAccessKeys option 2017-01-06 08:56:24 -08:00
Kevin Sawicki
eb533e04b9 Add option to normalize dialog access keys 2017-01-06 08:56:24 -08:00
Weiqiang Lin
58fa8add31 Using Widevine CDM Plugin to zh-CN 2017-01-06 21:41:25 +08:00
Weiqiang Lin
34afa3b8a5 Using Pepper Flash Plugin to zh-CN 2017-01-06 21:40:36 +08:00
Weiqiang Lin
17ef05672b Using Selenium and WebDriver to zh-CN 2017-01-06 21:38:58 +08:00
gellert
c5fe173e47 adds autorelease to nsimage 2017-01-06 14:32:34 +01:00
gellert
456ea04683 adds mask image for smooth vibrant view corners 2017-01-06 14:26:16 +01:00
Haojian Wu
0e5fc9c4e4 Merge pull request #8343 from oukan/feature/translate-zh-CN
Debugging the Main Process to zh-CN
2017-01-06 08:32:42 +01:00
Weiqiang Lin
cf5689371a debugging-main-process-node-inspector to zh-CN 2017-01-06 10:02:44 +08:00
Kevin Sawicki
e788b9f959 Merge pull request #8258 from deepak1556/net_header_patch
net: disallow cookies from cookie store
2017-01-05 16:47:44 -08:00
Kevin Sawicki
d3d09ff25f Merge pull request #8347 from Rastaban/master
fix permissive C++ code (MSVC /permissive-)
2017-01-05 14:53:11 -08:00
Phil Christensen
2c259990da fix permissive C++ code (MSVC /permissive-)
These were found by the C++ compiler group when doing "Real world code"
build tests using /permissive-.  We are sharing these with you to help clean up
your code before the new version of the compiler comes out.  For more information on
/permissive- see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/.
In paticular, see the "Do not treat copy initialization as direct initialization"
section of the blog.
2017-01-05 09:38:41 -08:00
Weiqiang Lin
e2d60940a2 Debugging the Main Process to zh-CN 2017-01-05 14:49:07 +08:00
Weiqiang Lin
dc786996ef Debugging the Main Process in node-inspector to zh-CN 2017-01-05 14:47:39 +08:00
Weiqiang Lin
cc3ac9b1da Debugging the Main Process to zh-CN 2017-01-05 14:45:43 +08:00
Weiqiang Lin
431faf58ff Debugging the Main Process in VSCode to zh-CN 2017-01-05 14:43:17 +08:00
Weiqiang Lin
63ae55be2b Debugging the Main Process to zh-CN 2017-01-05 14:42:51 +08:00
Kevin Sawicki
14d6a70fa8 Merge pull request #8335 from liuderchi/i18n_zhTW_repl
translate repl.md into zh-TW
2017-01-04 09:00:06 -08:00
Kevin Sawicki
1ff6fc6491 Merge pull request #8326 from nicmitchell/copyright-year
Update copyright year in LICENSE file
2017-01-04 08:59:33 -08:00
Kevin Sawicki
a376d09be5 Merge pull request #8319 from oukan/feature/translate-zh-CN
application-distribution to zh-CN
2017-01-04 08:59:01 -08:00
liuderchi
02d7203b4f [ci skip] 📝 translate repl.md 2017-01-04 17:03:25 +08:00
liuderchi
e65cc8a245 [ci skip] 📝 copy repl.md source 2017-01-04 16:59:59 +08:00
Nic Mitchell
dc1eca14f0 Update copyright year in LICENSE file 2017-01-02 21:19:38 -08:00
Weiqiang Lin
0b7b2f5a57 Using Native Node Modules to zh-CN 2017-01-02 11:17:46 +08:00
Weiqiang Lin
6cff48112d application-distribution to zh-CN 2017-01-02 00:20:29 +08:00
Haojian Wu
fe0a577c8b Merge pull request #8318 from oukan/feature/translate-zh-CN
mac-app-store-submission-guide to zh-CN
2017-01-01 16:57:53 +01:00
Weiqiang Lin
91e93e6a5a mac-app-store-submission-guide to zh-CN 2017-01-01 20:44:06 +08:00
Weiqiang Lin
a1ef49c26f mac-app-store-submission-guide to zh-CN 2017-01-01 10:17:58 +08:00
Haojian Wu
339f4b8c31 Merge pull request #8313 from oukan/feature/translated-supported-platforms
translated supported platforms to zh-CN
2016-12-31 09:39:33 +01:00
Weiqiang Lin
406b0fdbcc no actual change 2016-12-31 16:36:20 +08:00
Zeke Sikelianos
349972368c Merge pull request #8312 from oukan/feature/translated-readme
add glossary page link to readme
2016-12-30 18:32:20 -08:00
Weiqiang Lin
4225524b6f . to 。 2016-12-31 09:50:41 +08:00
林伟强
aac916857d translated supported platforms to zh-CN 2016-12-30 23:58:54 +08:00
林伟强
25246c6db7 add glossary page link to readme 2016-12-30 23:51:25 +08:00
Haojian Wu
800689fc81 Merge pull request #8303 from ldehai/master
fix some expression
2016-12-30 16:00:34 +01:00
Andy
d9fbead8ca fix some expression 2016-12-30 22:50:44 +08:00
Haojian Wu
496c741513 Merge pull request #8311 from oukan/feature/process-translated
docs-translations API process Translated into zh-CN
2016-12-30 14:48:15 +01:00
林伟强
c392710802 s/./。 2016-12-30 17:48:48 +08:00
林伟强
b0886e2abf docs-translations API process Translated into zh-CN 2016-12-30 17:15:28 +08:00
林伟强
3d35f01bd1 docs-translations API process Translated into zh-CN 2016-12-30 10:45:39 +08:00
Kevin Sawicki
d86662cb80 Merge pull request #8309 from electron/optional-before-dash
Put optional label before dash
2016-12-29 15:51:39 -08:00
Kevin Sawicki
afa3bd2143 Put optional label before dash 2016-12-29 14:11:26 -08:00
Kevin Sawicki
196cb2dda4 Merge pull request #8306 from electron/link-to-offscreen-tutorial
Link to offscreen rendering tutorial
2016-12-29 13:33:06 -08:00
Kevin Sawicki
fc75080c28 Merge pull request #8298 from electron/configure-throttling-on-created-callback
Configure background throttling on RenderViewCreated callback
2016-12-29 13:31:09 -08:00
Kevin Sawicki
f8d41f1f68 Link to offscreen rendering tutorial 2016-12-29 09:15:28 -08:00
Kevin Sawicki
6ea1bacc73 Merge pull request #8250 from gerhardberger/osr-window-size-fix
Always create offscreen window frameless
2016-12-29 09:10:14 -08:00
Andy
6324270221 fix some expression 2016-12-29 21:53:53 +08:00
Kevin Sawicki
41afeb744a Configure background throttling on RenderViewCreated callback 2016-12-28 15:52:47 -08:00
Kevin Sawicki
219693d91f Merge pull request #8295 from electron/more-default-font-families
Support cursive/fantasy default font families
2016-12-28 13:42:35 -08:00
Kevin Sawicki
25c80f314b Merge pull request #8281 from abouthiroppy/fix-electron-jp-link
Fix electron-jp's link in README.md
2016-12-28 13:41:52 -08:00
Kevin Sawicki
5d505f9139 Support cursive/fantasy default font families 2016-12-28 13:40:53 -08:00
Kevin Sawicki
bc39964ece Merge pull request #8254 from electron/webcontents-will-navigate-crash
Don't load URL if web contents is destroyed
2016-12-28 13:40:31 -08:00
Kevin Sawicki
abea1196de Add spec for closing from will-navigate listener 2016-12-28 13:40:07 -08:00
Kevin Sawicki
1308f790ad Don't load URL if web contents is destroyed 2016-12-28 13:40:06 -08:00
Haojian Wu
095f304d7d Merge pull request #8284 from x-yao/zh-cn-docs
Add glossary.md in Simplified Chinese docs
2016-12-28 09:13:36 +01:00
x-yao
5a54d90d72 [ci skip]update glossary.md translation changes 2016-12-28 15:54:51 +08:00
x-yao
003fdd2382 Merge branch 'master' of github.com:electron/electron into zh-cn-docs 2016-12-28 15:47:24 +08:00
Zeke Sikelianos
5b9b33f32d Merge pull request #8285 from electron/update-glossary
📝 Fix a broken asar link.
2016-12-26 10:23:17 -08:00
x-yao
5ee3915c40 [ci skip]fixed glossary.md incorrect words 2016-12-26 17:57:20 +08:00
Haojian Wu
dcead89507 📝 Fix a broken asar link. 2016-12-26 10:28:08 +01:00
x-yao
6f2f3ed1ac Merge branch 'master' of github.com:electron/electron into zh-cn-docs 2016-12-26 12:03:00 +08:00
x-yao
738c8c047e [ci skip]add glossary.md in Simplified Chinese docs 2016-12-26 12:02:24 +08:00
abouthiroppy
d224f5d998 Fix electron-jp's link in README.md 2016-12-25 18:08:25 +09:00
Zeke Sikelianos
f8a9f628ae Merge pull request #7888 from electron/rename-webview-doc
Rename web-view to webview for consistency
2016-12-22 15:54:39 -08:00
Zeke Sikelianos
6995b51f2c set webview spec timeout to three minutes 2016-12-22 13:31:30 -08:00
Zeke Sikelianos
c989ea43f5 bump webview spec timeout to two minutes 2016-12-22 12:30:34 -08:00
Zeke Sikelianos
b0c4c79c49 remove unused webview fixture 2016-12-22 10:41:05 -08:00
Zeke Sikelianos
eb4038d626 more internal web-view reverting 2016-12-22 10:41:05 -08:00
Zeke Sikelianos
7562a8b662 revert renames of internal web-view stuff 2016-12-22 10:41:05 -08:00
Zeke Sikelianos
c75a1f08fd replace all web-view code with webview 2016-12-22 10:41:05 -08:00
Zeke Sikelianos
1085c28612 rename all web-view files to webview 2016-12-22 10:41:05 -08:00
Kevin Sawicki
eca9bffb01 Merge pull request #8269 from drewchandler/fix-clear-storage-data-docs
Use localstorage in clearStorageData docs
2016-12-22 10:07:31 -08:00
Drew Chandler
b28a865436 Use localstorage in clearStorageData docs
It won't work if you use include the space that is currently in the docs.
2016-12-22 09:51:39 -08:00
Kevin Sawicki
57d682a050 Merge pull request #8252 from electron/dialog-window-crash
Don't crash when window is closed by dialog callback
2016-12-22 09:34:07 -08:00
Kevin Sawicki
8c5f26373b Add override 2016-12-22 09:33:21 -08:00
Kevin Sawicki
87f09131aa Observe window and only use it when it is open 2016-12-22 09:33:21 -08:00
Kevin Sawicki
371b347ee9 Merge pull request #8268 from electron/update-production-variables
Move a couple env vars from development to production
2016-12-22 09:32:43 -08:00
Kevin Sawicki
ad2627b05a Move variables from development to production 2016-12-22 09:22:04 -08:00
Zeke Sikelianos
bb012c3db2 Merge pull request #8265 from thorbenegberts/patch-1
🐛 Fix link to Quick Start [ci skip]
2016-12-22 08:01:32 -08:00
x-yao
387dd67b60 [ci skip]fix chinese incorrect words 2016-12-22 17:10:27 +08:00
Thorben Egberts
b22eb0d65f Change Quick Start link from absolute to relative 2016-12-22 08:45:51 +01:00
Zeke Sikelianos
ec46d57816 Merge pull request #8267 from cesarandreu/patch-2
Fix a typo, there => their
2016-12-21 20:49:36 -08:00
Cesar Andreu
e296d4826f Fix a typo, there => their 2016-12-21 19:21:04 -08:00
Thorben Egberts
3cfe94c5ef Fixed link to Quick Start 2016-12-21 23:41:34 +01:00
gellert
7e82e12468 adds note to offscreen tutorial 2016-12-21 23:15:39 +01:00
gellert
f81908711b use only one if statement 2016-12-21 23:15:05 +01:00
Zeke Sikelianos
2b955a5ae1 Merge pull request #7878 from electron/glossary
Add a glossary of terms
2016-12-21 14:12:07 -08:00
Zeke Sikelianos
aeedd36168 see also 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
e57cb713b2 link process annotations to glossary 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
a098bf30d4 add DMG and NSIS to glossary 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
f1692f3274 lint to glossary from docs readme 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
a39dc1b78a 🎨 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
ead5275d63 fix heading level 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
4e8c21549b define process and webview 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
ed081c8834 WIP 2016-12-21 13:47:40 -08:00
Kevin Sawicki
f99dabbac6 Merge pull request #8078 from electron/dts-docs-update-again
Update Docs
2016-12-21 13:39:53 -08:00
Kevin Sawicki
707b1d1b79 Merge pull request #8207 from philwyett-hemi/rpm_dev
Doc updates related to Fedora and RHEL / CentOS
2016-12-21 13:38:09 -08:00
Kevin Sawicki
026711e750 Merge pull request #8249 from electron/nsscreens-crash
Use firstObject instead of objectAtIndex:0
2016-12-21 10:58:14 -08:00
Kevin Sawicki
b9f569f7fb Merge pull request #8248 from electron/secure-options
Add options to protocol.registerStandardSchemes docs
2016-12-21 09:40:30 -08:00
Kevin Sawicki
0a5f51fd03 Merge pull request #8259 from mawie81/fix-screen-docs
[Docs] fix link in screen docs
2016-12-21 09:40:13 -08:00
mawie81
d20e2ec349 [ci skip] fix link in screen docs 2016-12-21 09:43:47 +01:00
deepak1556
f9417e3fcc net: disallow cookies from the cookie store 2016-12-21 11:54:48 +05:30
deepak1556
41c352c306 add failing spec 2016-12-21 11:52:27 +05:30
gellert
1ef0f6beff creates offscreen window frameless 2016-12-20 23:43:52 +01:00
Kevin Sawicki
c70eb81e32 Use firstObject instead of objectAtIndex:0 2016-12-20 13:49:35 -08:00
Kevin Sawicki
38681d0a2b Bump v1.4.13 2016-12-20 10:37:16 -08:00
Kevin Sawicki
c5097ae483 Add options to protocol.registerStandardSchemes docs 2016-12-20 09:44:58 -08:00
Kevin Sawicki
5bb196dce3 Merge pull request #8240 from electron/fix-structures-link
fix relative link to CertificatePrincipal doc
2016-12-20 09:13:01 -08:00
Kevin Sawicki
cb47de5eca Merge pull request #8225 from Golasowski/docs-translations-cz
Create Czech translate
2016-12-20 09:09:39 -08:00
Kevin Sawicki
56a8e17b21 Merge pull request #8243 from x-yao/zh-cn-docs
[DOC] Add systemPreferences API Simplified Chinese translation
2016-12-20 09:09:01 -08:00
x-yao
e3b23842dd [ci skip]add net API Simplified Chinese translation 2016-12-20 17:03:32 +08:00
Zeke Sikelianos
12cb35ef61 Merge pull request #8242 from DustinX/patch-1
Corrected some grammatical errors
2016-12-19 20:05:28 -08:00
longbotao
2fb8839d31 [ci skip]add systemPreferences API Simplified Chinese translation 2016-12-20 12:03:59 +08:00
Zeke Sikelianos
6578498e31 Merge pull request #8229 from electron/do-not-recommend-yarn
do not recommend yarn
2016-12-19 20:03:51 -08:00
Dustin
2e1feb63e4 Corrected some grammatical errors 2016-12-19 19:01:35 -08:00
Zeke Sikelianos
9e626c5fee fix relative link to CertificatePrincipal doc 2016-12-19 13:49:02 -08:00
Kevin Sawicki
78a89c666b Merge pull request #8238 from electron/doc-links
Link to return class type
2016-12-19 10:48:27 -08:00
Kevin Sawicki
6352afb07a Link to return class type 2016-12-19 09:40:07 -08:00
Kevin Sawicki
683d8033f0 Merge pull request #8235 from x-yao/zh-cn-docs
[DOC]update electron-faq.md in  Simplified Chinese docs
2016-12-19 09:22:24 -08:00
longbotao
e2bb8088d4 [ci skip]update electron-faq.md in Simplified Chinese docs and fix a little words 2016-12-19 15:01:50 +08:00
Zeke Sikelianos
64116e5d7c do not recommend yarn 2016-12-17 20:35:06 -08:00
O.G.olasowski
219a6b175b Create README.md 2016-12-17 00:31:37 +00:00
Kevin Sawicki
2a8b36c761 Merge pull request #8134 from deepak1556/empty_client_certificate_patch
app: select-client-certificate event callback can accept certificate optionally
2016-12-15 08:31:12 -08:00
liusi
b853671132 fix fullscreen, maximize, unmaximize 2016-12-15 14:01:03 +08:00
Phil Wyett
2fbf560668 Commit...
* Update build instructions to correctly reflect python version on CentOS
  that has Python 2.6.
* Correct Fedora package install command. Fedora now uses 'dnf' not 'yum'.
* Add RHEL / CentOS section that does use 'yum' for package install.
2016-12-15 03:05:24 +00:00
Kevin Sawicki
cd067bca37 Merge pull request #8175 from gerhardberger/createfrombuffer-bitmap
Add bitmap support to nativeImage.createFromBuffer
2016-12-14 13:24:45 -08:00
Kevin Sawicki
98d4e186e3 Move details next to params 2016-12-14 10:19:38 -08:00
Kevin Sawicki
8680a08a8d Add deprecated comment to scaleFactor parameter 2016-12-14 10:18:01 -08:00
Kevin Sawicki
3b259b4243 Add createFromBuffer to planned breaking changes 2016-12-14 10:12:37 -08:00
Kevin Sawicki
25feb9232d Merge pull request #8143 from poiru/webcontents-before-input-event
Add before-input-event event for webContents (fixes #7586)
2016-12-14 10:05:32 -08:00
Kevin Sawicki
590bde5e14 Remove unused include 2016-12-13 16:00:37 -08:00
Kevin Sawicki
88dac36c91 Move footer link to bottom 2016-12-13 15:58:03 -08:00
Kevin Sawicki
7842040d9d Add ToV8 converter for NativeWebKeyboardEvent 2016-12-13 15:54:13 -08:00
Kevin Sawicki
3237c6751a Use DCHECK instead of assert 2016-12-13 15:54:13 -08:00
Kevin Sawicki
7a5ec96d53 Prevent input event from main process 2016-12-13 15:54:13 -08:00
Kevin Sawicki
5ae80d541b Remove will-navigate spec 2016-12-13 15:54:13 -08:00
Kevin Sawicki
25ac23ab17 Upgrade brightray 2016-12-13 15:54:13 -08:00
Birunthan Mohanathas
a3b65ad481 Add before-input-event event for webContents (fixes #7586)
Embedding arbitrary web content is problematic when it comes to keyboard
shortcuts because:

* Web content can steal app shortcuts (see e.g. brave/browser-laptop#4408)

* Blocked web content (e.g. a focused <webview> performing expensive
computation) will also prevent app shortcuts from firing immediately

The new before-input-event event can be used to overcome these issues by
always handle certain keyboard events in the main process.

Note that this requires electron/brightray#261 to compile.
2016-12-13 15:54:13 -08:00
gellert
9d2c9df992 adds empty bitmap test for createFromBuffer 2016-12-14 00:24:57 +01:00
gellert
7ceb8d1ab8 additional tests for createFromBuffer 2016-12-14 00:18:24 +01:00
gellert
a609e52a14 moves bitmap parameters to options object 2016-12-13 21:32:17 +01:00
gellert
39875c90f1 adds bitmap support to createFromBuffer 2016-12-13 21:32:17 +01:00
Kevin Sawicki
3290c6b335 Merge pull request #8201 from electron/docs-lint
Remove trailing spaces
2016-12-13 10:43:05 -08:00
Kevin Sawicki
0f93515ede Remove trailing spaces 2016-12-13 10:42:13 -08:00
Kevin Sawicki
dfc25d0ca5 Merge pull request #8199 from Casimodo/patch-2
Create quick-start.md
2016-12-13 08:30:57 -08:00
Kevin Sawicki
db0beb6c36 Merge pull request #8192 from rhysd/patch-1
Fixed a broken link in dialog.md [ci skip]
2016-12-13 08:30:28 -08:00
Casimodo
7b240d82fd Create quick-start.md 2016-12-13 15:50:23 +01:00
Linda_pp
704433f3d6 Fix broken link in dialog.md [ci skip] 2016-12-13 17:48:49 +09:00
Kevin Sawicki
8ae7d01d1a Merge pull request #8189 from electron/undefined-browser-window-in-dialog
Undefined browser causes error in dialog APIs
2016-12-12 16:44:16 -08:00
Kevin Sawicki
2bd8ef83d1 Use != null to handle undefined 2016-12-12 16:25:56 -08:00
Kevin Sawicki
c108088110 Test with some null/undefined windows 2016-12-12 16:25:14 -08:00
Kevin Sawicki
cb7715a572 Merge pull request #8187 from electron/optional-buttons
Allow buttons to be optional in 'showMessageBox'
2016-12-12 13:52:17 -08:00
Kevin Sawicki
2e1e893675 Merge pull request #8159 from seanchas116/devtools
Record JavaScript calls in DevTools timeline on Node/ipc callback
2016-12-12 13:50:42 -08:00
Kevin Sawicki
3796d7a6a1 Use trace event with zero args 2016-12-12 13:49:58 -08:00
Kevin Sawicki
b08bc02cde Merge pull request #8137 from deepak1556/media_device_id_patch
session: reset media device id salt when cookies are cleared
2016-12-12 13:34:24 -08:00
Kevin Sawicki
04e873f78e Make deviceIds const 2016-12-12 13:33:18 -08:00
Kevin Sawicki
04da9257ef Catch any close window errors 2016-12-12 13:32:27 -08:00
Kevin Sawicki
cae601a682 Upgrade brightray for media device salt fix 2016-12-12 13:31:08 -08:00
Kevin Sawicki
f2aabeefd5 Merge pull request #8085 from deepak1556/protocol_http_session_patch
protocol: support custom session with interceptHttpProtocol
2016-12-12 13:07:14 -08:00
Kevin Sawicki
1d288b69e2 Merge pull request #7947 from beakerbrowser/register-standard-secure-schemes
Add {secure:} opt to protocol.registerStandardSchemes
2016-12-12 12:52:28 -08:00
Kevin Sawicki
cac85d2a12 Remove linter errors 2016-12-12 12:51:48 -08:00
Kevin Sawicki
381f55b3cb Remove unneeded empty checks 2016-12-12 12:51:48 -08:00
Paul Frazee
04fa85f67f removed unused iostream include 2016-12-12 12:51:48 -08:00
Paul Frazee
bacf6511a6 remove unneeded deprecations couts 2016-12-12 12:51:48 -08:00
Paul Frazee
4e01ab59c1 fix documentation for planned breaking changes 2016-12-12 12:51:48 -08:00
Paul Frazee
a46040a4fa log deprecation notices for webframe 2016-12-12 12:51:48 -08:00
Paul Frazee
b458201874 add deprecation notices to webframe 2016-12-12 12:51:48 -08:00
Paul Frazee
99ea50649a finish implementation of {secure:true} opt on protocol.registerStandardScehesm, and add working test 2016-12-12 12:49:57 -08:00
Paul Frazee
9d2e23413e add {secure:} opt to protocol.registerStandardSchemes 2016-12-12 12:49:57 -08:00
Daniel Pham
4b53cd9c3c 🐛 Allow buttons to be optional in 'showMessageBox' 2016-12-12 13:25:32 -05:00
Kevin Sawicki
ee88e0054b Merge pull request #8186 from devjin0617/devjin0617-docs-browser-window-proxy
[Docs] Add translations of broswer-window-proxy in korean docs
2016-12-12 10:06:28 -08:00
Kevin Sawicki
e77fa72d6d Merge pull request #8167 from seanchas116/fix-modal-corner
🍎 Make sure no round corners for modal windows
2016-12-12 10:05:47 -08:00
Kevin Sawicki
2fa9ca1f6d Merge pull request #8156 from sindresorhus/remove-dock-window-level
🍎 Document that the `dock` window level is deprecated
2016-12-12 09:39:08 -08:00
Kevin Sawicki
a2d1a5258b Merge pull request #8178 from lgeiger/native-modules-prebuild
Add instructions for native modules using prebuild
2016-12-12 09:29:27 -08:00
Kevin Sawicki
009c00cdc6 Merge pull request #8177 from Geo1088/patch-1
[Docs] Fix list item number rendering in distribution tutorial
2016-12-12 09:28:46 -08:00
Kevin Sawicki
1a0fbf84f9 Merge pull request #8165 from geoff-addepar/geoff/fix-sandbox-printing
Fix printing with the sandbox enabled
2016-12-12 09:26:52 -08:00
cheongjin.kim
9ea391e03d Add translations of broswer-window-proxy in korean docs 2016-12-13 00:11:16 +09:00
Lukas Geiger
6bcf4b1112 📝 Add instructions for native modules using prebuild 2016-12-10 20:23:33 +01:00
George
82bd1d98d5 Indent tree structure to fix Markdown list number rendering 2016-12-10 11:14:10 -05:00
Kevin Sawicki
de625bfb65 Bump v1.4.12 2016-12-09 21:43:27 -08:00
Kevin Sawicki
c751d42d1a Merge pull request #8176 from electron/upgrade-libcc-for-ct-timebomb-patch
Upgrade libcc for CT timebomb patch
2016-12-09 19:24:59 -08:00
Kevin Sawicki
198f5f237f Upgrade libcc for CT timebomb patch 2016-12-09 10:47:09 -08:00
Kevin Sawicki
dc5b27069a Merge pull request #8107 from deepak1556/clear_auth_cache_patch
session: add api to clear http auth cache
2016-12-09 10:08:02 -08:00
Kevin Sawicki
6a829e0179 Throw error when options object is invalid 2016-12-09 10:07:04 -08:00
deepak1556
4085ba309a fix spec 2016-12-09 09:56:16 -08:00
deepak1556
975d677f55 add docs 2016-12-09 09:56:16 -08:00
deepak1556
21be9a3309 add spec 2016-12-09 09:55:55 -08:00
deepak1556
7456b9ae17 net: add api to set request flags for testing 2016-12-09 09:54:30 -08:00
deepak1556
35349643af session: api to clear auth cache 2016-12-09 09:54:30 -08:00
Kevin Sawicki
952e3bac2c Merge pull request #8061 from deepak1556/resume_download_api
session: api to resume canceled downloads from previous session
2016-12-09 09:39:14 -08:00
Kevin Sawicki
d705f4cbac Fix issue where actual/expected was same variable 2016-12-09 09:37:46 -08:00
deepak1556
5d94221c61 fix code style 2016-12-09 09:37:46 -08:00
deepak1556
f124732431 add spec 2016-12-09 09:37:46 -08:00
deepak1556
d944219b28 add docs 2016-12-09 09:37:46 -08:00
deepak1556
86961d0f44 session: add api to create interrupted downloads 2016-12-09 09:37:46 -08:00
Sindre Sorhus
3dde669ee8 🍎 Remove deprecated dock window level
According to the Apple docs, the `NSDockWindowLevel` constant is deprecated: https://developer.apple.com/reference/appkit/nsdockwindowlevel?language=objc
2016-12-09 12:46:49 +01:00
Ryohei Ikegami
ccdeb915fa 🍎 Make sure no round corners for modal windows 2016-12-08 12:12:53 +09:00
Geoff Lywood
5345b08d24 Fix printing with the sandbox enabled
Closes #7984
2016-12-07 17:40:18 -08:00
Kevin Sawicki
54d27a390b Merge pull request #8155 from salomvary/explain-macos-modal-sheet
Clarify modal windows being sheets on macOS
2016-12-07 10:29:42 -08:00
Kevin Sawicki
ba44dca34a Merge pull request #8158 from jdfwarrior/master
Add detail for the browserWindow argument in dialog docs
2016-12-07 10:28:34 -08:00
Kevin Sawicki
61d91579df Merge pull request #8157 from electron/post-data-example
Add simple postData example to docs
2016-12-07 10:28:00 -08:00
Kevin Sawicki
ea2e2def55 Bump v1.4.11 2016-12-07 08:53:58 -08:00
Ryohei Ikegami
a7a06a483e Record JavaScript calls in DevTools timeline on Node/ipc callback 2016-12-07 20:22:13 +09:00
deepak1556
388b601503 URLRequestFetchJob should report start error 2016-12-07 16:34:28 +05:30
deepak1556
2b8b76a527 protocol: support custom session with interceptHttpProtocol 2016-12-07 16:22:34 +05:30
deepak1556
cbddbdb296 fix code style 2016-12-07 15:33:56 +05:30
deepak1556
06701786c4 update docs 2016-12-07 13:26:06 +05:30
deepak1556
1c45285fe3 add spec 2016-12-07 13:26:06 +05:30
deepak1556
18c0cfa6f5 app: optionally pass cert with select-client-certificate event 2016-12-07 13:26:06 +05:30
David Ferguson
32ae3a52b8 add detail for the browserWindow argument in dialog docs 2016-12-06 22:23:14 -06:00
Kevin Sawicki
e198b6945c Add simple postData example 2016-12-06 16:49:22 -08:00
Kevin Sawicki
f1f73eff04 Merge pull request #8152 from electron/dont-show-window
Don't show window in specs
2016-12-06 13:54:55 -08:00
Márton Salomváry
9adb232d99 Clarify modal windows being sheets on macOS 2016-12-06 22:47:26 +01:00
Kevin Sawicki
63bffbc460 Don't show window 2016-12-06 13:25:46 -08:00
Kevin Sawicki
3e128abb73 Merge pull request #8144 from electron/from-devtools-webcontents-fix
Guard against missing devToolsWebContents
2016-12-06 11:05:16 -08:00
Kevin Sawicki
820fb3b82b Guard against no devtools web contents 2016-12-06 10:36:59 -08:00
Kevin Sawicki
03263bb5b6 Add failing BrowserWindow.fromDevToolsWebContents spec 2016-12-06 10:36:59 -08:00
Kevin Sawicki
b0a1e2988b Add spec for BrowserWindow.fromWebContents 2016-12-06 10:36:59 -08:00
Kevin Sawicki
571592a5a4 Merge pull request #8147 from electron/upgrade-libcc-for-linux-keyevent-fix
Upgrade libcc for Chrome 56 Linux key event fix
2016-12-06 10:36:25 -08:00
Kevin Sawicki
d1da48ff0f Upgrade libcc for Chrome 56 Linux key event fix 2016-12-06 09:55:22 -08:00
Kevin Sawicki
6c214ed386 Merge pull request #8148 from electron/clear-interval-before-done
Clear interval before done
2016-12-06 09:54:48 -08:00
Kevin Sawicki
b29f7b9acb Clear interval before assert 2016-12-06 09:25:55 -08:00
Kevin Sawicki
c2f516067f Add missing r in variable name 2016-12-06 09:22:29 -08:00
Kevin Sawicki
58cae1d8de Clear interval before destroying window 2016-12-06 09:22:08 -08:00
Kevin Sawicki
a9d4d9ad85 Merge pull request #8120 from electron/implement-window-methods-in-main-process
Implement window methods in main process
2016-12-05 09:29:11 -08:00
deepak1556
e043dabcb8 add spec 2016-12-04 00:22:57 +05:30
deepak1556
3de3fb53bd session: reset media device id salt when cookies are cleared 2016-12-03 16:44:33 +05:30
Kevin Sawicki
d6d85ade8e 🎨 Assign binding as const 2016-12-02 13:40:31 -08:00
Kevin Sawicki
1278e8cebc Remove unused variable 2016-12-02 13:40:31 -08:00
Kevin Sawicki
de0ec9b33c Tweak cancelId docs 2016-12-02 13:40:31 -08:00
Kevin Sawicki
3b99827540 Coerce features to string 2016-12-02 13:40:31 -08:00
Kevin Sawicki
635c909aab Implement window.alert/confirm/close in main process 2016-12-02 13:40:31 -08:00
Kevin Sawicki
f894da13b0 Pass args array instead of arguments object 2016-12-02 13:40:31 -08:00
Kevin Sawicki
c27633dff4 Merge pull request #8110 from electron/track-render-view-by-process-id
Don't clear until render view is deleted for process id
2016-12-02 13:40:20 -08:00
Kevin Sawicki
c1a02d6556 Add spec for render-view-deleted issue 2016-12-02 10:42:09 -08:00
Kevin Sawicki
ec43dd067c Co-locate with other private methods 2016-12-02 10:41:42 -08:00
Kevin Sawicki
f3d391e3f2 Don't clear until render view is deleted for process id 2016-12-02 10:41:42 -08:00
Kevin Sawicki
851f490168 Merge pull request #8123 from electron/dont-write-back-to-passed-options
Don't write back to passed in options object
2016-12-02 09:10:02 -08:00
Kevin Sawicki
07f99c06ea Don't write back to passed in options object 2016-12-01 17:16:18 -08:00
Kevin Sawicki
d0643250f7 Merge pull request #8122 from electron/use-spread-instead-of-apply
Use spread syntax instead of apply
2016-12-01 17:15:22 -08:00
Kevin Sawicki
f56b00718b Remove unused method 2016-12-01 14:56:00 -08:00
Kevin Sawicki
af555bd879 Use spread syntax instead of apply 2016-12-01 14:56:00 -08:00
Kevin Sawicki
b61e1fd69f Add spec for error on removing all IPC listeners 2016-12-01 14:56:00 -08:00
Kevin Sawicki
c8ff67ab75 Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
Kevin Sawicki
f72942bff1 Merge pull request #8121 from electron/add-basic-dialog-specs
Add basic dialog specs
2016-12-01 14:55:49 -08:00
Kevin Sawicki
36371357cd buttonLabel -> Button label for consistency 2016-12-01 14:16:33 -08:00
Kevin Sawicki
750bd9a88b Add initial dialog specs 2016-12-01 14:15:34 -08:00
Kevin Sawicki
5660b1e225 Merge pull request #8115 from ArisLittle/patch-1
fix typos
2016-12-01 08:25:39 -08:00
Zheng Guoli
acfded9687 fix typos
a more ‘允许’ word should be removed
2016-12-01 10:03:33 +08:00
Guerin
a9f4c208a0 Adding French translations for the documentation (#8097)
* Adding French translation of electron-versioning.md

* Adding French translation of security.md

* Fixing typos and rewriting some text

* Update security.md
2016-11-30 09:49:36 -08:00
Kevin Sawicki
bca7a6baa9 Merge pull request #8105 from electron/ci-build-scripts
Add Linux CI builds scripts
2016-11-30 09:44:46 -08:00
Kevin Sawicki
3cb3d8f981 Log build type 2016-11-30 09:32:20 -08:00
Kevin Sawicki
9904da9a48 Add initial arm specific cibuild script 2016-11-30 09:22:30 -08:00
Kevin Sawicki
8d9328fbee Merge pull request #8098 from electron/clean-up-specs
Unify spec timeouts
2016-11-30 09:06:37 -08:00
Kevin Sawicki
eaa5d071ef Remove unneeded timeout call 2016-11-29 16:27:18 -08:00
Kevin Sawicki
d86f0a1686 Add missing call to done 2016-11-29 14:52:47 -08:00
Kevin Sawicki
f0566f3790 isCi -> isCI 2016-11-29 14:48:28 -08:00
Kevin Sawicki
f5f790863d Use 1 or 2 minute timeout for long specs 2016-11-29 14:31:57 -08:00
Kevin Sawicki
10386edea5 Default timeout to 30 seconds on CI and 10 seconds locally 2016-11-29 14:29:35 -08:00
Kevin Sawicki
4ccc3d9fb3 Remove unneeded return 2016-11-29 14:19:20 -08:00
Kevin Sawicki
77fa7ce977 Run more crashReporter specs on CI 2016-11-29 14:18:42 -08:00
Kevin Sawicki
2c8ab72269 Merge pull request #8084 from poiru/systempreferences-setuserdefault
Add systemPreferences.setUserDefault for macOS
2016-11-29 14:07:35 -08:00
Kevin Sawicki
df179ed28d Merge pull request #8092 from poiru/setcursorautohide
Add BrowserWindow.setCursorAutoHide
2016-11-29 13:36:58 -08:00
Kevin Sawicki
3ec0e2f132 Add override to SetAutoHideCursor signature 2016-11-29 13:36:08 -08:00
Kevin Sawicki
477ac313ab Merge pull request #8086 from deepak1556/devtools_remove_workspace_patch
override window.confirm in devtools
2016-11-29 13:31:21 -08:00
Kevin Sawicki
72e559458f Inline buttons and cancelId values 2016-11-29 13:30:28 -08:00
Kevin Sawicki
21f0b2bd2a Merge pull request #8096 from electron/dont-use-skip
Don't use Mocha's skip method
2016-11-29 12:53:13 -08:00
Kevin Sawicki
cc2936cfdf closeWindow in an afterEach block 2016-11-29 12:30:40 -08:00
Kevin Sawicki
d20e664ea8 Close window in an afterEach 2016-11-29 12:13:33 -08:00
Kevin Sawicki
fee7683b86 Reuse window variable and only close from root afterEach 2016-11-29 11:52:31 -08:00
Kevin Sawicki
d7e7c2b17f Assert single window from closeWindow helper 2016-11-29 11:29:20 -08:00
Kevin Sawicki
1afa41477d Don't use this.skip() since after hooks won't be run 2016-11-29 10:56:58 -08:00
Kevin Sawicki
217848ca52 Assert windows are not leaking across tests 2016-11-29 10:56:17 -08:00
Birunthan Mohanathas
486b6b9096 Add systemPreferences.setUserDefault for macOS
This API can be used to e.g. enable key repeat by setting
`ApplePressAndHoldEnabled` to `false` (see also #47).
2016-11-29 09:46:32 -08:00
Birunthan Mohanathas
18c49285a8 Add BrowserWindow.setAutoHideCursor for macOS
The `disableAutoHideCursor` BrowserWindow option can be used to control
auto-hiding behavior when the window is created. This new API is needed
to dynamically change the behavior after the fact.
2016-11-29 09:46:00 -08:00
Kevin Sawicki
fb74f5576d Merge pull request #8082 from aaronang/doc-electron-resources
Clarify where Electron's resources directory can be found
2016-11-28 15:39:07 -08:00
Kevin Sawicki
4aa2b093ff Merge pull request #8072 from ramya-rao-a/doc-update
Clarifying crash reporter behviour in Mac
2016-11-28 15:37:21 -08:00
Kevin Sawicki
446065b88c Minor updates to crash reporter notes 2016-11-28 15:37:06 -08:00
Kevin Sawicki
594aaec7bb Merge pull request #7901 from electron/rename-auto-upload
Rename autoUpload to uploadToServer
2016-11-28 15:34:07 -08:00
Kevin Sawicki
07994f50f3 Remove include now included in parent header 2016-11-28 15:11:50 -08:00
Kevin Sawicki
1c6e166af5 Value should be true on non-macOS platforms 2016-11-28 15:08:28 -08:00
Kevin Sawicki
0b9a2f6be6 Add autoSubmit crashReporter option 2016-11-28 15:08:28 -08:00
Kevin Sawicki
0c73140b07 used -> called 2016-11-28 15:08:28 -08:00
Kevin Sawicki
02cbd24165 Mention setUploadToServer only has effect after start 2016-11-28 15:08:28 -08:00
Kevin Sawicki
f4be3782a2 Add spec for get/setUploadToServer 2016-11-28 15:08:28 -08:00
Kevin Sawicki
bb9876bd6e Remove deprecation warning for autoSubmit 2016-11-28 15:08:28 -08:00
Samuel Attard
2bf6f28152 shouldUpload --> uploadToServer 2016-11-28 15:08:28 -08:00
Samuel Attard
a7dedb3a13 Update crash_reporter.cc 2016-11-28 15:08:28 -08:00
Samuel Attard
4b61a4d3de Fix linting 2016-11-28 15:08:28 -08:00
Samuel Attard
285a36f9de Use GetUploadsEnabled to return GetShouldUpload 2016-11-28 15:08:28 -08:00
Samuel Attard
5a1a2616aa Fix build issues 2016-11-28 15:08:12 -08:00
Samuel Attard
0d1804b2a0 Fix issues and deprecate the old prop 2016-11-28 15:08:12 -08:00
Samuel Attard
0b9530efd7 shouldUpload API's are macOS only 2016-11-28 15:08:12 -08:00
Samuel Attard
6bbd92368f Add docs for getShouldUpload 2016-11-28 15:08:12 -08:00
Samuel Attard
7b8eb3e09c Rename autoUpload to shouldUpload 2016-11-28 15:08:12 -08:00
Kevin Sawicki
774b2f99f2 Merge pull request #8038 from electron/danhp/close-file-preview
Add 'win.closeFilePreview()'
2016-11-28 14:47:06 -08:00
Kevin Sawicki
a7395118af Merge pull request #7952 from the-ress/window-setappid
Added BrowserWindow.setAppDetails to set user model id, icon and relaunch command
2016-11-28 14:46:14 -08:00
Kevin Sawicki
3897a88082 Use skip for setAppDetails spec 2016-11-28 14:43:18 -08:00
Kevin Sawicki
0a61aad499 Add initial previewFile/closeFilePreview test 2016-11-28 14:32:15 -08:00
Kevin Sawicki
5abecadfd3 Tweak setAppDetails docs 2016-11-28 14:29:21 -08:00
Kevin Sawicki
fff59271af Initialize app icon index to 0 2016-11-28 14:26:30 -08:00
Daniel Pham
d5a0dd39a1 🎁 Add 'win.closeFilePreview()' 2016-11-28 14:25:11 -08:00
Kevin Sawicki
ccabee764b Bump v1.4.10 2016-11-28 12:50:12 -08:00
Kevin Sawicki
5283b94bf9 Merge branch 'access-url-through-web-contents' 2016-11-28 10:56:35 -08:00
Kevin Sawicki
6f6c5c07f0 Remove unintended returns 2016-11-28 10:56:23 -08:00
Kevin Sawicki
3a29555772 Access URL through webContents directly 2016-11-28 10:56:23 -08:00
Kevin Sawicki
145e40c2f6 Add more origin comparison specs 2016-11-28 10:56:23 -08:00
Kevin Sawicki
41dea03007 window.opener location should be webview src URL 2016-11-28 10:56:23 -08:00
deepak1556
3ac9858726 override window.confirm in devtools 2016-11-28 01:08:48 +05:30
Cheng Zhao
bbaab755e3 Merge pull request #8049 from electron/prevent-remove-all-ipc
Throw an error when users attempt to remove all listeners from the IPC modules
2016-11-27 14:29:49 +08:00
Cheng Zhao
8fd6463ab0 Merge pull request #8024 from pedro/handle-drop-mac-os-fix
Fix support for dragging urls in Mac
2016-11-27 14:24:35 +08:00
Aaron Ang
92fe82a208 📝 Clarify where Electron's resources directory can be found
[ci skip]
2016-11-26 00:44:08 +01:00
Samuel Attard
4ff7cf2bcc Update web-frame docs 2016-11-25 23:33:31 +11:00
Samuel Attard
f6a6ca8a22 Update cookies docs 2016-11-25 23:27:11 +11:00
Samuel Attard
c9615a201c Update app docs 2016-11-25 23:23:45 +11:00
Samuel Attard
921b474919 Fixup app and bw docs 2016-11-25 23:21:25 +11:00
Samuel Attard
06960704c4 Update docs for dts again 2016-11-25 23:17:31 +11:00
Ramya Achutha Rao
f8b738e6c2 Clarifying crash reporter behviour in Mac 2016-11-23 15:36:03 -08:00
Kevin Sawicki
b036fdfee0 Bump v1.4.9 2016-11-23 14:36:32 -08:00
Kevin Sawicki
3930f17d9d Merge pull request #8071 from electron/fix-doc-indentation
Fix indentation in menu template example
2016-11-23 14:36:18 -08:00
Kevin Sawicki
9eb521fb38 Fix indentation in menu template example 2016-11-23 14:34:55 -08:00
Kevin Sawicki
27625d2665 Merge pull request #8070 from electron/remove-unnecessary-escape-characters
Remove unnecessary escape characters
2016-11-23 14:31:32 -08:00
Kevin Sawicki
0593696344 Remove unnecessary escape characters 2016-11-23 14:27:54 -08:00
Kevin Sawicki
2cabfa5589 Merge branch 'check-sender-web-contents-access' 2016-11-23 12:30:25 -08:00
Kevin Sawicki
0134d62681 Always use guest contents for canAccessWindow check 2016-11-23 12:01:09 -08:00
Kevin Sawicki
0799317ff5 Add failing specs window.opener from <webview> opened window 2016-11-23 12:01:09 -08:00
Kevin Sawicki
686a26d948 Merge pull request #8065 from DanTheMan827/patch-1
Fixed language code for Aragonese
2016-11-23 09:10:48 -08:00
Kevin Sawicki
cd5bfbfead Sort by codes 2016-11-23 09:10:27 -08:00
Kevin Sawicki
9a7209d58e Merge pull request #8016 from the-ress/windows-lint
Fixed linting on Windows
2016-11-23 09:09:39 -08:00
DanTheMan827
f89a045605 Fixed language code to Aragonese 2016-11-23 09:21:27 -06:00
Zeke Sikelianos
a353a94b70 use new docs linter, remove cross-conf-env dep 2016-11-23 08:19:42 +01:00
Tereza Tomcova
5498a31493 Fixed linting on Windows 2016-11-23 08:18:46 +01:00
Zeke Sikelianos
6b34b97c29 Merge pull request #8057 from electron/fixup-docs-for-ts
Docs update
2016-11-22 19:18:37 -08:00
Samuel Attard
6a8ee19bf0 Docs update 2016-11-23 11:51:44 +11:00
Kevin Sawicki
cf690ae513 Merge pull request #7986 from salomvary/fix-before-quit-docs
Clarify docs on a `before-quit` behavior edge case
2016-11-22 16:51:26 -08:00
LuisHsu
cd8b7f5219 zh_TW translation of some tutorial document (#8054)
* 📝 zh_TW translation of tutorial

docs-translations/zh-TW/tutorial/debugging-main-process-
node-inspector.md

* 📝 zh_TW translation of tutorial

[ci skip]

debugging-main-process-vscode.md

* 📝 Translate zh_TW DE integration

desktop-environment-integration.md

* 📝 Translate zh_TW DE integration

[ci skip]
desktop-environment-integration.md
2016-11-22 15:59:28 -08:00
Kevin Sawicki
37b18243f4 Bump v1.4.8 2016-11-22 14:02:52 -08:00
Kevin Sawicki
e356168c9a Merge pull request #8047 from electron/fix-incorrect-window-size
Fix incorrect window size after restore on Windows
2016-11-22 14:01:50 -08:00
Kevin Sawicki
6f29d7211e Move restore/unmaximize specs near state ones 2016-11-22 13:32:39 -08:00
Kevin Sawicki
414db313c6 Merge pull request #8056 from electron/mocha-only-check
Check runner.hasOnly for focused spec check
2016-11-22 13:30:08 -08:00
Kevin Sawicki
63eec70350 Assert bounds when restoring 2016-11-22 13:22:30 -08:00
Kevin Sawicki
c0d9175bc3 Try specs without setTimeout calls 2016-11-22 13:14:17 -08:00
Kevin Sawicki
89965aa5db Check runner.hasOnly for focused spec check 2016-11-22 13:06:18 -08:00
Kevin Sawicki
238beb72ee Remove .only call 2016-11-22 11:41:02 -08:00
Zeke Sikelianos
6c046704c7 Merge pull request #8022 from electron/lint-required-and-optional-params
use updated docs linter with required param parsing
2016-11-22 10:47:32 -08:00
Zeke Sikelianos
5dc4b22d31 Merge pull request #7992 from electron/process-doc-followup
Process doc followup
2016-11-22 10:46:57 -08:00
Kevin Sawicki
95ab4815de Merge pull request #8041 from electron/webview-zoom-factor
Add new method to set layout-based zoom level limit
2016-11-22 09:08:00 -08:00
Kevin Sawicki
a7aed98d59 Add initial spec for zoom level limits 2016-11-22 08:43:14 -08:00
Kevin Sawicki
c4b68d88e9 Add setZoomLevelLimits to planned breaking changes 2016-11-22 08:11:14 -08:00
Kevin Sawicki
d4368fabb9 Add 2.0 comment about setZoomLevelLimits 2016-11-22 08:09:14 -08:00
Kevin Sawicki
9a5df9da41 Expose setVisualZoomLevelLimits on webContents and <web-view> 2016-11-22 08:07:55 -08:00
Kevin Sawicki
756a338b05 Document webFrame.setVisualZoomLevelLimits as public 2016-11-22 08:03:04 -08:00
Kevin Sawicki
e887fb69bd Export a setVisualZoomLevelLimits method 2016-11-22 07:53:02 -08:00
Kevin Sawicki
fb5bca8bc5 Merge pull request #8046 from electron/bengotow/url-schemes-docs-patch
Update open-url docs to mention NSPrincipalClass
2016-11-22 07:50:13 -08:00
Kevin Sawicki
0d317a2e49 Add backticks around Info.plist 2016-11-22 07:49:56 -08:00
Kevin Sawicki
77e317c1eb Merge pull request #8043 from electron/crash-reporter-docs
crash-reporter -> crashReporter
2016-11-22 07:49:11 -08:00
Samuel Attard
db729b5b52 Throw an error when users attempt to remove all listeners from the IPC modules 2016-11-22 18:30:58 +11:00
Samuel Attard
97b4f12112 Fix linting issues 2016-11-22 16:13:08 +11:00
Samuel Attard
926cabec78 Add spec for maximize restore positioning 2016-11-22 16:07:19 +11:00
Samuel Attard
621a934160 Fix maximize --> unmaximize positioning issue 2016-11-22 16:07:05 +11:00
Samuel Attard
c65033a13b Revert "incorrect position when restored from maximize-on-top-drag under Windows #7630"
This reverts commit a2b3abbf47.
2016-11-22 15:49:56 +11:00
Samuel Attard
67f33cdb60 Add failing spec for window size after restore 2016-11-22 15:49:47 +11:00
Ben Gotow
964c88a189 Update open-url docs to mention NSPrincipalClass
We got bit by a nasty bug today - if you change your app's info.plist `NSPrincipalClass` to something other to `AtomApplication` (We set it to NylasApplication via a bad find-replace), everything works except open-url is never fired. Add a small reference to the docs so folks know to check this key.
2016-11-21 16:55:18 -08:00
Kevin Sawicki
62b39d58ca crash-reporter -> crashReporter 2016-11-21 15:42:24 -08:00
Paul Betts
3e85d7759b 📝 2016-11-21 15:16:13 -05:00
Paul Betts
7445f9bdcc Lint 2016-11-21 15:13:34 -05:00
Paul Betts
e2649ce7d8 Add new method to set layout-based zoom level limit 2016-11-21 14:59:55 -05:00
Kevin Sawicki
71f94c7a3a Merge pull request #8030 from LuisHsu/master
zh_TW translation of tutorial docs
2016-11-21 09:53:25 -08:00
Kevin Sawicki
41d6207376 Merge pull request #8027 from bowbowbow/patch-1
Fix missed parameter in example.
2016-11-21 09:51:44 -08:00
Kevin Sawicki
82d17cb05d Merge pull request #7993 from electron/get-user-default-crash
Prevent systemPreferences.getUserDefault crash for missing arrays/dictionaries
2016-11-21 09:50:37 -08:00
Kevin Sawicki
26137977cd Fix crash when return value pointer is null 2016-11-21 09:22:30 -08:00
Kevin Sawicki
cbffd598f9 Add failing spec for unknown user defaults 2016-11-21 09:22:30 -08:00
Kevin Sawicki
2e35b1c855 Merge pull request #7776 from electron/zoom-to-web-contents-size
Add zoomToPageWidth window option
2016-11-21 09:21:55 -08:00
Kevin Sawicki
ea6b53578f Mention preferred size 2016-11-21 08:45:46 -08:00
Kevin Sawicki
2fc46f638f 🎨 2016-11-21 08:45:46 -08:00
Kevin Sawicki
a991570677 intrinsicWidth -> pageWidth 2016-11-21 08:45:46 -08:00
Kevin Sawicki
d4ba5b4638 Add spec for zoomToPageWidth 2016-11-21 08:45:46 -08:00
Kevin Sawicki
b02c0e6f46 Remove unneeded proportion calculation 2016-11-21 08:45:46 -08:00
Kevin Sawicki
7916981da2 zoomToContentSize -> zoomToPageWidth 2016-11-21 08:45:46 -08:00
Kevin Sawicki
7896ee23a2 Document zoomToContentSize 2016-11-21 08:45:46 -08:00
Kevin Sawicki
c5790e39dc Add support for zooming to content size 2016-11-21 08:45:46 -08:00
Zeke Sikelianos
8bc3dcd17a Merge pull request #8031 from muryoimpl/fix-broken-link-in-api-dialog
Fix typo in docs/api/dialog
2016-11-20 17:54:47 -08:00
muryoimpl
eab5376c25 Fix typo 2016-11-21 00:49:11 +09:00
LuisHsu
56b15eadea 📝 zh_TW of tutorial/accessibility.md
[ci skip]

 * Translate tutorial/about.md
2016-11-20 22:35:32 +08:00
LuisHsu
61c31f8e21 📝 zh_TW translation of tutorial/about.md
[ci skip]

1. Translate tutorial/about.md

2. Fix some broken links

3. Untranslated links are keep in English
2016-11-20 22:01:43 +08:00
bowbowbow
8918770892 I modified missed parameter in example.
Below example (in line 43 ~ 45) not working like comment. Because `ipcRenderer` callback function have two parameters (event, arg).

```javascript
ipcRenderer.on('asynchronous-reply', (arg) => {
  console.log(arg) // "pong" 출력
})
```
2016-11-20 21:30:50 +09:00
Pedro Belo
89e8ad4947 Fix support for dragging urls in Mac 2016-11-19 21:18:24 -08:00
Zeke Sikelianos
94988f89b0 use updated docs linter with required param parsing 2016-11-19 11:34:19 -08:00
Tereza Tomcova
b305020c1d Added documentation for BrowserWindow.setAppDetails 2016-11-18 21:43:03 +01:00
Tereza Tomcova
782417b1fa Added tests for BrowserWindow.setAppDetails 2016-11-18 21:34:01 +01:00
Tereza Tomcova
38b14fc912 Include shell.h only for Windows 2016-11-18 21:33:55 +01:00
Tereza Tomcova
ac9e0b458d Added BrowserWindow.setAppDetails to set user model id, icon and relaunch command 2016-11-18 21:33:55 +01:00
Zeke Sikelianos
d6e3360aef Merge pull request #8009 from deed02392/master
Update docs
2016-11-18 08:33:24 -08:00
deed02392
1ee0efbe5c Merge pull request #1 from deed02392/patch-1
Patch 1
2016-11-18 00:38:24 +00:00
George Hafiz
aac31159b8 Update formatting to prevent '[] ()' sequences (e.g. String[] (optional)), which breaks MD rendering on GitHub and hides the array indication 2016-11-18 00:34:48 +00:00
deed02392
0aa1c3c6c3 Update dialog.md
Fix syntax to support docs parser and MD.
2016-11-17 22:39:24 +00:00
Kevin Sawicki
02a95a3eba Merge pull request #7981 from electron/more-menu-item-roles
Add reload and toggledevtools menu item roles
2016-11-17 13:04:13 -08:00
Kevin Sawicki
996ddba715 Add rpc error for ELECTRON_BROWSER_MEMBER_GET 2016-11-17 12:29:23 -08:00
Kevin Sawicki
88809b0e0b Document reload and toggledevtools roles 2016-11-17 10:57:20 -08:00
Kevin Sawicki
88959079bd Add toggledevtools menu item role 2016-11-17 10:57:20 -08:00
Kevin Sawicki
0698b5f1be Add reload menu item role 2016-11-17 10:57:20 -08:00
Kevin Sawicki
28c39d5151 Merge pull request #8003 from electron/missing-remote-object-error
Throw custom error when remote object is missing from registry
2016-11-17 10:57:03 -08:00
Kevin Sawicki
5427ec4844 Negate code as per node docs 2016-11-17 10:22:29 -08:00
Kevin Sawicki
aef898ad93 Set errno on RPC error 2016-11-17 10:09:29 -08:00
Kevin Sawicki
c05ca68811 Throw custom error when remote object is missing from registry 2016-11-17 09:55:13 -08:00
deed02392
489d873306 Update dialog.md
Fix 'properties' type in documentation (was missing `[]` notation due to lack of Markdown escaping).
2016-11-17 07:36:37 +00:00
Cheng Zhao
3834f0c6a6 Merge pull request #7974 from electron/chrome-runtime-response-callback
Implement chrome.runtime.onMessage response callback
2016-11-17 13:01:38 +09:00
Samuel Attard
7c26ec8bd4 Remove semicolon 2016-11-17 14:56:44 +11:00
Cheng Zhao
eb63bea87c Merge branch 'gabriel-master' 2016-11-17 12:15:38 +09:00
Cheng Zhao
5639faf069 Also fix the Windows and Linux side of async openExternal 2016-11-17 12:13:07 +09:00
Cheng Zhao
090a5d9a61 platform_util code should not involve V8 code 2016-11-17 11:22:09 +09:00
Cheng Zhao
622bad1cff Simplify getting callback 2016-11-17 10:36:16 +09:00
Gabriel Handford
5b260dbee3 Fix win/linux compile (again) 2016-11-17 10:33:24 +09:00
Gabriel Handford
f0ca9dff81 Fix win/linux compile 2016-11-17 10:33:24 +09:00
Gabriel Handford
9382d48708 Update docs 2016-11-17 10:33:24 +09:00
Gabriel Handford
54222bdf28 More general string for OSStatus 2016-11-17 10:33:24 +09:00
Gabriel Handford
2931c27395 More readable 2016-11-17 10:33:24 +09:00
Gabriel Handford
31123f908d Fix ternary 2016-11-17 10:33:24 +09:00
Gabriel Handford
99a5258999 Callback uses (platform specific) error, with message 2016-11-17 10:33:24 +09:00
Gabriel Handford
5e8059e0fa Fix method names, move to anon namespace 2016-11-17 10:33:24 +09:00
Gabriel Handford
08a9af3a85 Linting 2016-11-17 10:33:24 +09:00
Gabriel Handford (linux)
d186fd78e3 Fix header 2016-11-17 10:33:23 +09:00
Gabriel Handford
6524a33ffc Include callback header 2016-11-17 10:33:23 +09:00
Gabriel Handford
21df08d536 Remove redundant comment 2016-11-17 10:33:23 +09:00
Gabriel Handford
cfd2a029ad Fix linting 2016-11-17 10:33:23 +09:00
Gabriel Handford
c78567aba6 Update shell openExternal docs (from review) 2016-11-17 10:33:23 +09:00
Gabriel Handford
9ca684d87f Remove redundant method 2016-11-17 10:33:23 +09:00
Gabriel Handford
128feb17cb Fix method call 2016-11-17 10:33:23 +09:00
Gabriel Handford
3eb5f8d521 Fix typo 2016-11-17 10:33:23 +09:00
Gabriel Handford
b266533dfc Shell openExternal can take optional callback (macOS) 2016-11-17 10:33:23 +09:00
Zeke Sikelianos
1b5b29901c Merge pull request #7969 from electron/one-file-per-api
move each API doc into its own file
2016-11-16 11:12:36 -08:00
Zeke Sikelianos
468d8b7707 reference node's process object 2016-11-16 09:54:29 -08:00
Zeke Sikelianos
1da97f729e process object is available in renderer processes too 2016-11-16 09:54:19 -08:00
Zeke Sikelianos
f9683ff99f use unreleased linter 2016-11-16 09:03:17 -08:00
Zeke Sikelianos
a7fdd04751 move menu constructor docs to top of file 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
5979dab13c fix some class headings 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
c9739abf7f add description and process for BrowserWindow class 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
39330affda DownloadItem only needs one heading 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
d6684c4dcd fix UploadBlob heading 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
4770d2b526 returns an instance, not the module 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
2b689a21e7 fix structure headings 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
b084dc29ea move each API doc into its own file 2016-11-16 09:02:49 -08:00
Kevin Sawicki
c4d74c48e4 Bump v1.4.7 2016-11-16 08:11:28 -08:00
Kevin Sawicki
436775b1e4 Merge branch 'opener-origin-check' 2016-11-16 08:10:18 -08:00
Kevin Sawicki
aa2824621a Make scheme const 2016-11-16 08:03:07 -08:00
Kevin Sawicki
651eaec64f Use sender.id instead of sender.webContents.id 2016-11-16 07:50:30 -08:00
Kevin Sawicki
92577c37c8 Don't log blocked messages when guestWindow is null 2016-11-16 07:50:30 -08:00
Kevin Sawicki
04c68745db Always call done callback in before block 2016-11-16 07:50:30 -08:00
Cheng Zhao
81f2e76e36 Fix standard linting errors 2016-11-16 07:50:30 -08:00
Cheng Zhao
18fca785c4 Print error messages 2016-11-16 07:50:30 -08:00
Cheng Zhao
a1066617a8 Do permission check when calling guest window methods 2016-11-16 07:50:30 -08:00
Cheng Zhao
a1dfdbdde4 spec: Should check origin before accessing window.opener 2016-11-16 07:50:30 -08:00
Kevin Sawicki
63a138b6de Merge pull request #7980 from electron/guard-against-missing-members
Guard against missing members in setObjectMembers
2016-11-16 07:46:42 -08:00
Kevin Sawicki
5167ccd147 Guard against missing members in setObjectMembers 2016-11-16 07:45:34 -08:00
Kevin Sawicki
cb0845fc49 Merge pull request #7979 from electron/credits-attributed-string
Convert about credits to NSAttributedString
2016-11-16 07:45:07 -08:00
Kevin Sawicki
11449b2e8c Convert about credits to NSAttributedString 2016-11-16 07:42:24 -08:00
Kevin Sawicki
bee5ced8f4 Merge pull request #7978 from electron/memoize-no-asar-env-check
Memoize ELECTRON_NO_ASAR env var check
2016-11-16 07:41:48 -08:00
Kevin Sawicki
bea1a0643c Memoize ELECTRON_NO_ASAR env var check 2016-11-16 07:37:53 -08:00
Kevin Sawicki
f111bb4107 Merge pull request #7989 from electron/pin-electron-docs-linter
Pin electron-docs-linter version
2016-11-16 07:37:08 -08:00
Kevin Sawicki
f20ca63dd0 Pin electron-docs-linter to 1.14.1 2016-11-16 07:33:36 -08:00
Márton Salomváry
98e18a62e2 Clarify docs on a before-quit behavior edge case
See #7875
2016-11-16 10:38:57 +01:00
Kevin Sawicki
9624bc1403 Merge pull request #7917 from voidbridge/feature/expose-cert-chain
Expose whole certificate chain to verify proc
2016-11-15 16:37:58 -08:00
Kevin Sawicki
fc1ce3eeab Assert certs further up the chain 2016-11-15 16:32:12 -08:00
Kevin Sawicki
095d711848 Remove select-client-certificate issueCert assert 2016-11-15 16:24:50 -08:00
Kevin Sawicki
a1dca8afc9 🎨 Remove buildup asserts and just use assert.equal 2016-11-15 15:53:42 -08:00
Greg Nolle
86321a2c60 Fixed incorrect subject name of test client certificate. 2016-11-15 15:53:42 -08:00
Greg Nolle
2e5c92d41e Fix listing issues: remove semicolons. 2016-11-15 15:53:42 -08:00
Greg Nolle
f767f0f048 Remove unnecessary ConvertToV8 calls. 2016-11-15 15:53:42 -08:00
Greg Nolle
93ce2f7800 Add assertions for new fields in existing specs. 2016-11-15 15:53:42 -08:00
Greg Nolle
5d028f9163 Expose extra certificate information: full breakdown of issuer and subject principals, as well as full structure of intermediate issuer certificates. 2016-11-15 15:53:42 -08:00
Greg Nolle
446399c3c1 Expose whole certificate chain to verify proc and certificate-error event. 2016-11-15 15:53:42 -08:00
Kevin Sawicki
0ef6d4631d Merge pull request #7658 from figma/webview-manual-guest-resize
Allow webview guests to be resized manually
2016-11-15 14:21:56 -08:00
Kevin Sawicki
b87d86e9d5 Merge pull request #7982 from kirly-af/kirly-af-tray-example-fix
[ci skip] Correct Linux limitation example
2016-11-15 14:19:03 -08:00
Kevin Sawicki
35e000024c Minor doc updates to setSize/disableguestresize 2016-11-15 13:59:01 -08:00
Kevin Sawicki
9e51c779e1 Assert expected height 2016-11-15 13:54:25 -08:00
Alexandre
6f8eb282b7 [ci skip] Correct Linux limitation example 2016-11-15 21:53:54 +01:00
Kevin Sawicki
301b8ec39a Merge pull request #7962 from liusy182/disable-accelerator
disable accelerator when menu item is disabled
2016-11-15 11:05:36 -08:00
Birunthan Mohanathas
2986b7bc4a Allow webview guests to be resized manually
This adds the `disableguestresize` property for webviews to prevent the
webview guest from reacting to size changes of the webview element. This
also partially documents the `webContents.setSize` function in order to
manually control the webview guest size.

These two features can be combined to improve resize performance for
e.g. webviews that span the entire window. This greatly reduces the lag
described in #6905.
2016-11-15 11:00:09 -08:00
张树源
89feefac2c update app.md Chinese translation to latest version (#7973)
* Update Chinese translation to latest version.

* Update app.md translation

* update app.md Chinese translation to latest version.
2016-11-15 10:04:00 -08:00
Kevin Sawicki
68a6b39920 Merge pull request #7971 from electron/modify-install-docs
make npm install instructions more prominent
2016-11-15 10:03:23 -08:00
Kevin Sawicki
eeffa42513 Merge pull request #7923 from jhen0409/patch-1
Add support remove / clear for chrome.storage
2016-11-15 09:04:45 -08:00
Jhen
8b30439d7f Update devtools extension spec for chrome.storage 2016-11-15 19:58:08 +08:00
Samuel Attard
01005688b6 Implement chrome.runtime.onMessage response callback 2016-11-15 21:30:40 +11:00
liusi
00d9baa605 fix linting error 2016-11-15 13:23:59 +08:00
liusi
9e91f319c1 fix linting error 2016-11-15 13:19:34 +08:00
Kevin Sawicki
619bb31de2 Merge pull request #7972 from electron/macos-10-11-constants
Use visual effect values directly since enums are 10.11+
2016-11-14 17:04:55 -08:00
Kevin Sawicki
dcb3a13361 Use values directly since constants are 10.11+ 2016-11-14 16:43:05 -08:00
Kevin Sawicki
c2663e48c1 Merge pull request #7967 from veleek/patch-1
Update electron-squirrel-startup link
2016-11-14 15:46:34 -08:00
Zeke Sikelianos
621715e5e5 link to more relevant yarn doc 2016-11-14 13:57:12 -08:00
Zeke Sikelianos
b9991f0494 make npm install instructions more prominent 2016-11-14 13:52:07 -08:00
Ben Randall
c259b4294d Update electron-squirrel-startup link
The currently link points to a non-existent page.  I'm pointing it to another link that seems to be appropriate, but I'm not positive.
If someone else knows that this is the correct place to link that would be nice to hear.
2016-11-14 10:16:24 -08:00
Kevin Sawicki
4867475cee Merge pull request #7540 from deepak1556/form_post_new_window_patch
webContents: handle POST navigation for new windows
2016-11-14 07:39:54 -08:00
Kevin Sawicki
8822c7d87d Merge pull request #7958 from jhen0409/patch-2
Add Redux DevTools Extension to support list
2016-11-14 07:32:53 -08:00
liusi
06cfcd612d disable accelerator when menu item is disabled 2016-11-14 12:29:27 +08:00
Jhen
1404ea1c2c Add Redux DevTools Extension to support list 2016-11-14 00:32:31 +08:00
deepak1556
4deb7c6fa7 fix lint error 2016-11-12 07:16:48 +05:30
Kevin Sawicki
b9e950f5c7 Mark postData as optional 2016-11-12 07:15:21 +05:30
Kevin Sawicki
134f8afbe6 Add specs for content type on POST forms 2016-11-11 10:54:01 -08:00
Kevin Sawicki
50019f39e9 🎨 2016-11-11 10:54:01 -08:00
deepak1556
5f596b22c7 specify content type depending on post data 2016-11-11 10:54:01 -08:00
Kevin Sawicki
cbb68f6980 Remove quotes around key 2016-11-11 10:54:01 -08:00
deepak1556
61576c39be uploadData => uploadRawData 2016-11-11 10:54:01 -08:00
deepak1556
9536ebc0ad fix build error 2016-11-11 10:54:01 -08:00
deepak1556
723a3eda8b update docs 2016-11-11 10:54:01 -08:00
deepak1556
a5fd6507a9 set default values in converter 2016-11-11 10:54:01 -08:00
deepak1556
dbe57c4ad4 update docs 2016-11-11 10:54:01 -08:00
deepak1556
ad5f944185 add spec 2016-11-11 10:53:36 -08:00
deepak1556
2044208fd6 add docs 2016-11-11 10:53:36 -08:00
deepak1556
2d7ceae320 fix js lint error 2016-11-11 10:53:00 -08:00
deepak1556
0410a184ce webContents: handle POST navigation for new windows 2016-11-11 10:53:00 -08:00
Kevin Sawicki
7cfe1dd0af Merge pull request #7946 from electron/move-footer-links-to-bottom
Move footer links to bottom
2016-11-11 10:23:03 -08:00
Kevin Sawicki
4de2493d89 Move footer links to bottom 2016-11-11 10:22:27 -08:00
Jhen
b86dff45d7 Add support remove / clear for chrome.storage 2016-11-12 02:16:51 +08:00
Zeke Sikelianos
fb8339830e Merge pull request #7945 from electron/add-process-to-content-tracing-doc
add process to contentTracing doc
2016-11-11 10:09:07 -08:00
Zeke Sikelianos
ec7cae4a34 add process to contentTracing doc 2016-11-11 10:07:36 -08:00
Zeke Sikelianos
80a7835cdf Merge pull request #7884 from electron/optional-things
Update docs to correctly identify props and params that are optional
2016-11-11 09:47:31 -08:00
Zeke Sikelianos
50be8b65d1 update docs linter 2016-11-11 09:22:55 -08:00
Samuel Attard
174e51507d Update menu.md 2016-11-11 09:22:55 -08:00
Samuel Attard
494afec01d remote require could resolve to strings/numbers not just objects 2016-11-11 09:22:55 -08:00
Samuel Attard
aeefee7348 Fix the download-item doc so it correctly resembles a class 2016-11-11 09:22:55 -08:00
Samuel Attard
c1af62a3b3 Move crash-report object to it's own struct 2016-11-11 09:22:55 -08:00
Samuel Attard
11f8923c43 Fix tray and menu docs 2016-11-11 09:22:55 -08:00
Samuel Attard
63ebc41778 More docs updates 2016-11-11 09:22:55 -08:00
Samuel Attard
1a9b4b4671 First few docs made optional 2016-11-11 09:22:55 -08:00
Kevin Sawicki
8a29604f1e Merge pull request #7944 from electron/autorelease-effect-view
Autorelease NSVisualEffectView
2016-11-11 09:05:32 -08:00
Kevin Sawicki
483e007b69 🎨 2016-11-11 08:51:33 -08:00
Kevin Sawicki
2d8a61a775 autorelease NSVisualEffectView 2016-11-11 08:51:29 -08:00
gellert
5e62d28e50 adds test, adds view to AtomNSWindow and minor fixes 2016-11-11 08:49:57 -08:00
gellert
2cf30c0d63 remove method transferred to set with null 2016-11-11 08:49:57 -08:00
gellert
16253fe708 doc fixes 2016-11-11 08:49:57 -08:00
gellert
84a3fe50dc little fix in docs 2016-11-11 08:49:57 -08:00
gellert
8ad50d1e35 adds vibrancy effect for macos 2016-11-11 08:49:57 -08:00
Zeke Sikelianos
ad638097b6 Merge pull request #7933 from joshaber/patch-1
Update external frameworks version
2016-11-11 07:43:35 -08:00
liusi
356d0520ae fix linting error 2016-11-11 17:57:22 +08:00
joshaber
999b349e94 Docit 2016-11-10 13:35:56 -05:00
Kevin Sawicki
76375a83eb Merge pull request #7925 from mrxf/patch-5
Modify the error terms
2016-11-10 09:34:14 -08:00
Kevin Sawicki
ea534aa564 Merge pull request #7922 from mrxf/patch-4
Modify some translation errors
2016-11-10 09:33:55 -08:00
Kevin Sawicki
055e49ab9c Merge pull request #7921 from mrxf/patch-3
fix some translation problems
2016-11-10 09:33:04 -08:00
Josh Abernathy
0d43e239d4 Update to version 1.2.0 of external frameworks. 2016-11-10 11:33:01 -05:00
张树源
c04a0381dc Modify the error terms
There is an error in the translation of the last sentence.It may make reader confuse.
2016-11-10 14:42:41 +08:00
张树源
5cebe65310 Modify some translation errors 2016-11-10 11:13:54 +08:00
张树源
ab5a49b6ae fix some translation problems
update translation.
2016-11-10 10:29:43 +08:00
Kevin Sawicki
7b463297c6 Merge pull request #7908 from deepak1556/about_scheme_patch
protocol: register about scheme handler
2016-11-09 16:13:27 -08:00
Kevin Sawicki
debdce1e66 Bump v1.4.6 2016-11-09 11:59:25 -08:00
Kevin Sawicki
8a2706d2f4 Merge pull request #7906 from electron/upgrade-chrome-53
Upgrade to Chrome 53.0.2785.143
2016-11-09 11:49:33 -08:00
Kevin Sawicki
709dd0bf18 Upgrade to Chrome 53.0.2785.143 2016-11-09 11:03:44 -08:00
Kevin Sawicki
de78f3441e Merge pull request #7916 from thompsonemerson/patch-7
add link for powerSaveBlocker | pt-br
2016-11-09 08:28:21 -08:00
Emerson Thompson
f23624755e add link for powerSaveBlocker | pt-br 2016-11-09 13:25:24 -03:00
Kevin Sawicki
0c265f8ed4 Merge pull request #7912 from mrxf/patch-2
Update translation
2016-11-09 08:17:59 -08:00
Kevin Sawicki
c1f2e30c5a Merge pull request #7910 from mrxf/patch-1
update simplified Chinese translation
2016-11-09 08:17:31 -08:00
Kevin Sawicki
3b415b2e99 Merge pull request #7907 from thompsonemerson/patch-5
power-save-blocker.md file translation
2016-11-09 08:16:20 -08:00
张树源
bea9f78ddb Update translation
change link to a simple Chinese page.
2016-11-09 18:29:49 +08:00
张树源
95484a1b1a 修改翻译不完善部分
完善翻译内容
2016-11-09 16:53:53 +08:00
deepak1556
a0065e62fa add about: protocol handler 2016-11-09 13:22:58 +05:30
deepak1556
3aab713d24 add failing spec 2016-11-09 11:00:50 +05:30
Emerson Thompson
5d6f180413 power-save-blocker.md file translation 2016-11-08 14:51:53 -03:00
liusi
a69ee76705 fix review comments 2016-11-08 15:36:37 +08:00
Kevin Sawicki
7971ce0dd9 Merge pull request #7895 from electron/windows-symbol-server
Update Windows symbols server URL
2016-11-07 15:14:53 -08:00
Lee Dohm
4159a6a41d Merge pull request #7900 from electron/more-license-clarification
More license section clarification and update copyright year
2016-11-07 14:57:46 -08:00
Lee Dohm
e49af23a7d Add copyright range of 2013-2016 to LICENSE 2016-11-07 14:54:54 -08:00
Lee Dohm
30117816be More license section clarification 2016-11-07 14:26:21 -08:00
Kevin Sawicki
b6ece7d16c Merge pull request #7852 from electron/webview-guestinstance
Fix reload/destroy webview guestinstance issues
2016-11-07 13:48:01 -08:00
Kevin Sawicki
6fda4fc45c Guard against attachedCallback firing while handling detachedCallback 2016-11-07 13:42:36 -08:00
Kevin Sawicki
18e1de105f Add failing spec for deleted guestinstance when moving webview 2016-11-07 13:42:36 -08:00
Kevin Sawicki
133ad6e18b Only set size and load URL on first attach 2016-11-07 13:42:36 -08:00
Kevin Sawicki
b84fed5cb2 Add failing spec for hide/show reload issue 2016-11-07 13:42:36 -08:00
Kevin Sawicki
a737732521 Only remove guest from embedder when view id changes 2016-11-07 13:42:36 -08:00
Kevin Sawicki
f454cb3408 Add failing spec for hide/show webview issue 2016-11-07 13:42:36 -08:00
Lee Dohm
d18a9eaf65 Merge pull request #7897 from electron/logo-clarification
Add logo clarification and standardized licensing language
2016-11-07 12:23:08 -08:00
Lee Dohm
059433511c Add logo clarification and standardized licensing language 2016-11-07 12:08:11 -08:00
Kevin Sawicki
acacb3f551 Update symbols server URL 2016-11-07 10:58:27 -08:00
Kevin Sawicki
0008bc5f82 Merge pull request #7893 from tinydew4/translate-ko
Update the korean docs up to 'ef9d8fe' commit.
2016-11-07 08:55:22 -08:00
Kevin Sawicki
a3e10aba95 Merge pull request #7863 from electron/coffee-script-webview-cleanup
Clean up CoffeeScript leftovers in webview code
2016-11-07 08:53:08 -08:00
Kevin Sawicki
73774f21b7 🎨 2016-11-07 08:28:02 -08:00
Kevin Sawicki
3c18de9c5a Only return when guestInstance is non-null 2016-11-07 08:25:01 -08:00
Kevin Sawicki
19a5d2ba2b Use window close helper instead of destroying for coverage 2016-11-07 08:25:01 -08:00
Kevin Sawicki
16f57b219b Add resize event spec 2016-11-07 08:25:01 -08:00
Kevin Sawicki
0485069c7b Use spread operator 2016-11-07 08:25:01 -08:00
Kevin Sawicki
e4d6aa30a1 Do truthy check in if block 2016-11-07 08:25:01 -08:00
Kevin Sawicki
89a26684e5 Return webContents directly 2016-11-07 08:25:01 -08:00
Kevin Sawicki
0e1c2b0fcb Use for/of and remove loop variables 2016-11-07 08:25:01 -08:00
Kevin Sawicki
6eab14359c Use ES6 style class for WebViewImpl 2016-11-07 08:25:01 -08:00
Kevin Sawicki
76f96bd99c Destructure requires 2016-11-07 08:25:01 -08:00
Kevin Sawicki
48bcad87c2 Use template strings 2016-11-07 08:25:01 -08:00
Kevin Sawicki
712b15286c Use let/const instead of var 2016-11-07 08:25:01 -08:00
Kevin Sawicki
3053be345b Remove unneeded returns 2016-11-07 08:25:01 -08:00
Kevin Sawicki
8e834e9047 Merge pull request #7869 from electron/less-browserify-build-time
Only run browserify when sandbox files change
2016-11-07 08:20:20 -08:00
Kevin Sawicki
3e34760eef Run browserify with --silent 2016-11-07 08:19:59 -08:00
Kevin Sawicki
e0afb814aa Only call browserify when one of sandbox sources change 2016-11-07 08:19:59 -08:00
tinydew4
0fd35cf768 Update the korean docs up to 'ef9d8fe' commit. 2016-11-07 13:59:53 +00:00
Kevin Sawicki
0b86acfef4 Merge pull request #7881 from electron/node-headers-url
Update dist url to be electron instead of atom-shell
2016-11-04 16:22:34 -07:00
Kevin Sawicki
36ee417d3b Update more download URLs from atom-shell to electron 2016-11-04 16:21:30 -07:00
Kevin Sawicki
a1a07aed44 Add atom-shell URL to planned breaking changes 2016-11-04 16:21:30 -07:00
Kevin Sawicki
f0731be20b Update dist url to be electron instead of atom-shell 2016-11-04 16:21:30 -07:00
Zeke Sikelianos
58278ee095 Merge pull request #7867 from electron/update-issue-template
ask for more info in the issue template
2016-11-04 15:12:20 -07:00
Zeke Sikelianos
494a025fb8 🎨 2016-11-04 15:11:40 -07:00
Zeke Sikelianos
ade8401b5b add a preamble 2016-11-04 12:12:37 -07:00
Zeke Sikelianos
ef9d8fe9bd Merge pull request #7843 from electron/process-docs
document the process(es) in which APIs are available
2016-11-03 13:14:30 -07:00
Zeke Sikelianos
471b9980ec line up process annotations consistently 2016-11-03 13:13:21 -07:00
Zeke Sikelianos
9c65b9a9f2 ask for more info in the issue template 2016-11-03 12:58:31 -07:00
Zeke Sikelianos
21105271a4 document processes for APIs nested in parent docs 2016-11-03 11:50:00 -07:00
Kevin Sawicki
7e90bb47a5 Merge pull request #7533 from electron/async-executeJavaScript
Allow web frame methods to return async promises
2016-11-03 10:32:21 -07:00
Zeke Sikelianos
ac68de6215 document process(es) for all APIs 2016-11-03 10:26:00 -07:00
Kevin Sawicki
8e203592e2 🎨 Remove extra returns 2016-11-03 09:51:01 -07:00
Samuel Attard
9f18a6e65c Use ES6 template strings, fix docs and remove _ERROR_ IPC event 2016-11-03 09:33:47 -07:00
Samuel Attard
857e1da6a3 Make executeJavaScript return a Promise so that caught errors can be sent to the caller 2016-11-03 09:33:47 -07:00
Samuel Attard
75b010ce63 Add sync executeJavaScript test 2016-11-03 09:33:47 -07:00
Samuel Attard
124fbdbd74 Allow web frame methods to return async promises 2016-11-03 09:33:47 -07:00
Kevin Sawicki
cf0cd5b50b Merge pull request #7823 from kanemontreuil/consolidate-gitignore
Consolidate log files
2016-11-03 09:26:48 -07:00
liusi
0e9d973715 toggle thick_frame_ along with resizable change 2016-11-03 12:13:06 +08:00
Zeke Sikelianos
cc18670ae1 Merge pull request #7854 from electron/fix-ipc-docs
Fix the IPC docs so the docs-linter finds the methods
2016-11-02 20:14:47 -07:00
Samuel Attard
6228ce3f35 Fix the IPC docs so the docs-linter finds the methods 2016-11-03 14:04:03 +11:00
Kevin Sawicki
89511bb0cb Merge pull request #7847 from tinydew4/translate-ko
[ko] Add net document on README.md
2016-11-02 09:23:54 -07:00
Kevin Sawicki
11bc993344 Merge pull request #7846 from thomsonreuters/net-doc-samples
Documentation: Formatting JavaScript sample code.
2016-11-02 09:23:35 -07:00
tinydew4
9126ab6766 Add net document on README.md 2016-11-02 11:22:21 +00:00
ali.ibrahim
49cb675057 Fixing a trivial js lint issue. 2016-11-02 11:16:37 +01:00
ali.ibrahim
e8b119e636 Formatting JavaScript sample code. 2016-11-02 10:40:51 +01:00
Zeke Sikelianos
e8bb79310c document the process(es) in which APIs are available 2016-11-01 16:35:31 -07:00
Zeke Sikelianos
da3dbdcb9b Merge pull request #7837 from electron/lightweight-docs-linter
use docs linter with lots of stuff npmignored
2016-11-01 12:12:04 -07:00
Zeke Sikelianos
b400edcc88 use docs linter with lots of stuff npmignored 2016-11-01 10:45:29 -07:00
Kevin Sawicki
6580088574 Bump v1.4.5 2016-11-01 08:51:10 -07:00
Haojian Wu
794479519c Add missing net document entry. 2016-11-01 16:50:55 +01:00
Kevin Sawicki
97d468cf35 Merge pull request #7822 from tinydew4/translate-ko
Update the korean docs up to '379c347' commit.
2016-11-01 08:44:10 -07:00
Kevin Sawicki
af6a3b3173 Merge pull request #7821 from electron/lint-net-docs
use new docs linter with support for the new net APIs
2016-11-01 08:43:46 -07:00
Kevin Sawicki
0c8160bfe3 Merge pull request #7820 from tinydew4/trimming
Trim: docs/api/net.md
2016-11-01 08:43:28 -07:00
Kane Montreuil
a584acef46 Consolidate log files 2016-11-01 00:47:34 -04:00
tinydew4
691ad97abe Update the korean docs up to '379c347' commit.
Swap two debugging tutorials with each other.
2016-11-01 04:20:23 +00:00
tinydew4
836cd017a9 Trim: docs/api/net.md 2016-11-01 03:53:45 +00:00
Zeke Sikelianos
e70f8acf47 use new docs linter with support for the new net APIs 2016-10-31 20:53:13 -07:00
Zeke Sikelianos
721924b749 Merge pull request #7818 from electron/more-net-doc-fixes
fix formatting of new net API doc
2016-10-31 19:36:31 -07:00
liusi
7880d37d73 merge changes from master 2016-11-01 10:20:47 +08:00
Kevin Sawicki
ba6bb45f70 Merge pull request #7813 from electron/ready-to-show-spec
Add initial ready-to-show event spec
2016-10-31 16:28:09 -07:00
Zeke Sikelianos
379c3470c8 fix formatting of new net API doc 2016-10-31 15:48:06 -07:00
Kevin Sawicki
038718717c Add initial ready-to-show spec 2016-10-31 12:40:49 -07:00
Kevin Sawicki
b8f09ecf4f Merge pull request #7812 from electron/url-format-in-quick-start
Format URL passed to BrowserWindow.loadURL
2016-10-31 11:37:41 -07:00
Kevin Sawicki
e9a2792b55 Format URL passed to BrowserWindow.loadURL 2016-10-31 11:34:53 -07:00
Kevin Sawicki
aa3bc13ca3 Merge pull request #7788 from electron/notification-crash
Fix notification crash when using permission handler
2016-10-31 09:39:38 -07:00
Kevin Sawicki
ed3a2dae1b Merge pull request #7787 from julianengel/patch-1
Added example usage for the default port
2016-10-31 09:28:20 -07:00
Kevin Sawicki
48eaee0c0e Match example to node inspector doc 2016-10-31 09:27:42 -07:00
Kevin Sawicki
6b2848307d Merge pull request #7807 from electron/net-docs-fixup
Quick fix up of net docs
2016-10-31 09:23:07 -07:00
DaLun
651a2d4399 ZH_TW docs update (#7797)
* Update cookie.md

* Update cookie.md

* Update task.md

* ZH_TW docs /structures/cookie add

* Fix a word && add new docs

* Update task.md

* Update cookie.md

* new update
2016-10-31 09:21:56 -07:00
DaLun
7c48dd54e1 ZH_TW docs api/structures/cookie add (#7793)
* Update cookie.md

* Update cookie.md

* Update task.md

* ZH_TW docs /structures/cookie add

* Fix a word && add new docs

* Update task.md

* Update cookie.md
2016-10-31 09:21:43 -07:00
Zeke Sikelianos
5968346c1e Merge pull request #7809 from shiftkey/typos-for-net-docs
fixed a couple of typos
2016-10-31 09:16:32 -07:00
Zeke Sikelianos
266d3b553b Merge pull request #7745 from electron/inline-enums
update docs linter to add support for inline ENUM values
2016-10-31 09:05:05 -07:00
Kevin Sawicki
53ff706cd2 Upgrade brigthray for notification crash fix 2016-10-31 09:02:18 -07:00
Brendan Forster
651b0c0f82 fixed a couple of typos 2016-10-31 08:59:26 -07:00
Kevin Sawicki
3f8e173452 Call callback asynchronously to match original issue 2016-10-31 08:54:57 -07:00
Kevin Sawicki
078c924760 Upgrade brightray for notification crash fix 2016-10-31 08:54:57 -07:00
Kevin Sawicki
611614c649 Use equal/deepEqual for channel/args asserts 2016-10-31 08:54:57 -07:00
Kevin Sawicki
dda3fcef91 Add failing spec for notification permission crash 2016-10-31 08:54:56 -07:00
Cheng Zhao
92f8c105d9 Merge pull request #7766 from liusy182/window-size-restore
incorrect position when restored from maximize-on-top-drag under Windows #7630
2016-10-31 11:04:35 +09:00
Samuel Attard
4ee308fcc2 Quick fix up of net docs 2016-10-31 12:43:57 +11:00
Cheng Zhao
dfefa00a50 Merge pull request #7577 from thomsonreuters/net_module
net module
2016-10-31 10:31:56 +09:00
Zeke Sikelianos
44146009ad Merge pull request #7795 from LaurentLeVan/master
[docs-translations\fr-FR]Add section supported platforms
2016-10-30 09:40:22 -07:00
Laurent Le Van
b376c29937 [docs-translations/fr-FR]Correct some typos (double space deletion and 'de' to 'ne') in supported-platforms.md 2016-10-30 14:22:35 +02:00
liusy182
c657186920 address review comments 2016-10-30 09:50:22 +08:00
Laurent Le Van
f613d8d0d0 [docs-translations\fr-FR]Add of the tutorial folder and create supported-platforms.md in French 2016-10-29 18:10:57 +03:00
Kevin Sawicki
a506df4d25 Merge pull request #7791 from electron/io-doc-link-fix
Fix README link to Mac debug instructions
2016-10-28 14:49:43 -07:00
Ian Olsen
a0772dbbe9 fix link to Mac debug instructions 2016-10-28 14:32:48 -07:00
Kevin Sawicki
f603e47226 Merge pull request #7785 from tinydew4/translate-ko
[ko] Update the korean docs up to '2006d64' commit.
2016-10-28 09:46:28 -07:00
Julian Engel
4b0b875d6f Added example usage for the default port
According to Issue ##7756 I added the example usage.
2016-10-28 18:04:51 +03:00
tinydew4
d50cabddc0 [ko] Update the korean docs up to '2006d64' commit. 2016-10-28 08:42:57 +00:00
Kevin Sawicki
cbda2a3e60 Merge pull request #7770 from vitaliel/patch-1
Fixed typo in ru-RU/tutorial/application-distribution.md
2016-10-27 10:43:11 -07:00
Kevin Sawicki
2006d64939 Merge pull request #7757 from crilleengvall/master
Adding documentation about hidden-inset
2016-10-28 02:42:57 +09:00
Kevin Sawicki
d9f3355dea Remove excess newlines 2016-10-27 10:42:31 -07:00
Kevin Sawicki
c8263a9a18 Add newlines and backticks 2016-10-27 10:41:43 -07:00
Kevin Sawicki
6d2e9f5311 Merge pull request #7753 from tinydew4/translate-ko
[ko] Update the korean docs up to '02a7094' commit.
2016-10-28 02:40:08 +09:00
Kevin Sawicki
bb6d15ee10 Merge pull request #7750 from bheart/master
Document the fact that Accelerators are used by the globalShortcut module
2016-10-28 02:39:46 +09:00
Kevin Sawicki
56f7aceec7 Merge pull request #7743 from doraeric/trans-zhtw
add zh-tw docs
2016-10-28 02:38:00 +09:00
Vitalie Lazu
933e013e7e Fixed typo 2016-10-27 14:58:16 +03:00
liusi
a2b3abbf47 incorrect position when restored from maximize-on-top-drag under Windows #7630 2016-10-27 17:42:43 +08:00
liusi
c61414e11b fix for Window hidden behind taskbar after maximize #7672 2016-10-27 17:14:31 +08:00
Christian Engvall
29470dd018 Adding documentation about hidden-inset 2016-10-26 21:33:48 +02:00
Zeke Sikelianos
ed878b400e Merge pull request #7752 from tinydew4/clean-up
Clean unnecessary sentences on web-contents.md
2016-10-26 11:40:23 -07:00
tinydew4
fbe4394bbd Clean unnecessary sentences on web-contents.md 2016-10-26 15:41:47 +00:00
tinydew4
3e0d8841ea Update the korean docs up to '02a7094' commit. 2016-10-26 15:36:06 +00:00
Will Tange
aeb774730b Link Accelerator docs to globalShortcut module
Usage of Accelerators (i.e. `globalShortcut.register`) is now documented in the Accelerator docs themselves.
2016-10-26 14:48:09 +02:00
ali.ibrahim
6d92457095 Fixing code review issues: refactoring emit methods using CustomEmit. 2016-10-26 11:10:15 +02:00
Zeke Sikelianos
8fa3057e19 update docs linter to add support for inline ENUM values 2016-10-25 23:48:48 -07:00
Zeke Sikelianos
eed8f201e2 Merge pull request #7741 from electron/shuffle-bw-docs
Clean up nested objects and string ENUMS in the docs
2016-10-25 23:47:32 -07:00
Zeke Sikelianos
0add800240 Merge pull request #7715 from electron/docs-linter-function-param-types
update docs linter to support parsing of function parameter types
2016-10-25 23:42:50 -07:00
doraeric
9356843e27 add zh-tw docs 2016-10-26 14:09:36 +08:00
Samuel Attard
02a7094529 Follow docs style guide for string ENUMS 2016-10-26 16:19:41 +11:00
Samuel Attard
76da80c5e9 Further clean up 2016-10-26 16:18:55 +11:00
Samuel Attard
7078ed80fa Move webPreferences and titleBarStyle to the correct place in the docs
In their previous location `electron-docs-linter` would not output an Object structure for `webPreferences` (which is a key part of the constructor)
2016-10-26 14:31:30 +11:00
Cheng Zhao
e97d3c21a3 Merge pull request #7719 from electron/find-pasteboard
Add macOS find pasteboard support
2016-10-26 11:23:14 +09:00
Kevin Sawicki
9e266642f9 Merge pull request #7592 from frontapp/master
Preview file with QuickLook
2016-10-26 10:12:15 +09:00
Kevin Sawicki
0f5bfadd2b Merge pull request #7740 from mauriciofauth/pt-br/api/window-open
Update docs-translations/pt-BR/api/window-open.md
2016-10-26 09:58:48 +09:00
Kevin Sawicki
d85c4da11b Minor formatting tweaks 2016-10-26 09:55:34 +09:00
Kevin Sawicki
d982376fc4 filename -> displayName 2016-10-26 09:47:38 +09:00
Pierre Laurac
d26601f695 Convention naming 2016-10-26 09:07:38 +09:00
Pierre Laurac
0ec57cca32 last linter commit 2016-10-26 09:06:50 +09:00
Pierre Laurac
cf5fc3f922 more linter 2016-10-26 09:06:44 +09:00
Pierre Laurac
1f60aff73d linter 2016-10-26 09:06:39 +09:00
Pierre Laurac
9b19e6ee38 Changing names and memory leak fix 2016-10-26 09:05:42 +09:00
Pierre Laurac
6bac17fb9a Linter 2016-10-26 09:05:36 +09:00
Pierre Laurac
e759ce72b5 Using UTF8 String for filepath and filename 2016-10-26 09:05:27 +09:00
Pierre Laurac
b44371f4bf filename as Optional argument 2016-10-26 09:05:01 +09:00
Pierre Laurac
9736dc3115 Specifying macOS only method 2016-10-26 09:04:30 +09:00
Pierre Laurac
18ac4178fe Validation with linter 2016-10-26 09:04:22 +09:00
Pierre Laurac
2f7cceb11c Removing extra line break 2016-10-26 09:03:55 +09:00
Pierre Laurac
002462ce7b Removing unused header dependencies 2016-10-26 09:03:49 +09:00
Pierre Laurac
4d305b06d1 Adding documentation 2016-10-26 09:03:14 +09:00
Pierre Laurac
9673cee4d7 Using string from the std 2016-10-26 09:02:36 +09:00
Pierre Laurac
526debb5ab Adding easy way to preview files 2016-10-26 09:02:29 +09:00
Pierre Laurac
fb444f646b default template for PreviewFile 2016-10-26 09:02:21 +09:00
Kevin Sawicki
26f76f8d41 Merge pull request #7739 from electron/fix-incorrect-types-registerURLSchemeAsPrivileged
Update web-frame.md
2016-10-26 08:50:20 +09:00
Maurício Meneghini Fauth
9ae18c6194 📝 Update docs-translations/pt-BR/api/window-open.md [ci skip] 2016-10-25 21:48:22 -02:00
Samuel Attard
9e425cd01e Update web-frame.md 2016-10-26 10:04:18 +11:00
Zeke Sikelianos
171b901c61 Merge pull request #7736 from mauriciofauth/pt-br/readme
Fix links in docs-translations/pt-BR/README.md
2016-10-25 14:18:01 -07:00
Zeke Sikelianos
fbade9305c Merge pull request #7730 from tinydew4/translate-ko
[ko] Update the korean docs depend on the '1c7d5df' commit.
2016-10-25 13:55:42 -07:00
Maurício Meneghini Fauth
082cd9b72c 📝 Fix links in docs-translations/pt-BR/README.md [ci skip] 2016-10-25 15:53:33 -02:00
ali.ibrahim
e9db926b48 Fixing code review issues: fixing linter issues in spec file. 2016-10-25 16:55:17 +02:00
ali.ibrahim
bdb3f4d4cb Fixing code review issues: adding some test cases for partition/session options. 2016-10-25 16:19:26 +02:00
ali.ibrahim
b44d5290e2 Fixing code review issues: adding a partition options and making the session option only takes Session objects. 2016-10-25 15:47:54 +02:00
tinydew4
6a36deec3b Update the korean docs depend on the '1c7d5df' commit. 2016-10-25 13:34:48 +00:00
ali.ibrahim
6d7f179a9b Fixing code review issues: making delegate_ a raw pointer. 2016-10-25 15:02:35 +02:00
ali.ibrahim
61278f9ace Fixing code review issues. 2016-10-25 12:41:01 +02:00
Kevin Sawicki
7ffc1faf5b Document read/writeFindText 2016-10-25 14:16:40 +09:00
Kevin Sawicki
1c3b5835f4 Add spec for read/write find text 2016-10-25 14:15:54 +09:00
Kevin Sawicki
1718697ef0 Read/write find pasteboard text via IPC in renderer process 2016-10-25 14:15:54 +09:00
Kevin Sawicki
144a61c5a3 Add find text support to clipboard 2016-10-25 14:15:54 +09:00
Kevin Sawicki
f7bf8c4fdc Merge pull request #7718 from mike-engel/mengel/update-docs
Clarify the setMenuBarVisibility api
2016-10-25 13:08:37 +09:00
Mike Engel
6f64ad30cb Clarify the setMenuBarVisibility api
The setMenuBarVisibility api is only supported on Windows and Linux.
This adds some minor documentation to make that clearer. Fixes #7686
2016-10-24 22:04:45 -06:00
Kevin Sawicki
1c7d5df2fe Merge pull request #7717 from electron/doc-lists
Add newlines before lists
2016-10-25 12:40:32 +09:00
Kevin Sawicki
65e6da2673 Add newlines before lists 2016-10-25 12:38:08 +09:00
Kevin Sawicki
39a5c7dab9 Merge pull request #7631 from beakerbrowser/webview-policy-flags2
Add 'webpreferences' attribute to webview
2016-10-25 12:14:25 +09:00
Kevin Sawicki
b4cc3541a8 Minor tweaks to webpreferences docs 2016-10-25 12:08:19 +09:00
Kevin Sawicki
68c2c9825f Remove lint warnings 2016-10-25 10:36:43 +09:00
Kevin Sawicki
3aad6a0c99 Use forEach and destructuring for parsing features 2016-10-25 10:31:50 +09:00
Kevin Sawicki
2556ed8744 Add parse-features-strings.js 2016-10-25 10:28:36 +09:00
Paul Frazee
f35536bdc5 factor out parse-features-string.js 2016-10-24 20:21:42 -05:00
Cheng Zhao
775328d5d5 Merge pull request #7707 from electron/focus-window-on-menu-bar-click
Focus window on menu bar click
2016-10-25 09:09:45 +09:00
Zeke Sikelianos
1a03e62717 update docs linter to support parsing of function parameter types 2016-10-24 12:04:37 -07:00
Kevin Sawicki
31b4f61815 Merge pull request #7651 from deepak1556/session_cert_verifier_patch
session: exclude hosts from CT verification if they are handled by custom cert verifiers
2016-10-24 16:53:04 +09:00
Kevin Sawicki
076e033236 Merge pull request #7711 from tinydew4/translate-ko
[ko] Apply the changes till the 'a2a4462' commit.
2016-10-24 16:49:37 +09:00
tinydew4
2c50f14346 Apply the changes till the 'a2a4462' commit. 2016-10-24 07:41:15 +00:00
Kevin Sawicki
82e593b44f Merge pull request #7709 from tinydew4/translate-ko
[ko] 	Apply the changes till the 'b2559d7' commit.
2016-10-24 16:36:58 +09:00
Kevin Sawicki
224d2ca93c Merge pull request #7710 from electron/web-frame-lint
Remove RegisterURLSchemeAsPrivileged lint error
2016-10-24 16:29:10 +09:00
Kevin Sawicki
0841c4291a Remove RegisterURLSchemeAsPrivileged lint error 2016-10-24 16:27:54 +09:00
Kevin Sawicki
271733fc53 Add tests for ses.setCertificateVerifyProc 2016-10-24 16:12:49 +09:00
Kevin Sawicki
a2a44621fd Merge pull request #7708 from tinydew4/fix-typo
Fix typo, and trimming.
2016-10-24 16:12:29 +09:00
Cheng Zhao
ad48aeeea4 Merge pull request #7665 from beakerbrowser/privilegedschemeopts
Add options to webFrame.registerURLSchemeAsPrivileged
2016-10-24 15:56:18 +09:00
Kevin Sawicki
83f47bc980 Upgrade brighray for RequireCTDelegate 2016-10-24 15:44:21 +09:00
tinydew4
67a09d9fe0 Fix typo, and trimming. 2016-10-24 06:34:09 +00:00
tinydew4
189ae97732 Apply the changes till the 'b2559d7' commit. 2016-10-24 06:32:28 +00:00
Kevin Sawicki
632739ec6e Merge pull request #7590 from electron/docs-cleanup
Cleanup docs and standardize structs
2016-10-24 15:13:39 +09:00
Cheng Zhao
88ac376382 Merge pull request #7628 from deepak1556/geo_request_context_patch
browser: fix race in creation of default browser context by AtomAccessTokenStore
2016-10-24 14:57:37 +09:00
Kevin Sawicki
b2559d7d28 Merge pull request #7596 from electron/function-param-types
Function param types
2016-10-24 12:40:41 +09:00
Kevin Sawicki
98387e50cc Focus window on menu bar click 2016-10-24 11:49:51 +09:00
Constantin Dumitrescu
93464b8100 [ci skip] Update docs/README.md to point to the right location of styleguide.md (#7697) 2016-10-24 10:22:22 +09:00
kok liu
52783bb67f update the zh-CN docs README.md and find a error in en docs README.md (#7676)
* update the zh-CN readme and find a error in en readme

* fix a style problem
2016-10-24 10:21:02 +09:00
Kevin Sawicki
c90d4abcf0 Merge pull request #7654 from scotttrinh/flash-frame-doc
📝 Add flashFrame to desktop env integration
2016-10-24 10:20:08 +09:00
Kevin Sawicki
6f85d85c12 Minor tweaks to flash frame section 2016-10-24 10:19:51 +09:00
Kevin Sawicki
280235872b Add flashframe link 2016-10-24 10:14:52 +09:00
Kevin Sawicki
e93eaed5d0 Merge pull request #7666 from amtj/issue#6939
📝Remove ambiguous default value of nodeintegration Issue #6939
2016-10-24 09:54:46 +09:00
Kevin Sawicki
32cff67fd4 Merge pull request #7641 from rogerlista/master
📝 Link to README.md pt-br [ci skip]
2016-10-24 09:19:08 +09:00
Kevin Sawicki
d3f40212db Merge pull request #7622 from Haraldson/flash-trust
Add a note on Flash permissions to Troubleshooting
2016-10-24 09:16:07 +09:00
Zeke Sikelianos
11ad9e7f25 Merge pull request #7650 from davej/patch-3
Docs: Fix relative link to MAS builds tutorial
2016-10-22 23:51:59 +09:00
ali.ibrahim
0c44d19249 net module: documenting the session property. 2016-10-20 15:48:36 +02:00
ali.ibrahim
7c17aeb6da Documenting net module: fixing linter issues. 2016-10-20 14:42:15 +02:00
ali.ibrahim
8c19d3b210 Documenting net module: various fixes. 2016-10-20 13:57:08 +02:00
ali.ibrahim
9f15191280 Formatting net documentation. 2016-10-20 12:30:03 +02:00
ali.ibrahim
69790bd7ed Documenting ClientRequest constructor options. 2016-10-20 11:58:06 +02:00
ali.ibrahim
fdfa0f4a6d Documenting the login event. 2016-10-20 11:45:45 +02:00
ali.ibrahim
7f8b180f70 Fixing authentication cancel with null/undefined credentials. 2016-10-20 11:43:26 +02:00
tinydew4
43ae784a40 Translate releasing 2016-10-20 08:58:48 +00:00
Kevin Sawicki
6a4d9f8a87 Merge pull request #7674 from electron/tweak-releasing-doc
Push after bumping version
2016-10-20 16:12:33 +09:00
Kevin Sawicki
e2c646a14b Push after bumping 2016-10-20 11:34:51 +09:00
Kevin Sawicki
337db9fbb9 Merge pull request #7660 from electron/document-release-process
Document release process
2016-10-20 11:31:51 +09:00
Zeke Sikelianos
63267031e9 💲 2016-10-20 11:30:36 +09:00
Zeke Sikelianos
88b288502a Add note about Python HTTPS warning 2016-10-20 11:29:02 +09:00
Zeke Sikelianos
b0fb0c6492 Document S3 creds 2016-10-20 11:22:32 +09:00
Zeke Sikelianos
3a44663003 Add note about setting $ELECTRON_GITHUB_TOKEN 2016-10-20 11:19:18 +09:00
Zeke Sikelianos
147addbce1 Bump v1.4.4 2016-10-20 09:17:29 +09:00
ali.ibrahim
7549adcfce Documenting net module: various fixes. 2016-10-19 18:31:08 +02:00
ali.ibrahim
fddbde2fd5 Documenting net module: various fixes. 2016-10-19 18:19:28 +02:00
ali.ibrahim
6e5951b764 Documenting net module: formatting. 2016-10-19 18:11:07 +02:00
ali.ibrahim
3b620b8c0c Documenting net module: various fixes. 2016-10-19 18:05:38 +02:00
ali.ibrahim
0d82fbcf37 Documenting net.IncomingMessage. 2016-10-19 16:51:44 +02:00
ali.ibrahim
5cd20a8e5d Documenting net.ClientRequest 2016-10-19 15:34:21 +02:00
Amitoj
4ff73d8b56 📝 Small tweaks
[ci skip] Remove ambiguous default value of nodeintegration.
Issue #6939
2016-10-19 13:38:46 +05:30
ali.ibrahim
f651b21cda Fixing net doc file name. 2016-10-19 09:24:59 +02:00
Zeke Sikelianos
7a73c0189f bump-release -> bump-version 2016-10-19 11:40:40 +09:00
Paul Frazee
0345b62369 update webFrame.registerURLSchemeAsPrivileged docs to be more specific 2016-10-18 17:13:33 -05:00
Amitoj
3a31f28f27 📝Remove ambiguous default value of nodeintegration
Remove ambiguous default value for nodeintegration in webview.
Issue #6939
2016-10-19 02:38:29 +05:30
Paul Frazee
a5c62bb264 add options to webFrame.registerURLSchemeAsPrivileged 2016-10-18 15:52:41 -05:00
ali.ibrahim
9bddc2cbaa Adding net documentation skeleton. 2016-10-18 19:14:43 +02:00
ali.ibrahim
43113fcfb4 Fixing net response objects being piped into writable streams test. 2016-10-18 10:28:35 +02:00
Zeke Sikelianos
6b207d65bf update releasing 2016-10-18 14:04:52 +09:00
Samuel Attard
9d0d1c8341 Fix bd object name 2016-10-18 15:47:18 +11:00
Zeke Sikelianos
82a16ee41f document the electron release process 2016-10-18 13:41:57 +09:00
Kevin Sawicki
104f8d6057 Merge pull request #7659 from electron/jacob/ally
Fire a11y event on touch screens using screen readers
2016-10-18 13:41:48 +09:00
Jacob Groundwater
9c9ba80978 Fire a11y event on touch screens using screen readers 2016-10-18 13:28:32 +09:00
Scott Trinh
a06a1fa262 📝 Add flashFrame to desktop env integration 2016-10-17 16:22:45 -04:00
ali.ibrahim
c198828e58 Adding gc tests: fixing a memory leak with C++ URLRequest objects. 2016-10-17 19:02:25 +02:00
Cheng Zhao
cbe9768529 Merge pull request #7566 from electron/always-shorten-path
Shorten Socket path for makeSingleInstance in sandboxed apps
2016-10-17 20:43:51 +08:00
Cheng Zhao
ce847fc3ca Merge pull request #7578 from electron/windows-logging
Show console output from Windows when ELECTRON_RUN_AS_NODE is set
2016-10-17 20:22:39 +08:00
deepak1556
5cbbd6efe6 session: exclude hosts from CT verification if they are handled by custom cert verifiers 2016-10-17 16:35:28 +05:30
Dave Jeffery
00d641aaf7 Docs: Fix relative link to MAS builds tutorials
The link was 404'ing
2016-10-17 11:26:28 +01:00
ali.ibrahim
9b4e9c642a Making test code run directly in main browser context to avoid rpc persistent handles. 2016-10-17 11:51:20 +02:00
ali.ibrahim
c6ae27c7c9 Adding a stability test: non referenced, unused requests are collected without crash. 2016-10-17 10:38:10 +02:00
Rogério
9ead3ad0a0 📝 Link to README.md pt-br [ci skip] 2016-10-15 21:01:37 -03:00
Paul Frazee
e7962c7ba2 fixes and tests for webview 'webpreferences' attr 2016-10-14 18:04:33 -05:00
Paul Frazee
194b14100e add the 'webpreferences' attribute to webviews 2016-10-14 17:16:39 -05:00
Kevin Sawicki
3dd8377218 Merge pull request #7611 from electron/only-enable-msaa-if-needed
Check harder before enabling Accessibility support on Win32
2016-10-14 12:46:32 -07:00
deepak1556
bd34db256b browser: fix race in creation of default browser context by AtomAccessTokenStore 2016-10-15 01:00:54 +05:30
Paul Betts
6fdf40b038 Code Cleanup 2016-10-14 12:17:32 -07:00
Kevin Sawicki
988e2334f5 Merge pull request #7614 from tinydew4/translate-ko
[ko] Apply the changes till the '9367c76' commit.
2016-10-14 09:19:04 -07:00
ali.ibrahim
0e13b8dd01 making the net module usable only after the ready event. 2016-10-14 17:57:37 +02:00
ali.ibrahim
ac9e6eda95 Fixing a crash with pending URLRequests on shutdown. 2016-10-14 17:37:39 +02:00
Samuel Attard
ba91bbd397 Fix spaces 2016-10-14 22:54:04 +11:00
Hein Haraldson Berg
63e1b2fb46 Add a note on Flash permissions to Troubleshooting 2016-10-14 12:51:26 +02:00
ali.ibrahim
c0c9e3ac3d Formatting C++ code using ClangFormat. 2016-10-14 11:51:45 +02:00
ali.ibrahim
4347ce4a53 Formatting C++ code using ClangFormat. 2016-10-14 11:50:47 +02:00
ali.ibrahim
9cc8bfae1c fixing space formatting issues. 2016-10-14 10:58:16 +02:00
tinydew4
741ae488d5 Apply the changes till the '9367c76' commit. 2016-10-14 02:24:27 +00:00
Samuel Attard
10ef6749b3 Source -> DesktopCapturerSource 2016-10-14 13:10:37 +11:00
Samuel Attard
32c3f17f5a Rename dcs object 2016-10-14 13:00:03 +11:00
Samuel Attard
ad45c084cc Fix uploaddata naming 2016-10-14 11:37:36 +11:00
Kevin Sawicki
a13ed2a005 Merge pull request #7610 from LShun/patch-1
Word addition and revision for Readme,md
2016-10-13 14:18:56 -07:00
Kevin Sawicki
9367c764be Merge pull request #7608 from nabeelomer/master
Add further information to online-offline event documentation
2016-10-13 14:17:07 -07:00
Kevin Sawicki
4f57b685bd Add backticks around true/false values 2016-10-13 14:16:37 -07:00
Kevin Sawicki
902a8c57bd Merge pull request #7602 from danburzo/cli_switches_docs
Docs: Command-line switches -- note about node.js flags, added debug flags
2016-10-13 14:13:08 -07:00
Kevin Sawicki
21cfd330c0 Switch from node man to node --help 2016-10-13 14:11:56 -07:00
Long Nhat Nguyen
c017a7a1c7 Update url (#7598)
* Update EventEmitter URL

* Update EventEmitter URL

* Enable click

* Update EventEmitter URL

* Update EventEmitter URL

* Update URL

* Update URL

* Update EventEmitter URL

* Tweak sentence and add perios
2016-10-13 14:09:14 -07:00
Kevin Sawicki
0756aa663b Merge pull request #7587 from electron/update-standard
Update standard to v8 to be inline with standard-markdown
2016-10-13 14:04:24 -07:00
Kevin Sawicki
4ee94917a0 Merge pull request #7576 from tinydew4/translate-ko
Apply the changes of docs on ko-KR
2016-10-13 13:56:39 -07:00
Paul Betts
0df21afcdf Check harder before enabling Accessibility support 2016-10-13 11:46:55 -07:00
ali.ibrahim
de29f2dde5 Fixing build: removing constness on net::HttpResponseHeaders as otherwise we would need a change in libchromiumcontent. 2016-10-13 17:51:19 +02:00
ali.ibrahim
6f5b0a28c5 Fixing code review issues: function call formatting, renaming JS member variables, refactoring response headers conversion. 2016-10-13 17:14:23 +02:00
LShun
433a825006 Word addition and revision for Readme,md
I edited some words as well as added some information ( for example the License ) that was missing in the translation but found in the main site README.md,
2016-10-13 22:58:48 +08:00
Nabeel Omer
4f288e3ba2 Update 2016-10-13 20:22:40 +05:30
Nabeel Omer
392b59be4e Made relevant changes 2016-10-13 20:12:44 +05:30
Nabeel Omer
6d8d211631 Update online-offline-events.md 2016-10-13 19:45:39 +05:30
Dan Burzo
af17253a72 Changed link to Node docs in MD reference format 2016-10-13 13:03:29 +03:00
Dan Burzo
cfdea04c83 Added note about sending flags to Node.js, additional debug flags 2016-10-13 12:54:22 +03:00
Samuel Attard
5cf03e68d4 Fix missing type 2016-10-13 17:33:12 +11:00
Samuel Attard
20323e7032 Specifiy function param types in docs 2016-10-13 17:30:57 +11:00
Samuel Attard
78343a62b8 Cleanup docs and standardize structs 2016-10-13 14:38:06 +11:00
Zeke Sikelianos
7584e73d70 Merge pull request #7580 from electron/docs-linter-rectangle-rename
Update docs linter with Rectangle structure fixes
2016-10-12 19:06:44 -07:00
Samuel Attard
eac5ba4c56 Fix spec linting issues 2016-10-13 12:47:43 +11:00
Samuel Attard
a9d5699a52 Update standard to v8 to be inline with standard-markdown 2016-10-13 12:46:00 +11:00
tinydew4
4e08264522 Apply the changes on early Oct 13, 2016 2016-10-13 00:49:20 +00:00
tinydew4
6b39e4a210 Apply the changes about #7379 to ko_KR 2016-10-13 00:34:39 +00:00
tinydew4
4a1c8f6cb7 Apply the changes 2016-10-13 00:33:12 +00:00
tinydew4
468d5f6c7a Apply the changes on Oct 12, 2016 2016-10-13 00:32:05 +00:00
Kevin Sawicki
a8382d6794 Moving atom_bindings include to Windows block 2016-10-12 13:48:49 -07:00
Kevin Sawicki
e899050500 Add basic test of spawned ELECTRON_RUN_AS_NODE process 2016-10-12 13:48:49 -07:00
Kevin Sawicki
b01fd9715b Only expose process.log on Windows 2016-10-12 13:48:48 -07:00
Kevin Sawicki
0417a3e51e Upgrade node for process logging fix patch 2016-10-12 13:48:48 -07:00
Kevin Sawicki
0740b2f66b Reuse Log method 2016-10-12 13:48:48 -07:00
Kevin Sawicki
d686916fe2 Expose process.log when running as node 2016-10-12 13:48:48 -07:00
Kevin Sawicki
fefc7c23f9 Merge pull request #7479 from bpasero/process-no-asar
Introduce ELECTRON_NO_ASAR
2016-10-12 13:48:03 -07:00
Kevin Sawicki
cef7525d00 Merge pull request #7583 from torn4dom4n/master
Update devDependency Status URL
2016-10-12 13:20:16 -07:00
Long Nhat Nguyen
b448b0c796 Update devDependency Status URL
[ci skip]
2016-10-12 20:17:26 +00:00
Kevin Sawicki
a97dc6d17a Merge pull request #7570 from preco21/korean-docs-12
docs: Update Korean docs as upstream and small improves
2016-10-12 13:06:02 -07:00
Kevin Sawicki
fcfc13c1ea Merge pull request #7579 from electron/tweak-about-panel-key-names
Use lower-case about panel option keys
2016-10-12 11:32:01 -07:00
Kevin Sawicki
1e4ef195bb Use lower-case about panel option keys 2016-10-12 11:18:21 -07:00
Kevin Sawicki
566d76def2 Mention spawning with ELECTRON_RUN_AS_NODE 2016-10-12 11:11:27 -07:00
Kevin Sawicki
f553d16539 Only support ELECTRON_NO_ASAR in non browser/renderer processes 2016-10-12 11:11:27 -07:00
Kevin Sawicki
8897a7a926 Add specs for ELECTRON_NO_ASAR env var 2016-10-12 11:11:27 -07:00
Benjamin Pasero
656ee0d9c3 introduce ELECTRON_NO_ASAR 2016-10-12 11:11:27 -07:00
Zeke Sikelianos
ecc03fdd40 update docs linter with Rectangle structure fixes 2016-10-12 11:04:53 -07:00
ali.ibrahim
b290415bbd Fixing build on Mac OS 2016-10-12 19:41:13 +02:00
ali.ibrahim
16069cd477 Commenting some test code. 2016-10-12 17:13:06 +02:00
ali.ibrahim
ae1c33b863 fixing linter issues. 2016-10-12 14:54:32 +02:00
ali.ibrahim
d21def7b8d Fixing various issues in tests. 2016-10-12 14:54:32 +02:00
ali.ibrahim
bd5e622bec Adding request/response piping tests. 2016-10-12 14:54:31 +02:00
ali.ibrahim
a5c508d2d7 Adding abort, webRequest interception and creation tests. 2016-10-12 14:54:31 +02:00
ali.ibrahim
b731ca50bc Adding HTTP request headers manipulation tests. 2016-10-12 14:54:30 +02:00
ali.ibrahim
4eb9fc1bb6 Adding chunked uploading test. 2016-10-12 14:54:29 +02:00
ali.ibrahim
9b94dfcbdc Adding basic http tests, fixing issues in ClientRequest constructor. 2016-10-12 14:54:29 +02:00
Ali Ibrahim
046f48db51 Fixing build on Linux 2016-10-12 14:54:28 +02:00
ali.ibrahim
b57ffbf1ab Temporary fix for the post data test. 2016-10-12 14:54:28 +02:00
ali.ibrahim
42bae9d71d Making the HTTP response a full-fledged Readable stream. 2016-10-12 14:54:27 +02:00
ali.ibrahim
dcffb51e5e Adding net module spec file skeleton. 2016-10-12 14:54:26 +02:00
ali.ibrahim
8c5751e9f7 Adding systematic checks on the atom_request_ pointer as it may be reset to null. 2016-10-12 14:54:26 +02:00
ali.ibrahim
a655cca0a1 Request/Response state simplification. Removing redundant state flags. 2016-10-12 14:54:25 +02:00
ali.ibrahim
e472d11761 Caching response headers so that AtomURLRequest can be freed after the close event. 2016-10-12 14:54:25 +02:00
ali.ibrahim
ec1fc5a17b Implementing error, close, finish, abort events management. 2016-10-12 14:54:24 +02:00
ali.ibrahim
bde30b90e8 Adding some implementation comments. Enforcing Chromium coding conventions. 2016-10-12 14:54:23 +02:00
ali.ibrahim
42adb2afd4 Fixing lint-js issues. 2016-10-12 14:54:22 +02:00
ali.ibrahim
0588435882 Fixing cpplint issues. 2016-10-12 14:54:22 +02:00
ali.ibrahim
08947682b0 Implementing abort workflow, emitting error events. 2016-10-12 14:54:21 +02:00
ali.ibrahim
cbbc4376ca Adding support for upload chunked encoding. 2016-10-12 14:54:20 +02:00
ali.ibrahim
9498a5738a Refactoring net module, adding a ClientRequest and IncomingMessage classes. 2016-10-12 14:54:20 +02:00
ali.ibrahim
fcaf9cb031 Some code cleaning. 2016-10-12 14:54:19 +02:00
ali.ibrahim
f7525d7877 Adding support for POST requests. 2016-10-12 14:54:18 +02:00
ali.ibrahim
2b3b41d5f9 Implementing authentication callback. 2016-10-12 14:54:18 +02:00
ali.ibrahim
2d9d4af98d Implementing URLRequest API, getting response body. 2016-10-12 14:54:17 +02:00
ali.ibrahim
81eab9887b Adding URLResponse to emit response events, implementing status code. 2016-10-12 14:54:16 +02:00
ali.ibrahim
7521aeea09 Implement URLRequest::Delegate, handle thread sync. 2016-10-12 14:54:15 +02:00
ali.ibrahim
e8d4abe78f Adding net module and URLRequest class. 2016-10-12 14:54:15 +02:00
Cheng Zhao
46cd8708a4 Merge pull request #7561 from electron/windows-system-colors
Support retrieving Windows system colors
2016-10-12 15:35:18 +09:00
Zeke Sikelianos
27e1938e9f Merge pull request #7471 from electron/update-standard-markdown
Use standard style JavaScript in all docs translations
2016-10-11 22:37:54 -07:00
Zeke Sikelianos
17198c26d9 update standard-markdown 2016-10-11 22:37:32 -07:00
Zeke Sikelianos
eaeebd3ebd use newer function syntax 2016-10-11 22:37:32 -07:00
Zeke Sikelianos
253a383168 standardize docs-translations by hand 2016-10-11 22:37:32 -07:00
Zeke Sikelianos
3e4a0705e9 standardize docs 2016-10-11 22:37:32 -07:00
Zeke Sikelianos
7ef374477d lint docs-translations with standard-markdown 2016-10-11 22:36:11 -07:00
Zeke Sikelianos
4ae6103356 auto-standardize javascript in docs-translations 2016-10-11 22:36:11 -07:00
Zeke Sikelianos
2e4322c230 update to new standard-markdown with --fix feature 2016-10-11 22:36:11 -07:00
Zeke Sikelianos
6b7e375963 Merge pull request #7379 from electron/seperate-structs
Move reused object structures to a standard structures folder
2016-10-11 22:28:39 -07:00
Zeke Sikelianos
c46c1dbb1e Merge pull request #7505 from electron/testing-docs
Update test dependencies and documentation
2016-10-11 22:28:16 -07:00
Plusb Preco
af79f4793e 📝 Improve grammar
[ci skip]
2016-10-12 12:24:21 +09:00
Plusb Preco
774a15f4c8 📝 Improve grammar
[ci skip]

* Use `formal` tense.
* Small fixes.
2016-10-12 12:24:14 +09:00
Plusb Preco
b7c4cde11a 📝 Adjust line wrap to 80
[ci skip]
2016-10-12 12:13:59 +09:00
Plusb Preco
9857aa25a3 📝 Update Korean docs as upstream
[ci skip]
2016-10-12 12:02:04 +09:00
Zeke Sikelianos
d4a8a64ba7 Merge pull request #7498 from electron/custom-props-in-menu-item-constructor
Preserve custom properties passed to MenuItem constructor
2016-10-11 14:24:13 -07:00
Zeke Sikelianos
af0098f064 remove badge count after each setBadgeCount test 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
37c53f2e09 clarify mocha test exclusion 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
a8e59ccd3d fix links to testing docs 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
57852366bb mention building before testing 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
a4832c304e unify testing docs for all platforms 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
156d823b7f remove badge after setBadgeCount test finishes 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
45d9cc6405 update test dependencies 2016-10-11 14:22:48 -07:00
Zeke Sikelianos
0aeb53435e add tips for testing 2016-10-11 14:22:48 -07:00
Paul Betts
7dd1ebc734 Fix oops typos 2016-10-11 14:02:29 -07:00
Kevin Sawicki
ce694760bc Remove const since SkColor is an int 2016-10-11 13:15:27 -07:00
Kevin Sawicki
c8189046fe Emit color-changed event on Windows 2016-10-11 13:15:27 -07:00
Kevin Sawicki
2656812dea Doc systemPreferences.getColor 2016-10-11 13:15:27 -07:00
Kevin Sawicki
1978b39337 Remove duplicate colors 2016-10-11 13:15:27 -07:00
Kevin Sawicki
e7bfd1c959 Add systemPreferences.getColor specs 2016-10-11 13:15:26 -07:00
Kevin Sawicki
663f8f4b54 Add systemPreferences.getColor on Windows 2016-10-11 13:15:26 -07:00
Kevin Sawicki
9b0a32f62c Add ToRGBHex color helper 2016-10-11 13:15:26 -07:00
Paul Betts
06065d1c5d Instead of gating the path shortening to MAS_BUILD, figure it out at runtime 2016-10-11 13:06:29 -07:00
Paul Betts
e84ae6e2aa Add a method to determine whether we're in the Apple sandbox 2016-10-11 13:06:29 -07:00
Kevin Sawicki
13f9a6c273 Merge pull request #7563 from rogerlista/master
📝 Translation of security.md to pt-BR [ci skip]
2016-10-11 10:06:02 -07:00
Rogério
d89b23c120 📝 Translation of security.md to pt-BR [ci skip] 2016-10-11 14:01:07 -03:00
Kevin Sawicki
479451e7c7 Merge pull request #7562 from odedhb/patch-1
Update mac-app-store-submission-guide.md
2016-10-11 10:00:56 -07:00
Oded Breiner
ea8a4f2b51 Update mac-app-store-submission-guide.md 2016-10-11 19:58:53 +03:00
Kevin Sawicki
e26189ba87 Merge pull request #7560 from electron/upgrade-brigthray
Upgrade brightray for devtools dock state preference fix
2016-10-11 09:48:39 -07:00
Kevin Sawicki
003522d6f7 Merge pull request #7558 from danburzo/build_instructions
Adds link to PyObjC installation instructions
2016-10-11 09:48:20 -07:00
Kevin Sawicki
4db6ccd579 Merge pull request #7555 from tinydew4/translate-ko
Apply the changes of docs to ko-KR
2016-10-11 09:47:51 -07:00
Kevin Sawicki
39aa740c88 Merge pull request #7552 from electron/fix-menu-docs
fix Menu API example
2016-10-11 09:47:30 -07:00
Kevin Sawicki
66f825beb1 Upgrade brightray for devtools dock state preference fix 2016-10-11 08:45:42 -07:00
Dan Burzo
75feeca0f0 Small fix to grammar in Build instructions (macOS) 2016-10-11 17:41:28 +03:00
Dan Burzo
120aa1c9ce Adds link to PyObjC installation instructions 2016-10-11 17:34:35 +03:00
tinydew4
7fa2ffc2a7 Apply the changes on Oct 11, 2016 2016-10-11 12:25:34 +00:00
tinydew4
15fae91ac7 Apply changes about crash-reporter 2016-10-11 12:06:32 +00:00
Cheng Zhao
4ae190dab9 Merge pull request #7549 from electron/about-panel-options
Support setting about panel options
2016-10-11 20:18:23 +09:00
Cheng Zhao
0baa60caab Merge pull request #7528 from electron/key-and-code-on-sent-input-events
Set key and code on sendInputEvent keyboard events
2016-10-11 19:34:05 +09:00
Cheng Zhao
2a3bcdcaab Merge pull request #7518 from electron/inverted-color-scheme
Support detecting inverted color scheme on Windows
2016-10-11 19:31:34 +09:00
Zeke Sikelianos
619f74fa12 fix Menu example 2016-10-10 23:01:35 -07:00
Zeke Sikelianos
8aaf029e55 remove unused var 2016-10-10 15:38:27 -07:00
Zeke Sikelianos
bcce7aff18 test that overrideProperty is not overwritten 2016-10-10 15:25:56 -07:00
Zeke Sikelianos
b575055d7e inherit user-specific MenuItem properties more safely 2016-10-10 14:40:49 -07:00
Kevin Sawicki
d5b3ef5380 Merge pull request #7548 from malept/electron-packager-mas-doc-fix
Docs: clarify ignoring object files with electron-packager
2016-10-10 13:50:41 -07:00
Kevin Sawicki
58ef0bea17 Doc app.setAboutPanelOptions 2016-10-10 13:40:57 -07:00
Kevin Sawicki
7de6a06acf Support setting about panel options 2016-10-10 13:30:58 -07:00
Zeke Sikelianos
2cd10d339f remove duplicated prop copying 2016-10-10 11:07:01 -07:00
Kevin Sawicki
38281f3364 Implement SysColorChangeListener directly on Windows 2016-10-10 10:43:09 -07:00
Kevin Sawicki
25bcc2dd0d 🎨 2016-10-10 10:43:09 -07:00
Kevin Sawicki
af27c62b07 Doc inverted-color-scheme-changed event 2016-10-10 10:43:08 -07:00
Kevin Sawicki
8b16b82ce9 Add inverted-color-scheme-changed event 2016-10-10 10:43:08 -07:00
Kevin Sawicki
223e9d97a0 Doc systemPreferences.isInvertedColorScheme 2016-10-10 10:43:08 -07:00
Kevin Sawicki
7b49d94e9f Add systemPreferences.isInvertedColorScheme API 2016-10-10 10:43:08 -07:00
Mark Lee
a677eb0f95 📝 clarify ignoring object files with electron-packager
Note that Electron Packager 8.1.0 ignores object files by default.
2016-10-10 13:08:36 -04:00
Kevin Sawicki
987579d391 Send initial keyDown before char event 2016-10-10 09:35:44 -07:00
Kevin Sawicki
99414065a9 Add char/keypress event tests 2016-10-10 09:35:44 -07:00
Kevin Sawicki
e4b0577cb0 Assert key and code in keyup input event spec 2016-10-10 09:35:44 -07:00
Kevin Sawicki
424afd3faf Update expected key and code values 2016-10-10 09:35:43 -07:00
Kevin Sawicki
6fac14ad3f Set key and code on keyboard events 2016-10-10 09:35:43 -07:00
Kevin Sawicki
d69367aa9b Add keydown sendInputEvent specs 2016-10-10 09:35:43 -07:00
Kevin Sawicki
2efb7a12cb Merge pull request #7544 from tinydew4/fix-docs
Fix dot
2016-10-10 09:19:13 -07:00
Kevin Sawicki
9f616b934b Merge pull request #7542 from Menq/patch-1
update
2016-10-10 09:18:41 -07:00
Kevin Sawicki
c016e83eb3 Merge pull request #7541 from tinydew4/translate-ko
Translate clang-format
2016-10-10 09:18:23 -07:00
Kevin Sawicki
7015dbf0d2 Merge pull request #7536 from rogerlista/master
📝 Translation of faq.md to pt-BR [ci skip]
2016-10-10 09:18:02 -07:00
tinydew4
9f42c4c441 Fix dot 2016-10-10 14:31:05 +00:00
孟强
1841f826fe update
rename electron-prebuild to electron
2016-10-10 17:08:26 +08:00
Cheng Zhao
e24267d060 Update brightray for #7503 2016-10-10 11:35:59 +09:00
Cheng Zhao
91591f37e6 Merge pull request #7500 from electron/store-crashes-in-configured-temp-dir
Store crash reports in configured temp dir
2016-10-10 10:19:02 +09:00
tinydew4
8875296338 Translate clang-format.md 2016-10-10 00:53:13 +00:00
Rogério
98eb8cd3c1 📝 Translation of faq.md to pt-BR [ci skip] 2016-10-09 10:56:55 -03:00
Zeke Sikelianos
2acd7f4d12 fix NativeImage link path 2016-10-07 21:25:39 -07:00
Samuel Attard
4d49156dac Rename bounds -> rectangle 2016-10-08 13:09:31 +11:00
Kevin Sawicki
c147e72c8e Merge pull request #7499 from electron/clang-format
Add a guide to use clang-format
2016-10-07 14:06:18 -07:00
Kevin Sawicki
f872799f5c Minor edits to clang-format guide 2016-10-07 14:05:33 -07:00
Kevin Sawicki
913bc8e198 Merge pull request #7527 from electron/only-set-global-app-name-on-audio-manager-on-linux
Only call media::AudioManager::SetGlobalAppName on Linux
2016-10-07 14:04:03 -07:00
Kevin Sawicki
c37740273f Add linux guard for SetGlobalAppName call 2016-10-07 13:44:54 -07:00
Kevin Sawicki
f09ed4b677 Merge pull request #7524 from deepak1556/pa_app_name_patch
media: set the application name for audio streams shown in external apps
2016-10-07 10:15:35 -07:00
Kevin Sawicki
e52f5933a0 Merge pull request #7522 from tinydew4/translate-ko
Add REPL doc in ko-KR and apply other changes
2016-10-07 10:11:24 -07:00
Kevin Sawicki
9339853448 Merge pull request #7520 from electron/fix-undef-webprefs
Default webPreferences to empty object always
2016-10-07 10:10:40 -07:00
deepak1556
12fb9f1f18 media: set the application name for audio streams shown in external apps 2016-10-07 16:15:30 +05:30
tinydew4
f3b182606b Add REPL doc in ko-KR and apply other changes 2016-10-07 08:34:27 +00:00
Samuel Attard
a0284a9bc5 Add spec for window.open with webPreferences set to null 2016-10-07 12:13:04 +11:00
Samuel Attard
09e5035ab5 Default webPreferences to empty object always 2016-10-07 11:45:13 +11:00
Zeke Sikelianos
b7e078e98d sanitize MenuItem options 2016-10-06 14:37:13 -07:00
Zeke Sikelianos
f80e81bf9f standardize 2016-10-06 12:20:00 -07:00
Zeke Sikelianos
c34d868609 update docs-linter 2016-10-06 12:20:00 -07:00
Samuel Attard
2b05c61ae3 Update docs for parsing 2016-10-06 12:19:38 -07:00
Samuel Attard
b859afc118 Update docs to follow the 'link first instance' standard 2016-10-06 12:19:38 -07:00
Samuel Attard
03979936f3 Move reused object structures to a standard structures folder 2016-10-06 11:59:42 -07:00
Kevin Sawicki
4d7050553c Merge pull request #7449 from amtj/repl-docs
add REPL documentation
2016-10-06 11:38:48 -07:00
Kevin Sawicki
c104858079 Update Node.js docs link and Windows note 2016-10-06 11:38:09 -07:00
Kevin Sawicki
2c8781ed69 Merge pull request #7511 from tinydew4/translate-ko
Update korean docs
2016-10-06 11:12:26 -07:00
Kevin Sawicki
e38fc724f8 Merge pull request #7508 from miniak/docs-fix
Add missing documentation
2016-10-06 11:11:31 -07:00
Kevin Sawicki
3bbfc4d420 Merge pull request #7507 from toonborgers/translate-nl
Add link to dutch translation in CONTRIBUTING.md [ci skip]
2016-10-06 11:06:18 -07:00
Kevin Sawicki
217010a669 Merge pull request #7515 from electron/newline-before-list
Add newline before list
2016-10-06 11:03:52 -07:00
Kevin Sawicki
451cea4675 Add newline before list 2016-10-06 11:02:30 -07:00
Kevin Sawicki
d39182b41a Pass crashes directory instead of product name and temp dir 2016-10-06 10:55:11 -07:00
Zeke Sikelianos
2cda2bd718 Merge pull request #7502 from squarejaw/patch-1
Fix misspelling in docs/api/app.md
2016-10-06 10:44:11 -07:00
Kevin Sawicki
16e3991ffa Guard against app.getPath throwing with OS fallback 2016-10-06 10:07:40 -07:00
Kevin Sawicki
fbbffe03a5 Add getPath specs 2016-10-06 09:57:25 -07:00
Kevin Sawicki
f61ace74bb Sort includes 2016-10-06 09:50:06 -07:00
Kevin Sawicki
4a8dcec63a Wait for crash report to become available 2016-10-06 09:47:07 -07:00
Kevin Sawicki
30c6ca6751 Only call UTF8ToUTF16 on Windows 2016-10-06 09:14:16 -07:00
Kevin Sawicki
84b7bb29f0 Fix Windows compiler errors 2016-10-06 09:02:03 -07:00
Kevin Sawicki
9d1d1f21e9 Use FilePath for crash reporter temp directory 2016-10-06 09:02:03 -07:00
Kevin Sawicki
883c4b63d0 temp_path -> temp_dir 2016-10-06 09:02:02 -07:00
Kevin Sawicki
0380d3ae50 Pass crashes directory to crash service process 2016-10-06 09:02:02 -07:00
Kevin Sawicki
2fbb98a97c Remove directory assert 2016-10-06 09:02:02 -07:00
Kevin Sawicki
43702e0f8e Support calling getUploadedReports on unstarted crash reporter 2016-10-06 09:02:02 -07:00
Kevin Sawicki
56d9ce34e4 Use valid Linux report id 2016-10-06 09:02:02 -07:00
Kevin Sawicki
76abb2e18d Add missing temp_dir arg to override 2016-10-06 09:02:02 -07:00
Kevin Sawicki
a0db484510 Use app.getPath directly for temp path 2016-10-06 09:02:02 -07:00
Kevin Sawicki
b3b856f476 Set productName in main process on Linux 2016-10-06 09:02:02 -07:00
Kevin Sawicki
69a7025c96 Fix Linux compiler errors 2016-10-06 09:02:01 -07:00
Kevin Sawicki
773bfea386 Remove unused rimraf spec dependency 2016-10-06 09:02:01 -07:00
Kevin Sawicki
eafc694bba Mention crash report locations 2016-10-06 09:02:01 -07:00
Kevin Sawicki
81733a523e DRY up temp directory logging 2016-10-06 09:02:01 -07:00
Kevin Sawicki
1afe501a36 Add tests for crash reports in custom temp directory 2016-10-06 09:02:01 -07:00
Kevin Sawicki
f282b51c98 🎨 Use ES6 class, destructuring, and let/const 2016-10-06 09:02:01 -07:00
Kevin Sawicki
ac0658bbf1 Use PathService for temp dir path for crashes 2016-10-06 09:02:01 -07:00
tinydew4
116dbc0581 Update ko docs 2016-10-06 14:53:57 +00:00
tinydew4
6af8a0fae4 Update ko docs 2016-10-06 14:27:48 +00:00
tinydew4
79b5ae3d57 Modify docs to refelect the latest 2016-10-06 14:27:48 +00:00
Milan Burda
cb15181f43 Fix typo 2016-10-06 12:03:37 +02:00
Milan Burda
9f342ebbd1 Add missing documentation 2016-10-06 11:30:34 +02:00
Toon Borgers
27795015ff Add link to dutch translation in CONTRIBUTING.md 2016-10-06 10:56:59 +02:00
Cheng Zhao
79a5de3fd8 Bump v1.4.3 2016-10-06 17:12:07 +09:00
Cheng Zhao
2624738534 Lock the version of electron-docs-linter 2016-10-06 17:12:06 +09:00
Cheng Zhao
10b91b1291 Merge pull request #7488 from electron/native-image-resize-and-crop
Support resizing and cropping native images
2016-10-06 15:01:41 +09:00
Cheng Zhao
1781ceb25b Merge pull request #7494 from thomsonreuters/Update_Test_For_Missing_Additional_Features
Update BrowserWindow's test to check additional features upon window.open() call
2016-10-06 14:45:28 +09:00
Cheng Zhao
051e5c27b3 Update brightray for #7332 2016-10-06 14:42:14 +09:00
Cheng Zhao
5285b729be Merge pull request #7407 from thomsonreuters/New_Window_Handler_Can_Create_And_Return_Window
New-window event handler can return its own BrowserWindow instance
2016-10-06 14:37:48 +09:00
Bryan Bess
9bc6000cb5 📝 Fix misspelling in docs/api/app.md [ci skip] 2016-10-05 19:17:49 -05:00
Zeke Sikelianos
fdf3f6ce30 remove unneeded new keyword 2016-10-05 13:44:28 -07:00
Haojian Wu
0d930b65f1 📝 clang-format on Electron C++ code. 2016-10-05 22:12:48 +02:00
Zeke Sikelianos
16b3962b66 preserve custom properties passed to MenuItem constructor 2016-10-05 12:24:08 -07:00
Kevin Sawicki
4b95f3a462 Mark width/height as optional 2016-10-05 11:02:58 -07:00
Kevin Sawicki
4ffae1d563 Add spec for getAspectRatio 2016-10-05 11:02:58 -07:00
Kevin Sawicki
abffd98e29 Resize images with preserve aspect ratio 2016-10-05 11:02:58 -07:00
Kevin Sawicki
56f9cc683a bounds -> rect 2016-10-05 11:02:57 -07:00
Kevin Sawicki
49cc00dedf Add tests of resizing/cropping an empty image 2016-10-05 11:02:57 -07:00
Kevin Sawicki
9fa13710aa Document crop and resize 2016-10-05 11:02:57 -07:00
Kevin Sawicki
0eda33f057 Add tests for cropping native images 2016-10-05 11:02:57 -07:00
Kevin Sawicki
2b4fff70d5 Add initial crop method 2016-10-05 11:02:57 -07:00
Kevin Sawicki
a80f4c1605 Add specs for other create image helpers 2016-10-05 11:02:57 -07:00
Kevin Sawicki
6aba4e916a 🎨 Use deepEqual asserts 2016-10-05 11:02:57 -07:00
Kevin Sawicki
6a7f0d70fd Add native image resize tests 2016-10-05 11:02:56 -07:00
Kevin Sawicki
042684fb38 Add resize method to native image 2016-10-05 11:02:56 -07:00
Kevin Sawicki
018575de71 Merge pull request #7496 from electron/app-doc-fix
Add newline before return list
2016-10-05 09:36:01 -07:00
Kevin Sawicki
8c0588d4e0 Merge pull request #7495 from toonborgers/translate-nl
📝 Dutch translation for CONTRIBUTING.md [ci skip]
2016-10-05 09:34:08 -07:00
Kevin Sawicki
aaa8c56686 Merge pull request #7487 from fplucas/master
📝 Fix the link source-code-directory-structure.md on pt-br [ci skip]
2016-10-05 09:33:07 -07:00
Kevin Sawicki
5e936a24ac Add newline before list 2016-10-05 09:24:33 -07:00
Michael Vasseur
edd80d88a9 Update BrowserWindow's test to check additional features upon window.open() call 2016-10-05 13:45:15 +02:00
Toon Borgers
25659e482e Fix relative url 2016-10-05 12:28:36 +02:00
Toon Borgers
a097d17166 Fix relative link, added translation link for dutch 2016-10-05 12:28:08 +02:00
Toon Borgers
d4bbc24031 Translate CONTRIBUTING.md 2016-10-05 12:25:50 +02:00
Michael Vasseur
3dd41bc09a Fix errors 2016-10-05 11:46:55 +02:00
Michael Vasseur
9490ec7686 Fix JS Lint issues 2016-10-05 09:47:39 +02:00
Michael Vasseur
a2b3cf95a7 Sets correct openerId in mergeBrowserWindowOptions() to give correct options to 'new-window' event handler 2016-10-05 09:47:39 +02:00
Michael Vasseur
cc7f4fedf6 Rebase with recent changes 2016-10-05 09:47:39 +02:00
Michael Vasseur
22bd7c0271 Updated the related documentation 2016-10-05 09:47:38 +02:00
Michael Vasseur
3408c8038e Fix indentation 2016-10-05 09:47:38 +02:00
Michael Vasseur
5a4cdcfde1 'new-window' event handlers can return their window when default behavior is prevented 2016-10-05 09:46:54 +02:00
Toon Borgers
0babe4a5ed Add english version to start from 2016-10-05 09:27:20 +02:00
Toon Borgers
a538b37854 Create CONTRIBUTING.md 2016-10-05 09:16:34 +02:00
Cheng Zhao
ebaeec1677 Merge pull request #7491 from electron/initialize-direct-write-font-proxy
Enable emoji as fallback font on Windows 10
2016-10-05 14:15:55 +09:00
Kevin Sawicki
1f1d9cefca Update libchromiumcontent for #7334 2016-10-04 17:28:46 -07:00
Haojian Wu
a846088eac Add clang-format config file. 2016-10-04 22:42:49 +02:00
Kevin Sawicki
43f4eb76c4 Merge pull request #7489 from davej/patch-2
Docs: Correct image.getSize() type signature
2016-10-04 13:36:48 -07:00
Dave Jeffery
29b9fbcc9a Docs: Move buffer link to end of file 2016-10-04 21:34:24 +01:00
Dave Jeffery
4d10b9a31b Docs: Correct image.getSize() type signature 2016-10-04 21:20:42 +01:00
Lucas Pugliesi
0727102c5e 📝 Fix the link source-code-directory-structure.md on pt-br [ci skip] 2016-10-04 14:43:11 -03:00
Kevin Sawicki
4c2590ed92 Merge pull request #7486 from fplucas/master
📝 Translation of build-instructions-osx.md to pt-br [ci skip]
2016-10-04 10:31:08 -07:00
Lucas Pugliesi
66ce176b22 Merge remote-tracking branch 'upstream/master' 2016-10-04 14:27:00 -03:00
Lucas Pugliesi
a824ff479a 📝 Translation of build-instructions-osx.md to pt-br [ci skip] 2016-10-04 14:26:41 -03:00
Kevin Sawicki
c88c6b1323 Merge pull request #7481 from fplucas/master
📝 Translation of synopsis.md to pt-br [ci skip]
2016-10-04 09:11:16 -07:00
Kevin Sawicki
b459f00bd3 Merge pull request #7478 from tinydew4/translate-ko
Update the ko-KR docs related to the `additionalFeatures`.
2016-10-04 09:10:55 -07:00
Amitoj
00376c1d59 add note about windows
note "REPL is not available on Windows."
2016-10-04 19:32:46 +05:30
Lucas Pugliesi
85a8b149bb 📝 Translation of synopsis.md to pt-br [ci skip] 2016-10-04 09:37:18 -03:00
tinydew4
3fcb57559a Update the ko-KR docs related to the . 2016-10-04 08:35:07 +00:00
Cheng Zhao
bf21892cfa Merge pull request #7291 from thomsonreuters/Fix_Missing_Additional_Features_New_Popup_Windows
Fix for missing additional features fields when creating new popup windows
2016-10-04 15:42:36 +09:00
Cheng Zhao
c4576463e2 Format the docs according to style guide 2016-10-04 14:41:37 +09:00
Michael Vasseur
3af686daff Documented JavasScript API changes related to the fix for additional features processing 2016-10-04 14:38:32 +09:00
Michael Vasseur
c811188e22 Updated required code to handle missing additional features for popup windows 2016-10-04 14:38:32 +09:00
Cheng Zhao
ef88a06f08 Update libchromiumcontent for #7291 2016-10-04 14:30:59 +09:00
Cheng Zhao
cf050ff9e2 Merge pull request #7468 from electron/focus-window-when-menu-is-clicked
Focus window when menu button is pressed
2016-10-04 14:22:49 +09:00
Kevin Sawicki
bb04069e83 Merge pull request #7437 from fplucas/master
📝 Translation of CONTRIBUTING.md to pt-br [ci skip]
2016-10-03 15:37:52 -07:00
Amitoj
a938859eb8 repl-docs: move file to tutorials
also add note for renderer processes.
2016-10-04 00:12:25 +05:30
Lucas Pugliesi
8d35576a36 Merge CONTRIBUTING.md 2016-10-03 15:18:03 -03:00
Kevin Sawicki
9cae04edde Remove unused ButtonListener 2016-10-03 10:26:18 -07:00
Kevin Sawicki
11684c2c73 Focus submenu buttons when clicked 2016-10-03 10:13:41 -07:00
Kevin Sawicki
e258973490 Merge pull request #7434 from rafaelstz/patch-2
Update year in LICENSE file
2016-10-03 09:29:54 -07:00
Kevin Sawicki
00d57fa547 Merge pull request #7433 from rafaelstz/patch-1
Update license in README file
2016-10-03 09:29:26 -07:00
Kevin Sawicki
24106469c5 Merge pull request #7456 from amitmerchant1990/patch-1
Update accessibility.md
2016-10-03 09:28:22 -07:00
Kevin Sawicki
9c55280917 Merge pull request #7457 from josephfrazier/fix-findinpage-links
Fix webContents.findInPage links in docs
2016-10-03 09:22:53 -07:00
Cheng Zhao
98333049ec Merge pull request #7452 from enlight/node-buffer-safe-free
Prevent undefined behavior when some Node Buffer objects are destroyed
2016-10-03 21:57:37 +09:00
Cheng Zhao
63b45a873b Merge pull request #7451 from was4444/master
keep up with en version
2016-10-03 21:35:06 +09:00
Cheng Zhao
ec34bfde26 Merge pull request #7432 from electron/check-if-window-closed
Ignore already closed windows
2016-10-03 21:21:35 +09:00
Cheng Zhao
8ae91ea2ee Merge pull request #7444 from rogerlista/master
📝 Translation of CODE OF CONDUCT.md to pt-BR [ci skip]
2016-10-03 21:19:35 +09:00
Cheng Zhao
772c456513 Merge pull request #7335 from miniak/set-default-error-mode
Add process.setDefaultErrorMode()
2016-10-03 20:53:42 +09:00
Cheng Zhao
3a4cd19226 Merge pull request #7461 from electron/revert-7416-fix-windows-draggable-high-dpi
Revert "Fix for issues seen on frameless window (Windows) when at 200% resolution"
2016-10-03 20:42:44 +09:00
Cheng Zhao
4d8c1c61a5 Revert "Fix for issues seen on frameless window (Windows) when at 200% resolution" 2016-10-03 20:41:52 +09:00
Cheng Zhao
bee3abe334 Merge pull request #7416 from bsclifton/fix-windows-draggable-high-dpi
Fix for issues seen on frameless window (Windows) when at 200% resolution
2016-10-03 18:34:18 +09:00
Joseph Frazier
5d1c626a53 Fix webContents.findInPage links in docs 2016-10-03 02:07:52 -04:00
Amit Merchant
fb612075c4 Update accessibility.md 2016-10-03 11:13:25 +05:30
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
Amitoj
002b9b5d4b add link to repl documentation 2016-10-02 23:47:11 +05:30
Amitoj
a0a23e04cf s/provides/provides a/ 2016-10-02 23:42:37 +05:30
wxf
763fdb4be1 keep up with en version 2016-10-02 21:45:22 +08:00
Amitoj
4d0cef5070 add REPL documentation 2016-10-02 18:20:29 +05:30
Rogério
18c7ba94f8 📝 Translation of accessibility.md to pt-BR [ci skip] 2016-10-01 21:28:17 -03:00
Rogério
5fb72b5e05 📝 Translation of README.md to pt-BR [ci_skip] 2016-10-01 20:55:12 -03:00
Rogério
960971b195 📝 Translation of CONTRIBUTING.md to pt-BR[ci skip] 2016-10-01 19:56:01 -03:00
Rogério
b10a6422d4 Translation of CODE OF CONDUCT.md to pt-BR [ci skip] 2016-10-01 17:59:30 -03:00
Lucas Pugliesi
2714f280f5 📝 Translation of file-object.md to pt-br [ci skip] 2016-10-01 09:07:49 -03:00
Lucas Pugliesi
9c53d241fa 📝 Translation of CONTRIBUTING.md to pt-br [ci skip] 2016-10-01 08:45:31 -03:00
Rafael Corrêa Gomes
f4d33e366d Update year in LICENSE file 2016-10-01 00:34:29 -03:00
Rafael Corrêa Gomes
73cdf35c98 Update license in README file 2016-10-01 00:33:51 -03:00
Kevin Sawicki
140651c258 Ignore already closed windows 2016-09-30 15:04:13 -07:00
Kevin Sawicki
ff6a8fac2a Merge pull request #7417 from electron/check-sheet-parent-before-beginning
Only begin sheet when no sheet parent
2016-09-30 13:08:35 -07:00
Kevin Sawicki
1807458c66 Only begin sheet when no sheet parent 2016-09-30 10:43:43 -07:00
Kevin Sawicki
fb41474555 Merge pull request #7429 from electron/webview-max-listeners
Ensure webviews get reset after spec finishes
2016-09-30 10:43:27 -07:00
Kevin Sawicki
3f390c6849 Ensure webviews get reset after spec finishes 2016-09-30 10:15:11 -07:00
Kevin Sawicki
4a186069d9 Merge pull request #7428 from electron/sandbox-specs
Explicitly close popup window from sandbox spec
2016-09-30 09:28:59 -07:00
Kevin Sawicki
d942694695 openedWindow -> popupWindow 2016-09-30 08:54:24 -07:00
Kevin Sawicki
766f5afabd Explicitly close popup window 2016-09-30 08:50:41 -07:00
Kevin Sawicki
e16fa08e61 🎨 2016-09-30 08:38:21 -07:00
Kevin Sawicki
b07d4eba11 Merge pull request #7427 from tinydew4/translate-ko
Update ko-KR/api/session.md
2016-09-30 08:14:46 -07:00
tinydew4
f1d1070baa Update ko-KR/api/session.md 2016-09-30 15:09:11 +00:00
Kevin Sawicki
0c146de7dd Merge pull request #7422 from tinydew4/translate-ko
Update korean CODE_OF_CONDUCT.md
2016-09-30 07:56:07 -07:00
Cheng Zhao
5a56de501a Bump v1.4.2 2016-09-30 17:39:27 +08:00
Cheng Zhao
11d16a7342 Merge pull request #7415 from electron/disable-tab-menu-on-sierra
Hide Show Tab Bar menu item on macOS Sierra
2016-09-30 17:23:54 +08:00
Cheng Zhao
1b5db42ec6 Merge pull request #7398 from electron/cookie-changed-event
Add cookie changed event
2016-09-30 17:10:44 +08:00
tinydew4
0b6b4ca50d Update CODE_OF_CONDUCT.md 2016-09-30 06:32:07 +00:00
tinydew4
e7e8b3fdb6 Remove BOM to korean docs 2016-09-30 00:03:29 +00:00
Milan Burda
5bfa898a02 Always drop SEM_NOGPFAULTERRORBOX flag from error mode (enables WER if crashReporter is not started) 2016-09-29 13:57:41 -07:00
Kevin Sawicki
770a3509cf Add forward declaration of NSWindow.allowsAutomaticWindowTabbing 2016-09-29 10:54:59 -07:00
Kevin Sawicki
b14870d9a1 Merge pull request #7413 from deepak1556/devtools_filesystemapi_patch
browser: allow filesystem access for devtools scheme
2016-09-29 10:52:47 -07:00
Brian Clifton
52340b43f5 Possible fix for issues seen on frameless window (Windows) when at 200% 2016-09-29 10:48:36 -07:00
deepak1556
1323542373 browser: allow filesystem access for devtools scheme 2016-09-29 22:54:39 +05:30
Kevin Sawicki
24b9313958 Disable Show Tab Bar menu item on macOS Sierrra 2016-09-29 10:18:15 -07:00
Kevin Sawicki
0e1290fc10 Upgrade brightray for merged cookie delegate support 2016-09-29 09:18:21 -07:00
Kevin Sawicki
8abe8fe01d Remove unneeded locker and handle scope 2016-09-29 09:16:35 -07:00
Kevin Sawicki
77b35ba7ab Use separate session for cookies change event test 2016-09-29 09:16:35 -07:00
Kevin Sawicki
96e48ac13c Document cookie changed event 2016-09-29 09:16:35 -07:00
Kevin Sawicki
d83534d513 Add specs for cookie changed event 2016-09-29 09:16:35 -07:00
Kevin Sawicki
19c7ee0932 Use scoped_refptr for cookie delegate 2016-09-29 09:16:35 -07:00
Kevin Sawicki
24bcf6ac16 Add initial cookie changed event support 2016-09-29 09:16:29 -07:00
Kevin Sawicki
5d23d165a9 Upgrade brigthray for cookie monster delegate 2016-09-29 09:16:29 -07:00
Kevin Sawicki
b3b9994ce8 Configure ink drops on menu bar buttons (#7397)
* Add ink drop to menu bar buttons

* Pass background color to submenu button

* Sort includes
2016-09-29 09:15:12 -07:00
Arus
df0bda058f Update korean docs, according to most recent changes and other missing. (#7400)
* Apply changes

* Apply changes

* Apply changes

* Apply changes

* Fix all JS standard syntax errors

* Apply of recent changes, #7374
2016-09-29 08:52:40 -07:00
Cheng Zhao
15b8449411 Merge pull request #7393 from electron/upgrade-brigthray-for-ct-fix
Upgrade Brightray for certificate transparency crash fix
2016-09-29 16:56:31 +08:00
Cheng Zhao
e1d68fa3cd Merge pull request #7374 from electron/fixup-return-values
Update docs to contain more specific return values
2016-09-29 16:44:08 +08:00
Cheng Zhao
2c9ce3f3e0 Merge pull request #7372 from electron/update-docs-linter
update electron-docs-linter
2016-09-29 16:43:22 +08:00
Cheng Zhao
734f42b5f9 Merge pull request #7319 from Menci/master
Workaround for electron/electron#5050
2016-09-29 16:42:30 +08:00
Kevin Sawicki
3cff64001d Upgrade brightray for CT crash fix 2016-09-28 16:02:48 -07:00
Kevin Sawicki
241297fb2e Merge pull request #7388 from electron/custom-window-level-test
Add test for BrowserWindow.setAlwaysOnTop
2016-09-28 15:47:29 -07:00
Kevin Sawicki
d4583006b3 Merge pull request #7391 from kiavashps/patch-1
docs: app.md - fix relaunch arg concat syntax
2016-09-28 10:30:59 -07:00
Kiavash Page
d42e51e33a app.md - fix relaunch arg concat syntax 2016-09-28 10:23:03 -07:00
Kevin Sawicki
3bed19d70d Add spec for BrowserWindow.setAlwaysOnTop 2016-09-28 09:23:52 -07:00
Kevin Sawicki
fd6ef6712f Link to window level macOS docs 2016-09-28 09:20:22 -07:00
Cheng Zhao
c51982a231 Merge pull request #7362 from bsclifton/fix-windows-draggable-high-dpi
Fixes mouse coordinates for Windows when display is set to a higher DPI
2016-09-28 19:42:17 +08:00
Cheng Zhao
53d4c36332 Merge pull request #7353 from electron/no-login-item-apis-on-mas
document lack of MAS support for login item APIs
2016-09-28 19:20:32 +08:00
Cheng Zhao
de76bf5f63 Merge pull request #7296 from adammeyer/custom-window-level
Allow custom window level when sending window to top
2016-09-28 19:18:12 +08:00
Samuel Attard
e0e47ea9a1 Update docs to contain more specific return values 2016-09-28 18:28:44 +13:00
Zeke Sikelianos
3989139378 update electron-docs-linter 2016-09-27 22:04:22 -07:00
Menci
ca68dfe097 🎨 Remove extra semicolon 2016-09-28 06:45:15 +08:00
Kevin Sawicki
5114d571df Merge pull request #7364 from tiagotol/patch-1
Update quick-start.md
2016-09-27 13:02:25 -07:00
tiagotol
08808664b6 Update quick-start.md 2016-09-27 14:29:35 -03:00
Brian Clifton
13de65d310 Fixes mouse coordinates for Windows when display is set to a higher DPI (ex: enlarged by 150% using display settings) 2016-09-27 08:23:48 -07:00
Zeke Sikelianos
6728efe87e Merge pull request #7339 from electron/document-return-values
Document the return values of all methods in the docs
2016-09-27 07:39:25 -07:00
Cheng Zhao
458c4dd129 Merge branch 'support-chromium-sandbox' of https://github.com/tarruda/electron into tarruda-support-chromium-sandbox 2016-09-27 20:02:23 +08:00
Menci
ef45b67dbf 🐧 🐛 Move the workaround to lib/browser/init.js 2016-09-27 19:19:52 +08:00
Cheng Zhao
604700187d Merge pull request #7327 from MaxWhere/osr-fixes
Small fixes for offscreen rendering
2016-09-27 19:17:10 +08:00
Cheng Zhao
7e1ae369ed Merge pull request #7356 from electron/fix-typo
fix typo
2016-09-27 19:05:06 +08:00
Cheng Zhao
9850af93c9 Merge pull request #7313 from electron/add-type-to-webview-style-tag
add type to webview style tag
2016-09-27 19:03:08 +08:00
Cheng Zhao
4c8d0ab804 Merge pull request #7298 from deepak1556/content_settings_patch
protocol: disable storage for non standard custom schemes
2016-09-27 18:52:36 +08:00
Thiago de Arruda
47fd41715f Add some tests for "sandbox" option 2016-09-27 06:01:47 -03:00
Thiago de Arruda
a64978b812 Use the routing id on api::WebContents::GetID
The sandbox option allows multiple webContents in one renderer process, so using
the only the renderer id to identify WebContents instances is no longer an
option.

WebContents::GetID now returns a 64-bit integer, which is composed of both the
process id(high 32), and the RenderViewHost routing id(low 32). Also add a
`GetProcessID` that retrieves the renderer process id, a requirement in some of
our javascript code.
2016-09-27 06:01:47 -03:00
Thiago de Arruda
524bab530a Improve AtomSandboxedRendererClient to support preload scripts.
Add RenderFrameObserver/RenderViewObserver subclasses that implement the
necessary support for preload scripts in sandboxed renderers.
2016-09-27 06:01:47 -03:00
Thiago de Arruda
72154b64ed Embed setup bundle for preload scripts in sandboxed renderers.
Add a gyp target that creates a browserify bundle starting with
`lib/sandboxed_renderer/init.js`, which is embedded into the executable using
the `atom_js2c` target.

The goal of this bundle is to provide a very basic environment for preload
scripts where a `require` function is available.
2016-09-27 06:01:47 -03:00
Thiago de Arruda
695509e267 Add browser side support for reading files from renderer. 2016-09-27 06:01:46 -03:00
Thiago de Arruda
0f7652dc85 Move code that defines ipcRenderer methods into another file. 2016-09-27 06:01:46 -03:00
Thiago de Arruda
1713200084 Refactor the atom_js2c target to include javascript from multiple dirs.
Before invoking js2c, copy all files that must be embedded into the shared
intermediate directory, and modify the js2c wrapper script to include all files
from that directory(which is passed as argument).

This allows the build system to embed files that don't share a common base
directory, such as javascript generated at build time.
2016-09-27 06:01:46 -03:00
Thiago de Arruda
6afe8aa7f2 Move EmitIPCEvent into AtomRenderViewObserver.
Refactor this function as a method so it is possible to inherit most behavior
from AtomRenderViewObserver and override EmitIPCEvent.
2016-09-27 06:01:46 -03:00
Thiago de Arruda
c8629019f5 Expose atom_api_renderer_ipc module API 2016-09-27 06:01:46 -03:00
Thiago de Arruda
a7b6332ed0 Add atom::AtomSandboxedRendererClient class 2016-09-27 06:01:46 -03:00
Thiago de Arruda
06cc9a44fe Add support for native chromium popups on sandboxed renderers.
- Allow `api::Window` instances to be created from existing `api::WebContents`.
- Override `WebContentsCreated` and `AddNewContents` to wrap renderer-created
  `content::WebContents` into `api::WebContents`.
- For `content::WebContents` that should be displayed in new windows, pass the
  wrapped `api::WebContents` object to window manager.
2016-09-27 06:01:46 -03:00
Thiago de Arruda
0b3b29938f Allow api::WebContents to fully wrap an existing content::WebContents.
- Add an overload to `WebContents::CreateFrom` that accepts a type parameter. If
  type is `REMOTE`, initialization is the same as before(a thin wrapper). If
  not, the `api::WebContents` will be fully initialized, as if it was created by
  `api::WebContents::Create`.
- Move common initialization code to `InitWithSessionAndOptions`.
2016-09-27 06:01:46 -03:00
Thiago de Arruda
1b1541fe1a Decouple api::Window initialization from api::WebContents construction. 2016-09-27 06:01:46 -03:00
Thiago de Arruda
1d228446db Expose --enable-sandbox command-line switch.
When `--enable-sandbox` is passed, electron will use chromium sandbox to spawn
all renderers, and every new BrowserWindow will automatically have "sandboxed"
passed as a web preference(since the renderer would not work properly
otherwise).
2016-09-27 06:01:46 -03:00
Thiago de Arruda
c783ec72bc Add "sandboxed" option to "webPreferences".
When "sandboxed" is passed as a web preference for `BrowserWindow`, the newly
created renderer won't run any node.js code/integration, only communicating with
the system via the IPC API of the content module. This is a requirement for
running the renderer under chrome OS-level sandbox.

Beyond that, certain behaviors of AtomBrowserClient are modified when dealing
with sandboxed renderers:

- `OverrideSiteInstanceNavigation` no longer create a new `SiteInstance` for
  every navigation. Instead, it reuses the source `SiteInstance` when not
  navigating to a different site.
- `CanCreateWindow` will return true and allow javascript access.
2016-09-27 06:01:46 -03:00
Zeke Sikelianos
90c5972fce Merge pull request #7342 from tinydew4/update-changes
Update changes to korean docs.
2016-09-26 22:19:45 -07:00
Zeke Sikelianos
1f677ed361 fix typo 2016-09-26 22:12:51 -07:00
Zeke Sikelianos
9c19b4e3d5 Merge pull request #7343 from tinydew4/translate-ko
Translate newest styleguide.md and update changes to system-preferences.md
2016-09-26 21:47:42 -07:00
Zeke Sikelianos
d4a1f396fb tweak wording about complex objects 2016-09-26 21:04:54 -07:00
arus
72e3816143 Change a word 2016-09-27 09:38:23 +09:00
arus
9dd181c206 Change some sentences after review 2016-09-27 09:34:59 +09:00
Zeke Sikelianos
9828926002 Merge pull request #7340 from tinydew4/fix-link
Fix broken link in original docs
2016-09-26 12:04:22 -07:00
Zeke Sikelianos
bb955b6202 document lack of MAS support for login item APIs 2016-09-26 11:00:13 -07:00
Cheng Zhao
1dd05ff520 Merge pull request #7338 from electron/fix-get-accent-color-docs
Fix getAccentColor() docs in system-preferences.md
2016-09-26 15:39:40 +08:00
Cheng Zhao
19bd5ea8ba Merge pull request #7316 from tinydew4/update-ko
Update debugging-main-process and Add planned-breaking-changes
2016-09-26 12:56:22 +08:00
arus
bcf7a86dc7 Update changes to ko-KR/api 2016-09-26 00:03:32 +09:00
arus
2fbdac1034 Update changes to ko-KR/api/app.md 2016-09-25 23:50:36 +09:00
arus
577585df63 Update changes to ko-KR/api/power-monitor.md 2016-09-25 23:48:09 +09:00
arus
f13bd655a1 Update changes to ko-KR/api/screen.md 2016-09-25 23:45:56 +09:00
arus
81de0518d9 Update changes to ko-KR/api/web-contents.md 2016-09-25 23:43:24 +09:00
arus
d93a86e8cc Remove some changes 2016-09-25 23:37:34 +09:00
arus
7e186cee55 Remove some changes 2016-09-25 23:28:59 +09:00
arus
97da066ae2 Update changes to ko-KR/api/web-contents.md 2016-09-25 23:25:05 +09:00
arus
b58f73b5c9 Update change to ko-KR/README.md 2016-09-25 23:18:18 +09:00
arus
ad1cb16a76 Update changes to web-view-tag.md 2016-09-25 22:58:41 +09:00
arus
cd4a66dca5 Update changes to browser-window.md 2016-09-25 22:40:05 +09:00
arus
cc282a1114 Update /ko-KR/api/system-preferences.md 2016-09-25 21:57:43 +09:00
arus
270d6f774a Update changes to browser-window and correct a word 2016-09-25 21:40:33 +09:00
Samuel Attard
987a2e173a Fix docs linting 2016-09-25 21:57:37 +13:00
arus
66efaa5e0f Update /ko-KR/styleguide.md 2016-09-25 17:04:34 +09:00
arus
27a9f960de Fix broken link 2016-09-25 16:15:16 +09:00
arus
74e03d285e Fix broken link 2016-09-25 16:13:34 +09:00
arus
123f2a8265 Update /ko-KR/styleguide.md 2016-09-25 16:05:45 +09:00
arus
d25c2d0f41 Update /ko-KR/api/system-preferences.md 2016-09-25 16:05:45 +09:00
Samuel Attard
d2a701a465 Document the return values of all methods in the docs 2016-09-25 12:59:30 +13:00
Vadim Macagon
1df30821db Fix getAccentColor() docs in system-preferences.md
Example was using a non-existent method.
2016-09-25 01:45:34 +07:00
Zeke Sikelianos
bf88fe32fd Merge pull request #7333 from tinydew4/translate-ko
Translate CODE_OF_CONDUCT and change a word as other docs, in korean
2016-09-24 10:04:04 -07:00
arus
e21d5bd380 Change some sentences more smoothly 2016-09-24 15:58:58 +09:00
arus
04bdc87283 Change some smoothly 2016-09-24 11:33:31 +09:00
arus
177ccbc014 Translate CODE_OF_CONDUCT and change a word as other docs, in korean 2016-09-24 10:37:17 +09:00
Zeke Sikelianos
d6cd9e3034 Merge pull request #7331 from tinydew4/fix-link
Fix broken links
2016-09-23 17:19:07 -07:00
Zeke Sikelianos
d391f1b527 Merge pull request #7330 from tinydew4/translate-ko
Translate accessibility and change some in korean
2016-09-23 17:07:40 -07:00
arus
8c7a4de27b Fix broken links 2016-09-24 08:26:25 +09:00
Arus
7cd7894878 Update accessibility.md 2016-09-24 08:23:36 +09:00
arus
d7fc7ef2ee Fix errata 2016-09-24 08:19:24 +09:00
arus
6aef061362 Translate accessibility.md in korean 2016-09-24 08:14:19 +09:00
arus
e4943b3ab3 Change more smoothly 2016-09-24 07:18:39 +09:00
arus
091136908d Replace changes as link of original docs 2016-09-24 06:51:28 +09:00
Zeke Sikelianos
c6390e71d9 Merge pull request #7314 from tinydew4/translate-ko
Translate ko, debug-instructions-macos.md
2016-09-23 11:53:45 -07:00
gellert
ab5e51c209 fixes software rendering on macos and small resizing addition 2016-09-23 20:27:05 +02:00
Menci
938b9e897a 🐧 🐛 Workaround for electron/electron#5050
Chromium only show the Tray icon with libappindicator when the env `XDG_CURRENT_DESKTOP`'s value is `Unity`. But under elementaryOS its value is 'Pantheon'.

Set it to `Unity` before app startup make the tray icon show under elementaryOS.
2016-09-23 18:07:43 +08:00
arus
924033c2ba Remove notice on top 2016-09-23 14:03:42 +09:00
arus
99e256f461 Translate debug-instructinos-macos.md in korean 2016-09-23 14:03:42 +09:00
arus
d2bcbafe73 Translate additonally 2016-09-23 12:56:21 +09:00
arus
5c07643d24 Apply debugging-main-process changes in korean 2016-09-23 12:51:28 +09:00
Zeke Sikelianos
56d62ff589 add html doctype 2016-09-22 14:47:20 -07:00
Zeke Sikelianos
62375663ab add type to webview style tag 2016-09-22 14:34:03 -07:00
Kevin Sawicki
f5694daeb7 Merge pull request #7299 from Gioggio/master
Docs: Start Italian translations
2016-09-22 12:21:09 -07:00
Gioggio
3a73625ece 📝 Update translation for faq.md
[ci skip]
2016-09-22 21:07:13 +02:00
Gioggio
3b45f5a8e9 📝 Add styleguide.md
[ci skip]
2016-09-22 21:07:13 +02:00
Gioggio
78791763cf 📝 Fix typos and improve translations in README.md
[ci skip]
2016-09-22 21:07:13 +02:00
Gioggio
81b55c1700 📝 Add faq.md
[ci skip]
2016-09-22 21:07:13 +02:00
Gioggio
39a3ffdb9d 📝 Add README.md
[ci skip]
2016-09-22 21:07:13 +02:00
Kevin Sawicki
df03c92249 Compare against NSNormalWindowLevel in IsAlwaysOnTop 2016-09-22 09:41:06 -07:00
Kevin Sawicki
c336cf59c1 Ignore level when calling SetAlwaysOnTop on Widget 2016-09-22 09:38:04 -07:00
Kevin Sawicki
fcd6fd9fd5 Merge pull request #7310 from BenV/patch-1
Add npm_config_target_arch to native module doc
2016-09-22 09:34:19 -07:00
Kevin Sawicki
1ec173ad81 Merge pull request #7308 from tinydew4/translate-ko
Apply docs changes to korean docs
2016-09-22 09:32:41 -07:00
Kevin Sawicki
bce62622bb Fix compiler errors 2016-09-22 09:22:28 -07:00
Ben Vinson
1290ddb5c9 Add npm_config_target_arch to native module doc
We ran into an issue when creating a 32-bit binary on 64-bit Windows where node-pre-gyp kept using the 64-bit library. Setting the `npm_config_target_arch` environment variable resolved the problem for us and caused the 32-bit binary to be built and used.
2016-09-22 09:46:31 -06:00
Kevin Sawicki
ea42722918 Merge pull request #7284 from enlight/debugging-with-electron-inspector
Split up debugging-main-process.md, add electron-inspector guide
2016-09-22 08:40:38 -07:00
arus
aac09e5234 Fix erratum 2016-09-22 22:56:19 +09:00
arus
df3896b143 Apply docs changes to korean docs 2016-09-22 22:53:11 +09:00
Cheng Zhao
903bf444d9 Bump v1.4.1 2016-09-22 19:05:58 +09:00
Cheng Zhao
3dad8734a0 Do not copy api.json on Windows 2016-09-22 19:05:58 +09:00
Vadim Macagon
762a5bbefa Split up debugging-main-process.md, add electron-inspector guide
- Move the debugging guides for VSCode and node-inspector into separate
  files.
- Add instructions for using electron-inspector to the node-inspector
  guide.
- Remove note in node-inspector guide about crashing when inspecting
  `process` (it was fixed a long time ago:
  https://github.com/nodejs/node-v0.x-archive/issues/8205)
2016-09-22 15:43:06 +07:00
Cheng Zhao
d3a175cea8 Merge pull request #7303 from electron/fix-out-dir
electron-api.json is under out/ instead of out/R/
2016-09-22 14:39:33 +09:00
Cheng Zhao
4e0f810148 electron-api.json is under out/ instead of out/R/ 2016-09-22 14:31:28 +09:00
Cheng Zhao
32543997d4 Merge pull request #7297 from electron/clean-docs
Mention build cleaning on all three platforms
2016-09-22 14:14:36 +09:00
Cheng Zhao
c9a3ab3a81 Merge pull request #7295 from electron/native-image-bad-path-docs
Mention createFromPath bad path return value
2016-09-22 14:14:15 +09:00
Cheng Zhao
3b4a071723 Merge pull request #7294 from electron/mutate-remote-array-docs
Mention mutating remote arrays and buffers
2016-09-22 14:13:49 +09:00
Cheng Zhao
de9b01409b Merge pull request #7293 from electron/bookmark-windows-docs
Mention using fallback text when writing bookmarks on Windows
2016-09-22 14:13:28 +09:00
Cheng Zhao
296a53536d Merge pull request #7292 from electron/ct-log-verifiers
Upgrade Brigthray for CT log verifier fix
2016-09-22 14:11:20 +09:00
adammeyer
783d47f78b custom window level as string 2016-09-21 22:49:06 -04:00
adammeyer
b35bde662a custom window level docs 2016-09-21 19:06:36 -04:00
deepak1556
ad783652c8 update docs 2016-09-22 00:20:34 +05:30
deepak1556
7ba947aee9 add spec 2016-09-22 00:15:25 +05:30
Kevin Sawicki
696e5e73bc Upgrade Brigthray for CT log verifier fix 2016-09-21 11:29:09 -07:00
Kevin Sawicki
a723d17f49 Mention cleaning on all three platforms 2016-09-21 11:10:52 -07:00
Kevin Sawicki
f8236c1a65 Add more failure asserts for nativeImage.createFromPath 2016-09-21 10:48:24 -07:00
Kevin Sawicki
546c0e7822 Mention createFromPath failure cases 2016-09-21 10:48:01 -07:00
Kevin Sawicki
e7c4d2523b Mention mutating remote arrays and buffers 2016-09-21 10:44:54 -07:00
adammeyer
fbb3a288ec Allow custom window level when sending window to top 2016-09-21 13:35:59 -04:00
Kevin Sawicki
cae15ad6b5 Mention using fallback text when writing bookmarks on Windows 2016-09-21 10:31:01 -07:00
deepak1556
ed465208a2 renderer: add content settings class for managing storage 2016-09-21 21:47:30 +05:30
Kevin Sawicki
c2c48c4079 Merge pull request #7290 from tinydew4/translate-ko
Translate tutorial/about.md
2016-09-21 09:04:20 -07:00
Kevin Sawicki
dc7d2dab68 Merge pull request #7287 from tinydew4/translate-update
Update windows-store-guide.md in ko-KR docs
2016-09-21 09:03:48 -07:00
arus
146970d29d Add missing sample codes 2016-09-22 00:35:27 +09:00
arus
ba2cb42f0d Remove incorrect letters 2016-09-22 00:30:20 +09:00
arus
7dfe1a59b1 Translate remains in about.md 2016-09-22 00:18:28 +09:00
arus
4343f762ac Translate some in about.md 2016-09-22 00:15:57 +09:00
arus
e2f53c6bcc Translate some in about.md 2016-09-22 00:13:44 +09:00
arus
5c22f2ca5d Translate some in about.md 2016-09-22 00:05:26 +09:00
arus
b6d4014bd5 Translate some in about.md 2016-09-22 00:04:24 +09:00
arus
6b8f5f5b7f Translate some in about.md 2016-09-22 00:01:21 +09:00
arus
b7e2f819a3 Translate Core Philosophy in about.md 2016-09-21 23:55:16 +09:00
arus
a8e0e8d7fd Translate LTS in about.md 2016-09-21 23:42:07 +09:00
arus
beea9a7c36 Translate Update dependencies and Versioning in about.md 2016-09-21 23:35:19 +09:00
arus
a44d7a3bc6 Translate some in aboud.md 2016-09-21 23:11:29 +09:00
arus
b45db70d21 Translate Releases in about.md 2016-09-21 23:08:32 +09:00
arus
8feff471ce Modify some in about.md 2016-09-21 23:04:41 +09:00
arus
00dec166e9 Translate Core Team and Contributors in about.md 2016-09-21 23:03:23 +09:00
arus
ebbbaf1ab0 Translate Core Team and Contributors in about.md 2016-09-21 23:03:02 +09:00
arus
29312186de Translate about/about electron in Korean 2016-09-21 22:38:17 +09:00
arus
e1d9e4ffcb Merge branch 'translate-update' of https://github.com/tinydew4/electron into translate-update 2016-09-21 22:01:54 +09:00
arus
b6c04c9e35 Update windows-store-guide.md in ko-KR docs 2016-09-21 22:00:48 +09:00
arus
405b411a29 Merge branch 'translate-update' of https://github.com/tinydew4/electron into translate-update 2016-09-21 21:44:07 +09:00
arus
582fc50cf6 Update windows-store-guide.md in ko-KR docs 2016-09-21 21:43:18 +09:00
arus
b74cfda7b9 Update windows-store-guide.md in ko-KR docs 2016-09-21 21:35:35 +09:00
Cheng Zhao
805ce0dee9 Merge pull request #7276 from electron/google-api-key-env2
allow GOOGLE_API_KEY to be set
2016-09-21 15:16:29 +09:00
Zeke Sikelianos
f4a8fb9eb4 🎨 standard 2016-09-20 14:55:45 -07:00
Kevin Sawicki
85702604c3 Merge pull request #7277 from electron/dictionary-to-object
Set parameter type to Object instead of Dictionary
2016-09-20 14:48:48 -07:00
Kevin Sawicki
98999f4850 Add missing s in progress 2016-09-20 14:46:17 -07:00
Kevin Sawicki
b5e1571204 Set parameter type to Object 2016-09-20 14:26:55 -07:00
Zeke Sikelianos
d7934e7525 add link to chromium API keys doc 2016-09-20 14:13:30 -07:00
Zeke Sikelianos
7fcba6ba0f document the GOOGLE_API_KEY env var 2016-09-20 13:58:39 -07:00
Kevin Sawicki
ea1927f428 Store api_key_ on TokenLoadingJob 2016-09-20 13:24:45 -07:00
Zeke Sikelianos
fa2aaa48b1 allow GOOGLE_API_KEY to be set in environment 2016-09-20 12:01:59 -07:00
Kevin Sawicki
dee383db07 Merge pull request #7273 from tinydew4/fix-links
Fix some bronken links
2016-09-20 09:00:08 -07:00
Kevin Sawicki
04a1dc8e1e Merge pull request #7272 from tinydew4/translate-ko
Translate "offscreen rendering" in Korean
2016-09-20 08:59:53 -07:00
Kevin Sawicki
ae31ded165 Merge pull request #7265 from octref/patch-1
Add instruction for debugging main process in VSCode
2016-09-20 08:59:37 -07:00
arus
402e977b40 Fix some bronken links 2016-09-20 23:36:20 +09:00
arus
a65c8cae63 modify some 2016-09-20 23:30:46 +09:00
arus
47a03d3ca1 modify some 2016-09-20 23:29:34 +09:00
arus
b4a13fda3a Translate offscreen rendering in Korean 2016-09-20 23:19:15 +09:00
Cheng Zhao
e11672d42b Merge pull request #7262 from tinydew4/patch-1
Update browser-window.md
2016-09-20 16:04:25 +09:00
Cheng Zhao
30a6b597a5 Merge pull request #7239 from darkdh/6873
Emit scroll-touch-edge event instead of changing the behavior of scrollll-touch-begin/end
2016-09-20 14:51:10 +09:00
Pine
c45ca254e3 Add instruction for debugging main process in VSCode
I hope you don't mind me putting the VSCode part before `node-inspector`, because VSCode seems easier to setup, and VSCode could inspect `process` without crashing.
2016-09-19 22:43:05 -07:00
Cheng Zhao
143d7ab98f Merge pull request #7264 from electron/docs-readme
Docs Readme
2016-09-20 14:31:31 +09:00
Cheng Zhao
e3e450613d Merge pull request #7157 from Mossop/moveguest
Allow moving a webcontents to a different webview
2016-09-20 14:28:42 +09:00
Cheng Zhao
77fdc67235 Merge pull request #7173 from electron/windows-system-color
Add an app API method to fetch the system ColorizationColor
2016-09-20 14:06:21 +09:00
Zeke Sikelianos
61e50046bd link to the documentation styleguide 2016-09-19 21:10:36 -07:00
Zeke Sikelianos
1cdf8bbc10 break up run-on sentence 2016-09-19 21:09:31 -07:00
Zeke Sikelianos
a3d2cdaa2c website doesn't display docs for old versions any more 2016-09-19 21:09:02 -07:00
Arus
159e2f2dab Update browser-window.md 2016-09-20 11:26:04 +09:00
Kevin Sawicki
e8f3cf164b Merge pull request #7227 from electron/felix-cmd-strings
Ensure correct types for commandLine
2016-09-19 10:22:28 -07:00
Samuel Attard
456f102cdc Fix k typo 2016-09-20 02:42:41 +10:00
Samuel Attard
ba98109d33 Remove semicolons from spec 2016-09-20 02:41:26 +10:00
Samuel Attard
9f94652792 Add basic spec for getAccentColor 2016-09-20 02:41:26 +10:00
Samuel Attard
1454510549 Alphabetical method ordering 2016-09-20 02:41:26 +10:00
Samuel Attard
c0f8b4895d Update docs 2016-09-20 02:41:26 +10:00
Samuel Attard
5dd5dbb3d8 Add a systemPreferences API method to fetch the system ColorizationColor
This is useful for automatical app theming

* Fetches the color from the registry
* Returns an empty string if the fetch fails (a falsey value)
2016-09-20 02:41:26 +10:00
Kevin Sawicki
48fd2bd35f binding -> bindings 2016-09-19 09:31:59 -07:00
Felix Rieseberg
29fa48d8c3 🔧 Ensure correct types for commandLine
This commit ensures that arguments passed to `appendSwitch` and `appendArgument` are turned into strings before passing them over to the binding.
2016-09-19 09:31:59 -07:00
Felix Rieseberg
90bff4d9de 🔧 Ensure correct types for commandLine
This commit ensures that arguments passed to `appendSwitch` and `appendArgument` are turned into strings before passing them over to the binding.
2016-09-19 09:31:59 -07:00
Cheng Zhao
b05254807b Merge pull request #7253 from electron/osr-crash
Unsubscribe observer when OffScreenRenderWidgetHostView is destroyed
2016-09-19 17:54:31 +09:00
Cheng Zhao
e504d82554 spec: Suppress the download.pdf test on AppVeyor 2016-09-19 17:12:33 +09:00
Cheng Zhao
5bf746700e Unsubscribe observer when OffScreenRenderWidgetHostView is destroyed 2016-09-19 16:51:03 +09:00
Cheng Zhao
07a08077a2 Revert electron/brightray#246 2016-09-19 16:31:00 +09:00
Cheng Zhao
26004f1a66 Merge pull request #7241 from miniak/crashed-killed
Add killed argument for webContents.on("crashed") and app.on("gpu-process-crashed") events
2016-09-19 16:02:52 +09:00
Cheng Zhao
1c6586c4b9 Merge pull request #7238 from electron/felix-windows-store-docs
Update Windows Store Language
2016-09-19 15:54:23 +09:00
Cheng Zhao
0ac4b89a0a Merge pull request #7236 from yuya-oc/accelerator-for-redo
Use Ctrl+Y as the accelerator of redo on Windows
2016-09-19 15:53:44 +09:00
Cheng Zhao
6de1eef078 Merge pull request #7234 from Mossop/testhistoryreplace
 Test that replacement history entries don't break forward navigation.
2016-09-19 15:47:30 +09:00
Cheng Zhao
1fd819e500 Merge pull request #7231 from miniak/default-error-mode
Fix ELECTRON_DEFAULT_ERROR_MODE
2016-09-19 15:44:52 +09:00
Cheng Zhao
a260647b4f Merge pull request #7062 from MaxWhere/osr-sizing-fix
Offscreen invalidate and sizing fix
2016-09-19 15:38:11 +09:00
Cheng Zhao
ffe931bde7 Merge pull request #7226 from electron/power-monitor-error
Rethrow caught errors from process.binding
2016-09-19 15:25:18 +09:00
Cheng Zhao
27bc6c7883 Merge pull request #7233 from electron/deprecate-atom-shell-version
Deprecate process.versions['atom-shell']
2016-09-19 15:24:10 +09:00
Cheng Zhao
6c340cece8 Merge pull request #7229 from electron/update-clang
Update clang to r274142.
2016-09-19 15:23:57 +09:00
Cheng Zhao
64718173ef Merge pull request #7230 from electron/windows-x64-link-crypt32
Link against crypt32.lib
2016-09-19 15:23:41 +09:00
Yuya Ochiai
43f955194e 🏁 Use Ctrl+Y as the accelerator of redo on Windows 2016-09-18 17:07:34 +09:00
Milan Burda
8567f79e67 Add killed argument for webContents.on("crashed") and app.on("gpu-process-crashed") events 2016-09-17 17:02:36 -07:00
Anthony Tseng
269a87b26f Emit scroll-touch-edge event instead of changing the behavior of scroll-touch-begin/end
fix #6873
2016-09-17 22:50:10 +08:00
Felix Rieseberg
084110c56f 📝 Update Windows Store Language 2016-09-17 04:19:55 -07:00
Dave Townsend
47df447e4f Test that replacement history entries don't break forward navigation.
This is a test for #7175
2016-09-16 17:08:54 -07:00
Kevin Sawicki
1072519488 Mark atom-shell version as deprecated 2016-09-16 15:59:00 -07:00
gellert
37de2301f7 moves setsize call to osr renderwidgethostview 2016-09-16 23:28:51 +02:00
gellert
fec5a7d67a removes extra header 2016-09-16 23:27:51 +02:00
gellert
8baaad4e0d cleanup and adds docs 2016-09-16 23:27:51 +02:00
gellert
10ea0268e5 calling setsize only on osr windows 2016-09-16 23:27:11 +02:00
gellert
b4c220613f adds invalidate method and proper resizing 2016-09-16 23:27:11 +02:00
Zeke Sikelianos
d4b204799d Merge pull request #7120 from electron/lint-docs
Publish the public API as a JSON object
2016-09-16 14:05:32 -07:00
Milan Burda
12a2b144f3 Only drop the SEM_NOGPFAULTERRORBOX flag when calling SetErrorMode (ELECTRON_DEFAULT_ERROR_MODE) 2016-09-16 14:01:33 -07:00
Kevin Sawicki
7df86c48fa Link against crypt32.lib 2016-09-16 13:17:58 -07:00
Kevin Sawicki
0c3ad527e3 initialize -> require 2016-09-16 13:09:06 -07:00
Haojian Wu
37e30cef60 Update clang to r274142. 2016-09-16 21:59:25 +02:00
Kevin Sawicki
0fda86f79a Mention not requiring module until app is ready 2016-09-16 11:42:02 -07:00
Kevin Sawicki
e77d7e7f62 🎨 2016-09-16 11:41:53 -07:00
Kevin Sawicki
5d0f3534eb Rethrow binding errors 2016-09-16 11:34:52 -07:00
Kevin Sawicki
577394442b power-monitor -> powerMonitor 2016-09-16 09:58:27 -07:00
Cheng Zhao
d1274bb79f Update brightray for #7073 2016-09-16 21:28:24 +09:00
Cheng Zhao
da677b683b Merge pull request #7163 from MaxWhere/frame-sub-scale-fix
Frame subscriber improvements
2016-09-16 21:24:53 +09:00
Cheng Zhao
9dad9478fa Merge pull request #7169 from deepak1556/download_defaultname_patch
browser: provide a default filename when unable to generate from download data
2016-09-16 21:19:21 +09:00
Cheng Zhao
ea244a5188 Merge pull request #7209 from electron/remote-function-missing-properties
Guard against missing remote function properties
2016-09-16 21:11:12 +09:00
Cheng Zhao
69d4cac760 Merge branch 'release' 2016-09-16 21:03:54 +09:00
deepak1556
e7f1265b64 add save-to-disk disposition for new-window event 2016-09-16 16:30:26 +05:30
deepak1556
94faaf7d58 provide a default file name for downloads 2016-09-16 16:02:57 +05:30
deepak1556
d426d4ad90 add failing spec 2016-09-16 16:02:57 +05:30
gellert
64e53a17bd reverts subscriber api 2016-09-16 11:18:15 +02:00
Cheng Zhao
20d5a50ac9 Merge pull request #7178 from aichingm/master
🐧 Add support for different trash implementations
2016-09-16 17:43:09 +09:00
Cheng Zhao
9714348260 Merge pull request #6941 from deepak1556/blob_data_patch
protocol: provide blob uuid with uploadData
2016-09-16 17:01:15 +09:00
Plusb Preco
787bc85703 docs: Update Korean docs as upstream (#7211)
* 📝 Update `README-ko.md`

* Remove Korean readme specified header.
* Add Indonesia community link.

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Mark untranslated docs

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Add untranslated files

[ci skip]

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Update Korean docs as upstream

* 📝 Update `README-ko.md`

* Remove Korean readme specified header.
* Add Indonesia community link.

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Update Korean docs as upstream

* 📝 Mark untranslated docs

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Add untranslated files

[ci skip]

* 📝 Update Korean docs as upstream

[ci skip]

* 📝 Update Korean docs as upstream

* 📝 Correct readme name

[ci skip]

* 📝 Update Korean docs as upstream

[ci skip]
2016-09-15 09:27:10 -07:00
Cheng Zhao
e62e62292a Bump v1.4.0 2016-09-15 14:44:38 +09:00
Cheng Zhao
b84d29fb32 Merge pull request #7213 from electron/chrome-update
Update to Chrome 53.0.2785.113
2016-09-15 14:44:10 +09:00
Cheng Zhao
5be8104104 Update to Chrome 53.0.2785.113 2016-09-15 14:27:56 +09:00
Kevin Sawicki
eef42770c6 Don't load remote properties until they are accessed 2016-09-14 13:29:49 -07:00
Kevin Sawicki
f792c720f4 Allow spec to be run multiple times in same runner 2016-09-14 11:16:44 -07:00
Kevin Sawicki
359ab2f9b3 Only set members when members exist 2016-09-14 10:54:23 -07:00
Kevin Sawicki
bc13536208 Add failing spec for missing remote properties 2016-09-14 10:53:25 -07:00
Kevin Sawicki
0d4872755c Merge pull request #7195 from Joshua-Anderson/update-node-req
Update nodejs requirement for building on linux
2016-09-14 09:52:23 -07:00
Cheng Zhao
4627311c34 Merge pull request #7104 from electron/chrome53
Upgrade to Chrome 53 and Node 6.5.0
2016-09-14 22:18:08 +09:00
Cheng Zhao
dc2ced14b8 Node module version should be 50 2016-09-14 17:08:13 +09:00
deepak1556
eafb6307d5 fix crash when using geolocation api with enableHighAccuracy option 2016-09-14 16:23:01 +09:00
Cheng Zhao
fbac635687 Only emit finalUpdate found-in-page events
Since Chrome 53 all meaningful results of found-in-page are finalUpdate.
2016-09-14 16:23:01 +09:00
Cheng Zhao
5ccd0a24e9 Fix compatibility with canScroll 2016-09-14 16:23:01 +09:00
Cheng Zhao
f8bdc7437d module search paths have changed 2016-09-14 16:23:01 +09:00
Cheng Zhao
1de2b77ee4 Update to Node 6.5.0 2016-09-14 16:23:00 +09:00
Cheng Zhao
18fd3e0329 Fix js linting error 2016-09-14 16:23:00 +09:00
Cheng Zhao
a510642a25 finalUpdate can be false 2016-09-14 16:23:00 +09:00
Cheng Zhao
30dd65e3a9 Fix failing spec when refreshing test window 2016-09-14 16:23:00 +09:00
Cheng Zhao
5708e86a05 Fix API change of findInPage API 2016-09-14 16:23:00 +09:00
Cheng Zhao
937ae7ef8f Fix crash caused by new network parameters 2016-09-14 16:23:00 +09:00
Cheng Zhao
4c56c1c2b2 Fix crash in offscreen renderer 2016-09-14 16:22:59 +09:00
Cheng Zhao
6d8f900916 Fix building on Windows 2016-09-14 16:22:43 +09:00
Cheng Zhao
4aa292c7cd Fix building on Linux 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
2e0a1a8a64 Upgrade to Chrome 53 2016-09-14 16:22:41 +09:00
Cheng Zhao
cfe7bfd7eb Bump v1.3.6 2016-09-14 14:36:11 +09:00
Cheng Zhao
7086bb8973 Merge pull request #7189 from electron/both-arm-names
Upload ARM assets with and without v7l suffix
2016-09-14 14:31:10 +09:00
Cheng Zhao
23ae57fe79 Merge pull request #7188 from electron/app-is-ready-public
Mark app.isReady() as public
2016-09-14 14:30:46 +09:00
Joshua Anderson
56b40ae6d2 Update nodejs requirement for building on linux 2016-09-13 19:41:53 -07:00
Kevin Sawicki
34b9ba2edc Upload ARM assets without v7l suffix 2016-09-13 10:06:09 -07:00
Kevin Sawicki
4c4d585b84 initialization -> initializing 2016-09-13 09:37:03 -07:00
Kevin Sawicki
f373f2ae15 Mark app.isReady() as public 2016-09-13 09:35:39 -07:00
Cheng Zhao
b13bab6fae Merge pull request #7182 from electron/shell-return-values
Return booleans from more shell APIs
2016-09-13 16:46:05 +09:00
Cheng Zhao
4eba8094d4 Merge pull request #7096 from minggo/add-option-to-disable-devtools
add option to disable devtools
2016-09-13 16:01:56 +09:00
Cheng Zhao
df3f0a4516 Merge pull request #7175 from bsuh/fix-twitch-navigation
Fix navigation controller
2016-09-13 16:01:00 +09:00
Cheng Zhao
036a35ab64 Merge pull request #7160 from PierBover/patch-1
added clarification for common Windows pitfalls
2016-09-13 15:09:04 +09:00
Kevin Sawicki
07304e5950 Add missing return value 2016-09-12 14:33:22 -07:00
Kevin Sawicki
00d0887cab Document shell.moveItemToTrash return value 2016-09-12 14:30:01 -07:00
Kevin Sawicki
55eab8e385 Return boolean from shell.openItem 2016-09-12 14:29:06 -07:00
Kevin Sawicki
72558654ef Return boolean from shell.showItemInFolder 2016-09-12 14:22:29 -07:00
Zeke Sikelianos
9e8b0953f3 fix indentation 2016-09-12 10:47:36 -07:00
Kevin Sawicki
05043432dd Merge pull request #7162 from electron/network-entitlements
Document com.apple.security.network entitlements
2016-09-12 09:31:11 -07:00
Mario Aichinger
893fc2cd53 🐧 Add support for different trash implementations
Make the trash implemantation in MoveItemToTrash selectable via an environment variable
2016-09-12 10:41:23 +02:00
Cheng Zhao
9a56959647 Merge pull request #7140 from liusy182/url-fix
fix a bug in navigation-controller where string is used as object
2016-09-12 14:46:05 +09:00
Brian Suh
5fc1f57fb5 Fix navigation controller
In-page navigation has not actually started if the current entry is
being replaced. Do not set inPageIndex if replaceEntry is true.
2016-09-11 14:46:17 -07:00
gellert
2435f1b660 lint fix 2016-09-09 23:50:01 +02:00
gellert
afb551e94a updates tests 2016-09-09 23:40:10 +02:00
gellert
5754f3aea0 update docs 2016-09-09 23:26:14 +02:00
gellert
d3dc66e308 adds scale factor check and simplifies frame subscription 2016-09-09 23:17:17 +02:00
Kevin Sawicki
b128264ae4 Document com.apple.security.network entitlements 2016-09-09 13:55:32 -07:00
Pier Bover
70c1d194ef added clarification for common Windows pitfalls 2016-09-09 13:51:42 -05:00
Dave Townsend
313b2faa3c Add a guestinstance attribute to webviews reflecting their current guest
instance ID and allowing moving a guest instance to a new webview.
2016-09-09 10:32:05 -07:00
Zeke Sikelianos
18585204b7 wrap line to stay under 80 chars 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
3d40c720dd fix indentation and rename function 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
8d201ae1ad generate electron-api.json and upload with release 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
67c89b68d3 use new electron-docs-linter with node 4 support 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
5937d37fc5 move linting work to electron-docs-linter's new CLI 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
56a644d49f move electron.json to docs/api.json 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
0c54700b16 add electron.json (compiled to target 1.2.7 release) 2016-09-09 10:07:22 -07:00
Zeke Sikelianos
3a5bf51d1d add lint-docs script 2016-09-09 10:07:22 -07:00
Kevin Sawicki
01fa9827b4 Merge pull request #7153 from VarunAgw/patch-1
SSL issue in links
2016-09-09 08:05:38 -07:00
Phil Haack
cadbd7beb1 Merge pull request #7145 from electron/device-scale-factor-failures
Get specs passing on displays using certain device scale factors
2016-09-09 07:38:23 -07:00
Cheng Zhao
e189132176 Merge pull request #7123 from deepak1556/asar_range_patch
protocol: respect range header when reading from asar
2016-09-09 20:59:12 +09:00
Varun Agrawal
95206682a0 SSL issue in links 2016-09-09 17:27:27 +05:30
Cheng Zhao
7ed33dfbee Merge pull request #7077 from miniak/title-bar-style
Add support for titleBarStyle: 'hidden-inset' on OS X 10.9
2016-09-09 20:27:26 +09:00
Cheng Zhao
b6079ff90b Merge pull request #7053 from electron/launch-from-notification
Send notification info to app.ready, on macOS
2016-09-09 20:01:39 +09:00
Cheng Zhao
693ba1375b Merge pull request #7146 from electron/resolve-empty-url-values
Tweak how empty URLs are resolved
2016-09-09 19:58:41 +09:00
Cheng Zhao
932b6dc0cf Merge pull request #7142 from electron/require-buffer
Require Buffer explicitly instead of relying on global
2016-09-09 19:52:53 +09:00
Kevin Sawicki
64d436682c Verify resolving URL via console-message event 2016-09-08 17:38:40 -07:00
Kevin Sawicki
7c26fe46b8 === -> !== 2016-09-08 17:12:53 -07:00
Kevin Sawicki
daf1eec5ec Use === for string comparison 2016-09-08 17:11:10 -07:00
Kevin Sawicki
7d24df34fc Place resolve specs in correct outer block 2016-09-08 17:08:49 -07:00
Kevin Sawicki
bfd48fe2ad Add specs for resolving attribute URLs 2016-09-08 16:56:29 -07:00
Kevin Sawicki
1dbaf4987e Don't resolve empty src/preload attribute values 2016-09-08 16:48:30 -07:00
Kevin Sawicki
ea069805d1 Add failing specs for empty preload/src attribute 2016-09-08 16:40:31 -07:00
Kevin Sawicki
68c67b64c5 Use delta when scale factor is above 2 and odd 2016-09-08 16:24:11 -07:00
Charlie Hess
32e0e8a151 Use smart pointers in a couple places. 2016-09-08 16:23:55 -07:00
Kevin Sawicki
59a49f6f96 Use bounds helper in failing specs 2016-09-08 16:20:46 -07:00
Kevin Sawicki
7494e286d9 Put actual value first 2016-09-08 16:20:45 -07:00
Kevin Sawicki
d88f70caa2 Use single assert bounds helper 2016-09-08 16:20:45 -07:00
Kevin Sawicki
71fac07a93 Add scale factor assert helpers 2016-09-08 16:20:45 -07:00
Kevin Sawicki
de6f405d98 Merge pull request #7143 from electron/windows-spec-failures
Fix windows spec failures
2016-09-08 16:13:16 -07:00
Kevin Sawicki
9829baed46 Open about:blank when window.open is called with no URL 2016-09-08 16:10:21 -07:00
Kevin Sawicki
e4e4e8b2eb Add missing {} 2016-09-08 13:12:00 -07:00
Kevin Sawicki
4d20c4f3fd Update productName default in docs 2016-09-08 11:52:29 -07:00
Kevin Sawicki
d407eab0ff Set crashReporter productName in specs 2016-09-08 11:52:29 -07:00
Kevin Sawicki
63e9bc4804 Assert isTTY is undefined on Windows 2016-09-08 11:52:29 -07:00
Kevin Sawicki
638c96345d Merge pull request #7133 from electron/update-travis-node-versions
Upgrade Travis node version
2016-09-08 11:13:00 -07:00
Kevin Sawicki
74bb4bacd7 Add section about Buffer global 2016-09-08 10:42:43 -07:00
Kevin Sawicki
aaf2bb2751 Add spec for deleting Buffer global in preload 2016-09-08 10:34:09 -07:00
Kevin Sawicki
d476227e16 Remove unneeded return 2016-09-08 10:20:39 -07:00
Kevin Sawicki
902bd0564e Require Buffer explicitly instead of relying on global 2016-09-08 10:17:06 -07:00
Kevin Sawicki
24da3d181f Merge pull request #7129 from adamkidder/override_libchromium
Allow LIBCHROMIUMCONTENT_COMMIT to be overridden from the environment
2016-09-08 09:37:05 -07:00
Kevin Sawicki
e8fcdebf6d Update Travis config to build on node 4.5.0 2016-09-08 09:24:59 -07:00
Kevin Sawicki
803943bff8 Merge pull request #7128 from electron/api-breakage-list
Document what APIs will break in Electron 2.0
2016-09-08 09:21:26 -07:00
Kevin Sawicki
ae933140af Add variables to options example 2016-09-08 09:15:05 -07:00
Kevin Sawicki
d1876aa313 Add headings for each module 2016-09-08 09:09:49 -07:00
Kevin Sawicki
25f5135134 Move breaking changes doc to /docs 2016-09-08 09:07:58 -07:00
Kevin Sawicki
2aa64853f4 Add planned 2.0 API breakage 2016-09-08 09:05:49 -07:00
Kevin Sawicki
224d3aef3e Mark detach option for 2.0 removal 2016-09-08 09:05:49 -07:00
liusy182
2c7690be45 simplify logic 2016-09-08 21:36:39 +08:00
liusy182
180a77e671 fix a minor bug in navigation-controller where a string is used as an object 2016-09-08 21:31:42 +08:00
Cheng Zhao
2885e980a5 Merge pull request #7131 from electron/end-sheet-on-close
End sheet in parent when closing modal window
2016-09-08 15:53:07 +09:00
deepak1556
c003c3e28f increase spec timeout 2016-09-08 11:38:24 +05:30
Cheng Zhao
a0eccdfe1e Merge pull request #7130 from electron/windows-stdin-renderer
Add EOF process.stdin in  render process
2016-09-08 15:04:10 +09:00
deepak1556
bd291b9601 protocol: respect range header when reading from asar 2016-09-08 10:14:49 +05:30
deepak1556
1ae7b2fcbc update 2016-09-08 10:12:23 +05:30
deepak1556
7e6cba1482 add failing spec 2016-09-08 09:37:06 +05:30
Kevin Sawicki
45e8c40ae8 Merge pull request #7132 from electron/lint-python-via-npm-run-lint
Run pylint as part of main lint task
2016-09-07 16:49:21 -07:00
Kevin Sawicki
d6b1d61438 Run pylint as part of main lint task 2016-09-07 16:23:59 -07:00
Kevin Sawicki
8652888e27 End sheet in parent when closing modal window 2016-09-07 15:24:37 -07:00
Kevin Sawicki
d76c970da6 Assert read value instead of exception 2016-09-07 14:51:05 -07:00
Kevin Sawicki
28b33074cf Setup stdin in both processes on Windows 2016-09-07 14:45:56 -07:00
Kevin Sawicki
b5e9bb9e6a Add spec for accessing process.stdin 2016-09-07 14:40:18 -07:00
Adam Kidder
8ec49fe57c Allow LIBCHROMIUMCONTENT_COMMIT to be overridden from the environment 2016-09-07 12:06:06 -07:00
Kevin Sawicki
691aec701f Merge pull request #7119 from electron/arrange-project-translations
Arrange meta docs translations
2016-09-07 08:46:37 -07:00
Cheng Zhao
e561608c0d Merge pull request #7116 from electron/restore-no-asar
Restore process.noAsar in finally block
2016-09-07 16:50:26 +09:00
Cheng Zhao
ade60ed482 Merge pull request #7110 from electron/circular-menu-require
Prevent circular Menu require
2016-09-07 16:32:23 +09:00
minggo
3fdc99c3c6 change the option name to devTools 2016-09-07 10:16:52 +08:00
minggo
7d712b77ba remove duplicate comment 2016-09-07 09:43:06 +08:00
Kevin Sawicki
0686908461 Link to translations 2016-09-06 14:58:50 -07:00
Kevin Sawicki
22368d0f06 Move translated project docs to docs-translations folder 2016-09-06 14:54:17 -07:00
Kevin Sawicki
076d957ab9 Merge pull request #7068 from duncup/master
Create translate docs.
2016-09-06 14:47:18 -07:00
Kevin Sawicki
540b1960a8 Merge pull request #7113 from electron/const-default-app
Use const instead of var in default app
2016-09-06 13:42:36 -07:00
Kevin Sawicki
46fbb6ed61 Reset process.noAsar in finally block 2016-09-06 13:40:25 -07:00
Kevin Sawicki
b186d752da Add failing spec for restoring noAsar value 2016-09-06 13:40:15 -07:00
Kevin Sawicki
7bc45c328b Use const instead of var 2016-09-06 11:58:06 -07:00
Kevin Sawicki
b54b74c310 Prevent missing Menu.buildFromTemplate function 2016-09-06 11:31:14 -07:00
minggo
91fb85947d WebContents::InspectElement and WebContents::InspenctServiceWorker return immediately if DevTools is disabled 2016-09-06 17:53:42 +08:00
minggo
2db5aa8294 update browser-window.md to add disableDevTools option 2016-09-06 17:46:55 +08:00
minggo
baa55caf83 remove unneeded whitespace 2016-09-06 11:48:48 +08:00
minggo
19f6811312 initialize disable_devtools_ 2016-09-06 11:08:50 +08:00
minggo
1f1180f857 use webPreferences to disable devtools 2016-09-05 18:25:57 +08:00
minggo
0d7e7be748 add option to disable devtools 2016-09-05 16:27:56 +08:00
Charlie Hess
80f046c8df Update docs. 2016-09-03 12:03:58 -07:00
Milan Burda
9911e60f5b Add support for titleBarStyle: 'hidden-inset' on OS X 10.9 2016-09-03 01:33:20 +02:00
duncup
742a498f13 Create translate docs. 2016-09-02 14:25:56 +08:00
Cheng Zhao
02ce727ff6 Bump v1.3.5 2016-09-02 13:59:28 +09:00
Cheng Zhao
cdfcca147a Fix warning when compiling for win32 ia32 build 2016-09-02 13:59:28 +09:00
Cheng Zhao
8471f647a1 Fix arm's zip name 2016-09-02 13:57:56 +09:00
Kevin Sawicki
0c2da5dcea Merge pull request #7059 from malept/docs-typos
Fix documentation typos
2016-09-01 17:37:28 -07:00
Mark Lee
38e1a24304 📝 Make arch references more consistent
[ci skip]
2016-09-01 07:53:32 -07:00
Mark Lee
00154c7f9c 📝 Add missing words
[ci skip]
2016-09-01 07:49:36 -07:00
Cheng Zhao
249777721c Fix symbols zip's name 2016-09-01 19:18:19 +09:00
Cheng Zhao
31e947a9f7 Update brightray submodule 2016-09-01 19:12:44 +09:00
Cheng Zhao
308f3bb77b Update libchromiumcontent for #5665 2016-09-01 16:38:52 +09:00
Cheng Zhao
14f625d61b Merge pull request #6826 from enlight/set-jump-list
Extend the custom Jump List API provided by Electron
2016-09-01 15:35:21 +09:00
deepak1556
7b85ca0301 create helper class to read blob data 2016-09-01 08:52:44 +05:30
Vadim Macagon
c64294cf60 Extend the custom Jump List API
Add `app.getJumpListSettings()` and `app.setJumpList(callback)` that
make it possible to fully customize the Jump List of an Electron app.
It is now possible to:
- Add tasks to the standard `Tasks` category.
- Add separators to the standard `Tasks` category.
- Add custom categories containing tasks and file links.
- Add system managed Recent/Frequent categories.
- Remove the custom Jump List.
2016-09-01 09:56:14 +07:00
Charlie Hess
f0517812b1 Linter fascism. 2016-08-31 18:12:35 -07:00
Charlie Hess
cd25066c9f Fix oops on Windows / Linux. 2016-08-31 17:26:25 -07:00
Charlie Hess
af9e010162 Send notification userInfo to app.ready, on macOS.
Check if the user launched the app from a notification and send the notification args across if so.
2016-08-31 17:17:44 -07:00
deepak1556
5cbc8d5c71 fix ambiguous constructor call 2016-09-01 01:01:52 +05:30
deepak1556
be4bc6b7ef fix docs and update specs 2016-09-01 01:01:52 +05:30
deepak1556
d2e40d4fc1 update api to work on public url and uuid 2016-09-01 01:01:52 +05:30
deepak1556
a23e7ecf8f add docs 2016-09-01 01:01:52 +05:30
deepak1556
0fb2339e3d session: api to retrieve blob data from uuid 2016-09-01 01:01:52 +05:30
deepak1556
2b0f632d51 provide blob uuid from upload data 2016-09-01 01:01:52 +05:30
Cheng Zhao
a37544cef4 Merge pull request #7041 from Ikana/document-webcontents-fromId
documents webContents.fromId
2016-08-31 21:01:49 +09:00
Cheng Zhao
4833c4800e Merge pull request #6998 from electron/ipc-v8-converter-crash
Don't serialize external values over IPC
2016-08-31 20:45:25 +09:00
Cheng Zhao
5c051c9941 Merge pull request #6986 from electron/arm-release-asset-name
Add v7l to ARM release assets
2016-08-31 20:35:59 +09:00
Cheng Zhao
f854b27bfb Merge pull request #6867 from electron/remote-function-properties
Allow accessing remote function properties
2016-08-31 17:28:09 +09:00
roderik
1ff58a6066 documents webContents.fromId 2016-08-30 22:25:04 -05:00
Kevin Sawicki
3e7a0e4b43 Test external value as send argument 2016-08-30 09:27:12 -07:00
Kevin Sawicki
8a9776b227 Move IsExternal check to FromV8ValueImpl 2016-08-30 08:51:22 -07:00
Cheng Zhao
e2d70fb92b Merge pull request #7028 from electron/default-exit-code
Default app exit code to 0
2016-08-30 19:36:03 +09:00
Cheng Zhao
f30ebc6839 Merge pull request #7026 from Menci/master
Add guide for force new page in print / printToPDF
2016-08-30 19:31:31 +09:00
Cheng Zhao
572f58bc34 Merge pull request #7018 from HanaeKae/jpfont-in-flash
Japanese font rendering in flash.
2016-08-30 17:52:05 +09:00
Cheng Zhao
46b2579441 Merge pull request #7029 from electron/revert-7003-exit-tab-fullscreen
Revert "exit tab fullscreen on destroy"
2016-08-30 17:09:37 +09:00
Cheng Zhao
ee1571e556 Revert "exit tab fullscreen on destroy" 2016-08-30 17:08:51 +09:00
Samuel Attard
adf9acc468 Default app exit code to 0 2016-08-30 13:30:56 +10:00
Menci
ec60c149f5 Add guide for force new page in print / printToPDF 2016-08-30 08:45:39 +08:00
Kevin Sawicki
679ee95e8a Explicitly mention external objects 2016-08-29 10:38:17 -07:00
Kevin Sawicki
625bfe53f7 🎨 2016-08-29 10:38:17 -07:00
Kevin Sawicki
558ee08be9 Add explicit test for IPC cycle detection 2016-08-29 10:38:16 -07:00
Kevin Sawicki
434e7cb5e9 Add test for sending webContents instance over IPC 2016-08-29 10:38:16 -07:00
Kevin Sawicki
0f7e43aa47 Re-enable DOM object over IPC asserts 2016-08-29 10:38:16 -07:00
Kevin Sawicki
58fc1b7933 Ignore external values when serializing 2016-08-29 10:38:16 -07:00
Kevin Sawicki
b17a2874f8 Add empty request error handler 2016-08-29 10:38:16 -07:00
Kevin Sawicki
e38bc17a7b Add regression spec for HTTP request over IPC 2016-08-29 10:38:16 -07:00
Kevin Sawicki
3f4af3a2ba Convert specs to expect empty objects 2016-08-29 10:38:16 -07:00
Kevin Sawicki
4579ec6094 Don't convert values with internal fields 2016-08-29 10:38:16 -07:00
Cheng Zhao
b5dec9990e Merge pull request #7003 from brave/exit-tab-fullscreen
exit tab fullscreen on destroy
2016-08-29 16:36:44 +09:00
Hanae Kae
6ea5e50179 Japanese font rendering in flash. 2016-08-29 16:02:09 +09:00
Cheng Zhao
4e800e7fef Merge pull request #7002 from electron/include-alpha
Enable alphabetical include order cpplint rule
2016-08-29 15:19:05 +09:00
Cheng Zhao
ac9e64cfd4 Merge pull request #7001 from electron/debug-wait-connect
Port --debug-brk support to Node 6.3.0
2016-08-29 15:15:14 +09:00
Kevin Sawicki
9965423c4d Merge pull request #7006 from electron/fix-optional-param-spacing
fix optional param spacing
2016-08-27 12:18:45 -07:00
Zeke Sikelianos
7ff5649965 fix optional param spacing 2016-08-26 23:47:04 -07:00
Kevin Sawicki
3dd5628ded Include windows.h first 2016-08-26 16:00:05 -07:00
bridiver
4532114965 exit tab fullscreen on destroy 2016-08-26 15:52:15 -07:00
Kevin Sawicki
6285500cdc Sort includes alphabetically 2016-08-26 15:30:02 -07:00
Kevin Sawicki
56c17ae516 Enable alphabetical include order lint filter 2016-08-26 15:29:53 -07:00
Kevin Sawicki
307b504eb4 Merge pull request #6925 from BraveNewMath/patch-1
fix windows command prompt error
2016-08-26 14:17:55 -07:00
Kevin Sawicki
8d194691fe Add separate platform examples for running electron 2016-08-26 14:16:30 -07:00
Kevin Sawicki
7dd1a7e6f4 Only set _debugWaitConnect in main process 2016-08-26 12:30:27 -07:00
Kevin Sawicki
a2f0111205 Remove v8debug flag no longer supported by node 2016-08-26 12:08:18 -07:00
Kevin Sawicki
056e5b951b Set process._debugWaitConnect with --debug-brk is specified 2016-08-26 12:06:15 -07:00
Cheng Zhao
723c74ace6 Merge pull request #6989 from Menci/master
[doc] Add support for titleBarStyle hidden on macOS 10.9
2016-08-26 20:57:26 +09:00
Cheng Zhao
c5ece2bfb1 Merge pull request #6984 from electron/zoom-webview
Document <webview>.setZoomFactor/Level as public
2016-08-26 20:56:47 +09:00
Cheng Zhao
cd469b5f31 Merge pull request #6983 from electron/download-item-prompt
Check DownloadItem save path before prompting
2016-08-26 20:41:03 +09:00
Cheng Zhao
d35613b5ad Merge pull request #6977 from electron/ipc-cycle-detection
Improve cycle detection in IPC arguments
2016-08-26 20:26:00 +09:00
Menci
a9eb6b7238 Add support for titleBarStyle hidden on macOS 10.9
"titleBarStyle: 'hidden'" supports macOS 10.9 now. See https://github.com/electron/electron/pull/6848 and ab8fd49c72 for more info.
2016-08-26 12:06:56 +08:00
Kevin Sawicki
fd38cfd88c Remove unused imports 2016-08-25 17:57:14 -07:00
Kevin Sawicki
d0b95e9298 Add v7l suffix to ARM build assets 2016-08-25 17:51:37 -07:00
Kevin Sawicki
87e60466d3 Add helper for generating zip file names 2016-08-25 17:50:12 -07:00
Zeke Sikelianos
34e0f8c644 Merge pull request #6985 from electron/more-parameter-fixes
More parameter fixes
2016-08-25 17:28:36 -07:00
Zeke Sikelianos
e91dc83b2c capitalize 2016-08-25 17:26:57 -07:00
Zeke Sikelianos
0ba9564629 use the right bullet 2016-08-25 17:26:52 -07:00
Zeke Sikelianos
ab1238d8fd add a description for BrowserWindowProxy 2016-08-25 15:20:05 -07:00
Kevin Sawicki
bdaea02d8a Document <webview>.setZoomFactor/Level as public 2016-08-25 14:55:01 -07:00
Zeke Sikelianos
5619558689 document some missing parameters 2016-08-25 14:43:06 -07:00
Zeke Sikelianos
0e4e60625f fix method heading level 2016-08-25 14:42:53 -07:00
Kevin Sawicki
3108b8aacd Use path to non-existent file 2016-08-25 14:40:15 -07:00
Kevin Sawicki
cf93e3e713 Check download item save path before prompting 2016-08-25 14:34:48 -07:00
Kevin Sawicki
1de8a0dcf9 Add failing spec for unwanted save dialog 2016-08-25 14:27:37 -07:00
Kevin Sawicki
e14e92147d Merge pull request #6981 from electron/typo-in-method-name
Correct misspelling of destroy in method name
2016-08-25 13:45:42 -07:00
Kevin Sawicki
7a0129bbc7 Correct misspelling of destroy in method name 2016-08-25 12:28:57 -07:00
Zeke Sikelianos
9548184b15 Merge pull request #6980 from electron/method-params-take-2
Document all Method Parameters
2016-08-25 11:25:01 -07:00
Zeke Sikelianos
28d42ba35b document missing method parameters 2016-08-25 10:52:19 -07:00
Kevin Sawicki
50e2e26e4f Improve cycle detection in V8ValueConverter 2016-08-25 09:26:07 -07:00
Kevin Sawicki
10d39f673a Add failing spec for duplicate references over IPC 2016-08-25 09:25:13 -07:00
Cheng Zhao
97a004a357 Merge pull request #6963 from electron/remote-buffers
Serialize ArrayBuffers as Buffers instead of Arrays over remote
2016-08-25 17:29:12 +09:00
Cheng Zhao
764c84f569 Merge pull request #6952 from deepak1556/custom_scheme_filesystem_patch
protocol: allow standard schemes to support filesystem api
2016-08-25 09:28:34 +09:00
Cheng Zhao
6e75e8e2bf Merge pull request #6961 from electron/fullscreen-linux
Only change window state when fullscreen is true
2016-08-25 09:23:02 +09:00
Kevin Sawicki
b688539fe9 🎨 Use const 2016-08-24 17:00:03 -07:00
Kevin Sawicki
e1cf61f0cb Add spec for Int16Array remote parameter 2016-08-24 16:47:14 -07:00
Kevin Sawicki
a1a7b1779c Add missing space after comma 2016-08-24 16:41:59 -07:00
Kevin Sawicki
01e69353d5 Don't serialize ArrayBuffer as Array 2016-08-24 15:18:42 -07:00
Kevin Sawicki
363a02b82d Add more remote Buffer specs 2016-08-24 15:01:52 -07:00
Kevin Sawicki
554e944105 Add test of sending Buffer 2016-08-24 14:49:25 -07:00
Zeke Sikelianos
a97b40eff5 Install node 4 on GitHub CI (#6948) 2016-08-24 14:37:19 -07:00
Kevin Sawicki
459c80da4e Only change window state when fullscreen is true 2016-08-24 14:30:29 -07:00
Kevin Sawicki
4ce2c221c9 Minor doc edits and link to MDN page 2016-08-24 09:03:44 -07:00
deepak1556
62cb8428fb use schemes from global instead of commandline 2016-08-24 20:22:35 +05:30
Cheng Zhao
7bdce52290 Merge pull request #6944 from electron/check-window-from-native-view
Access native window through native view
2016-08-24 16:25:27 +09:00
Cheng Zhao
dc73a5afea Merge pull request #6896 from malept/fix-checksum-format
The checksum file needs to indicate that the files should be opened in binary mode
2016-08-24 16:15:22 +09:00
deepak1556
ae297760af add spec and docs 2016-08-24 06:53:14 +05:30
deepak1556
ad0c86db7a register custom schemes to access files through filesystem api 2016-08-24 05:46:54 +05:30
Kevin Sawicki
21de91d6e2 Don't open dev tools if already initialized 2016-08-23 15:26:13 -07:00
Kevin Sawicki
1276587ebe Merge pull request #6934 from electron/add-missing-class-descriptions
Give every class a description
2016-08-23 10:16:29 -07:00
Kevin Sawicki
463b3de199 Use correct GetToplevelWindow signature 2016-08-23 10:12:55 -07:00
Kevin Sawicki
399470e281 Add spec for detached window crash 2016-08-23 10:06:05 -07:00
Kevin Sawicki
dd5ee28b2f Access window through native view 2016-08-23 09:51:54 -07:00
Jessica Lord
bb7599cddd Merge pull request #6938 from electron/add-accessibility-doc
Add accessibility doc
2016-08-23 09:30:02 -07:00
Cheng Zhao
88979a9844 Bump v1.3.4 2016-08-23 17:03:07 +09:00
Cheng Zhao
4ca6587660 Merge pull request #6935 from electron/default-network-conditions
Default network conditions to 0.0
2016-08-23 16:40:36 +09:00
Zeke Sikelianos
098d4dc0ca improve wording about class instantiation 2016-08-22 21:45:25 -07:00
Kevin Sawicki
ec44a5d198 Add tests for setting remote function properties 2016-08-22 17:07:18 -07:00
Kevin Sawicki
666a668d91 Support remote function keys and property descriptors 2016-08-22 17:07:18 -07:00
Kevin Sawicki
d226b7bc6c Use Proxy for accessing properties of remote function 2016-08-22 17:07:18 -07:00
Kevin Sawicki
8b38018ab4 Add helper for including function properties 2016-08-22 17:07:17 -07:00
Kevin Sawicki
3245bb99b2 Only register methods with members 2016-08-22 17:07:17 -07:00
Kevin Sawicki
600076b46d Remove lint from fixtures 2016-08-22 17:07:17 -07:00
Kevin Sawicki
d333cc5e38 Support remote function properties 2016-08-22 17:07:17 -07:00
Kevin Sawicki
9e4665fbc4 Add failing spec for remote static members 2016-08-22 17:07:17 -07:00
Kevin Sawicki
5cc61089d9 Add failing spec for remote function with properties 2016-08-22 17:07:17 -07:00
Jessica Lord
d2ad88978a Add accessibility doc 2016-08-22 16:27:33 -07:00
Kevin Sawicki
0485e9eb36 🎨 Go back to single line declaration 2016-08-22 16:26:31 -07:00
Kevin Sawicki
0955c2fd4d Merge pull request #6936 from electron/add-missing-require
add missing require to win.loadURL doc
2016-08-22 15:49:48 -07:00
Zeke Sikelianos
84fc1d022f add missing require to win.loadURL doc 2016-08-22 14:25:48 -07:00
Kevin Sawicki
4fc6cf48b0 Document enableNetworkEmulation defaults 2016-08-22 14:25:42 -07:00
Kevin Sawicki
ad3dc3766e Default network values to 0.0 2016-08-22 14:19:09 -07:00
Zeke Sikelianos
3d371e09b7 add a blockquote for every class 2016-08-22 14:11:03 -07:00
Kevin Sawicki
e84d0ebb7e Merge pull request #6932 from electron/fix-power-save-blocker-doc-bug
Fix some invalid docs
2016-08-22 12:30:00 -07:00
Zeke Sikelianos
8c0a551d25 fix linting errors in docs 2016-08-22 11:47:55 -07:00
Zeke Sikelianos
ee44ab7ecd wrap MenuItem constructor in backticks 2016-08-22 11:29:15 -07:00
Zeke Sikelianos
39c5ff2077 missing space in doc 2016-08-22 11:17:05 -07:00
Cheng Zhao
d6a63855c4 Merge pull request #6926 from electron/fix-fetch
Use scoped policy for micro tasks
2016-08-22 20:08:08 +09:00
Cheng Zhao
103fea5cdf Use scoped policy for micro tasks 2016-08-22 19:34:59 +09:00
Cheng Zhao
9bc6302aea spec: Add test case for fetch 2016-08-22 19:26:07 +09:00
Cheng Zhao
374e23fc37 Merge pull request #6922 from TomKaltz/patch-1
Update devtools-extension.md
2016-08-22 16:52:18 +09:00
Elias
1fe3b70a23 fix windows command prompt error
path to electron needs to be wrapped in quotes or else windows command prompt will error out
2016-08-22 00:29:33 -07:00
Cheng Zhao
c1989fb794 Merge pull request #6913 from markwylde/bugfix-spelling-fix
Fix spelling mistake from registred to registered
2016-08-22 11:19:09 +09:00
Cheng Zhao
be9fa3c9d3 Merge pull request #6923 from electron/fix-path-compatibility
Do not add extra space when args is empty
2016-08-22 11:00:07 +09:00
Cheng Zhao
23ca9fcd02 Merge pull request #6900 from electron/loadurl-example
Improve doc for loadURL
2016-08-22 10:46:03 +09:00
Cheng Zhao
31b82731ac Cleanup the usages of std::wstring 2016-08-22 09:57:52 +09:00
Cheng Zhao
77dfd3a76c Do not add extra space when args is empty 2016-08-22 09:50:58 +09:00
Cheng Zhao
8b9fd8a76e Merge pull request #6858 from electron/default-protocol-launch-args
Allow settings of launch args when using defaultProtocol
2016-08-22 09:32:54 +09:00
Thomas Kaltz III
77dc700c51 Update devtools-extension.md
Cerebral Debugger is now supported under Electron
2016-08-21 17:36:26 -04:00
Mark Wylde
c55b1e87ed Fix spelling mistake from registred to registered 2016-08-20 14:25:13 +01:00
Zeke Sikelianos
1985432e8e recommend url.format for file URLs 2016-08-19 13:31:57 -07:00
Zeke Sikelianos
d9901e62b6 improve doc for loadURL 2016-08-18 22:20:55 -07:00
Will Eccles
488fe53276 fixed grammar for 32bit 2016-08-18 08:56:12 -07:00
Mark Lee
aaf9c5327c The checksum file needs to indicate that the files should be opened in binary mode 2016-08-18 08:35:54 -07:00
Samuel Attard
ab7899d0fb Fix linting issues 2016-08-18 20:42:06 +10:00
Samuel Attard
73246112d2 Use base::string16 and base::JoinString instead of custom methods 2016-08-18 20:35:57 +10:00
Samuel Attard
ca971e978e Return boolean instead of empty string when error occurs. Update docs 2016-08-18 18:02:13 +10:00
Cheng Zhao
293ba4230d Merge pull request #6888 from electron/show-spec-runner-initially
Show spec window initially when not on CI
2016-08-18 15:27:09 +09:00
Cheng Zhao
b9b6fc238e docs: Correctly fomart titleBarStyle line 2016-08-18 14:42:10 +09:00
Cheng Zhao
105597c7e8 Merge pull request #6848 from miniak/titlebar-style-hidden
Add support for titleBarStyle: 'hidden' on OS X 10.9
2016-08-18 14:40:54 +09:00
Cheng Zhao
06d2dfe119 Merge pull request #6788 from electron/felix-progress-enum
Use enum to declare ProgressState
2016-08-18 14:35:00 +09:00
Cheng Zhao
56d17a1449 Merge pull request #6829 from electron/fix-thumbar-buttons-vanishing
Save the thumbar buttons when setting them to restore later
2016-08-18 14:34:26 +09:00
Cheng Zhao
9b00e3f432 Merge pull request #6882 from duncup/patch-1
Fix typos
2016-08-18 11:51:43 +09:00
Kevin Sawicki
dfb6a9b07d Show window when not on CI 2016-08-17 14:25:42 -07:00
Kevin Sawicki
6813c03f30 Merge pull request #6853 from electron/about-documentation
Add About Electron documentation
2016-08-17 08:53:33 -07:00
Kevin Sawicki
b8971ae185 Merge pull request #6871 from electron/update-docs-for-electron-npm
Update docs re: electron module update
2016-08-17 08:52:42 -07:00
Kevin Sawicki
09adffe48f Merge pull request #6870 from electron/more-permissive-standard-markdown
Use a more permissive version of standard-markdown
2016-08-17 08:52:06 -07:00
Kevin Sawicki
bc3d2cfc34 Merge pull request #6875 from electron/remove-styleguide-rule-about-endlines
source files DO have newlines at the end
2016-08-17 08:51:20 -07:00
wolf
e9b5833ed4 Fix typos
Fix typos,`当前也` change to `当前页`
修正错别字,`当前也`改为`当前页`
2016-08-17 22:16:28 +08:00
Cheng Zhao
0b7b6b38c0 Merge pull request #6872 from electron/only-show-extension-button-on-save-dialog
Only call setCanSelectHiddenExtension on save dialogs
2016-08-17 22:35:15 +09:00
Cheng Zhao
faebe5259d Merge pull request #6861 from megahertz/bug_window_location
Apply resolveURL when set a location of a window opened by window.open()
2016-08-17 22:04:46 +09:00
Cheng Zhao
fc57201406 Merge pull request #6857 from brave/object-registry
clear the storage for the webContentsId when the render view is deleted
2016-08-17 21:47:39 +09:00
Cheng Zhao
79f35fa475 Merge pull request #6850 from electron/disable-resize-when-changing-style-mask
Disable all resizes when changing the window's style mask
2016-08-17 21:19:35 +09:00
Cheng Zhao
2e8d7cd6db Merge pull request #6881 from electron/data-string
Certificate data is now a string
2016-08-17 21:13:31 +09:00
Cheng Zhao
8f9a0100e3 Certificate data is now a string 2016-08-17 20:48:09 +09:00
Cheng Zhao
47c37d6f51 Merge pull request #6814 from brave/net-converter-fix
don't convert a string to an array buffer
2016-08-17 20:44:13 +09:00
Cheng Zhao
bd03ae53f2 Merge pull request #6832 from hammerandchisel/bug/remote_object_freer_crash
fix intermittent crash in RemoteObjectFreer
2016-08-17 20:31:06 +09:00
Cheng Zhao
4e355355a9 Merge pull request #6851 from electron/focused-web-contents-from-hidden-windows
Prevent web contents in hidden windows from reporting as focused
2016-08-17 20:15:37 +09:00
Zeke Sikelianos
515e25b749 source files DO have newlines at the end 2016-08-16 21:24:53 -07:00
Kevin Sawicki
4fc4f0ae53 Only call setCanSelectHiddenExtension for save dialogs 2016-08-16 17:22:44 -07:00
Kevin Sawicki
925fb27b1e Merge pull request #6874 from electron/tweak-flaky-web-contents-spec
Tweak flaky web contents spec
2016-08-16 16:42:01 -07:00
Kevin Sawicki
6cca62788d Assert first and last web contents types 2016-08-16 16:19:32 -07:00
Jessica Lord
3ebd5fbd8f Update docs re: electron module update 2016-08-16 15:57:07 -07:00
Zeke Sikelianos
cc2b95fac3 js → javascript 2016-08-16 14:50:21 -07:00
Zeke Sikelianos
e71280f31c restore js label to orphan code blocks 2016-08-16 14:49:42 -07:00
Zeke Sikelianos
8527bc360a bump standard-markdown for orphan array support 2016-08-16 14:48:35 -07:00
Zeke Sikelianos
6b298213ab update standard-markdown to 1.2.0 2016-08-16 14:07:50 -07:00
Jessica Lord
8d9aaf1d5e Fix date 2016-08-16 11:34:20 -07:00
Kevin Sawicki
959613bb04 Merge pull request #6865 from electron/test-for-request-headers-without-path-expansion
Add test for header with . characters
2016-08-16 10:05:48 -07:00
Kevin Sawicki
1f46574efe Add test for header with . characters 2016-08-16 09:08:36 -07:00
Kevin Sawicki
c93a8fb4ea Merge pull request #6856 from brave/nested-header-fix
don't convert header names to nested values
2016-08-16 08:54:26 -07:00
Alexey Prokhorov
16f2702495 Apply resolveURL when set a location of a window opened by window.open() 2016-08-16 16:24:49 +05:00
Samuel Attard
88bf089504 Pass args through correctly 2016-08-16 17:40:44 +10:00
Samuel Attard
14154e374a Fix cpp linting issues 2016-08-16 15:54:30 +10:00
Samuel Attard
ce986590cf Clarify defaults 2016-08-16 15:39:36 +10:00
Samuel Attard
db27da5db0 Document the optional params 2016-08-16 15:38:35 +10:00
Samuel Attard
e5daf63b0e Allow client to specify EXE file and args to set as default handler
* Optional path param to setAsDefaultProtocolClient
* Optional args param to setAsDefaultProtocolClient
2016-08-16 15:35:33 +10:00
bridiver
3b11bf5e41 clear the storage for the webContentsId when the render view is deleted 2016-08-15 21:53:58 -07:00
bridiver
ca4cbe34a0 don't convert header names to nested values
fixes #6855
2016-08-15 17:21:14 -07:00
Jessica Lord
fd9a032839 Add About Electron documentation 2016-08-15 16:26:30 -07:00
Kevin Sawicki
0755349e70 Ensure hidden windows don't have focused webContents 2016-08-15 14:13:24 -07:00
Kevin Sawicki
cc7fe82b74 Add failing webContents.isFocused spec 2016-08-15 14:11:08 -07:00
Kevin Sawicki
86e5bd3552 Disable resize during any stylemask change 2016-08-15 13:18:22 -07:00
Milan Burda
ab8fd49c72 Add support for titleBarStyle: 'hidden' on OS X 10.9 (hidden-inset falls back to hidden) 2016-08-15 22:10:38 +02:00
Kevin Sawicki
c754b5efdc Add failing spec for state changes resizing frameless window 2016-08-15 12:30:26 -07:00
Kevin Sawicki
420f756c47 Merge pull request #6846 from ysagal/patch-1
Added `title` to `page-title-updated` return args
2016-08-15 10:11:16 -07:00
Stan
c9f80dfc7b Added title to page-title-updated return args 2016-08-15 13:06:29 -04:00
Kevin Sawicki
2a67b05fcf Merge pull request #6838 from Gerhut/master
📝 Rename `electron-prebuilt` to `electron` when install [ci skip]
2016-08-15 08:53:45 -07:00
程启翔
91ed01df26 📝 Rename electron-prebuilt to electron when install [ci skip]
ref electron-userland/electron-prebuilt#160
2016-08-14 12:42:26 +08:00
bridiver
94c60379d1 don't convert a string to an array buffer 2016-08-13 13:35:23 -07:00
Andy Dill
704561b255 use MSG_ROUTING_NONE to initialize routing_id_ rather than 0 2016-08-12 13:03:31 -07:00
Haojian Wu
6a9801b82c Remove an extra space in front of #. 2016-08-12 22:01:30 +02:00
Andy Dill
a3bd54a41a 👕 fix lint line length error in remote_object_freer 2016-08-12 09:38:49 -07:00
Andy Dill
067aa3dbef cache routing_id so we can look up the render_view in RunDestructor with no v8 calls 2016-08-12 09:16:10 -07:00
Samuel Attard
2fa7aa3c71 Save the thumbar buttons when setting them
Then restore the buttons when restoring the taskbar icon
2016-08-13 01:55:42 +10:00
Cheng Zhao
05518ccd52 Merge pull request #6817 from deepak1556/context_menu_image_patch
webContents: fix value of contextMenu hasImageContents property
2016-08-12 17:51:40 +09:00
Cheng Zhao
d84098c4c1 Merge pull request #6816 from deepak1556/webframe_scheme_patch
webFrame: enable privileged schemes to send CORS requests
2016-08-12 17:48:50 +09:00
Cheng Zhao
620847d2fd Merge pull request #6755 from electron/upgrade-clang
Upgrade clang
2016-08-12 17:38:03 +09:00
Cheng Zhao
c41183302b Update brightray for #6755 2016-08-12 17:37:38 +09:00
Cheng Zhao
f30fe5643a Merge pull request #6812 from electron/bootstrap-defines
Support build variable setting during bootstrap
2016-08-12 17:11:22 +09:00
Cheng Zhao
6a7c6cae3a Merge pull request #6810 from electron/iframe-ismainpage-event
Send isMainFrame as argument to did-navigate-in-page event
2016-08-12 17:10:47 +09:00
deepak1556
ee298ea0e3 webContents: fix value of contextMenu hasImageContents property 2016-08-12 00:55:20 +05:30
Haojian Wu
fc36048d78 Move project-specific flags to common.gypi. 2016-08-11 21:08:12 +02:00
Haojian Wu
42a5b1f5bc Don't show -Wvarargs warning in libuv. 2016-08-11 20:59:06 +02:00
Haojian Wu
2e5eeef70e Pass compilation on mac. 2016-08-11 20:59:06 +02:00
Haojian Wu
cd169f933e Upgrade clang to r269902. 2016-08-11 20:59:06 +02:00
deepak1556
77173be1c6 webFrame: enable privileged schemes to send CORS requests 2016-08-11 23:01:10 +05:30
Kevin Sawicki
d07e40b415 Support build variable setting during bootstrap 2016-08-11 09:50:40 -07:00
Samuel Attard
0b624315b2 Fix attribute typo in docs 2016-08-12 01:49:56 +10:00
Samuel Attard
5b07e8dd5b Send isMainFrame as argument to did-navigate-in-page event 2016-08-12 01:27:50 +10:00
Cheng Zhao
58b391cb77 Merge pull request #6801 from electron/libchromiumcontent-packages
Add gperf and bison to package install commands
2016-08-11 17:23:33 +09:00
Cheng Zhao
b285b22b07 Update native_mate 2016-08-11 17:23:03 +09:00
Cheng Zhao
919571a5fc Merge pull request #6804 from electron/clean-libchromiumcontent-src
Clean libchromiumcontent/src
2016-08-11 17:20:44 +09:00
Cheng Zhao
e491b7932f Merge pull request #6789 from electron/felix-ignore-vscode
Gitignore Visual Studio Files
2016-08-11 17:16:41 +09:00
Kevin Sawicki
bc28f8d3cc Add clean npm run script 2016-08-10 17:36:58 -07:00
Kevin Sawicki
321e953a1d Clean libchromiumcontent/src 2016-08-10 17:36:57 -07:00
Kevin Sawicki
252aca8834 Add gperf and bison to package install commands 2016-08-10 17:34:58 -07:00
Kevin Sawicki
e290d51412 Merge pull request #6796 from electron/disable-global-shortcut-spec-on-windows-ci
Disable globalShortcut spec on Windows CI
2016-08-10 09:57:51 -07:00
Felix Rieseberg
8b85ee8a20 🔧 Use enum to declare ProgressState
As recommended in #6768, this commit adds an enum for progress states for windows.
2016-08-10 08:56:26 -07:00
Felix Rieseberg
96632370b2 Gitignore Visual Studio Files
Adds Visual Studio and Visual Studio Code configuration files (auto-generated) to .gitignore.
2016-08-10 08:54:50 -07:00
Kevin Sawicki
b017d2d324 Disable globalShortcut spec on Windows CI 2016-08-10 08:52:50 -07:00
Cheng Zhao
912c7716b3 Bump v1.3.3 2016-08-10 16:00:24 +09:00
Cheng Zhao
d9b872b073 Merge pull request #6787 from electron/api-specs
Add initial specs for untested modules
2016-08-10 15:55:23 +09:00
Kevin Sawicki
2a0eb72334 Add asserts for crash report APIs 2016-08-09 15:44:04 -07:00
Kevin Sawicki
ce0165367c Add spec for invalid capture options 2016-08-09 15:31:24 -07:00
Kevin Sawicki
a6353eb98f Add initial global shortcut spec 2016-08-09 15:13:05 -07:00
Kevin Sawicki
39e1541a7e Add initial power save blocker spec 2016-08-09 15:05:56 -07:00
Kevin Sawicki
ab0d726594 Merge pull request #6782 from electron/dip-thumbnail-clip
Convert DIP to screen rect for thumbnail clip
2016-08-09 09:16:10 -07:00
Kevin Sawicki
2802d2f3f9 Use gfx::Rect::ToRECT 2016-08-09 08:50:06 -07:00
Kevin Sawicki
5f2a13d01b Convert dip to screen rect for thumbnail clip 2016-08-09 08:40:38 -07:00
Cheng Zhao
6cd99ebf6b Merge pull request #6752 from lgalabru/feature/macos-native-notifications
Send events as native macOS notifications
2016-08-09 21:34:52 +09:00
Cheng Zhao
dd79c71302 Style fixes for SetProgressBar 2016-08-09 21:02:14 +09:00
Cheng Zhao
81244c2221 Merge pull request #6768 from electron/felix-set-progress
Enable mode indication for setProgressBar
2016-08-09 20:58:07 +09:00
Cheng Zhao
01f92a83ab Merge pull request #6780 from electron/update-available-check
Mark update available until restart
2016-08-09 20:44:26 +09:00
Cheng Zhao
25f29e30f5 Merge pull request #6776 from electron/remove-has-real-name-callback-property-check
Remove HasRealNamedCallbackProperty check when converting objects
2016-08-09 20:26:26 +09:00
Cheng Zhao
4a9bb87f31 Merge pull request #6777 from electron/zoom-roles
Add zoom menu item roles
2016-08-09 20:24:06 +09:00
Ludovic Galabru
a5351407c5 Fixing indentation 2016-08-09 05:57:02 -04:00
Felix Rieseberg
73c91dae9e 🔧 Enable mode indication for setProgressBar
This commit enables setting a mode for the setProgressBar method.
Old behavior is kept intact, usage is entirely optional.
2016-08-08 15:52:20 -07:00
Kevin Sawicki
0747957919 Add spec for quitAndInstall with no update on Windows 2016-08-08 13:13:08 -07:00
Kevin Sawicki
dd6c69c90b Use const instead of var 2016-08-08 13:07:01 -07:00
Kevin Sawicki
49908fd818 Keep update available flag set until restart 2016-08-08 13:03:02 -07:00
Kevin Sawicki
11b14f7621 Add zoom items to menu template 2016-08-08 11:09:30 -07:00
Kevin Sawicki
af607f8b67 🎨 function -> => 2016-08-08 11:09:30 -07:00
Kevin Sawicki
bcc372568f Add zoom menu item roles 2016-08-08 11:09:30 -07:00
Kevin Sawicki
59ffe35781 Merge pull request #6765 from miniak/menu-speaking-roles
Add macOS specific speaking roles for MenuItem
2016-08-08 11:06:45 -07:00
Kevin Sawicki
e767d3c131 Add spec for executeJavaScript DOM class prototype 2016-08-08 09:42:43 -07:00
Kevin Sawicki
42a1136c88 Remove HasRealNamedCallbackProperty check 2016-08-08 09:35:40 -07:00
Kevin Sawicki
8b3aa4dbb4 Add spec for sending document.location over IPC 2016-08-08 09:35:30 -07:00
Cheng Zhao
872fbe8ba0 Merge pull request #6762 from miniak/set-thumbnail-clip
Add BrowserWindow.prototype.setThumbnailToolTip
2016-08-08 20:27:15 +09:00
Cheng Zhao
3dd57d1171 Update brightray and libchromiumcontent to latest for #6769 2016-08-08 20:17:41 +09:00
Cheng Zhao
f5abae31a3 Code cleanup for native_window_mac
Method definitions should matche sequence of declarations.
2016-08-08 20:15:45 +09:00
Milan Burda
a6125c538e Add BrowserWindow.prototype.setThumbnailToolTip 2016-08-08 12:05:47 +02:00
Cheng Zhao
a432fb0c34 Merge pull request #6766 from miniak/set-user-tasks-result
Report app.setUserTasks success/failure
2016-08-08 17:43:08 +09:00
Cheng Zhao
850ea37abd Merge pull request #6761 from bbondy/master
Fix printing on Windows when sandbox is enabled
2016-08-08 16:52:07 +09:00
Cheng Zhao
d1b9d03c74 Merge pull request #6754 from darkdh/swipe_conflict
Fix scroll conflict
2016-08-08 16:23:52 +09:00
Cheng Zhao
b6becdeae7 Merge pull request #6741 from MaxWhere/native-window-widget-mac
Offscreen rendering fixes for macOS
2016-08-08 16:10:30 +09:00
Cheng Zhao
443761b047 Merge pull request #6745 from electron/remove-lint-ignore-files
Remove files from cpplint ignore list
2016-08-08 16:04:07 +09:00
Cheng Zhao
2137c42215 Merge pull request #6744 from sairoutine/jpdocs
Japanese: add build-instructions-linux.md
2016-08-08 16:03:30 +09:00
Cheng Zhao
fd461cdd27 Merge pull request #6743 from electron/recovery-suggestion
Add recovery suggestion to auto update failure string
2016-08-08 16:02:13 +09:00
Milan Burda
e84c82b4a7 Document boolean return value of app.setAsDefaultProtocolClient + app.removeAsDefaultProtocolClient 2016-08-08 02:26:27 +02:00
Milan Burda
a0cf013112 Report app.setUserTasks success/failure 2016-08-08 02:22:51 +02:00
Milan Burda
edc1a9614c Add macOS specific speaking roles for MenuItem 2016-08-08 00:02:32 +02:00
Brian R. Bondy
95d5de1444 Fix printing on Windows when sandbox is enabled
Auditors:  @bridiver

This makes it closer to how it works in Chromium and fixes the forever spooling problem on Windows.

The old way worked when the sandbox was disabled but failed on the call for shared_buf.CreateAndMapAnonymous when the sandbox was enabled

This also fixes a handle leak which Chromium already had fixed.
2016-08-07 10:46:08 -04:00
Ludovic Galabru
38cc56efee 🍎 Send events as native macOS notifications 2016-08-06 14:54:07 +02:00
Anthony Tseng
1aedccaeeb Fix scroll conflict 2016-08-06 14:02:40 +08:00
gellert
541116ff24 removes recycling of compositors on mac 2016-08-06 00:00:32 +02:00
Kevin Sawicki
a9c6ee997f Remove ignore files that are lint free 2016-08-05 10:53:10 -07:00
Kevin Sawicki
fdc666708f Use ATOM_COMMON_ATOM_VERSION_H_ as ifdef guar 2016-08-05 10:52:56 -07:00
sairoutine
c8369c8890 📝 Japanese: add build-instructions-linux.md [ci skip] 2016-08-06 02:03:15 +09:00
Kevin Sawicki
0c5b49c402 Add recovery suggestion to failure string 2016-08-05 09:24:13 -07:00
gellert
f29dc3402b reverts AcceleratedWidgetMacNSView into offscreen class 2016-08-05 15:23:36 +02:00
Cheng Zhao
5eeadb0ad4 Merge pull request #6737 from MaxWhere/setpainting-fix
Fix for transparent frames when offscreen window restarted painting
2016-08-05 20:47:35 +09:00
Cheng Zhao
d23418728f Merge pull request #6721 from electron/osr-refactor
Emit NativeImage objects in paint event
2016-08-05 20:44:40 +09:00
Heilig Benedek
29f30aa6ba added checks for painting_ when setting the outputdevice to active state and removed show/hide from start/stoppainting since during testing they caused transparent frames to appear when a window was set to paint again after stopping 2016-08-05 12:30:47 +02:00
gellert
795753286b moves AcceleratedWidgetMacNSView to NativeWindowMac 2016-08-05 12:29:35 +02:00
Cheng Zhao
7173d8b01b Use getBitmap in docs 2016-08-05 18:08:36 +09:00
Cheng Zhao
1be253e1aa Cleanup the code of getBitmap 2016-08-05 18:05:44 +09:00
Heilig Benedek
b5c19a9c6d update docs 2016-08-05 17:40:42 +09:00
Heilig Benedek
37f5ef5712 add getBitmap to NativeImage 2016-08-05 17:40:42 +09:00
Cheng Zhao
736fbd46c6 docs: Show how to use bitmap data directly 2016-08-05 17:40:42 +09:00
Cheng Zhao
8c4ebdc88e Emit NativeImage objects in paint event 2016-08-05 17:40:42 +09:00
Cheng Zhao
3be68ba136 Merge pull request #6736 from electron/maximizable-state
Always restore maximizable state after changing window behavior/style
2016-08-05 17:25:22 +09:00
Cheng Zhao
8a33464d41 Merge pull request #6654 from electron/content-bounds
Add BrowserWindow.get/setContentBounds()
2016-08-05 17:23:24 +09:00
Cheng Zhao
2ef33bc158 Merge pull request #6739 from electron/cookies-refactor
Remove AtomBrowserContext::SetCookieableSchemes
2016-08-05 16:46:40 +09:00
Cheng Zhao
a14b2c1cf8 Remove AtomBrowserContext::SetCookieableSchemes
The standard schemes are already stored, we don't have to duplicate the
list for every session.
2016-08-05 16:35:37 +09:00
Cheng Zhao
6cd1aa21af Merge pull request #6708 from deepak1556/cookieable_schemes_patch
protocol: custom standard schemes should support cookies
2016-08-05 16:25:23 +09:00
Cheng Zhao
ce5bdaf46f Update brightray for #6708 2016-08-05 16:23:59 +09:00
Kevin Sawicki
23203daf95 Non-resizable windows should only maximizable on Mac 2016-08-04 17:22:09 -07:00
Kevin Sawicki
b77a553de7 Always reset maximizable state 2016-08-04 16:50:22 -07:00
Kevin Sawicki
41a0a3fff2 Add failing spec 2016-08-04 16:46:40 -07:00
Kevin Sawicki
dbddf5028a Adjust y position if menu bar is visible 2016-08-04 13:18:58 -07:00
Kevin Sawicki
2a20630f2f Use same position as setPosition test 2016-08-04 13:02:41 -07:00
Kevin Sawicki
3a0ceb40b9 Assert new content bounds after resize event 2016-08-04 12:54:45 -07:00
Kevin Sawicki
3041fcc79e Add spec for BrowserWindow.setContentBounds 2016-08-04 12:34:09 -07:00
Kevin Sawicki
01f95c149a Doc BrowserWindow.setContentBounds 2016-08-04 12:15:29 -07:00
Kevin Sawicki
7bca105e15 Set max size on window constraints 2016-08-04 12:14:23 -07:00
Kevin Sawicki
7ae9c7616d Use empty origin when only adjusting size 2016-08-04 12:10:01 -07:00
Kevin Sawicki
52199a008d Add initial setContentBounds method 2016-08-04 12:02:24 -07:00
Kevin Sawicki
5681ee5220 Use current content position when adjusting content size 2016-08-04 11:41:32 -07:00
Kevin Sawicki
a190495df3 Use bounds for converting window/content sizes 2016-08-04 11:27:27 -07:00
Kevin Sawicki
4751f971e2 Use View::GetBoundsInScreen to compute content bounds 2016-08-04 09:58:36 -07:00
Kevin Sawicki
4f90abce23 Set bounds size to content size 2016-08-04 09:58:36 -07:00
Kevin Sawicki
a868bffd73 Document BrowserWindow.getContentBounds() 2016-08-04 09:58:36 -07:00
Kevin Sawicki
79eee0fdf1 Assert after size through getContentBounds() API 2016-08-04 09:58:35 -07:00
Kevin Sawicki
48cc13d009 Add BrowserWindow.getClientBounds API 2016-08-04 09:58:35 -07:00
Cheng Zhao
cdfbeb1a0a Merge pull request #6726 from MaxWhere/dummy-view-fix
Omits setMouseDownCanMoveWindow call for OffScreenView
2016-08-04 22:07:30 +09:00
gellert
0bb5dabf99 omits setMouseDownCanMoveWindow call for OffScreenView 2016-08-04 12:00:35 +02:00
Cheng Zhao
7624958cf2 Merge pull request #6723 from electron/dummy-view
Show a dummy view in the offscreen window
2016-08-04 17:04:32 +09:00
Cheng Zhao
c0c7b81aed Fix building on Linux 2016-08-04 16:43:30 +09:00
Cheng Zhao
31d8e1b9c9 Also show the text on Windows and Linux 2016-08-04 16:36:01 +09:00
deepak1556
2aa1c9e556 register cookieable schemes with browser context 2016-08-04 12:17:30 +05:30
Cheng Zhao
41df037f64 Show dummy view under offscreen mode 2016-08-04 15:35:08 +09:00
deepak1556
52431506ba protocol: custom standard schemes should support cookies 2016-08-04 11:06:21 +05:30
Cheng Zhao
64334fd40b Pass SkBitmap directly 2016-08-04 13:22:19 +09:00
Cheng Zhao
530fcc8de1 Pass OnPaint callback in constructor
This can catch the paint events happened before onload event.
2016-08-04 13:03:24 +09:00
Cheng Zhao
32d9382417 Merge pull request #6713 from MaxWhere/offscreen-rendering-fixes
Fixes buffer size in offscreen mode
2016-08-04 13:00:54 +09:00
Heilig Benedek
1b0af6f6f1 removed bpp (it can be calculated)
fixed buffer size calculation (we actually send the whole image, not just the dirty part)
removed the unnecessary resets and const
now we use Copy instead of New
2016-08-04 05:18:27 +02:00
Cheng Zhao
01d3f76f92 Merge pull request #6718 from electron/coverage
Add JavaScript code coverage reporting
2016-08-04 10:59:54 +09:00
Cheng Zhao
4a5a4729b4 Merge pull request #6720 from deepak1556/extension_scheme_patch
browser: register extension scheme as web safe scheme
2016-08-04 10:51:48 +09:00
Cheng Zhao
6e63ea7d91 Merge pull request #6719 from electron/is-destroyed-public
Mark isDestroyed as public on BrowserWindow/WebContents
2016-08-04 10:49:01 +09:00
Cheng Zhao
f9a3ed10b8 Merge pull request #6714 from sairoutine/jpdocs
Add: japanese build-instructions-osx.md
2016-08-04 10:26:00 +09:00
Cheng Zhao
28cb0c7f6b Merge pull request #6709 from saghul/uv-fixes
A couple of small libuv related fixes
2016-08-04 10:09:58 +09:00
Cheng Zhao
361161df0a Merge pull request #6711 from miniak/cleanup
isSwipeTrackingFromScrollEventsEnabled cleanup
2016-08-04 10:09:39 +09:00
Kevin Sawicki
1ee244c1b2 Upgrade to electabul@0.0.4 2016-08-03 16:37:53 -07:00
Kevin Sawicki
e1eef5f7ca Upgrade to electabul@0.0.3 2016-08-03 16:23:40 -07:00
Kevin Sawicki
a665cf1935 Remove unused spec modules 2016-08-03 16:23:40 -07:00
Kevin Sawicki
ad07a20d9a Use electabul to instrument and report coverage 2016-08-03 16:23:39 -07:00
Kevin Sawicki
2c0de93f06 Use once when calling done callback 2016-08-03 16:23:39 -07:00
Kevin Sawicki
0ebe142b2f Close windows instead of destroying them 2016-08-03 16:23:39 -07:00
Kevin Sawicki
cce6be1900 Only prevent unload the first time it is attempted 2016-08-03 16:23:39 -07:00
Kevin Sawicki
916920844e Use once instead of on 2016-08-03 16:23:39 -07:00
Kevin Sawicki
60e60d86d1 Send coverage from chrome extension iframe 2016-08-03 16:23:39 -07:00
Kevin Sawicki
9aec425ea8 Save dev tools coverage when available 2016-08-03 16:23:39 -07:00
Kevin Sawicki
e034bd05d3 Save type in coverage filename 2016-08-03 16:23:39 -07:00
Kevin Sawicki
88dc281242 Use web contents id when pid is unavailable 2016-08-03 16:23:38 -07:00
Kevin Sawicki
eaa567dd86 Ignore windows with no URLs 2016-08-03 16:23:38 -07:00
Kevin Sawicki
016faacf86 Save coverage on beforeunload event 2016-08-03 16:23:38 -07:00
Kevin Sawicki
300bf24241 Save coverage data when browser windows are destroyed 2016-08-03 16:23:38 -07:00
Kevin Sawicki
9299921ee9 Delete output lib folder before instrumenting 2016-08-03 16:23:38 -07:00
Kevin Sawicki
491f69df80 Add ability to run tests with coverage report 2016-08-03 16:23:38 -07:00
Kevin Sawicki
e17e195479 Add run script to generate instrumented code coverage .asar 2016-08-03 16:23:38 -07:00
Kevin Sawicki
5b5d51ecf4 Add helper to instrument electron.asar 2016-08-03 16:23:38 -07:00
Kevin Sawicki
afdff69482 Add initial code coverage reporting 2016-08-03 16:23:37 -07:00
deepak1556
835891b373 browser: register extension scheme as web safe scheme 2016-08-04 04:30:25 +05:30
Kevin Sawicki
05ab7d39ad Mark isDestroyed as public on BrowserWindow/WebContents 2016-08-03 14:58:22 -07:00
Kevin Sawicki
15e6028f38 Merge pull request #6710 from miniak/docs-fixes
docs: fix cwd description for shell.writeShortcutLink
2016-08-03 14:36:27 -07:00
gellert
ca16132268 renames to bytesPerPixel and use nullptr 2016-08-03 19:39:23 +02:00
Milan Burda
d8f79bf29b docs: fix cwd description for shell.writeShortcutLink 2016-08-03 18:27:15 +02:00
sairoutine
cedb3714a1 📝 delete no need text in japanese readme.md [ci skip] 2016-08-04 01:17:01 +09:00
sairoutine
ca0ac9c586 📝 build-instructions-osx.md [ci skip] 2016-08-04 01:13:57 +09:00
gellert
8a5e96056e adds resets to destructor 2016-08-03 17:38:56 +02:00
Milan Burda
136f10c4e8 Remove unnecessary comment + respondsToSelector for isSwipeTrackingFromScrollEventsEnabled implementation 2016-08-03 15:46:39 +02:00
Saúl Ibarra Corretgé
d6ff804b9a Remove unneeded flag check
stop_flag is only set if uv_stop was called, which is never the case, so
skipping the test should be harmless.
2016-08-03 12:52:17 +01:00
Saúl Ibarra Corretgé
0da72be8a9 Remove unneeded libuv callback 2016-08-03 12:48:58 +01:00
gellert
50485a28d3 fixes buffer size and adds pixel size to paint event 2016-08-03 13:28:19 +02:00
Cheng Zhao
3ea48a822e Merge pull request #6706 from sairoutine/jpdocs
Japanese: add atom-shell-vs-node-webkit.md
2016-08-03 20:06:03 +09:00
Cheng Zhao
230943d425 Merge pull request #6707 from electron/auto-run-micro-tasks
Revert Node's call of SetAutorunMicrotasks(false)
2016-08-03 18:14:01 +09:00
Cheng Zhao
1445ea8baf Revert Node's call of SetAutorunMicrotasks(false) 2016-08-03 17:57:10 +09:00
sairoutine
cdeef7c20a 📝 japanese: add atom-shell-vs-node-webkit.md [ci skip] 2016-08-03 17:21:30 +09:00
Cheng Zhao
617820dfc2 Merge pull request #6705 from electron/remove-view-painted
Remove the view-painted event
2016-08-03 16:55:48 +09:00
Cheng Zhao
5dabc47440 Remove the view-painted event 2016-08-03 16:20:55 +09:00
Cheng Zhao
1e4c83eb93 Cleanup atom_api_system_preferences_mac.mm 2016-08-03 16:13:51 +09:00
Cheng Zhao
322fb97d8d Merge pull request #6686 from darkdh/swipe_prefs
Swipe back/forward should respect system preferences
2016-08-03 16:10:29 +09:00
Cheng Zhao
b9bcba7abe docs: Do not repeat processes for multiple times in menu.md 2016-08-03 16:08:54 +09:00
Cheng Zhao
163a6bd5c5 Merge pull request #6700 from calidion/patch-1
Update menu.md
2016-08-03 16:00:52 +09:00
Cheng Zhao
53831d71e3 Merge pull request #6703 from electron/merge-offscreen
Merge #6691
2016-08-03 15:58:31 +09:00
Cheng Zhao
2e8ccfd8df Add Offscreen Rendering to guides 2016-08-03 15:38:24 +09:00
Cheng Zhao
1f41e22614 Put constants in annoymouse namespace 2016-08-03 14:09:38 +09:00
Cheng Zhao
82da3b6c66 Fix accidentally changed lines 2016-08-03 14:03:57 +09:00
Cheng Zhao
4d85c1a557 Refactor osr_render_widget_host_view 2016-08-03 13:53:11 +09:00
Cheng Zhao
ea8ea1543f Refactor osr_output_device 2016-08-03 13:06:38 +09:00
Cheng Zhao
9d8e510a55 Refactor the code in atom_api_web_contents 2016-08-03 13:06:34 +09:00
Cheng Zhao
921aaf9aa3 Move osr related files to atom/browser/osr 2016-08-03 13:05:47 +09:00
Anthony Tseng
e0c0e3e5f7 Add IsSwipeTrackingFromScrollEventsEnabled in system prefs 2016-08-03 10:27:56 +08:00
Eric
5ae112677b Update menu.md
1. add difference notice
2.  changed `render process` to `main process`
2016-08-03 10:10:56 +08:00
Cheng Zhao
b0e36ec93a Revert unnecessary changes 2016-08-03 10:48:07 +09:00
Cheng Zhao
aefd99ec7f Only enable kEnableBeginFrameScheduling for offscreen
It has effects on performance and only gets turned on after Chrome 54.
2016-08-03 10:40:12 +09:00
Cheng Zhao
63c34f3dcf docs: Use app.disableHardwareAcceleration() instead of --disable-gpu
The --disable-gpu switch does not work when passed with `appendSwitch`.
2016-08-03 10:32:29 +09:00
Cheng Zhao
c8b544ee1f spec: Remove duplicate code in tests 2016-08-03 10:27:55 +09:00
Cheng Zhao
ba9aa13bd8 Fix lint warnings in documentations 2016-08-03 10:15:38 +09:00
Cheng Zhao
d8a030fa9b Revert the change on default_app 2016-08-03 10:13:32 +09:00
Cheng Zhao
7b34b8d183 Update libchromiumcontent for offscreen patches 2016-08-03 10:12:41 +09:00
Cheng Zhao
c68e9cb595 Use electron/brightray 2016-08-03 10:10:58 +09:00
Cheng Zhao
363fabdcb4 Merge branch 'offscreen-rendering' of https://github.com/MaxWhere/electron into merge-offscreen 2016-08-03 10:09:48 +09:00
Cheng Zhao
1fa18aeba2 Merge pull request #6693 from sairoutine/jpdocs
Japanese: add coding-style.md
2016-08-03 08:30:32 +09:00
Cheng Zhao
549aa59d18 Merge pull request #6694 from ssdong/fixed_typo_in_chinese_doc_translation
fixed typo in simplified chinese doc translation
2016-08-03 08:30:18 +09:00
Cheng Zhao
59076711cb Bump v1.3.2 2016-08-03 07:18:31 +09:00
Susu Dong (LCL)
ddb7b5cff9 fixed typo in simplified chinese doc translation 2016-08-02 15:21:49 -04:00
sairoutine
93e37a92a2 📝 Japanese: add coding-style.md [ci skip] 2016-08-03 03:21:22 +09:00
gellert
1663a9cd13 fixes linendings 2016-08-02 19:31:30 +02:00
Kevin Sawicki
820f3968aa Merge pull request #6677 from miniak/default-app-menu
Add zooming commands to menu in default app
2016-08-02 10:27:56 -07:00
Milan Burda
87c9926fe8 Move Toggle Fullscreen to the bottom of the View menu 2016-08-02 18:08:41 +02:00
Milan Burda
2e043453c0 Add zooming commands to menu (default app) 2016-08-02 18:08:35 +02:00
gellert
362f3deb93 fixes linting 2016-08-02 16:39:07 +02:00
gellert
9872fa0f52 restoring default app 2016-08-02 15:17:50 +02:00
gellert
8eed91d87a Merge remote-tracking branch 'upstream/master' into speedup-gpu 2016-08-02 14:59:03 +02:00
Cheng Zhao
217156f76c Update libchromiumcontent: close #6668 2016-08-02 21:38:34 +09:00
Cheng Zhao
91169396f6 Merge pull request #6688 from electron/constructor-refactor
Use FunctionTemplate instead of ObjectTemplate for native classes
2016-08-02 21:37:56 +09:00
Cheng Zhao
8c0a033b6f Fix lint errors of using __proto__ 2016-08-02 21:02:28 +09:00
Cheng Zhao
edb573d69e Make WebContents inherit NavigationController 2016-08-02 20:55:56 +09:00
Cheng Zhao
025034127a Set JavaScript APIs on prototype of WebContents 2016-08-02 20:52:07 +09:00
Cheng Zhao
844f32aa36 Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
Heilig Benedek
4088f0eb33 remove unneeded windows specific things 2016-08-02 12:57:23 +02:00
Heilig Benedek
9068182664 small fixes 2016-08-02 12:56:03 +02:00
Cheng Zhao
8c3232dc56 Every native class now gets a name 2016-08-02 19:28:12 +09:00
Cheng Zhao
cb19efe49c Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
Cheng Zhao
895b8b47ee Save the prototype of EventEmitter 2016-08-02 18:07:58 +09:00
Cheng Zhao
892026458d Cleanup init.js 2016-08-02 17:45:46 +09:00
Cheng Zhao
8f62e79243 GetConstructor now returns FunctionTemplate 2016-08-02 17:20:58 +09:00
Cheng Zhao
6e0cde5b24 All native objects have prototype now 2016-08-02 17:12:17 +09:00
Cheng Zhao
8cd4612fe0 Get rid of Constructor class 2016-08-02 17:02:04 +09:00
Cheng Zhao
846ec5ba49 AttachAsUserData now can assume the existence of wrapper 2016-08-02 15:28:32 +09:00
Cheng Zhao
1505a46ed0 Do not rely on Constructor to call Init
This makes it deterministic when the JavaScript is initialized, which
can make our logic more clear.
2016-08-02 15:15:40 +09:00
Cheng Zhao
84bb82866d docs: the callbacks 2016-08-02 14:44:06 +09:00
Cheng Zhao
56b1abd64a Merge pull request #6685 from electron/document-contents-zoom
Implement and Document the zoom methods that are mapped to the webContents object
2016-08-02 14:41:09 +09:00
Cheng Zhao
7ac28b53e6 Merge pull request #6683 from gabriel/master
Add isVisible() to app.dock
2016-08-02 12:33:36 +09:00
Cheng Zhao
2330f927ed Merge pull request #6684 from electron/felix-debugging-link-fix
Fix link to macOS Debugging Instructions
2016-08-02 12:19:05 +09:00
Anthony Tseng
beca2d26f3 Swipe back/forward should respect system preferences 2016-08-02 11:18:46 +08:00
Samuel Attard
a498cf5b79 Fix linting issues 2016-08-02 13:13:17 +10:00
Samuel Attard
b59f37de98 Document the async versions of getZoomFactor and getZoomLevel 2016-08-02 13:04:21 +10:00
Samuel Attard
e4f6083753 Implement asynchronous versions of getZoomFactor and GetZoomLevel on the webContents object 2016-08-02 13:02:55 +10:00
Samuel Attard
a1f5ca1ad2 Document the zoom methods that are mapped to the webContents object 2016-08-02 12:28:13 +10:00
Felix Rieseberg
c36bcf47d3 📝 Fix link to macOS Debugging Instructions 2016-08-01 19:15:03 -07:00
Cheng Zhao
f8025d95b8 Merge pull request #6678 from sairoutine/jpdocs
Japanese: add system-preferences.md
2016-08-02 09:31:39 +09:00
Cheng Zhao
f7150228d8 Merge pull request #6675 from miniak/docs-ico-sizes
docs: Improve ICO size list
2016-08-02 09:31:19 +09:00
Gabriel Handford
7bde92deb9 Add isVisible() to app.dock 2016-08-01 15:22:37 -07:00
sairoutine
0e6c2f9971 📝 Japanese: add system-preferences.md [ci skip] 2016-08-01 23:43:07 +09:00
Cheng Zhao
eb73303f28 Merge pull request #6676 from electron/fix-upload
Fix a few errors when running the script to upload checksum files
2016-08-01 22:54:10 +09:00
Cheng Zhao
9765599b49 Must pass unicode to StringIO 2016-08-01 22:08:52 +09:00
Cheng Zhao
94a17bb494 Use spaces between checksum and filename 2016-08-01 22:08:52 +09:00
Cheng Zhao
217b639597 Fix filename when uploading to github 2016-08-01 22:08:52 +09:00
Cheng Zhao
c943e4a61f Fix error in run_boto_script 2016-08-01 22:08:52 +09:00
Cheng Zhao
d00bff4d94 Fix error of run_python_script 2016-08-01 21:41:55 +09:00
Cheng Zhao
079a7a1a1c Do not put the upload logic in make_zip 2016-08-01 21:16:16 +09:00
Cheng Zhao
8f75f10239 Merge pull request #6588 from malept/dist-checksums
Generate and upload checksums for released ZIPs to GitHub
2016-08-01 20:47:07 +09:00
Cheng Zhao
d56057b186 Merge pull request #6674 from electron/session-no-gc
Do not garbage collect sessions
2016-08-01 20:40:55 +09:00
gellert
935d47d83e Merge branch 'speedup-gpu' of https://github.com/MaxWhere/electron into speedup-gpu 2016-08-01 13:28:12 +02:00
gellert
56f5749675 adds transparency 2016-08-01 13:27:39 +02:00
Cheng Zhao
e1152ae96c Remove usages of linked_ptr
It is no longer needed since we now have move semantic.
2016-08-01 20:26:06 +09:00
Heilig Benedek
a4a2579423 brightray commit update 2016-08-01 13:22:16 +02:00
Milan Burda
e7322edb3a docs: Improve ICO size list 2016-08-01 13:13:40 +02:00
Cheng Zhao
ffed3e9c0c Move the code to native 2016-08-01 20:11:17 +09:00
Cheng Zhao
d23d9dcf01 Do not garbage collect sessions 2016-08-01 19:35:51 +09:00
gellert
36918250ec a possible fix for dragging 2016-08-01 12:06:46 +02:00
gellert
439ad94afe Merge remote-tracking branch 'upstream/master' into speedup-gpu 2016-08-01 12:00:34 +02:00
Mark Lee
59de146a9f Use S3 as an intermediary store & merge shasum files before uploading to GitHub 2016-07-31 19:25:26 -07:00
Mark Lee
5b07154b8e Generate and upload checksums for released ZIPs to GitHub
When generating an Electron release, create a `sha256sum`-compatible
file for each ZIP file, and upload them to the corresponding GitHub release.
This is primarily to confirm that the download of a given ZIP completed
successfully, as opposed to verifying that an Electron team member uploaded
the given ZIP files (which would require using a trusted GPG key).
2016-07-31 19:00:57 -07:00
Cheng Zhao
01ebc77228 Fix styling issues 2016-08-01 09:58:33 +09:00
Cheng Zhao
fb76aaac39 Merge pull request #6667 from liusy182/restore-issue
fix maximize restore issue caused by restore window size change
2016-08-01 09:56:08 +09:00
Cheng Zhao
1d33275374 Merge pull request #6661 from MaxWhere/minor-fixes
A minor fix for sendInputEvent and improvements related to cursor-changed event
2016-08-01 09:45:41 +09:00
Heilig Benedek
c39ded0481 Merge branch 'speedup-gpu' of https://github.com/MaxWhere/electron into speedup-gpu 2016-08-01 02:18:37 +02:00
Heilig Benedek
0eacee0058 add documentation for changes 2016-08-01 02:18:19 +02:00
Heilig Benedek
64f220fb50 fix UTF character sending as suggested by @zcbenz 2016-08-01 02:18:07 +02:00
Heilig Benedek
bc9adcd5ca fix toBUFFER naming issue and cursor-changed parameter order 2016-08-01 02:17:49 +02:00
Heilig Benedek
2b05be64b4 add documentation for changes 2016-08-01 02:14:45 +02:00
Heilig Benedek
7a471e1ab7 fix UTF character sending as suggested by @zcbenz 2016-08-01 02:14:11 +02:00
Heilig Benedek
bc7c5c567c fix toBUFFER naming issue and cursor-changed parameter order 2016-08-01 02:13:31 +02:00
Cheng Zhao
3d47ab20c2 Merge pull request #6663 from simonmysun/patch-1
Typo fix
2016-08-01 08:45:15 +09:00
Cheng Zhao
feb8a4b905 Merge pull request #6662 from sairoutine/jpdocs
Japanese: add testing-on-headless-ci.md
2016-08-01 08:44:54 +09:00
gellert
8e1214fc3a paint toggling fix cleanup 2016-08-01 01:01:55 +02:00
gellert
aac5fb0377 fixes paint toggling, for real tho hopefully 2016-08-01 00:47:53 +02:00
gellert
690ca7ec2a filtering out offscreen webcontents in getAllWebcontents call 2016-07-31 22:06:34 +02:00
gellert
1cd1c5e01c fixes paint toggling 2016-07-31 22:05:36 +02:00
Heilig Benedek
0098d5bca7 Hide when not painting + cursor event fix 2016-07-31 18:40:35 +02:00
gellert
35ee99265e adds tests for osr 2016-07-31 17:10:53 +02:00
liusi
db671702df fix maximize restore issue caused by restore window size change 2016-07-31 21:49:54 +08:00
gellert
5525ac36b8 does linting 2016-07-31 12:19:56 +02:00
孙茂胤
1d5a126135 Typo fix 2016-07-31 16:11:03 +08:00
sairoutine
a77a83761f 📝 Japanese: add testing-on-headless-ci.md [ci skip] 2016-07-31 17:05:13 +09:00
Heilig Benedek
f3b723c9fa Send some more data with the cursor-changed event 2016-07-31 05:24:54 +02:00
Heilig Benedek
21962be60e Adds option to get raw data from NativeImage 2016-07-31 05:24:44 +02:00
Heilig Benedek
af80b9a7df Fixes not being able to send UTF8 characters anymore 2016-07-31 05:24:28 +02:00
Heilig Benedek
015516497c Merge pull request #13 from electron/master
update as upstream
2016-07-31 05:19:43 +02:00
Heilig Benedek
0a349ef16c remove fpscounter, can be enabled from node 2016-07-31 05:13:29 +02:00
Heilig Benedek
3e7ff466cd Merge branch 'speedup-gpu' of https://github.com/MaxWhere/electron into speedup-gpu 2016-07-31 05:12:34 +02:00
Heilig Benedek
3a1285aeac Send some more data with the cursor-changed event 2016-07-31 05:11:56 +02:00
Heilig Benedek
d0bda76a2d Adds option to get raw data from NativeImage 2016-07-31 05:11:18 +02:00
Heilig Benedek
94e52f0738 Fixes not being able to send UTF8 characters anymore 2016-07-31 05:10:14 +02:00
gellert
092fc92cb8 adds tutorial 2016-07-31 00:47:08 +02:00
gellert
f60d791fa8 adds docs for osr 2016-07-31 00:22:34 +02:00
gellert
e4000850cd head part updates 2016-07-30 21:35:14 +02:00
gellert
916063f370 handles destroyed renderer process 2016-07-30 21:25:49 +02:00
gellert
976277ffbf webcontentsview cleanup 2016-07-30 20:39:17 +02:00
gellert
6486d80f87 api impl + cleanups + stability improvements 2016-07-30 15:40:16 +02:00
Cheng Zhao
a769996b8d Merge pull request #6641 from electron/felix-macos-debugging
Add debugging instructions for macOS
2016-07-30 11:55:05 +09:00
gellert
2190c4dd8d adds destructors + more code cleanup 2016-07-30 00:51:19 +02:00
Heilig Benedek
70656dc991 revert framesubscription 2016-07-29 19:54:35 +02:00
Felix Rieseberg
ab69ae07b7 📝 Add debugging instructions for macOS
I already wrote up debugging instructions for Windows, but never got
around to writing them for macOS - until now! This adds a very basic
introduction to LLDB from the command line, which should empower people
to figure out what’s happening inside Electron when they call an
Electron method from JavaScript.
2016-07-29 10:19:58 -07:00
Cheng Zhao
67ef47104f Merge pull request #6649 from miniak/docs-fix
docs: fix argument types
2016-07-29 22:51:26 +09:00
gellert
6abf7475b8 cleaning up osr pt1 2016-07-29 14:50:27 +02:00
Milan Burda
e428d5db4f docs: fix argument types 2016-07-29 11:56:32 +02:00
Cheng Zhao
ea6e6dab8c Merge pull request #6644 from electron/webcontents-is-focused-crash
Check view before checking top level native window
2016-07-29 11:08:11 +09:00
Cheng Zhao
6bb342ef2a Merge pull request #6646 from electron/linux-200
Load 200 DPI resources on Linux
2016-07-29 11:07:23 +09:00
Cheng Zhao
5643feabc3 Load 200 DPI resources on Linux 2016-07-29 10:51:31 +09:00
Cheng Zhao
72612ed2f5 Merge pull request #6637 from electron/check-window-class
Check that window is an EventDispatchingWindow
2016-07-29 10:42:36 +09:00
Cheng Zhao
e5e4c53b1e Merge pull request #6645 from electron/ico-125
Update ico to include sizes for 125% DPI
2016-07-29 10:33:55 +09:00
Cheng Zhao
5e7ee675f7 Update ico to include sizes for 125% DPI 2016-07-29 10:32:48 +09:00
Cheng Zhao
8bf30ace4b Merge pull request #6636 from yuya-oc/docs-win32-icon
docs: Add recommended sizes for Windows ICO icons
2016-07-29 10:11:05 +09:00
Cheng Zhao
6d3120b05c Merge pull request #6626 from Starefossen/patch-1
docs: mention app ready event for DevTools Extension tutorial
2016-07-29 10:02:01 +09:00
Heilig Benedek
fdff60132c update brightray commit 2016-07-29 01:48:29 +02:00
Kevin Sawicki
5982e3a75e Fix typo in comment 2016-07-28 15:48:01 -07:00
Kevin Sawicki
bd2ce5327c Return early when render widget host view is null 2016-07-28 15:47:52 -07:00
Heilig Benedek
ab38e7700f brightray url update 2016-07-28 22:18:21 +02:00
Kevin Sawicki
5eaae8136e Check that window is an EventDispatchingWindow 2016-07-28 08:48:56 -07:00
Yuya Ochiai
29d66eb0d0 📝 Add recommended sizes for Windows ICO icons
For #6396
Please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/dn742485(v=vs.85).aspx
[ci skip]
2016-07-28 23:22:41 +09:00
Heilig Benedek
7b61c5c9d0 removed some junk and added offscreen webcontents type 2016-07-28 12:10:56 +02:00
Cheng Zhao
b790ad6c1a Merge pull request #6631 from amor520/master
update Prerequisites
2016-07-28 18:07:33 +09:00
amor
46e707fd6d update Prerequisites 2016-07-28 15:01:36 +08:00
Cheng Zhao
e73bd00854 Merge pull request #6629 from electron/download-item-get-save-path
Set download item save path to selected path from dialog
2016-07-28 15:23:43 +09:00
Kevin Sawicki
55d6e0de1a Assert save path of download item 2016-07-27 17:52:36 -07:00
Kevin Sawicki
4e9b19074f Make downloadItem.getSavePath() public 2016-07-27 17:33:36 -07:00
Kevin Sawicki
0ad8c66b65 Use selected dialog path as item save path 2016-07-27 17:31:26 -07:00
Heilig Benedek
0dbe4bc417 api base 2016-07-28 01:58:23 +02:00
Cheng Zhao
bf20bbc247 Merge pull request #6623 from electron/shortcut
Add shell.writeShortcutLink/readShortcutLink APIs
2016-07-28 08:48:52 +09:00
Kevin Sawicki
34f33c3b45 Merge pull request #6627 from davej/patch-1
docs: Explain how to use highlightMode with BrowserWindow
2016-07-27 15:57:34 -07:00
DaveJ
42640b6170 docs: Add click handler to tray window example 2016-07-27 23:56:00 +01:00
DaveJ
322fe36dea docs: Fix undefined variables 2016-07-27 23:23:26 +01:00
Dave Jeffery
4823b5582f docs: Explain how to use highlightMode with BrowserWindow
As discussed on https://github.com/electron/electron/pull/6620
2016-07-27 21:35:13 +01:00
Hans Kristian Flaatten
ba2b8c8d3e docs: mention app ready event for DevTools Extension tutorial 2016-07-27 22:01:01 +02:00
gellert
c45d9555e7 cleans up class names 2016-07-27 20:31:03 +02:00
gellert
f90e62a7a5 apply fixes 2016-07-27 19:59:01 +02:00
gellert
6e1db86a77 fixes software output device rendering 2016-07-27 19:44:41 +02:00
Heilig Benedek
221714e141 added onpaint to software path 2016-07-27 19:19:53 +02:00
Heilig Benedek
783c9d9218 Merge branch 'speedup-gpu' of https://github.com/MaxWhere/electron into speedup-gpu 2016-07-27 18:25:28 +02:00
Heilig Benedek
da5c95710f software bump 2016-07-27 18:24:58 +02:00
gellert
d0bd4816cb adds tracing calls and osx fix 2016-07-27 18:02:54 +02:00
Heilig Benedek
a39bb35744 use electron nativewindow 2016-07-27 14:36:22 +02:00
Cheng Zhao
242ce4f818 Fix building on non-Windows 2016-07-27 19:55:05 +09:00
Cheng Zhao
ac8a490d56 Fix lint warnings 2016-07-27 19:51:16 +09:00
Cheng Zhao
eadffc6db8 docs: icon and iconIndex have to be set together 2016-07-27 19:49:17 +09:00
Cheng Zhao
57dbf284c1 spec: shell.writeShortcutLink/readShortcutLink 2016-07-27 19:43:11 +09:00
Cheng Zhao
d6234e11df docs: shell.writeShortcutLink/readShortcutLink 2016-07-27 16:47:24 +09:00
Cheng Zhao
ff5b8047a1 Throw exception when ReadShortcutLink failed 2016-07-27 16:32:32 +09:00
Cheng Zhao
25538fe7fb All fields are always returned 2016-07-27 16:23:35 +09:00
Cheng Zhao
60ba2d624e Initialize COM before using the API 2016-07-27 16:20:53 +09:00
Cheng Zhao
7f3443b138 Add shell.writeShortcutLink/readShortcutLink 2016-07-27 16:16:21 +09:00
gellert
8392ece321 updates impl to newer version of chromium 2016-07-26 16:52:43 +02:00
gellert
9d83ce1676 resolves 2016-07-25 21:09:49 +02:00
gellert
8fb7872b84 removes logs and adds webcontentsview init 2016-07-25 19:58:21 +02:00
gellert
0ad0c79202 adds beginframe scheduling 2016-07-25 19:58:14 +02:00
gellert
9e10f211d7 removes commented includes 2016-07-25 19:44:44 +02:00
gellert
8090278708 breaks down osr api to separate files 2016-07-25 19:44:44 +02:00
gellert
14836cef02 using damage_rect 2016-07-25 19:44:44 +02:00
gellert
96e1ba9c14 gpu acclereted osr added 2016-07-25 19:44:44 +02:00
Heilig Benedek
5371921f8a speed(up) bump 2016-07-25 19:44:44 +02:00
Heilig Benedek
4a0f0063a0 speedup base 2016-07-25 19:44:44 +02:00
gellert
6eba509d53 removes logs and adds webcontentsview init 2016-07-25 15:55:00 +02:00
gellert
81be0bc123 adds beginframe scheduling 2016-07-22 13:55:58 +02:00
gellert
504c79cae7 removes commented includes 2016-07-20 11:32:59 +02:00
gellert
84a5c50b62 breaks down osr api to separate files 2016-07-20 11:30:06 +02:00
gellert
7fc9df4f8f using damage_rect 2016-07-19 23:50:49 +02:00
gellert
50dc71d1c2 gpu acclereted osr added 2016-07-18 16:16:23 +02:00
Heilig Benedek
6e25aea49f speed(up) bump 2016-07-13 17:43:00 +02:00
Heilig Benedek
74120493fd Merge pull request #12 from electron/master
update as upstream
2016-07-06 14:12:24 +02:00
Heilig Benedek
6fb6b93003 speedup base 2016-07-05 21:33:22 +02:00
1087 changed files with 56233 additions and 13876 deletions

212
.circleci/config.yml Normal file
View File

@@ -0,0 +1,212 @@
version: 2
jobs:
electron-linux-arm:
docker:
- image: electronbuilds/electron:0.0.4
environment:
TARGET_ARCH: arm
resource_class: 2xlarge
steps:
- checkout
- run:
name: Check for release
command: |
if [ -n "${RUN_RELEASE_BUILD}" ]; then
echo 'release build triggered from api'
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
fi
- run:
name: Bootstrap
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Bootstrapping Electron for release build'
script/bootstrap.py --target_arch=$TARGET_ARCH
else
echo 'Bootstrapping Electron for debug build'
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
fi
- run: npm run lint
- run:
name: Build
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Building Electron for release'
script/build.py -c R
else
echo 'Building Electron for debug'
script/build.py -c D
fi
- run:
name: Create distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Creating Electron release distribution'
script/create-dist.py
else
echo 'Skipping create distribution because build is not for release'
fi
- run:
name: Upload distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
echo 'Uploading Electron release distribution to github releases'
script/upload.py
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
echo 'Uploading Electron release distribution to s3'
script/upload.py --upload_to_s3
else
echo 'Skipping upload distribution because build is not for release'
fi
electron-linux-ia32:
docker:
- image: electronbuilds/electron:0.0.4
environment:
TARGET_ARCH: ia32
resource_class: xlarge
steps:
- checkout
- run:
name: Check for release
command: |
if [ -n "${RUN_RELEASE_BUILD}" ]; then
echo 'release build triggered from api'
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
fi
- run:
name: Bootstrap
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Bootstrapping Electron for release build'
script/bootstrap.py --target_arch=$TARGET_ARCH
else
echo 'Bootstrapping Electron for debug build'
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
fi
- run: npm run lint
- run:
name: Build
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Building Electron for release'
script/build.py -c R
else
echo 'Building Electron for debug'
script/build.py -c D
fi
- run:
name: Create distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Creating Electron release distribution'
script/create-dist.py
else
echo 'Skipping create distribution because build is not for release'
fi
- run:
name: Upload distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
echo 'Uploading Electron release distribution to github releases'
script/upload.py
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
echo 'Uploading Electron release distribution to s3'
script/upload.py --upload_to_s3
else
echo 'Skipping upload distribution because build is not for release'
fi
electron-linux-x64:
docker:
- image: electronbuilds/electron:0.0.4
environment:
TARGET_ARCH: x64
DISPLAY: ':99.0'
resource_class: xlarge
steps:
- checkout
- run:
name: Setup for headless testing
command: sh -e /etc/init.d/xvfb start
- run:
name: Check for release
command: |
if [ -n "${RUN_RELEASE_BUILD}" ]; then
echo 'release build triggered from api'
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
fi
- run:
name: Bootstrap
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Bootstrapping Electron for release build'
script/bootstrap.py --target_arch=$TARGET_ARCH
else
echo 'Bootstrapping Electron for debug build'
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
fi
- run: npm run lint
- run:
name: Build
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Building Electron for release'
script/build.py -c R
else
echo 'Building Electron for debug'
script/build.py -c D
fi
- run:
name: Create distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo 'Creating Electron release distribution'
script/create-dist.py
else
echo 'Skipping create distribution because build is not for release'
fi
- run:
name: Upload distribution
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
echo 'Uploading Electron release distribution to github releases'
script/upload.py
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
echo 'Uploading Electron release distribution to s3'
script/upload.py --upload_to_s3
else
echo 'Skipping upload distribution because build is not for release'
fi
- run:
name: Test
environment:
MOCHA_FILE: junit/test-results.xml
MOCHA_REPORTER: mocha-junit-reporter
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
echo 'Testing Electron debug build'
mkdir junit
script/test.py --ci --rebuild_native_modules
else
echo 'Skipping testing on release build'
fi
- run:
name: Verify FFmpeg
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
echo 'Verifying ffmpeg on debug build'
script/verify-ffmpeg.py
else
echo 'Skipping verify ffmpeg on release build'
fi
workflows:
version: 2
build-arm:
jobs:
- electron-linux-arm
build-ia32:
jobs:
- electron-linux-ia32
build-x64:
jobs:
- electron-linux-x64

35
.clang-format Normal file
View File

@@ -0,0 +1,35 @@
# Defines the Chromium style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# This defaults to 'Auto'. Explicitly set it for a while, so that
# 'vector<vector<int> >' in existing files gets formatted to
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11
# Make sure code like:
# IPC_BEGIN_MESSAGE_MAP()
# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)
# IPC_END_MESSAGE_MAP()
# gets correctly indented.
MacroBlockBegin: "^\
BEGIN_MSG_MAP|\
BEGIN_MSG_MAP_EX|\
BEGIN_SAFE_MSG_MAP_EX|\
CR_BEGIN_MSG_MAP_EX|\
IPC_BEGIN_MESSAGE_MAP|\
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM|\
IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN|\
IPC_STRUCT_BEGIN|\
IPC_STRUCT_BEGIN_WITH_PARENT|\
IPC_STRUCT_TRAITS_BEGIN|\
POLPARAMS_BEGIN|\
PPAPI_BEGIN_MESSAGE_MAP$"
MacroBlockEnd: "^\
CR_END_MSG_MAP|\
END_MSG_MAP|\
IPC_END_MESSAGE_MAP|\
IPC_PROTOBUF_MESSAGE_TRAITS_END|\
IPC_STRUCT_END|\
IPC_STRUCT_TRAITS_END|\
POLPARAMS_END|\
PPAPI_END_MESSAGE_MAP$"

11
.gitignore vendored
View File

@@ -18,5 +18,12 @@ node_modules/
*.xcodeproj
*.swp
*.pyc
debug.log
npm-debug.log
*.VC.db
*.VC.VC.opendb
.vs/
.vscode/
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
*.sln
*.log

5
.gitmodules vendored
View File

@@ -12,7 +12,7 @@
url = https://github.com/electron/chromium-breakpad.git
[submodule "vendor/native_mate"]
path = vendor/native_mate
url = https://github.com/zcbenz/native-mate.git
url = https://github.com/electron/native-mate.git
[submodule "vendor/crashpad"]
path = vendor/crashpad
url = https://github.com/electron/crashpad.git
@@ -22,3 +22,6 @@
[submodule "vendor/boto"]
path = vendor/boto
url = https://github.com/boto/boto.git
[submodule "vendor/pdf_viewer"]
path = vendor/pdf_viewer
url = https://github.com/electron/pdf-viewer.git

View File

@@ -1 +1 @@
v6.3.0
v7.4.0

View File

@@ -3,14 +3,15 @@ git:
notifications:
email: false
language: cpp
compiler: clang
language: node_js
node_js:
- "4"
os:
- linux
- osx
env:
- TARGET_ARCH=x64
osx_image: xcode7
osx_image: xcode7.3
matrix:
include:

View File

@@ -1,5 +1,7 @@
# Contributing to Electron
:memo: Available Translations: [Korean](https://github.com/electron/electron/tree/master/docs-translations/ko-KR/project/CONTRIBUTING.md) | [Simplified Chinese](https://github.com/electron/electron/tree/master/docs-translations/zh-CN/project/CONTRIBUTING.md) | [Brazilian Portuguese](https://github.com/electron/electron/tree/master/docs-translations/pt-BR/project/CONTRIBUTING.md) | [Dutch](https://github.com/electron/electron/tree/master/docs-translations/nl/project/CONTRIBUTING.md)
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md).

View File

@@ -1,2 +1,35 @@
<!--
Thanks for opening an issue! A few things to keep in mind:
- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please try reproducing your issue against
the latest version of Electron.
- If you need general advice, join our Slack: http://atom-slack.herokuapp.com
-->
* Electron version:
* Operating system:
### Expected behavior
<!-- What do you think should happen? -->
### Actual behavior
<!-- What actually happens? -->
### How to reproduce
<!--
Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.
You can fork https://github.com/electron/electron-quick-start and include a link to the branch with your changes.
If you provide a URL, please list the commands required to clone/setup/run your repo e.g.
$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .
-->

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014 GitHub Inc.
Copyright (c) 2013-2017 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -1,14 +1,16 @@
[![Electron Logo](http://electron.atom.io/images/electron-logo.svg)](http://electron.atom.io/)
[![Electron Logo](https://electron.atom.io/images/electron-logo.svg)](https://electron.atom.io/)
[![Travis Build Status](https://travis-ci.org/electron/electron.svg?branch=master)](https://travis-ci.org/electron/electron)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/kvxe4byi7jcxbe26/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/electron)
[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron#info=devDependencies)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/bc56v83355fi3369/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron/branch/master)
[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron?type=dev)
[![Join the Electron Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/)
:memo: Available Translations: [Korean](https://github.com/electron/electron/tree/master/docs-translations/ko-KR/project/README.md) | [Simplified Chinese](https://github.com/electron/electron/tree/master/docs-translations/zh-CN/project/README.md) | [Brazilian Portuguese](https://github.com/electron/electron/tree/master/docs-translations/pt-BR/project/README.md) | [Traditional Chinese](https://github.com/electron/electron/tree/master/docs-translations/zh-TW/project/README.md) | [Spanish](https://github.com/electron/electron/tree/master/docs-translations/es/project/README.md) | [Turkish](https://github.com/electron/electron/tree/master/docs-translations/tr-TR/project/README.md)
The Electron framework lets you write cross-platform desktop applications
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
[Chromium](http://www.chromium.org) and is used by the [Atom
editor](https://github.com/atom/atom) and many other [apps](http://electron.atom.io/apps).
editor](https://github.com/atom/atom) and many other [apps](https://electron.atom.io/apps).
Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
announcements.
@@ -19,20 +21,20 @@ behavior to electron@github.com.
## Downloads
Prebuilt binaries and debug symbols of Electron for Linux, Windows and macOS can
be found on the [releases](https://github.com/electron/electron/releases) page.
You can also use [`npm`](https://docs.npmjs.com/) to install prebuilt electron
binaries:
To install prebuilt Electron binaries, use
[`npm`](https://docs.npmjs.com/):
```sh
# Install the `electron` command globally in your $PATH
npm install electron-prebuilt -g
# Install as a development dependency
npm install electron-prebuilt --save-dev
npm install electron --save-dev
# Install the `electron` command globally in your $PATH
npm install electron -g
```
See the [releases page](https://github.com/electron/electron/releases) for
prebuilt binaries, debug symbols, and more.
### Mirrors
- [China](https://npm.taobao.org/mirrors/electron)
@@ -52,6 +54,7 @@ contains documents describing how to build and contribute to Electron.
- [Simplified Chinese](https://github.com/electron/electron/tree/master/docs-translations/zh-CN)
- [Traditional Chinese](https://github.com/electron/electron/tree/master/docs-translations/zh-TW)
- [Turkish](https://github.com/electron/electron/tree/master/docs-translations/tr-TR)
- [Thai](https://github.com/electron/electron/tree/master/docs-Translations/th-TH)
- [Ukrainian](https://github.com/electron/electron/tree/master/docs-translations/uk-UA)
- [Russian](https://github.com/electron/electron/tree/master/docs-translations/ru-RU)
- [French](https://github.com/electron/electron/tree/master/docs-translations/fr-FR)
@@ -69,11 +72,18 @@ locations:
forums
- `#atom-shell` channel on Freenode
- [`Atom`](http://atom-slack.herokuapp.com/) channel on Slack
- [`electron-ru`](https://telegram.me/electron_ru) *(Russian)*
- [`electron-br`](https://electron-br.slack.com) *(Brazilian Portuguese)*
- [`electron-kr`](http://www.meetup.com/electron-kr/) *(Korean)*
- [`electron-jp`](https://electron-jp-slackin.herokuapp.com/) *(Japanese)*
- [`electron-tr`](http://www.meetup.com/Electron-JS-Istanbul/) *(Turkish)*
- [`electron-jp`](https://electron-jp.slack.com) *(Japanese)*
- [`electron-tr`](http://electron-tr.herokuapp.com) *(Turkish)*
- [`electron-id`](https://electron-id.slack.com) *(Indonesia)*
Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron)
for a community maintained list of useful example apps, tools and resources.
## License
[MIT](https://github.com/electron/electron/blob/master/LICENSE)
When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).

9
SECURITY.md Normal file
View File

@@ -0,0 +1,9 @@
# Reporting Security Issues
The Electron team and community take security bugs in Electron seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, email [electron@github.com](mailto:electron@github.com) and include the word "SECURITY" in the subject line.
The Electron team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [Node Security Project](https://nodesecurity.io/report).

View File

@@ -1,25 +0,0 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
version: "{build}"
os: Visual Studio 2015
init:
- git config --global core.autocrlf input
platform:
- x86
- x64
install:
- cmd: SET PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
- cmd: SET PATH=C:\python27;%PATH%
- cmd: python script/cibuild
branches:
only:
- master
# disable build and test pahses
build: off
test: off

1
atom/CPPLINT.cfg Normal file
View File

@@ -0,0 +1 @@
filter=+build/include_alpha

View File

@@ -7,6 +7,7 @@
#include <string>
#include <vector>
#include "atom/common/atom_constants.h"
#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
#include "atom/common/options_switches.h"
@@ -18,12 +19,13 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/user_agent.h"
#include "pdf/pdf.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/url_constants.h"
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#include "chrome/common/widevine_cdm_constants.h"
#endif
@@ -42,7 +44,7 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
std::vector<std::string> flash_version_numbers = base::SplitString(
version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (flash_version_numbers.size() < 1)
if (flash_version_numbers.empty())
flash_version_numbers.push_back("11");
// |SplitString()| puts in an empty string given an empty string. :(
else if (flash_version_numbers[0].empty())
@@ -71,7 +73,7 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
return plugin;
}
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
const std::string& version) {
content::PepperPluginInfo widevine_cdm;
@@ -108,6 +110,25 @@ content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
}
#endif
void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
content::PepperPluginInfo pdf_info;
pdf_info.is_internal = true;
pdf_info.is_out_of_process = true;
pdf_info.name = "Chromium PDF Viewer";
pdf_info.description = "Portable Document Format";
pdf_info.path = base::FilePath::FromUTF8Unsafe(kPdfPluginPath);
content::WebPluginMimeType pdf_mime_type(kPdfPluginMimeType, "pdf",
"Portable Document Format");
pdf_info.mime_types.push_back(pdf_mime_type);
pdf_info.internal_entry_points.get_interface = chrome_pdf::PPP_GetInterface;
pdf_info.internal_entry_points.initialize_module =
chrome_pdf::PPP_InitializeModule;
pdf_info.internal_entry_points.shutdown_module =
chrome_pdf::PPP_ShutdownModule;
pdf_info.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
plugins->push_back(pdf_info);
}
void ConvertStringWithSeparatorToVector(std::vector<std::string>* vec,
const char* separator,
const char* cmd_switch) {
@@ -135,7 +156,7 @@ void AddPepperFlashFromCommandLine(
plugins->push_back(CreatePepperFlashInfo(flash_path, flash_version));
}
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
void AddWidevineCdmFromCommandLine(
std::vector<content::PepperPluginInfo>* plugins) {
auto command_line = base::CommandLine::ForCurrentProcess();
@@ -187,9 +208,10 @@ void AtomContentClient::AddAdditionalSchemes(
void AtomContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) {
AddPepperFlashFromCommandLine(plugins);
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
AddWidevineCdmFromCommandLine(plugins);
#endif
ComputeBuiltInPlugins(plugins);
}
void AtomContentClient::AddServiceWorkerSchemes(
@@ -197,11 +219,20 @@ void AtomContentClient::AddServiceWorkerSchemes(
std::vector<std::string> schemes;
ConvertStringWithSeparatorToVector(&schemes, ",",
switches::kRegisterServiceWorkerSchemes);
if (!schemes.empty()) {
for (const std::string& scheme : schemes)
service_worker_schemes->insert(scheme);
}
for (const std::string& scheme : schemes)
service_worker_schemes->insert(scheme);
service_worker_schemes->insert(url::kFileScheme);
}
void AtomContentClient::AddSecureSchemesAndOrigins(
std::set<std::string>* secure_schemes,
std::set<GURL>* secure_origins) {
std::vector<std::string> schemes;
ConvertStringWithSeparatorToVector(&schemes, ",", switches::kSecureSchemes);
for (const std::string& scheme : schemes)
secure_schemes->insert(scheme);
}
} // namespace atom

View File

@@ -31,6 +31,9 @@ class AtomContentClient : public brightray::ContentClient {
std::vector<content::PepperPluginInfo>* plugins) override;
void AddServiceWorkerSchemes(
std::set<std::string>* service_worker_schemes) override;
void AddSecureSchemesAndOrigins(
std::set<std::string>* secure_schemes,
std::set<GURL>* secure_origins) override;
private:
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);

View File

@@ -10,7 +10,7 @@
#if defined(OS_MACOSX)
extern "C" {
__attribute__((visibility("default")))
int AtomMain(int argc, const char* argv[]);
int AtomMain(int argc, char* argv[]);
__attribute__((visibility("default")))
int AtomInitializeICUandStartNode(int argc, char *argv[]);

View File

@@ -15,11 +15,11 @@
#include "content/public/app/content_main.h"
#if defined(OS_MACOSX)
int AtomMain(int argc, const char* argv[]) {
int AtomMain(int argc, char* argv[]) {
atom::AtomMainDelegate delegate;
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
params.argv = const_cast<const char**>(argv);
atom::AtomCommandLine::Init(argc, argv);
return content::ContentMain(params);
}

View File

@@ -4,18 +4,22 @@
#include "atom/app/atom_main.h"
#include <stdlib.h>
#include <cstdlib>
#include <vector>
#if defined(OS_WIN)
#include <windows.h>
#include <windows.h> // windows.h must be included first
#include <shellapi.h>
#include <shellscalingapi.h>
#include <tchar.h>
#include <shellapi.h>
#include "atom/app/atom_main_delegate.h"
#include "atom/app/command_line_args.h"
#include "atom/common/crash_reporter/win/crash_service_main.h"
#include "base/environment.h"
#include "base/process/launch.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "content/public/app/sandbox_helper_win.h"
#include "sandbox/win/src/sandbox_types.h"
@@ -50,8 +54,39 @@ bool IsEnvSet(const char* name) {
#if defined(OS_WIN)
int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
int argc = 0;
wchar_t** wargv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
struct Arguments {
int argc = 0;
wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
~Arguments() { LocalFree(argv); }
} arguments;
if (!arguments.argv)
return -1;
#ifdef _DEBUG
// Don't display assert dialog boxes in CI test runs
static const auto kCI = "ELECTRON_CI";
bool is_ci = IsEnvSet(kCI);
if (!is_ci) {
for (int i = 0; i < arguments.argc; ++i) {
if (!_wcsicmp(arguments.argv[i], L"--ci")) {
is_ci = true;
_putenv_s(kCI, "1"); // set flag for child processes
break;
}
}
}
if (is_ci) {
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
_set_error_mode(_OUT_TO_STDERR);
}
#endif
bool run_as_node = IsEnvSet(kRunAsNode);
@@ -59,49 +94,24 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
if (run_as_node || !IsEnvSet("ELECTRON_NO_ATTACH_CONSOLE"))
base::RouteStdioToConsole(false);
// Convert argv to to UTF8
char** argv = new char*[argc];
for (int i = 0; i < argc; i++) {
// Compute the size of the required buffer
DWORD size = WideCharToMultiByte(CP_UTF8,
0,
wargv[i],
-1,
NULL,
0,
NULL,
NULL);
if (size == 0) {
// This should never happen.
fprintf(stderr, "Could not convert arguments to utf8.");
exit(1);
}
// Do the actual conversion
argv[i] = new char[size];
DWORD result = WideCharToMultiByte(CP_UTF8,
0,
wargv[i],
-1,
argv[i],
size,
NULL,
NULL);
if (result == 0) {
// This should never happen.
fprintf(stderr, "Could not convert arguments to utf8.");
exit(1);
}
}
if (run_as_node) {
// Now that argv conversion is done, we can finally start.
std::vector<char*> argv(arguments.argc);
std::transform(
arguments.argv, arguments.argv + arguments.argc, argv.begin(),
[](auto& a) { return _strdup(base::WideToUTF8(a).c_str()); });
base::AtExitManager atexit_manager;
base::i18n::InitializeICU();
return atom::NodeMain(argc, argv);
auto ret = atom::NodeMain(argv.size(), argv.data());
std::for_each(argv.begin(), argv.end(), free);
return ret;
} else if (IsEnvSet("ELECTRON_INTERNAL_CRASH_SERVICE")) {
return crash_service::Main(cmd);
}
if (!atom::CheckCommandLineArguments(arguments.argc, arguments.argv))
return -1;
sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info);
atom::AtomMainDelegate delegate;
@@ -109,33 +119,32 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
content::ContentMainParams params(&delegate);
params.instance = instance;
params.sandbox_info = &sandbox_info;
atom::AtomCommandLine::Init(argc, argv);
atom::AtomCommandLine::InitW(argc, wargv);
atom::AtomCommandLine::Init(arguments.argc, arguments.argv);
return content::ContentMain(params);
}
#elif defined(OS_LINUX) // defined(OS_WIN)
int main(int argc, const char* argv[]) {
int main(int argc, char* argv[]) {
if (IsEnvSet(kRunAsNode)) {
base::i18n::InitializeICU();
base::AtExitManager atexit_manager;
return atom::NodeMain(argc, const_cast<char**>(argv));
return atom::NodeMain(argc, argv);
}
atom::AtomMainDelegate delegate;
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
params.argv = const_cast<const char**>(argv);
atom::AtomCommandLine::Init(argc, argv);
return content::ContentMain(params);
}
#else // defined(OS_LINUX)
int main(int argc, const char* argv[]) {
int main(int argc, char* argv[]) {
if (IsEnvSet(kRunAsNode)) {
return AtomInitializeICUandStartNode(argc, const_cast<char**>(argv));
return AtomInitializeICUandStartNode(argc, argv);
}
return AtomMain(argc, argv);

View File

@@ -4,14 +4,16 @@
#include "atom/app/atom_main_delegate.h"
#include <string>
#include <iostream>
#include <string>
#include "atom/app/atom_content_client.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/relauncher.h"
#include "atom/common/google_api_key.h"
#include "atom/common/options_switches.h"
#include "atom/renderer/atom_renderer_client.h"
#include "atom/renderer/atom_sandboxed_renderer_client.h"
#include "atom/utility/atom_content_utility_client.h"
#include "base/command_line.h"
#include "base/debug/stack_trace.h"
@@ -29,7 +31,7 @@ namespace {
const char* kRelauncherProcess = "relauncher";
bool IsBrowserProcess(base::CommandLine* cmd) {
std::string process_type = cmd->GetSwitchValueASCII(switches::kProcessType);
std::string process_type = cmd->GetSwitchValueASCII(::switches::kProcessType);
return process_type.empty();
}
@@ -72,7 +74,7 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
// Only enable logging when --enable-logging is specified.
std::unique_ptr<base::Environment> env(base::Environment::Create());
if (!command_line->HasSwitch(switches::kEnableLogging) &&
if (!command_line->HasSwitch(::switches::kEnableLogging) &&
!env->HasVar("ELECTRON_ENABLE_LOGGING")) {
settings.logging_dest = logging::LOG_NONE;
logging::SetMinLogLevel(logging::LOG_NUM_SEVERITIES);
@@ -100,6 +102,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_WIN)
// Ignore invalid parameter errors.
_set_invalid_parameter_handler(InvalidParameterHandler);
// Disable the ActiveVerifier, which is used by Chrome to track possible
// bugs, but no use in Electron.
base::win::DisableHandleVerifier();
#endif
return brightray::MainDelegate::BasicStartupComplete(exit_code);
@@ -115,17 +120,23 @@ void AtomMainDelegate::PreSandboxStartup() {
auto command_line = base::CommandLine::ForCurrentProcess();
std::string process_type = command_line->GetSwitchValueASCII(
switches::kProcessType);
::switches::kProcessType);
// Only append arguments for browser process.
if (!IsBrowserProcess(command_line))
return;
// Disable renderer sandbox for most of node's functions.
command_line->AppendSwitch(switches::kNoSandbox);
if (command_line->HasSwitch(switches::kEnableSandbox)) {
// Disable setuid sandbox since it is not longer required on linux(namespace
// sandbox is available on most distros).
command_line->AppendSwitch(::switches::kDisableSetuidSandbox);
} else {
// Disable renderer sandbox for most of node's functions.
command_line->AppendSwitch(::switches::kNoSandbox);
}
// Allow file:// URIs to read other file:// URIs by default.
command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
command_line->AppendSwitch(::switches::kAllowFileAccessFromFiles);
#if defined(OS_MACOSX)
// Enable AVFoundation.
@@ -140,7 +151,13 @@ content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
content::ContentRendererClient*
AtomMainDelegate::CreateContentRendererClient() {
renderer_client_.reset(new AtomRendererClient);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSandbox)) {
renderer_client_.reset(new AtomSandboxedRendererClient);
} else {
renderer_client_.reset(new AtomRendererClient);
}
return renderer_client_.get();
}

View File

@@ -7,8 +7,8 @@
#include <string>
#include "brightray/common/main_delegate.h"
#include "brightray/common/content_client.h"
#include "brightray/common/main_delegate.h"
namespace atom {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_APP_COMMAND_LINE_ARGS_H_
#define ATOM_APP_COMMAND_LINE_ARGS_H_
#include "base/command_line.h"
namespace atom {
bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv);
} // namespace atom
#endif // ATOM_APP_COMMAND_LINE_ARGS_H_

View File

@@ -7,12 +7,16 @@
#include "atom/app/uv_task_runner.h"
#include "atom/browser/javascript_environment.h"
#include "atom/browser/node_debugger.h"
#include "atom/common/api/atom_bindings.h"
#include "atom/common/crash_reporter/crash_reporter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
#include "gin/v8_initializer.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
@@ -42,14 +46,26 @@ int NodeMain(int argc, char *argv[]) {
const char** exec_argv;
node::Init(&argc, const_cast<const char**>(argv), &exec_argc, &exec_argv);
node::IsolateData isolate_data(gin_env.isolate(), loop);
node::Environment* env = node::CreateEnvironment(
gin_env.isolate(), loop, gin_env.context(), argc, argv,
&isolate_data, gin_env.context(), argc, argv,
exec_argc, exec_argv);
// Start our custom debugger implementation.
NodeDebugger node_debugger(gin_env.isolate());
if (node_debugger.IsRunning())
env->AssignToContext(v8::Debug::GetDebugContext());
env->AssignToContext(v8::Debug::GetDebugContext(gin_env.isolate()));
mate::Dictionary process(gin_env.isolate(), env->process_object());
#if defined(OS_WIN)
process.SetMethod("log", &AtomBindings::Log);
#endif
process.SetMethod("crash", &AtomBindings::Crash);
// Setup process.crashReporter.start in child node processes
auto reporter = mate::Dictionary::CreateEmpty(gin_env.isolate());
reporter.SetMethod("start", &crash_reporter::CrashReporter::StartInstance);
process.Set("crashReporter", reporter);
node::LoadEnvironment(env);

View File

@@ -12,7 +12,6 @@
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/browser.h"
#include "atom/browser/login_handler.h"
#include "atom/browser/relauncher.h"
#include "atom/common/atom_command_line.h"
@@ -31,19 +30,23 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "brightray/browser/brightray_paths.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/content_switches.h"
#include "native_mate/dictionary.h"
#include "media/audio/audio_manager.h"
#include "native_mate/object_template_builder.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
#if defined(OS_WIN)
#include "atom/browser/ui/win/jump_list.h"
#include "base/strings/utf_string_conversions.h"
#endif
@@ -70,6 +73,220 @@ struct Converter<Browser::UserTask> {
return true;
}
};
using atom::JumpListItem;
using atom::JumpListCategory;
using atom::JumpListResult;
template<>
struct Converter<JumpListItem::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
JumpListItem::Type* out) {
std::string item_type;
if (!ConvertFromV8(isolate, val, &item_type))
return false;
if (item_type == "task")
*out = JumpListItem::Type::TASK;
else if (item_type == "separator")
*out = JumpListItem::Type::SEPARATOR;
else if (item_type == "file")
*out = JumpListItem::Type::FILE;
else
return false;
return true;
}
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
JumpListItem::Type val) {
std::string item_type;
switch (val) {
case JumpListItem::Type::TASK:
item_type = "task";
break;
case JumpListItem::Type::SEPARATOR:
item_type = "separator";
break;
case JumpListItem::Type::FILE:
item_type = "file";
break;
}
return mate::ConvertToV8(isolate, item_type);
}
};
template<>
struct Converter<JumpListItem> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
JumpListItem* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
return false;
if (!dict.Get("type", &(out->type)))
return false;
switch (out->type) {
case JumpListItem::Type::TASK:
if (!dict.Get("program", &(out->path)) ||
!dict.Get("title", &(out->title)))
return false;
if (dict.Get("iconPath", &(out->icon_path)) &&
!dict.Get("iconIndex", &(out->icon_index)))
return false;
dict.Get("args", &(out->arguments));
dict.Get("description", &(out->description));
return true;
case JumpListItem::Type::SEPARATOR:
return true;
case JumpListItem::Type::FILE:
return dict.Get("path", &(out->path));
}
assert(false);
return false;
}
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const JumpListItem& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.Set("type", val.type);
switch (val.type) {
case JumpListItem::Type::TASK:
dict.Set("program", val.path);
dict.Set("args", val.arguments);
dict.Set("title", val.title);
dict.Set("iconPath", val.icon_path);
dict.Set("iconIndex", val.icon_index);
dict.Set("description", val.description);
break;
case JumpListItem::Type::SEPARATOR:
break;
case JumpListItem::Type::FILE:
dict.Set("path", val.path);
break;
}
return dict.GetHandle();
}
};
template<>
struct Converter<JumpListCategory::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
JumpListCategory::Type* out) {
std::string category_type;
if (!ConvertFromV8(isolate, val, &category_type))
return false;
if (category_type == "tasks")
*out = JumpListCategory::Type::TASKS;
else if (category_type == "frequent")
*out = JumpListCategory::Type::FREQUENT;
else if (category_type == "recent")
*out = JumpListCategory::Type::RECENT;
else if (category_type == "custom")
*out = JumpListCategory::Type::CUSTOM;
else
return false;
return true;
}
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
JumpListCategory::Type val) {
std::string category_type;
switch (val) {
case JumpListCategory::Type::TASKS:
category_type = "tasks";
break;
case JumpListCategory::Type::FREQUENT:
category_type = "frequent";
break;
case JumpListCategory::Type::RECENT:
category_type = "recent";
break;
case JumpListCategory::Type::CUSTOM:
category_type = "custom";
break;
}
return mate::ConvertToV8(isolate, category_type);
}
};
template<>
struct Converter<JumpListCategory> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
JumpListCategory* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
return false;
if (dict.Get("name", &(out->name)) && out->name.empty())
return false;
if (!dict.Get("type", &(out->type))) {
if (out->name.empty())
out->type = JumpListCategory::Type::TASKS;
else
out->type = JumpListCategory::Type::CUSTOM;
}
if ((out->type == JumpListCategory::Type::TASKS) ||
(out->type == JumpListCategory::Type::CUSTOM)) {
if (!dict.Get("items", &(out->items)))
return false;
}
return true;
}
};
// static
template<>
struct Converter<JumpListResult> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, JumpListResult val) {
std::string result_code;
switch (val) {
case JumpListResult::SUCCESS:
result_code = "ok";
break;
case JumpListResult::ARGUMENT_ERROR:
result_code = "argumentError";
break;
case JumpListResult::GENERIC_ERROR:
result_code = "error";
break;
case JumpListResult::CUSTOM_CATEGORY_SEPARATOR_ERROR:
result_code = "invalidSeparatorError";
break;
case JumpListResult::MISSING_FILE_TYPE_REGISTRATION_ERROR:
result_code = "fileTypeRegistrationError";
break;
case JumpListResult::CUSTOM_CATEGORY_ACCESS_DENIED_ERROR:
result_code = "customCategoryAccessDeniedError";
break;
}
return ConvertToV8(isolate, result_code);
}
};
#endif
template<>
@@ -82,6 +299,8 @@ struct Converter<Browser::LoginItemSettings> {
dict.Get("openAtLogin", &(out->open_at_login));
dict.Get("openAsHidden", &(out->open_as_hidden));
dict.Get("path", &(out->path));
dict.Get("args", &(out->args));
return true;
}
@@ -96,8 +315,21 @@ struct Converter<Browser::LoginItemSettings> {
return dict.GetHandle();
}
};
} // namespace mate
template<>
struct Converter<content::CertificateRequestResultType> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
content::CertificateRequestResultType* out) {
bool b;
if (!ConvertFromV8(isolate, val, &b))
return false;
*out = b ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
return true;
}
};
} // namespace mate
namespace atom {
@@ -105,6 +337,26 @@ namespace api {
namespace {
class AppIdProcessIterator : public base::ProcessIterator {
public:
AppIdProcessIterator() : base::ProcessIterator(nullptr) {}
protected:
bool IncludeEntry() override {
return (entry().parent_pid() == base::GetCurrentProcId() ||
entry().pid() == base::GetCurrentProcId());
}
};
IconLoader::IconSize GetIconSizeByString(const std::string& size) {
if (size == "small") {
return IconLoader::IconSize::SMALL;
} else if (size == "large") {
return IconLoader::IconSize::LARGE;
}
return IconLoader::IconSize::NORMAL;
}
// Return the path constant from string.
int GetPathConstant(const std::string& name) {
if (name == "appData")
@@ -162,20 +414,31 @@ void OnClientCertificateSelected(
v8::Isolate* isolate,
std::shared_ptr<content::ClientCertificateDelegate> delegate,
mate::Arguments* args) {
mate::Dictionary cert_data;
if (!args->GetNext(&cert_data)) {
args->ThrowError();
if (args->Length() == 2) {
delegate->ContinueWithCertificate(nullptr);
return;
}
v8::Local<v8::Object> data;
v8::Local<v8::Value> val;
args->GetNext(&val);
if (val->IsNull()) {
delegate->ContinueWithCertificate(nullptr);
return;
}
mate::Dictionary cert_data;
if (!mate::ConvertFromV8(isolate, val, &cert_data)) {
args->ThrowError("Must pass valid certificate object.");
return;
}
std::string data;
if (!cert_data.Get("data", &data))
return;
auto certs = net::X509Certificate::CreateCertificateListFromBytes(
node::Buffer::Data(data), node::Buffer::Length(data),
net::X509Certificate::FORMAT_AUTO);
if (certs.size() > 0)
data.c_str(), data.length(), net::X509Certificate::FORMAT_AUTO);
if (!certs.empty())
delegate->ContinueWithCertificate(certs[0].get());
}
@@ -221,6 +484,21 @@ int ImportIntoCertStore(
}
#endif
void OnIconDataAvailable(v8::Isolate* isolate,
const App::FileIconCallback& callback,
gfx::Image* icon) {
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
if (icon && !icon->IsEmpty()) {
callback.Run(v8::Null(isolate), *icon);
} else {
v8::Local<v8::String> error_message =
v8::String::NewFromUtf8(isolate, "Failed to get file icon.");
callback.Run(v8::Exception::Error(error_message), gfx::Image());
}
}
} // namespace
App::App(v8::Isolate* isolate) {
@@ -253,7 +531,7 @@ void App::OnQuit() {
int exitCode = AtomBrowserMainParts::Get()->GetExitCode();
Emit("quit", exitCode);
if (process_singleton_.get()) {
if (process_singleton_) {
process_singleton_->Cleanup();
process_singleton_.reset();
}
@@ -275,8 +553,13 @@ void App::OnWillFinishLaunching() {
Emit("will-finish-launching");
}
void App::OnFinishLaunching() {
Emit("ready");
void App::OnFinishLaunching(const base::DictionaryValue& launch_info) {
#if defined(OS_LINUX)
// Set the application name for audio streams shown in external
// applications. Only affects pulseaudio currently.
media::AudioManager::SetGlobalAppName(Browser::Get()->GetName());
#endif
Emit("ready", launch_info);
}
void App::OnAccessibilitySupportChanged() {
@@ -308,11 +591,14 @@ void App::OnLogin(LoginHandler* login_handler,
login_handler->CancelAuth();
}
void App::OnCreateWindow(const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition,
int render_process_id,
int render_frame_id) {
void App::OnCreateWindow(
const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition,
const std::vector<std::string>& features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
int render_process_id,
int render_frame_id) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
content::RenderFrameHost* rfh =
@@ -321,7 +607,11 @@ void App::OnCreateWindow(const GURL& target_url,
content::WebContents::FromRenderFrameHost(rfh);
if (web_contents) {
auto api_web_contents = WebContents::CreateFrom(isolate(), web_contents);
api_web_contents->OnCreateWindow(target_url, frame_name, disposition);
api_web_contents->OnCreateWindow(target_url,
frame_name,
disposition,
features,
body);
}
}
@@ -334,8 +624,8 @@ void App::AllowCertificateError(
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) {
const base::Callback<void(content::CertificateRequestResultType)>&
callback) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
bool prevent_default = Emit("certificate-error",
@@ -347,7 +637,7 @@ void App::AllowCertificateError(
// Deny the certificate by default.
if (!prevent_default)
*request = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY;
callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
}
void App::SelectClientCertificate(
@@ -371,8 +661,17 @@ void App::SelectClientCertificate(
cert_request_info->client_certs[0].get());
}
void App::OnGpuProcessCrashed(base::TerminationStatus exit_code) {
Emit("gpu-process-crashed");
void App::OnGpuProcessCrashed(base::TerminationStatus status) {
Emit("gpu-process-crashed",
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
}
base::FilePath App::GetAppPath() const {
return app_path_;
}
void App::SetAppPath(const base::FilePath& app_path) {
app_path_ = app_path;
}
base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
@@ -382,7 +681,7 @@ base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
if (key >= 0)
succeed = PathService::Get(key, &path);
if (!succeed)
args->ThrowError("Failed to get path");
args->ThrowError("Failed to get '" + name + "' path");
return path;
}
@@ -390,7 +689,7 @@ void App::SetPath(mate::Arguments* args,
const std::string& name,
const base::FilePath& path) {
if (!path.IsAbsolute()) {
args->ThrowError("path must be absolute");
args->ThrowError("Path must be absolute");
return;
}
@@ -415,7 +714,7 @@ std::string App::GetLocale() {
bool App::MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback) {
if (process_singleton_.get())
if (process_singleton_)
return false;
base::FilePath user_dir;
@@ -436,7 +735,7 @@ bool App::MakeSingleInstance(
}
void App::ReleaseSingleInstance() {
if (process_singleton_.get()) {
if (process_singleton_) {
process_singleton_->Cleanup();
process_singleton_.reset();
}
@@ -455,11 +754,7 @@ bool App::Relaunch(mate::Arguments* js_args) {
}
if (!override_argv) {
#if defined(OS_WIN)
const relauncher::StringVector& argv = atom::AtomCommandLine::wargv();
#else
const relauncher::StringVector& argv = atom::AtomCommandLine::argv();
#endif
return relauncher::RelaunchApp(argv);
}
@@ -493,6 +788,12 @@ bool App::IsAccessibilitySupportEnabled() {
return ax_state->IsAccessibleBrowser();
}
Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
Browser::LoginItemSettings options;
args->GetNext(&options);
return Browser::Get()->GetLoginItemSettings(options);
}
#if defined(USE_NSS_CERTS)
void App::ImportCertificate(
const base::DictionaryValue& options,
@@ -524,6 +825,141 @@ void App::OnCertificateManagerModelCreated(
}
#endif
#if defined(OS_WIN)
v8::Local<v8::Value> App::GetJumpListSettings() {
JumpList jump_list(Browser::Get()->GetAppUserModelID());
int min_items = 10;
std::vector<JumpListItem> removed_items;
if (jump_list.Begin(&min_items, &removed_items)) {
// We don't actually want to change anything, so abort the transaction.
jump_list.Abort();
} else {
LOG(ERROR) << "Failed to begin Jump List transaction.";
}
auto dict = mate::Dictionary::CreateEmpty(isolate());
dict.Set("minItems", min_items);
dict.Set("removedItems", mate::ConvertToV8(isolate(), removed_items));
return dict.GetHandle();
}
JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
mate::Arguments* args) {
std::vector<JumpListCategory> categories;
bool delete_jump_list = val->IsNull();
if (!delete_jump_list &&
!mate::ConvertFromV8(args->isolate(), val, &categories)) {
args->ThrowError("Argument must be null or an array of categories");
return JumpListResult::ARGUMENT_ERROR;
}
JumpList jump_list(Browser::Get()->GetAppUserModelID());
if (delete_jump_list) {
return jump_list.Delete()
? JumpListResult::SUCCESS
: JumpListResult::GENERIC_ERROR;
}
// Start a transaction that updates the JumpList of this application.
if (!jump_list.Begin())
return JumpListResult::GENERIC_ERROR;
JumpListResult result = jump_list.AppendCategories(categories);
// AppendCategories may have failed to add some categories, but it's better
// to have something than nothing so try to commit the changes anyway.
if (!jump_list.Commit()) {
LOG(ERROR) << "Failed to commit changes to custom Jump List.";
// It's more useful to return the earlier error code that might give
// some indication as to why the transaction actually failed, so don't
// overwrite it with a "generic error" code here.
if (result == JumpListResult::SUCCESS)
result = JumpListResult::GENERIC_ERROR;
}
return result;
}
#endif // defined(OS_WIN)
void App::GetFileIcon(const base::FilePath& path,
mate::Arguments* args) {
mate::Dictionary options;
IconLoader::IconSize icon_size;
FileIconCallback callback;
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
base::FilePath normalized_path = path.NormalizePathSeparators();
if (!args->GetNext(&options)) {
icon_size = IconLoader::IconSize::NORMAL;
} else {
std::string icon_size_string;
options.Get("size", &icon_size_string);
icon_size = GetIconSizeByString(icon_size_string);
}
if (!args->GetNext(&callback)) {
args->ThrowError("Missing required callback function");
return;
}
auto icon_manager = g_browser_process->GetIconManager();
gfx::Image* icon =
icon_manager->LookupIconFromFilepath(normalized_path, icon_size);
if (icon) {
callback.Run(v8::Null(isolate()), *icon);
} else {
icon_manager->LoadIcon(
normalized_path, icon_size,
base::Bind(&OnIconDataAvailable, isolate(), callback),
&cancelable_task_tracker_);
}
}
std::vector<mate::Dictionary> App::GetAppMemoryInfo(v8::Isolate* isolate) {
AppIdProcessIterator process_iterator;
auto process_entry = process_iterator.NextProcessEntry();
std::vector<mate::Dictionary> result;
while (process_entry != nullptr) {
int64_t pid = process_entry->pid();
auto process = base::Process::OpenWithExtraPrivileges(pid);
#if defined(OS_MACOSX)
std::unique_ptr<base::ProcessMetrics> metrics(
base::ProcessMetrics::CreateProcessMetrics(
process.Handle(), content::BrowserChildProcessHost::GetPortProvider()));
#else
std::unique_ptr<base::ProcessMetrics> metrics(
base::ProcessMetrics::CreateProcessMetrics(process.Handle()));
#endif
mate::Dictionary pid_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary memory_dict = mate::Dictionary::CreateEmpty(isolate);
memory_dict.Set("workingSetSize",
static_cast<double>(metrics->GetWorkingSetSize() >> 10));
memory_dict.Set("peakWorkingSetSize",
static_cast<double>(metrics->GetPeakWorkingSetSize() >> 10));
size_t private_bytes, shared_bytes;
if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) {
memory_dict.Set("privateBytes", static_cast<double>(private_bytes >> 10));
memory_dict.Set("sharedBytes", static_cast<double>(shared_bytes >> 10));
}
pid_dict.Set("memory", memory_dict);
pid_dict.Set("pid", pid);
result.push_back(pid_dict);
process_entry = process_iterator.NextProcessEntry();
}
return result;
}
// static
mate::Handle<App> App::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new App(isolate));
@@ -531,9 +967,10 @@ mate::Handle<App> App::Create(v8::Isolate* isolate) {
// static
void App::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "App"));
auto browser = base::Unretained(Browser::Get());
mate::ObjectTemplateBuilder(isolate, prototype)
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("quit", base::Bind(&Browser::Quit, browser))
.SetMethod("exit", base::Bind(&Browser::Exit, browser))
.SetMethod("focus", base::Bind(&Browser::Focus, browser))
@@ -556,8 +993,7 @@ void App::BuildPrototype(
base::Bind(&Browser::RemoveAsDefaultProtocolClient, browser))
.SetMethod("setBadgeCount", base::Bind(&Browser::SetBadgeCount, browser))
.SetMethod("getBadgeCount", base::Bind(&Browser::GetBadgeCount, browser))
.SetMethod("getLoginItemSettings",
base::Bind(&Browser::GetLoginItemSettings, browser))
.SetMethod("getLoginItemSettings", &App::GetLoginItemSettings)
.SetMethod("setLoginItemSettings",
base::Bind(&Browser::SetLoginItemSettings, browser))
#if defined(OS_MACOSX)
@@ -567,14 +1003,20 @@ void App::BuildPrototype(
base::Bind(&Browser::SetUserActivity, browser))
.SetMethod("getCurrentActivityType",
base::Bind(&Browser::GetCurrentActivityType, browser))
.SetMethod("setAboutPanelOptions",
base::Bind(&Browser::SetAboutPanelOptions, browser))
#endif
#if defined(OS_WIN)
.SetMethod("setUserTasks", base::Bind(&Browser::SetUserTasks, browser))
.SetMethod("getJumpListSettings", &App::GetJumpListSettings)
.SetMethod("setJumpList", &App::SetJumpList)
#endif
#if defined(OS_LINUX)
.SetMethod("isUnityRunning",
base::Bind(&Browser::IsUnityRunning, browser))
#endif
.SetMethod("setAppPath", &App::SetAppPath)
.SetMethod("getAppPath", &App::GetAppPath)
.SetMethod("setPath", &App::SetPath)
.SetMethod("getPath", &App::GetPath)
.SetMethod("setDesktopName", &App::SetDesktopName)
@@ -588,7 +1030,9 @@ void App::BuildPrototype(
.SetMethod("isAccessibilitySupportEnabled",
&App::IsAccessibilitySupportEnabled)
.SetMethod("disableHardwareAcceleration",
&App::DisableHardwareAcceleration);
&App::DisableHardwareAcceleration)
.SetMethod("getFileIcon", &App::GetFileIcon)
.SetMethod("getAppMemoryInfo", &App::GetAppMemoryInfo);
}
} // namespace api
@@ -638,6 +1082,7 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
auto command_line = base::CommandLine::ForCurrentProcess();
mate::Dictionary dict(isolate, exports);
dict.Set("App", atom::api::App::GetConstructor(isolate)->GetFunction());
dict.Set("app", atom::api::App::Create(isolate));
dict.SetMethod("appendSwitch", &AppendSwitch);
dict.SetMethod("appendArgument",
@@ -656,6 +1101,7 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
base::Bind(&Browser::DockGetBadgeText, browser));
dict.SetMethod("dockHide", base::Bind(&Browser::DockHide, browser));
dict.SetMethod("dockShow", base::Bind(&Browser::DockShow, browser));
dict.SetMethod("dockIsVisible", base::Bind(&Browser::DockIsVisible, browser));
dict.SetMethod("dockSetMenu", &DockSetMenu);
dict.SetMethod("dockSetIcon", base::Bind(&Browser::DockSetIcon, browser));
#endif

View File

@@ -6,13 +6,19 @@
#define ATOM_BROWSER_API_ATOM_API_APP_H_
#include <string>
#include <vector>
#include "atom/browser/api/event_emitter.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/browser.h"
#include "atom/browser/browser_observer.h"
#include "atom/common/native_mate_converters/callback.h"
#include "base/process/process_iterator.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/browser/process_singleton.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
@@ -26,10 +32,14 @@ class FilePath;
namespace mate {
class Arguments;
}
} // namespace mate
namespace atom {
#if defined(OS_WIN)
enum class JumpListResult : int;
#endif
namespace api {
class App : public AtomBrowserClient::Delegate,
@@ -37,17 +47,23 @@ class App : public AtomBrowserClient::Delegate,
public BrowserObserver,
public content::GpuDataManagerObserver {
public:
using FileIconCallback = base::Callback<void(v8::Local<v8::Value>,
const gfx::Image&)>;
static mate::Handle<App> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
// Called when window with disposition needs to be created.
void OnCreateWindow(const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition,
int render_process_id,
int render_frame_id);
void OnCreateWindow(
const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition,
const std::vector<std::string>& features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
int render_process_id,
int render_frame_id);
#if defined(USE_NSS_CERTS)
void OnCertificateManagerModelCreated(
@@ -56,6 +72,8 @@ class App : public AtomBrowserClient::Delegate,
std::unique_ptr<CertificateManagerModel> model);
#endif
base::FilePath GetAppPath() const;
protected:
explicit App(v8::Isolate* isolate);
~App() override;
@@ -69,7 +87,7 @@ class App : public AtomBrowserClient::Delegate,
void OnOpenURL(const std::string& url) override;
void OnActivate(bool has_visible_windows) override;
void OnWillFinishLaunching() override;
void OnFinishLaunching() override;
void OnFinishLaunching(const base::DictionaryValue& launch_info) override;
void OnLogin(LoginHandler* login_handler,
const base::DictionaryValue& request_details) override;
void OnAccessibilitySupportChanged() override;
@@ -90,17 +108,19 @@ class App : public AtomBrowserClient::Delegate,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) override;
const base::Callback<void(content::CertificateRequestResultType)>&
callback) override;
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
// content::GpuDataManagerObserver:
void OnGpuProcessCrashed(base::TerminationStatus exit_code) override;
void OnGpuProcessCrashed(base::TerminationStatus status) override;
private:
void SetAppPath(const base::FilePath& app_path);
// Get/Set the pre-defined path in PathService.
base::FilePath GetPath(mate::Arguments* args, const std::string& name);
void SetPath(mate::Arguments* args,
@@ -115,10 +135,23 @@ class App : public AtomBrowserClient::Delegate,
bool Relaunch(mate::Arguments* args);
void DisableHardwareAcceleration(mate::Arguments* args);
bool IsAccessibilitySupportEnabled();
Browser::LoginItemSettings GetLoginItemSettings(mate::Arguments* args);
#if defined(USE_NSS_CERTS)
void ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback);
#endif
void GetFileIcon(const base::FilePath& path,
mate::Arguments* args);
std::vector<mate::Dictionary> GetAppMemoryInfo(v8::Isolate* isolate);
#if defined(OS_WIN)
// Get the current Jump List settings.
v8::Local<v8::Value> GetJumpListSettings();
// Set or remove a custom Jump List for the application.
JumpListResult SetJumpList(v8::Local<v8::Value> val, mate::Arguments* args);
#endif // defined(OS_WIN)
std::unique_ptr<ProcessSingleton> process_singleton_;
@@ -126,6 +159,11 @@ class App : public AtomBrowserClient::Delegate,
std::unique_ptr<CertificateManagerModel> certificate_manager_model_;
#endif
// Tracks tasks requesting file icons.
base::CancelableTaskTracker cancelable_task_tracker_;
base::FilePath app_path_;
DISALLOW_COPY_AND_ASSIGN(App);
};

View File

@@ -4,12 +4,13 @@
#include "atom/browser/api/atom_api_auto_updater.h"
#include "base/time/time.h"
#include "atom/browser/browser.h"
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
#include "atom/common/api/event_emitter_caller.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/node_includes.h"
#include "base/time/time.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
@@ -47,7 +48,9 @@ void AutoUpdater::OnError(const std::string& message) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
auto error = v8::Exception::Error(mate::StringToV8(isolate(), message));
EmitCustomEvent(
mate::EmitEvent(
isolate(),
GetWrapper(),
"error",
error->ToObject(isolate()->GetCurrentContext()).ToLocalChecked(),
// Message is also emitted to keep compatibility with old code.
@@ -87,16 +90,14 @@ void AutoUpdater::SetFeedURL(const std::string& url, mate::Arguments* args) {
void AutoUpdater::QuitAndInstall() {
// If we don't have any window then quitAndInstall immediately.
WindowList* window_list = WindowList::GetInstance();
if (window_list->size() == 0) {
if (WindowList::IsEmpty()) {
auto_updater::AutoUpdater::QuitAndInstall();
return;
}
// Otherwise do the restart after all windows have been closed.
window_list->AddObserver(this);
for (NativeWindow* window : *window_list)
window->Close();
WindowList::AddObserver(this);
WindowList::CloseAllWindows();
}
// static
@@ -106,8 +107,9 @@ mate::Handle<AutoUpdater> AutoUpdater::Create(v8::Isolate* isolate) {
// static
void AutoUpdater::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "AutoUpdater"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates)
.SetMethod("getFeedURL", &auto_updater::AutoUpdater::GetFeedURL)
.SetMethod("setFeedURL", &AutoUpdater::SetFeedURL)
@@ -121,11 +123,14 @@ void AutoUpdater::BuildPrototype(
namespace {
using atom::api::AutoUpdater;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("autoUpdater", atom::api::AutoUpdater::Create(isolate));
dict.Set("autoUpdater", AutoUpdater::Create(isolate));
dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -24,7 +24,7 @@ class AutoUpdater : public mate::EventEmitter<AutoUpdater>,
static mate::Handle<AutoUpdater> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit AutoUpdater(v8::Isolate* isolate);

View File

@@ -0,0 +1,162 @@
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_browser_view.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/browser.h"
#include "atom/browser/native_browser_view.h"
#include "atom/common/color_util.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
#include "native_mate/constructor.h"
#include "native_mate/dictionary.h"
#include "ui/gfx/geometry/rect.h"
namespace mate {
template <>
struct Converter<atom::AutoResizeFlags> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
atom::AutoResizeFlags* auto_resize_flags) {
mate::Dictionary params;
if (!ConvertFromV8(isolate, val, &params)) {
return false;
}
uint8_t flags = 0;
bool width = false;
if (params.Get("width", &width) && width) {
flags |= atom::kAutoResizeWidth;
}
bool height = false;
if (params.Get("height", &height) && height) {
flags |= atom::kAutoResizeHeight;
}
*auto_resize_flags = static_cast<atom::AutoResizeFlags>(flags);
return true;
}
};
} // namespace mate
namespace atom {
namespace api {
BrowserView::BrowserView(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options)
: api_web_contents_(nullptr) {
Init(isolate, wrapper, options);
}
void BrowserView::Init(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options) {
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
web_preferences.Set("isBrowserView", true);
mate::Handle<class WebContents> web_contents =
WebContents::Create(isolate, web_preferences);
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents.get();
view_.reset(NativeBrowserView::Create(
api_web_contents_->managed_web_contents()->GetView()));
InitWith(isolate, wrapper);
}
BrowserView::~BrowserView() {
api_web_contents_->DestroyWebContents(true /* async */);
}
// static
mate::WrappableBase* BrowserView::New(mate::Arguments* args) {
if (!Browser::Get()->is_ready()) {
args->ThrowError("Cannot create BrowserView before app is ready");
return nullptr;
}
if (args->Length() > 1) {
args->ThrowError("Too many arguments");
return nullptr;
}
mate::Dictionary options;
if (!(args->Length() == 1 && args->GetNext(&options))) {
options = mate::Dictionary::CreateEmpty(args->isolate());
}
return new BrowserView(args->isolate(), args->GetThis(), options);
}
int32_t BrowserView::ID() const {
return weak_map_id();
}
void BrowserView::SetAutoResize(AutoResizeFlags flags) {
view_->SetAutoResizeFlags(flags);
}
void BrowserView::SetBounds(const gfx::Rect& bounds) {
view_->SetBounds(bounds);
}
void BrowserView::SetBackgroundColor(const std::string& color_name) {
view_->SetBackgroundColor(ParseHexColor(color_name));
}
v8::Local<v8::Value> BrowserView::WebContents() {
if (web_contents_.IsEmpty()) {
return v8::Null(isolate());
}
return v8::Local<v8::Value>::New(isolate(), web_contents_);
}
// static
void BrowserView::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "BrowserView"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("setAutoResize", &BrowserView::SetAutoResize)
.SetMethod("setBounds", &BrowserView::SetBounds)
.SetMethod("setBackgroundColor", &BrowserView::SetBackgroundColor)
.SetProperty("webContents", &BrowserView::WebContents)
.SetProperty("id", &BrowserView::ID);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::BrowserView;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
BrowserView::SetConstructor(isolate, base::Bind(&BrowserView::New));
mate::Dictionary browser_view(
isolate, BrowserView::GetConstructor(isolate)->GetFunction());
mate::Dictionary dict(isolate, exports);
dict.Set("BrowserView", browser_view);
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_browser_view, Initialize)

View File

@@ -0,0 +1,72 @@
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
#define ATOM_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
#include <memory>
#include <string>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/native_browser_view.h"
#include "native_mate/handle.h"
namespace gfx {
class Rect;
}
namespace mate {
class Arguments;
class Dictionary;
} // namespace mate
namespace atom {
class NativeBrowserView;
namespace api {
class WebContents;
class BrowserView : public mate::TrackableObject<BrowserView> {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
NativeBrowserView* view() const { return view_.get(); }
int32_t ID() const;
protected:
BrowserView(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options);
~BrowserView() override;
private:
void Init(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options);
void SetAutoResize(AutoResizeFlags flags);
void SetBounds(const gfx::Rect& bounds);
void SetBackgroundColor(const std::string& color_name);
v8::Local<v8::Value> WebContents();
v8::Global<v8::Value> web_contents_;
class WebContents* api_web_contents_;
std::unique_ptr<NativeBrowserView> view_;
DISALLOW_COPY_AND_ASSIGN(BrowserView);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_BROWSER_VIEW_H_

View File

@@ -7,12 +7,13 @@
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/node_includes.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "content/public/browser/tracing_controller.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
using content::TracingController;
namespace mate {
@@ -68,10 +69,6 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
dict.SetMethod("stopRecording", &StopRecording);
dict.SetMethod("getTraceBufferUsage", base::Bind(
&TracingController::GetTraceBufferUsage, controller));
dict.SetMethod("setWatchEvent", base::Bind(
&TracingController::SetWatchEvent, controller));
dict.SetMethod("cancelWatchEvent", base::Bind(
&TracingController::CancelWatchEvent, controller));
}
} // namespace

View File

@@ -20,6 +20,7 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
using atom::AtomCookieDelegate;
using content::BrowserThread;
namespace mate {
@@ -54,6 +55,28 @@ struct Converter<net::CanonicalCookie> {
}
};
template<>
struct Converter<net::CookieStore::ChangeCause> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const net::CookieStore::ChangeCause& val) {
switch (val) {
case net::CookieStore::ChangeCause::INSERTED:
case net::CookieStore::ChangeCause::EXPLICIT:
return mate::StringToV8(isolate, "explicit");
case net::CookieStore::ChangeCause::OVERWRITE:
return mate::StringToV8(isolate, "overwrite");
case net::CookieStore::ChangeCause::EXPIRED:
return mate::StringToV8(isolate, "expired");
case net::CookieStore::ChangeCause::EVICTED:
return mate::StringToV8(isolate, "evicted");
case net::CookieStore::ChangeCause::EXPIRED_OVERWRITE:
return mate::StringToV8(isolate, "expired-overwrite");
default:
return mate::StringToV8(isolate, "unknown");
}
}
};
} // namespace mate
namespace atom {
@@ -156,6 +179,13 @@ void OnSetCookie(const Cookies::SetCallback& callback, bool success) {
base::Bind(callback, success ? Cookies::SUCCESS : Cookies::FAILED));
}
// Flushes cookie store in IO thread.
void FlushCookieStoreOnIOThread(
scoped_refptr<net::URLRequestContextGetter> getter,
const base::Closure& callback) {
GetCookieStore(getter)->FlushStore(base::Bind(RunCallbackInUI, callback));
}
// Sets cookie with |details| in IO thread.
void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
std::unique_ptr<base::DictionaryValue> details,
@@ -206,11 +236,14 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
Cookies::Cookies(v8::Isolate* isolate,
AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->url_request_context_getter()) {
: request_context_getter_(browser_context->url_request_context_getter()),
cookie_delegate_(browser_context->cookie_delegate()) {
Init(isolate);
cookie_delegate_->AddObserver(this);
}
Cookies::~Cookies() {
cookie_delegate_->RemoveObserver(this);
}
void Cookies::Get(const base::DictionaryValue& filter,
@@ -239,6 +272,20 @@ void Cookies::Set(const base::DictionaryValue& details,
base::Bind(SetCookieOnIO, getter, Passed(&copied), callback));
}
void Cookies::FlushStore(const base::Closure& callback) {
auto getter = make_scoped_refptr(request_context_getter_);
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(FlushCookieStoreOnIOThread, getter, callback));
}
void Cookies::OnCookieChanged(const net::CanonicalCookie& cookie,
bool removed,
net::CookieStore::ChangeCause cause) {
Emit("changed", cookie, cause, removed);
}
// static
mate::Handle<Cookies> Cookies::Create(
v8::Isolate* isolate,
@@ -248,11 +295,13 @@ mate::Handle<Cookies> Cookies::Create(
// static
void Cookies::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Cookies"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("get", &Cookies::Get)
.SetMethod("remove", &Cookies::Remove)
.SetMethod("set", &Cookies::Set);
.SetMethod("set", &Cookies::Set)
.SetMethod("flushStore", &Cookies::FlushStore);
}
} // namespace api

View File

@@ -8,6 +8,7 @@
#include <string>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/net/atom_cookie_delegate.h"
#include "base/callback.h"
#include "native_mate/handle.h"
#include "net/cookies/canonical_cookie.h"
@@ -26,7 +27,8 @@ class AtomBrowserContext;
namespace api {
class Cookies : public mate::TrackableObject<Cookies> {
class Cookies : public mate::TrackableObject<Cookies>,
public AtomCookieDelegate::Observer {
public:
enum Error {
SUCCESS,
@@ -41,7 +43,7 @@ class Cookies : public mate::TrackableObject<Cookies> {
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
@@ -51,9 +53,16 @@ class Cookies : public mate::TrackableObject<Cookies> {
void Remove(const GURL& url, const std::string& name,
const base::Closure& callback);
void Set(const base::DictionaryValue& details, const SetCallback& callback);
void FlushStore(const base::Closure& callback);
// AtomCookieDelegate::Observer:
void OnCookieChanged(const net::CanonicalCookie& cookie,
bool removed,
net::CookieStore::ChangeCause cause) override;
private:
net::URLRequestContextGetter* request_context_getter_;
scoped_refptr<AtomCookieDelegate> cookie_delegate_;
DISALLOW_COPY_AND_ASSIGN(Cookies);
};

View File

@@ -9,28 +9,20 @@
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/web_contents.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "atom/common/node_includes.h"
using content::DevToolsAgentHost;
namespace atom {
namespace api {
namespace {
// The wrapDebugger funtion which is implemented in JavaScript.
using WrapDebuggerCallback = base::Callback<void(v8::Local<v8::Value>)>;
WrapDebuggerCallback g_wrap_debugger;
} // namespace
Debugger::Debugger(v8::Isolate* isolate, content::WebContents* web_contents)
: web_contents_(web_contents),
previous_request_id_(0) {
@@ -52,12 +44,23 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
const std::string& message) {
DCHECK(agent_host == agent_host_.get());
std::unique_ptr<base::Value> parsed_message(base::JSONReader::Read(message));
if (!parsed_message->IsType(base::Value::TYPE_DICTIONARY))
return;
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::String> local_message =
v8::String::NewFromUtf8(isolate(), message.data());
v8::MaybeLocal<v8::Value> parsed_message = v8::JSON::Parse(
isolate()->GetCurrentContext(), local_message);
if (parsed_message.IsEmpty()) {
return;
}
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
if (!mate::ConvertFromV8(isolate(), parsed_message.ToLocalChecked(),
dict.get())) {
return;
}
base::DictionaryValue* dict =
static_cast<base::DictionaryValue*>(parsed_message.get());
int id;
if (!dict->GetInteger("id", &id)) {
std::string method;
@@ -115,7 +118,7 @@ bool Debugger::IsAttached() {
void Debugger::Detach() {
if (!agent_host_.get())
return;
agent_host_->DetachClient();
agent_host_->DetachClient(this);
AgentHostClosed(agent_host_.get(), false);
agent_host_ = nullptr;
}
@@ -144,44 +147,40 @@ void Debugger::SendCommand(mate::Arguments* args) {
std::string json_args;
base::JSONWriter::Write(request, &json_args);
agent_host_->DispatchProtocolMessage(json_args);
agent_host_->DispatchProtocolMessage(this, json_args);
}
// static
mate::Handle<Debugger> Debugger::Create(
v8::Isolate* isolate,
content::WebContents* web_contents) {
auto handle = mate::CreateHandle(
isolate, new Debugger(isolate, web_contents));
g_wrap_debugger.Run(handle.ToV8());
return handle;
return mate::CreateHandle(isolate, new Debugger(isolate, web_contents));
}
// static
void Debugger::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Debugger"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("attach", &Debugger::Attach)
.SetMethod("isAttached", &Debugger::IsAttached)
.SetMethod("detach", &Debugger::Detach)
.SetMethod("sendCommand", &Debugger::SendCommand);
}
void SetWrapDebugger(const WrapDebuggerCallback& callback) {
g_wrap_debugger = callback;
}
} // namespace api
} // namespace atom
namespace {
using atom::api::Debugger;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.SetMethod("_setWrapDebugger", &atom::api::SetWrapDebugger);
mate::Dictionary(isolate, exports)
.Set("Debugger", Debugger::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -39,7 +39,7 @@ class Debugger: public mate::TrackableObject<Debugger>,
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
Debugger(v8::Isolate* isolate, content::WebContents* web_contents);

View File

@@ -10,8 +10,7 @@
#include "chrome/browser/media/desktop_media_list.h"
#include "native_mate/dictionary.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
#include "third_party/webrtc/modules/desktop_capture/window_capturer.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
#include "atom/common/node_includes.h"
@@ -61,10 +60,12 @@ void DesktopCapturer::StartHandling(bool capture_window,
options.set_disable_effects(false);
#endif
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer(
capture_screen ? webrtc::ScreenCapturer::Create(options) : nullptr);
std::unique_ptr<webrtc::WindowCapturer> window_capturer(
capture_window ? webrtc::WindowCapturer::Create(options) : nullptr);
std::unique_ptr<webrtc::DesktopCapturer> screen_capturer(
capture_screen ? webrtc::DesktopCapturer::CreateScreenCapturer(options)
: nullptr);
std::unique_ptr<webrtc::DesktopCapturer> window_capturer(
capture_window ? webrtc::DesktopCapturer::CreateWindowCapturer(options)
: nullptr);
media_list_.reset(new NativeDesktopMediaList(
std::move(screen_capturer), std::move(window_capturer)));
@@ -99,8 +100,9 @@ mate::Handle<DesktopCapturer> DesktopCapturer::Create(v8::Isolate* isolate) {
// static
void DesktopCapturer::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "DesktopCapturer"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("startHandling", &DesktopCapturer::StartHandling);
}

View File

@@ -20,7 +20,7 @@ class DesktopCapturer: public mate::EventEmitter<DesktopCapturer>,
static mate::Handle<DesktopCapturer> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
void StartHandling(bool capture_window,
bool capture_screen,

View File

@@ -8,11 +8,13 @@
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/native_window.h"
#include "atom/browser/ui/certificate_trust.h"
#include "atom/browser/ui/file_dialog.h"
#include "atom/browser/ui/message_box.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/net_converter.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
@@ -35,6 +37,27 @@ struct Converter<file_dialog::Filter> {
}
};
template<>
struct Converter<file_dialog::DialogSettings> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
file_dialog::DialogSettings* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
return false;
dict.Get("window", &(out->parent_window));
dict.Get("title", &(out->title));
dict.Get("message", &(out->message));
dict.Get("buttonLabel", &(out->button_label));
dict.Get("nameFieldLabel", &(out->name_field_label));
dict.Get("defaultPath", &(out->default_path));
dict.Get("filters", &(out->filters));
dict.Get("properties", &(out->properties));
dict.Get("showsTagField", &(out->shows_tag_field));
return true;
}
};
} // namespace mate
namespace {
@@ -47,6 +70,8 @@ void ShowMessageBox(int type,
const std::string& title,
const std::string& message,
const std::string& detail,
const std::string& checkbox_label,
bool checkbox_checked,
const gfx::ImageSkia& icon,
atom::NativeWindow* window,
mate::Arguments* args) {
@@ -55,56 +80,44 @@ void ShowMessageBox(int type,
if (mate::Converter<atom::MessageBoxCallback>::FromV8(args->isolate(),
peek,
&callback)) {
atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons,
default_id, cancel_id, options, title,
message, detail, icon, callback);
atom::ShowMessageBox(window, static_cast<atom::MessageBoxType>(type),
buttons, default_id, cancel_id, options, title,
message, detail, checkbox_label, checkbox_checked,
icon, callback);
} else {
int chosen = atom::ShowMessageBox(window, (atom::MessageBoxType)type,
buttons, default_id, cancel_id,
options, title, message, detail, icon);
int chosen = atom::ShowMessageBox(
window, static_cast<atom::MessageBoxType>(type), buttons, default_id,
cancel_id, options, title, message, detail, icon);
args->Return(chosen);
}
}
void ShowOpenDialog(const std::string& title,
const std::string& button_label,
const base::FilePath& default_path,
const file_dialog::Filters& filters,
int properties,
atom::NativeWindow* window,
void ShowOpenDialog(const file_dialog::DialogSettings& settings,
mate::Arguments* args) {
v8::Local<v8::Value> peek = args->PeekNext();
file_dialog::OpenDialogCallback callback;
if (mate::Converter<file_dialog::OpenDialogCallback>::FromV8(args->isolate(),
peek,
&callback)) {
file_dialog::ShowOpenDialog(window, title, button_label, default_path,
filters, properties, callback);
file_dialog::ShowOpenDialog(settings, callback);
} else {
std::vector<base::FilePath> paths;
if (file_dialog::ShowOpenDialog(window, title, button_label, default_path,
filters, properties, &paths))
if (file_dialog::ShowOpenDialog(settings, &paths))
args->Return(paths);
}
}
void ShowSaveDialog(const std::string& title,
const std::string& button_label,
const base::FilePath& default_path,
const file_dialog::Filters& filters,
atom::NativeWindow* window,
void ShowSaveDialog(const file_dialog::DialogSettings& settings,
mate::Arguments* args) {
v8::Local<v8::Value> peek = args->PeekNext();
file_dialog::SaveDialogCallback callback;
if (mate::Converter<file_dialog::SaveDialogCallback>::FromV8(args->isolate(),
peek,
&callback)) {
file_dialog::ShowSaveDialog(window, title, button_label, default_path,
filters, callback);
file_dialog::ShowSaveDialog(settings, callback);
} else {
base::FilePath path;
if (file_dialog::ShowSaveDialog(window, title, button_label, default_path,
filters, &path))
if (file_dialog::ShowSaveDialog(settings, &path))
args->Return(path);
}
}
@@ -116,6 +129,10 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
dict.SetMethod("showErrorBox", &atom::ShowErrorBox);
dict.SetMethod("showOpenDialog", &ShowOpenDialog);
dict.SetMethod("showSaveDialog", &ShowSaveDialog);
#if defined(OS_MACOSX) || defined(OS_WIN)
dict.SetMethod("showCertificateTrustDialog",
&certificate_trust::ShowCertificateTrust);
#endif
}
} // namespace

View File

@@ -10,13 +10,13 @@
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/node_includes.h"
#include "base/memory/linked_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "native_mate/dictionary.h"
#include "net/base/filename_util.h"
#include "atom/common/node_includes.h"
namespace mate {
template<>
@@ -52,11 +52,7 @@ namespace api {
namespace {
// The wrapDownloadItem funtion which is implemented in JavaScript
using WrapDownloadItemCallback = base::Callback<void(v8::Local<v8::Value>)>;
WrapDownloadItemCallback g_wrap_download_item;
std::map<uint32_t, linked_ptr<v8::Global<v8::Value>>> g_download_item_objects;
std::map<uint32_t, v8::Global<v8::Object>> g_download_item_objects;
} // namespace
@@ -76,17 +72,15 @@ DownloadItem::~DownloadItem() {
}
// Remove from the global map.
auto iter = g_download_item_objects.find(weak_map_id());
if (iter != g_download_item_objects.end())
g_download_item_objects.erase(iter);
g_download_item_objects.erase(weak_map_id());
}
void DownloadItem::OnDownloadUpdated(content::DownloadItem* item) {
if (download_item_->IsDone()) {
Emit("done", item->GetState());
// Destroy the item once item is downloaded.
base::MessageLoop::current()->PostTask(FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
} else {
Emit("updated", item->GetState());
}
@@ -116,7 +110,6 @@ bool DownloadItem::CanResume() const {
void DownloadItem::Cancel() {
download_item_->Cancel(true);
download_item_->Remove();
}
int64_t DownloadItem::GetReceivedBytes() const {
@@ -141,7 +134,7 @@ std::string DownloadItem::GetFilename() const {
std::string(),
download_item_->GetSuggestedFilename(),
GetMimeType(),
std::string()).LossyDisplayName());
"download").LossyDisplayName());
}
std::string DownloadItem::GetContentDisposition() const {
@@ -152,6 +145,10 @@ const GURL& DownloadItem::GetURL() const {
return download_item_->GetURL();
}
const std::vector<GURL>& DownloadItem::GetURLChain() const {
return download_item_->GetUrlChain();
}
content::DownloadItem::DownloadState DownloadItem::GetState() const {
return download_item_->GetState();
}
@@ -168,10 +165,23 @@ base::FilePath DownloadItem::GetSavePath() const {
return save_path_;
}
std::string DownloadItem::GetLastModifiedTime() const {
return download_item_->GetLastModifiedTime();
}
std::string DownloadItem::GetETag() const {
return download_item_->GetETag();
}
double DownloadItem::GetStartTime() const {
return download_item_->GetStartTime().ToDoubleT();
}
// static
void DownloadItem::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "DownloadItem"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("pause", &DownloadItem::Pause)
.SetMethod("isPaused", &DownloadItem::IsPaused)
@@ -185,10 +195,14 @@ void DownloadItem::BuildPrototype(v8::Isolate* isolate,
.SetMethod("getFilename", &DownloadItem::GetFilename)
.SetMethod("getContentDisposition", &DownloadItem::GetContentDisposition)
.SetMethod("getURL", &DownloadItem::GetURL)
.SetMethod("getURLChain", &DownloadItem::GetURLChain)
.SetMethod("getState", &DownloadItem::GetState)
.SetMethod("isDone", &DownloadItem::IsDone)
.SetMethod("setSavePath", &DownloadItem::SetSavePath)
.SetMethod("getSavePath", &DownloadItem::GetSavePath);
.SetMethod("getSavePath", &DownloadItem::GetSavePath)
.SetMethod("getLastModifiedTime", &DownloadItem::GetLastModifiedTime)
.SetMethod("getETag", &DownloadItem::GetETag)
.SetMethod("getStartTime", &DownloadItem::GetStartTime);
}
// static
@@ -199,18 +213,13 @@ mate::Handle<DownloadItem> DownloadItem::Create(
return mate::CreateHandle(isolate, static_cast<DownloadItem*>(existing));
auto handle = mate::CreateHandle(isolate, new DownloadItem(isolate, item));
g_wrap_download_item.Run(handle.ToV8());
// Reference this object in case it got garbage collected.
g_download_item_objects[handle->weak_map_id()] = make_linked_ptr(
new v8::Global<v8::Value>(isolate, handle.ToV8()));
g_download_item_objects[handle->weak_map_id()] =
v8::Global<v8::Object>(isolate, handle.ToV8());
return handle;
}
void SetWrapDownloadItem(const WrapDownloadItemCallback& callback) {
g_wrap_download_item = callback;
}
} // namespace api
} // namespace atom
@@ -220,8 +229,9 @@ namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.SetMethod("_setWrapDownloadItem", &atom::api::SetWrapDownloadItem);
mate::Dictionary(isolate, exports)
.Set("DownloadItem",
atom::api::DownloadItem::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -6,6 +6,7 @@
#define ATOM_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
#include "base/files/file_path.h"
@@ -24,7 +25,7 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
content::DownloadItem* item);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
void Pause();
bool IsPaused() const;
@@ -38,10 +39,14 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
std::string GetFilename() const;
std::string GetContentDisposition() const;
const GURL& GetURL() const;
const std::vector<GURL>& GetURLChain() const;
content::DownloadItem::DownloadState GetState() const;
bool IsDone() const;
void SetSavePath(const base::FilePath& path);
base::FilePath GetSavePath() const;
std::string GetLastModifiedTime() const;
std::string GetETag() const;
double GetStartTime() const;
protected:
DownloadItem(v8::Isolate* isolate, content::DownloadItem* download_item);

View File

@@ -74,8 +74,9 @@ mate::Handle<GlobalShortcut> GlobalShortcut::Create(v8::Isolate* isolate) {
// static
void GlobalShortcut::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "GlobalShortcut"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("register", &GlobalShortcut::Register)
.SetMethod("isRegistered", &GlobalShortcut::IsRegistered)
.SetMethod("unregister", &GlobalShortcut::Unregister)

View File

@@ -24,7 +24,7 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
static mate::Handle<GlobalShortcut> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit GlobalShortcut(v8::Isolate* isolate);

View File

@@ -19,9 +19,10 @@ namespace atom {
namespace api {
Menu::Menu(v8::Isolate* isolate)
Menu::Menu(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: model_(new AtomMenuModel(this)),
parent_(nullptr) {
InitWith(isolate, wrapper);
}
Menu::~Menu() {
@@ -154,8 +155,9 @@ bool Menu::IsVisibleAt(int index) const {
// static
void Menu::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Menu"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("insertItem", &Menu::InsertItemAt)
.SetMethod("insertCheckItem", &Menu::InsertCheckItemAt)
@@ -174,7 +176,8 @@ void Menu::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isItemCheckedAt", &Menu::IsItemCheckedAt)
.SetMethod("isEnabledAt", &Menu::IsEnabledAt)
.SetMethod("isVisibleAt", &Menu::IsVisibleAt)
.SetMethod("popupAt", &Menu::PopupAt);
.SetMethod("popupAt", &Menu::PopupAt)
.SetMethod("closePopupAt", &Menu::ClosePopupAt);
}
} // namespace api
@@ -184,14 +187,15 @@ void Menu::BuildPrototype(v8::Isolate* isolate,
namespace {
using atom::api::Menu;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
using atom::api::Menu;
v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Function> constructor = mate::CreateConstructor<Menu>(
isolate, "Menu", base::Bind(&Menu::Create));
Menu::SetConstructor(isolate, base::Bind(&Menu::New));
mate::Dictionary dict(isolate, exports);
dict.Set("Menu", static_cast<v8::Local<v8::Value>>(constructor));
dict.Set("Menu", Menu::GetConstructor(isolate)->GetFunction());
#if defined(OS_MACOSX)
dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu);
dict.SetMethod("sendActionToFirstResponder",

View File

@@ -20,10 +20,10 @@ namespace api {
class Menu : public mate::TrackableObject<Menu>,
public AtomMenuModel::Delegate {
public:
static mate::WrappableBase* Create(v8::Isolate* isolate);
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
#if defined(OS_MACOSX)
// Set the global menubar.
@@ -36,7 +36,7 @@ class Menu : public mate::TrackableObject<Menu>,
AtomMenuModel* model() const { return model_.get(); }
protected:
explicit Menu(v8::Isolate* isolate);
Menu(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
~Menu() override;
// mate::Wrappable:
@@ -53,9 +53,9 @@ class Menu : public mate::TrackableObject<Menu>,
void ExecuteCommand(int command_id, int event_flags) override;
void MenuWillShow(ui::SimpleMenuModel* source) override;
virtual void PopupAt(Window* window,
int x = -1, int y = -1,
int positioning_item = 0) = 0;
virtual void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) = 0;
virtual void ClosePopupAt(int32_t window_id) = 0;
std::unique_ptr<AtomMenuModel> model_;
Menu* parent_;

View File

@@ -7,27 +7,40 @@
#include "atom/browser/api/atom_api_menu.h"
#include <map>
#include <string>
#import "atom/browser/ui/cocoa/atom_menu_controller.h"
using base::scoped_nsobject;
namespace atom {
namespace api {
class MenuMac : public Menu {
protected:
explicit MenuMac(v8::Isolate* isolate);
MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
void PopupAt(Window* window, int x, int y, int positioning_item) override;
base::scoped_nsobject<AtomMenuController> menu_controller_;
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
int32_t window_id, int x, int y, int positioning_item,
bool async);
void ClosePopupAt(int32_t window_id) override;
private:
friend class Menu;
static void SendActionToFirstResponder(const std::string& action);
scoped_nsobject<AtomMenuController> menu_controller_;
// window ID -> open context menu
std::map<int32_t, scoped_nsobject<AtomMenuController>> popup_controllers_;
base::WeakPtrFactory<MenuMac> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuMac);
};

View File

@@ -6,34 +6,58 @@
#include "atom/browser/native_window.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "atom/common/node_includes.h"
using content::BrowserThread;
namespace atom {
namespace api {
MenuMac::MenuMac(v8::Isolate* isolate) : Menu(isolate) {
MenuMac::MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: Menu(isolate, wrapper),
weak_factory_(this) {
}
void MenuMac::PopupAt(Window* window, int x, int y, int positioning_item) {
void MenuMac::PopupAt(
Window* window, int x, int y, int positioning_item, bool async) {
NativeWindow* native_window = window->window();
if (!native_window)
return;
auto popup = base::Bind(&MenuMac::PopupOnUI, weak_factory_.GetWeakPtr(),
native_window->GetWeakPtr(), window->ID(), x, y,
positioning_item, async);
if (async)
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, popup);
else
popup.Run();
}
void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
int32_t window_id, int x, int y, int positioning_item,
bool async) {
if (!native_window)
return;
brightray::InspectableWebContents* web_contents =
native_window->inspectable_web_contents();
if (!web_contents)
return;
base::scoped_nsobject<AtomMenuController> menu_controller(
[[AtomMenuController alloc] initWithModel:model_.get()
auto close_callback = base::Bind(&MenuMac::ClosePopupAt,
weak_factory_.GetWeakPtr(), window_id);
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>(
[[AtomMenuController alloc] initWithModel:model()
useDefaultAccelerator:NO]);
NSMenu* menu = [menu_controller menu];
NSMenu* menu = [popup_controllers_[window_id] menu];
NSView* view = web_contents->GetView()->GetNativeView();
// Which menu item to show.
@@ -68,11 +92,33 @@ void MenuMac::PopupAt(Window* window, int x, int y, int positioning_item) {
if (rightmostMenuPoint > screenRight)
position.x = position.x - [menu size].width;
// Don't emit unresponsive event when showing menu.
atom::UnresponsiveSuppressor suppressor;
// Show the menu.
[menu popUpMenuPositioningItem:item atLocation:position inView:view];
if (async) {
[popup_controllers_[window_id] setCloseCallback:close_callback];
// Make sure events can be pumped while the menu is up.
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
// setting flags in -[CrApplication sendEvent:], but since
// web-content menus are initiated by IPC message the setup has to
// be done manually.
base::mac::ScopedSendingEvent sendingEventScoper;
// Don't emit unresponsive event when showing menu.
atom::UnresponsiveSuppressor suppressor;
[menu popUpMenuPositioningItem:item atLocation:position inView:view];
} else {
// Don't emit unresponsive event when showing menu.
atom::UnresponsiveSuppressor suppressor;
[menu popUpMenuPositioningItem:item atLocation:position inView:view];
close_callback.Run();
}
}
void MenuMac::ClosePopupAt(int32_t window_id) {
popup_controllers_.erase(window_id);
}
// static
@@ -94,8 +140,8 @@ void Menu::SendActionToFirstResponder(const std::string& action) {
}
// static
mate::WrappableBase* Menu::Create(v8::Isolate* isolate) {
return new MenuMac(isolate);
mate::WrappableBase* Menu::New(mate::Arguments* args) {
return new MenuMac(args->isolate(), args->GetThis());
}
} // namespace api

View File

@@ -8,16 +8,20 @@
#include "atom/browser/unresponsive_suppressor.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
using views::MenuRunner;
namespace atom {
namespace api {
MenuViews::MenuViews(v8::Isolate* isolate) : Menu(isolate) {
MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: Menu(isolate, wrapper),
weak_factory_(this) {
}
void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
void MenuViews::PopupAt(
Window* window, int x, int y, int positioning_item, bool async) {
NativeWindow* native_window = static_cast<NativeWindow*>(window->window());
if (!native_window)
return;
@@ -37,14 +41,20 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
location = gfx::Point(origin.x() + x, origin.y() + y);
}
int flags = MenuRunner::CONTEXT_MENU | MenuRunner::HAS_MNEMONICS;
if (async)
flags |= MenuRunner::ASYNC;
// Don't emit unresponsive event when showing menu.
atom::UnresponsiveSuppressor suppressor;
// Show the menu.
views::MenuRunner menu_runner(
model(),
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS);
ignore_result(menu_runner.RunMenuAt(
int32_t window_id = window->ID();
auto close_callback = base::Bind(
&MenuViews::ClosePopupAt, weak_factory_.GetWeakPtr(), window_id);
menu_runners_[window_id] = std::unique_ptr<MenuRunner>(new MenuRunner(
model(), flags, close_callback));
ignore_result(menu_runners_[window_id]->RunMenuAt(
static_cast<NativeWindowViews*>(window->window())->widget(),
NULL,
gfx::Rect(location, gfx::Size()),
@@ -52,9 +62,13 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
ui::MENU_SOURCE_MOUSE));
}
void MenuViews::ClosePopupAt(int32_t window_id) {
menu_runners_.erase(window_id);
}
// static
mate::WrappableBase* Menu::Create(v8::Isolate* isolate) {
return new MenuViews(isolate);
mate::WrappableBase* Menu::New(mate::Arguments* args) {
return new MenuViews(args->isolate(), args->GetThis());
}
} // namespace api

View File

@@ -5,8 +5,12 @@
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
@@ -14,12 +18,19 @@ namespace api {
class MenuViews : public Menu {
public:
explicit MenuViews(v8::Isolate* isolate);
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(Window* window, int x, int y, int positioning_item) override;
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};

View File

@@ -0,0 +1,61 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_net.h"
#include "atom/browser/api/atom_api_url_request.h"
#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"
namespace atom {
namespace api {
Net::Net(v8::Isolate* isolate) {
Init(isolate);
}
Net::~Net() {}
// static
v8::Local<v8::Value> Net::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new Net(isolate)).ToV8();
}
// static
void Net::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Net"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetProperty("URLRequest", &Net::URLRequest);
}
v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
return URLRequest::GetConstructor(isolate)->GetFunction();
}
} // namespace api
} // namespace atom
namespace {
using atom::api::Net;
using atom::api::URLRequest;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
URLRequest::SetConstructor(isolate, base::Bind(URLRequest::New));
mate::Dictionary dict(isolate, exports);
dict.Set("net", Net::Create(isolate));
dict.Set("Net", Net::GetConstructor(isolate)->GetFunction());
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_net, Initialize)

View File

@@ -0,0 +1,35 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_NET_H_
#define ATOM_BROWSER_API_ATOM_API_NET_H_
#include "atom/browser/api/event_emitter.h"
namespace atom {
namespace api {
class Net : public mate::EventEmitter<Net> {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
v8::Local<v8::Value> URLRequest(v8::Isolate* isolate);
protected:
explicit Net(v8::Isolate* isolate);
~Net() override;
private:
DISALLOW_COPY_AND_ASSIGN(Net);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_NET_H_

View File

@@ -5,11 +5,12 @@
#include "atom/browser/api/atom_api_power_monitor.h"
#include "atom/browser/browser.h"
#include "atom/common/node_includes.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
@@ -43,7 +44,7 @@ v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate,
"Cannot initialize \"power-monitor\" module before app is ready")));
"Cannot require \"powerMonitor\" module before app is ready")));
return v8::Null(isolate);
}
@@ -52,8 +53,8 @@ v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
// static
void PowerMonitor::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype);
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "PowerMonitor"));
}
} // namespace api
@@ -63,16 +64,19 @@ void PowerMonitor::BuildPrototype(
namespace {
using atom::api::PowerMonitor;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
#if defined(OS_MACOSX)
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
#endif
using atom::api::PowerMonitor;
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("powerMonitor", PowerMonitor::Create(isolate));
dict.Set("PowerMonitor",
PowerMonitor::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -20,7 +20,7 @@ class PowerMonitor : public mate::TrackableObject<PowerMonitor>,
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit PowerMonitor(v8::Isolate* isolate);

View File

@@ -6,18 +6,21 @@
#include <string>
#include "atom/common/node_includes.h"
#include "content/public/browser/power_save_blocker.h"
#include "content/public/browser/browser_thread.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
using content::BrowserThread;
namespace mate {
template<>
struct Converter<content::PowerSaveBlocker::PowerSaveBlockerType> {
struct Converter<device::PowerSaveBlocker::PowerSaveBlockerType> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
content::PowerSaveBlocker::PowerSaveBlockerType* out) {
using content::PowerSaveBlocker;
device::PowerSaveBlocker::PowerSaveBlockerType* out) {
using device::PowerSaveBlocker;
std::string type;
if (!ConvertFromV8(isolate, val, &type))
return false;
@@ -39,7 +42,7 @@ namespace api {
PowerSaveBlocker::PowerSaveBlocker(v8::Isolate* isolate)
: current_blocker_type_(
content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension) {
device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension) {
Init(isolate);
}
@@ -58,30 +61,32 @@ void PowerSaveBlocker::UpdatePowerSaveBlocker() {
// higher precedence level than |kPowerSaveBlockPreventAppSuspension|.
//
// Only the highest-precedence blocker type takes effect.
content::PowerSaveBlocker::PowerSaveBlockerType new_blocker_type =
content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension;
device::PowerSaveBlocker::PowerSaveBlockerType new_blocker_type =
device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension;
for (const auto& element : power_save_blocker_types_) {
if (element.second ==
content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep) {
device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep) {
new_blocker_type =
content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep;
device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep;
break;
}
}
if (!power_save_blocker_ || new_blocker_type != current_blocker_type_) {
std::unique_ptr<content::PowerSaveBlocker> new_blocker =
content::PowerSaveBlocker::Create(
std::unique_ptr<device::PowerSaveBlocker> new_blocker(
new device::PowerSaveBlocker(
new_blocker_type,
content::PowerSaveBlocker::kReasonOther,
ATOM_PRODUCT_NAME);
device::PowerSaveBlocker::kReasonOther,
ATOM_PRODUCT_NAME,
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
power_save_blocker_.swap(new_blocker);
current_blocker_type_ = new_blocker_type;
}
}
int PowerSaveBlocker::Start(
content::PowerSaveBlocker::PowerSaveBlockerType type) {
device::PowerSaveBlocker::PowerSaveBlockerType type) {
static int count = 0;
power_save_blocker_types_[count] = type;
UpdatePowerSaveBlocker();
@@ -105,8 +110,9 @@ mate::Handle<PowerSaveBlocker> PowerSaveBlocker::Create(v8::Isolate* isolate) {
// static
void PowerSaveBlocker::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "PowerSaveBlocker"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("start", &PowerSaveBlocker::Start)
.SetMethod("stop", &PowerSaveBlocker::Stop)
.SetMethod("isStarted", &PowerSaveBlocker::IsStarted);

View File

@@ -9,7 +9,7 @@
#include <memory>
#include "atom/browser/api/trackable_object.h"
#include "content/public/browser/power_save_blocker.h"
#include "device/power_save_blocker/power_save_blocker.h"
#include "native_mate/handle.h"
namespace mate {
@@ -25,7 +25,7 @@ class PowerSaveBlocker : public mate::TrackableObject<PowerSaveBlocker> {
static mate::Handle<PowerSaveBlocker> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit PowerSaveBlocker(v8::Isolate* isolate);
@@ -33,18 +33,18 @@ class PowerSaveBlocker : public mate::TrackableObject<PowerSaveBlocker> {
private:
void UpdatePowerSaveBlocker();
int Start(content::PowerSaveBlocker::PowerSaveBlockerType type);
int Start(device::PowerSaveBlocker::PowerSaveBlockerType type);
bool Stop(int id);
bool IsStarted(int id);
std::unique_ptr<content::PowerSaveBlocker> power_save_blocker_;
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
// Currnet blocker type used by |power_save_blocker_|
content::PowerSaveBlocker::PowerSaveBlockerType current_blocker_type_;
device::PowerSaveBlocker::PowerSaveBlockerType current_blocker_type_;
// Map from id to the corresponding blocker type for each request.
using PowerSaveBlockerTypeMap =
std::map<int, content::PowerSaveBlocker::PowerSaveBlockerType>;
std::map<int, device::PowerSaveBlocker::PowerSaveBlockerType>;
PowerSaveBlockerTypeMap power_save_blocker_types_;
DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker);

View File

@@ -29,6 +29,9 @@ namespace api {
namespace {
// List of registered custom standard schemes.
std::vector<std::string> g_standard_schemes;
// Clear protocol handlers in IO thread.
void ClearJobFactoryInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter) {
@@ -39,6 +42,33 @@ void ClearJobFactoryInIO(
} // namespace
std::vector<std::string> GetStandardSchemes() {
return g_standard_schemes;
}
void RegisterStandardSchemes(const std::vector<std::string>& schemes,
mate::Arguments* args) {
g_standard_schemes = schemes;
auto* policy = content::ChildProcessSecurityPolicy::GetInstance();
for (const std::string& scheme : schemes) {
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT);
policy->RegisterWebSafeScheme(scheme);
}
// add switches to register as standard
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
atom::switches::kStandardSchemes, base::JoinString(schemes, ","));
mate::Dictionary opts;
bool secure = false;
if (args->GetNext(&opts) && opts.Get("secure", &secure) && secure) {
// add switches to register as secure
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
atom::switches::kSecureSchemes, base::JoinString(schemes, ","));
}
}
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->GetRequestContext()),
weak_factory_(this) {
@@ -137,8 +167,8 @@ void Protocol::OnIOCompleted(
std::string Protocol::ErrorCodeToString(ProtocolError error) {
switch (error) {
case PROTOCOL_FAIL: return "Failed to manipulate protocol factory";
case PROTOCOL_REGISTERED: return "The scheme has been registred";
case PROTOCOL_NOT_REGISTERED: return "The scheme has not been registred";
case PROTOCOL_REGISTERED: return "The scheme has been registered";
case PROTOCOL_NOT_REGISTERED: return "The scheme has not been registered";
case PROTOCOL_INTERCEPTED: return "The scheme has been intercepted";
case PROTOCOL_NOT_INTERCEPTED: return "The scheme has not been intercepted";
default: return "Unexpected error";
@@ -160,8 +190,9 @@ mate::Handle<Protocol> Protocol::Create(
// static
void Protocol::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Protocol"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("registerServiceWorkerSchemes",
&Protocol::RegisterServiceWorkerSchemes)
.SetMethod("registerStringProtocol",
@@ -199,15 +230,7 @@ void RegisterStandardSchemes(
return;
}
auto policy = content::ChildProcessSecurityPolicy::GetInstance();
for (const auto& scheme : schemes) {
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT);
policy->RegisterWebSafeScheme(scheme);
}
auto command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(atom::switches::kStandardSchemes,
base::JoinString(schemes, ","));
atom::api::RegisterStandardSchemes(schemes, args);
}
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
@@ -215,6 +238,7 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.SetMethod("registerStandardSchemes", &RegisterStandardSchemes);
dict.SetMethod("getStandardSchemes", &atom::api::GetStandardSchemes);
}
} // namespace

View File

@@ -5,8 +5,8 @@
#ifndef ATOM_BROWSER_API_ATOM_API_PROTOCOL_H_
#define ATOM_BROWSER_API_ATOM_API_PROTOCOL_H_
#include <string>
#include <map>
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
@@ -28,6 +28,10 @@ namespace atom {
namespace api {
std::vector<std::string> GetStandardSchemes();
void RegisterStandardSchemes(const std::vector<std::string>& schemes,
mate::Arguments* args);
class Protocol : public mate::TrackableObject<Protocol> {
public:
using Handler =
@@ -39,7 +43,7 @@ class Protocol : public mate::TrackableObject<Protocol> {
v8::Isolate* isolate, AtomBrowserContext* browser_context);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context);

View File

@@ -7,11 +7,12 @@
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "content/public/browser/render_process_host.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
@@ -53,8 +54,10 @@ void RenderProcessPreferences::RemoveEntry(int id) {
// static
void RenderProcessPreferences::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(
mate::StringToV8(isolate, "RenderProcessPreferences"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("addEntry", &RenderProcessPreferences::AddEntry)
.SetMethod("removeEntry", &RenderProcessPreferences::RemoveEntry);
}

View File

@@ -20,7 +20,7 @@ class RenderProcessPreferences
ForAllWebContents(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
int AddEntry(const base::DictionaryValue& entry);
void RemoveEntry(int id);

View File

@@ -97,7 +97,7 @@ v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate,
"Cannot initialize \"screen\" module before app is ready")));
"Cannot require \"screen\" module before app is ready")));
return v8::Null(isolate);
}
@@ -113,8 +113,9 @@ v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
// static
void Screen::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Screen"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("getCursorScreenPoint", &Screen::GetCursorScreenPoint)
.SetMethod("getPrimaryDisplay", &Screen::GetPrimaryDisplay)
.SetMethod("getAllDisplays", &Screen::GetAllDisplays)
@@ -128,10 +129,14 @@ void Screen::BuildPrototype(
namespace {
using atom::api::Screen;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
mate::Dictionary dict(context->GetIsolate(), exports);
dict.Set("screen", atom::api::Screen::Create(context->GetIsolate()));
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("screen", Screen::Create(isolate));
dict.Set("Screen", Screen::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -28,7 +28,7 @@ class Screen : public mate::EventEmitter<Screen>,
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
Screen(v8::Isolate* isolate, display::Screen* screen);

View File

@@ -4,6 +4,7 @@
#include "atom/browser/api/atom_api_session.h"
#include <map>
#include <string>
#include <vector>
@@ -11,28 +12,30 @@
#include "atom/browser/api/atom_api_download_item.h"
#include "atom/browser/api/atom_api_protocol.h"
#include "atom/browser/api/atom_api_web_request.h"
#include "atom/browser/browser.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_permission_manager.h"
#include "atom/browser/browser.h"
#include "atom/browser/net/atom_cert_verifier.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/content_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/net_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "base/files/file_path.h"
#include "base/guid.h"
#include "components/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/media/media_device_id_salt.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/storage_partition.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
@@ -41,13 +44,14 @@
#include "net/dns/host_cache.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_auth_preferences.h"
#include "net/proxy/proxy_service.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/l10n/l10n_util.h"
using atom::api::Cookies;
using content::BrowserThread;
using content::StoragePartition;
@@ -59,6 +63,15 @@ struct ClearStorageDataOptions {
uint32_t quota_types = StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
};
struct ClearAuthCacheOptions {
std::string type;
GURL origin;
std::string realm;
base::string16 username;
base::string16 password;
net::HttpAuth::Scheme auth_scheme;
};
uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
uint32_t storage_mask = 0;
for (const auto& it : storage_types) {
@@ -97,6 +110,18 @@ uint32_t GetQuotaMask(const std::vector<std::string>& quota_types) {
return quota_mask;
}
net::HttpAuth::Scheme GetAuthSchemeFromString(const std::string& scheme) {
if (scheme == "basic")
return net::HttpAuth::AUTH_SCHEME_BASIC;
if (scheme == "digest")
return net::HttpAuth::AUTH_SCHEME_DIGEST;
if (scheme == "ntlm")
return net::HttpAuth::AUTH_SCHEME_NTLM;
if (scheme == "negotiate")
return net::HttpAuth::AUTH_SCHEME_NEGOTIATE;
return net::HttpAuth::AUTH_SCHEME_MAX;
}
void SetUserAgentInIO(scoped_refptr<net::URLRequestContextGetter> getter,
const std::string& accept_lang,
const std::string& user_agent) {
@@ -128,7 +153,27 @@ struct Converter<ClearStorageDataOptions> {
}
};
template<>
template <>
struct Converter<ClearAuthCacheOptions> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
ClearAuthCacheOptions* out) {
mate::Dictionary options;
if (!ConvertFromV8(isolate, val, &options))
return false;
options.Get("type", &out->type);
options.Get("origin", &out->origin);
options.Get("realm", &out->realm);
options.Get("username", &out->username);
options.Get("password", &out->password);
std::string scheme;
if (options.Get("scheme", &scheme))
out->auth_scheme = GetAuthSchemeFromString(scheme);
return true;
}
};
template <>
struct Converter<net::ProxyConfig> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
@@ -159,6 +204,18 @@ struct Converter<net::ProxyConfig> {
}
};
template<>
struct Converter<atom::VerifyRequestParams> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
atom::VerifyRequestParams val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.Set("hostname", val.hostname);
dict.Set("certificate", val.certificate);
dict.Set("verificationResult", val.default_result);
return dict.GetHandle();
}
};
} // namespace mate
namespace atom {
@@ -169,15 +226,14 @@ namespace {
const char kPersistPrefix[] = "persist:";
// The wrapSession funtion which is implemented in JavaScript
using WrapSessionCallback = base::Callback<void(v8::Local<v8::Value>)>;
WrapSessionCallback g_wrap_session;
// Referenced session objects.
std::map<uint32_t, v8::Global<v8::Object>> g_sessions;
class ResolveProxyHelper {
public:
ResolveProxyHelper(AtomBrowserContext* browser_context,
const GURL& url,
Session::ResolveProxyCallback callback)
const Session::ResolveProxyCallback& callback)
: callback_(callback),
original_thread_(base::ThreadTaskRunnerHandle::Get()) {
scoped_refptr<net::URLRequestContextGetter> context_getter =
@@ -210,8 +266,8 @@ class ResolveProxyHelper {
// Start the request.
int result = proxy_service->ResolveProxy(
url, "GET", net::LOAD_NORMAL, &proxy_info_, completion_callback,
&pac_req_, nullptr, net::BoundNetLog());
url, "GET", &proxy_info_, completion_callback, &pac_req_, nullptr,
net::NetLogWithSource());
// Completed synchronously.
if (result != net::ERR_IO_PENDING)
@@ -227,6 +283,9 @@ class ResolveProxyHelper {
};
// Runs the callback in UI thread.
void RunCallbackInUI(const base::Callback<void()>& callback) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
}
template<typename ...T>
void RunCallbackInUI(const base::Callback<void(T...)>& callback, T... result) {
BrowserThread::PostTask(
@@ -312,6 +371,33 @@ void ClearHostResolverCacheInIO(
}
}
void ClearAuthCacheInIO(
const scoped_refptr<net::URLRequestContextGetter>& context_getter,
const ClearAuthCacheOptions& options,
const base::Closure& callback) {
auto request_context = context_getter->GetURLRequestContext();
auto network_session =
request_context->http_transaction_factory()->GetSession();
if (network_session) {
if (options.type == "password") {
auto auth_cache = network_session->http_auth_cache();
if (!options.origin.is_empty()) {
auth_cache->Remove(
options.origin, options.realm, options.auth_scheme,
net::AuthCredentials(options.username, options.password));
} else {
auth_cache->ClearEntriesAddedWithin(base::TimeDelta::Max());
}
} else if (options.type == "clientCertificate") {
auto client_auth_cache = network_session->ssl_client_auth_cache();
client_auth_cache->Remove(net::HostPortPair::FromURL(options.origin));
}
network_session->CloseAllConnections();
}
if (!callback.is_null())
RunCallbackInUI(callback);
}
void AllowNTLMCredentialsForDomainsInIO(
const scoped_refptr<net::URLRequestContextGetter>& context_getter,
const std::string& domains) {
@@ -330,12 +416,31 @@ void OnClearStorageDataDone(const base::Closure& callback) {
callback.Run();
}
void DownloadIdCallback(content::DownloadManager* download_manager,
const base::FilePath& path,
const std::vector<GURL>& url_chain,
const std::string& mime_type,
int64_t offset,
int64_t length,
const std::string& last_modified,
const std::string& etag,
const base::Time& start_time,
uint32_t id) {
download_manager->CreateDownloadItem(
base::GenerateGUID(), id, path, path, url_chain, GURL(), GURL(), GURL(),
GURL(), mime_type, mime_type, start_time, base::Time(), etag,
last_modified, offset, length, std::string(),
content::DownloadItem::INTERRUPTED,
content::DownloadDangerType::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false);
}
} // namespace
Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: devtools_network_emulation_client_id_(base::GenerateGUID()),
browser_context_(browser_context) {
// Observe DownloadManger to get download notifications.
// Observe DownloadManager to get download notifications.
content::BrowserContext::GetDownloadManager(browser_context)->
AddObserver(this);
@@ -346,6 +451,7 @@ Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
Session::~Session() {
content::BrowserContext::GetDownloadManager(browser_context())->
RemoveObserver(this);
g_sessions.erase(weak_map_id());
}
void Session::OnDownloadCreated(content::DownloadManager* manager,
@@ -355,10 +461,10 @@ void Session::OnDownloadCreated(content::DownloadManager* manager,
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
bool prevent_default = Emit(
"will-download",
DownloadItem::Create(isolate(), item),
item->GetWebContents());
auto handle = DownloadItem::Create(isolate(), item);
if (item->GetState() == content::DownloadItem::INTERRUPTED)
handle->SetSavePath(item->GetTargetFilePath());
bool prevent_default = Emit("will-download", handle, item->GetWebContents());
if (prevent_default) {
item->Cancel(true);
item->Remove();
@@ -387,6 +493,11 @@ void Session::ClearStorageData(mate::Arguments* args) {
auto storage_partition =
content::BrowserContext::GetStoragePartition(browser_context(), nullptr);
if (options.storage_types & StoragePartition::REMOVE_DATA_MASK_COOKIES) {
// Reset media device id salt when cookies are cleared.
// https://w3c.github.io/mediacapture-main/#dom-mediadeviceinfo-deviceid
brightray::MediaDeviceIDSalt::Reset(browser_context()->prefs());
}
storage_partition->ClearData(
options.storage_types, options.quota_types, options.origin,
content::StoragePartition::OriginMatcherFunction(),
@@ -415,7 +526,7 @@ void Session::SetDownloadPath(const base::FilePath& path) {
void Session::EnableNetworkEmulation(const mate::Dictionary& options) {
std::unique_ptr<brightray::DevToolsNetworkConditions> conditions;
bool offline = false;
double latency, download_throughput, upload_throughput;
double latency = 0.0, download_throughput = 0.0, upload_throughput = 0.0;
if (options.Get("offline", &offline) && offline) {
conditions.reset(new brightray::DevToolsNetworkConditions(offline));
} else {
@@ -479,6 +590,22 @@ void Session::ClearHostResolverCache(mate::Arguments* args) {
callback));
}
void Session::ClearAuthCache(mate::Arguments* args) {
ClearAuthCacheOptions options;
if (!args->GetNext(&options)) {
args->ThrowError("Must specify options object");
return;
}
base::Closure callback;
args->GetNext(&callback);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ClearAuthCacheInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
options, callback));
}
void Session::AllowNTLMCredentialsForDomains(const std::string& domains) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&AllowNTLMCredentialsForDomainsInIO,
@@ -503,9 +630,55 @@ std::string Session::GetUserAgent() {
return browser_context_->GetUserAgent();
}
void Session::GetBlobData(
const std::string& uuid,
const AtomBlobReader::CompletionCallback& callback) {
if (callback.is_null())
return;
AtomBlobReader* blob_reader =
browser_context()->GetBlobReader();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&AtomBlobReader::StartReading,
base::Unretained(blob_reader),
uuid,
callback));
}
void Session::CreateInterruptedDownload(const mate::Dictionary& options) {
int64_t offset = 0, length = 0;
double start_time = 0.0;
std::string mime_type, last_modified, etag;
base::FilePath path;
std::vector<GURL> url_chain;
options.Get("path", &path);
options.Get("urlChain", &url_chain);
options.Get("mimeType", &mime_type);
options.Get("offset", &offset);
options.Get("length", &length);
options.Get("lastModified", &last_modified);
options.Get("eTag", &etag);
options.Get("startTime", &start_time);
if (path.empty() || url_chain.empty() || length == 0) {
isolate()->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate(), "Must pass non-empty path, urlChain and length.")));
return;
}
if (offset >= length) {
isolate()->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate(), "Must pass an offset value less than length.")));
return;
}
auto download_manager =
content::BrowserContext::GetDownloadManager(browser_context());
download_manager->GetDelegate()->GetNextId(base::Bind(
&DownloadIdCallback, download_manager, path, url_chain, mime_type, offset,
length, last_modified, etag, base::Time::FromDoubleT(start_time)));
}
v8::Local<v8::Value> Session::Cookies(v8::Isolate* isolate) {
if (cookies_.IsEmpty()) {
auto handle = atom::api::Cookies::Create(isolate, browser_context());
auto handle = Cookies::Create(isolate, browser_context());
cookies_.Reset(isolate, handle.ToV8());
}
return v8::Local<v8::Value>::New(isolate, cookies_);
@@ -536,7 +709,12 @@ mate::Handle<Session> Session::CreateFrom(
auto handle = mate::CreateHandle(
isolate, new Session(isolate, browser_context));
g_wrap_session.Run(handle.ToV8());
// The Sessions should never be garbage collected, since the common pattern is
// to use partition strings, instead of using the Session object directly.
g_sessions[handle->weak_map_id()] =
v8::Global<v8::Object>(isolate, handle.ToV8());
return handle;
}
@@ -559,8 +737,9 @@ mate::Handle<Session> Session::FromPartition(
// static
void Session::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Session"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("resolveProxy", &Session::ResolveProxy)
.SetMethod("getCacheSize", &Session::DoCacheAction<CacheAction::STATS>)
@@ -571,29 +750,31 @@ void Session::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setDownloadPath", &Session::SetDownloadPath)
.SetMethod("enableNetworkEmulation", &Session::EnableNetworkEmulation)
.SetMethod("disableNetworkEmulation", &Session::DisableNetworkEmulation)
.SetMethod("setCertificateVerifyProc", &Session::SetCertVerifyProc)
.SetMethod("_setCertificateVerifyProc", &Session::SetCertVerifyProc)
.SetMethod("setPermissionRequestHandler",
&Session::SetPermissionRequestHandler)
.SetMethod("clearHostResolverCache", &Session::ClearHostResolverCache)
.SetMethod("clearAuthCache", &Session::ClearAuthCache)
.SetMethod("allowNTLMCredentialsForDomains",
&Session::AllowNTLMCredentialsForDomains)
.SetMethod("setUserAgent", &Session::SetUserAgent)
.SetMethod("getUserAgent", &Session::GetUserAgent)
.SetMethod("getBlobData", &Session::GetBlobData)
.SetMethod("createInterruptedDownload",
&Session::CreateInterruptedDownload)
.SetProperty("cookies", &Session::Cookies)
.SetProperty("protocol", &Session::Protocol)
.SetProperty("webRequest", &Session::WebRequest);
}
void SetWrapSession(const WrapSessionCallback& callback) {
g_wrap_session = callback;
}
} // namespace api
} // namespace atom
namespace {
using atom::api::Session;
v8::Local<v8::Value> FromPartition(
const std::string& partition, mate::Arguments* args) {
if (!atom::Browser::Get()->is_ready()) {
@@ -602,16 +783,16 @@ v8::Local<v8::Value> FromPartition(
}
base::DictionaryValue options;
args->GetNext(&options);
return atom::api::Session::FromPartition(
args->isolate(), partition, options).ToV8();
return Session::FromPartition(args->isolate(), partition, options).ToV8();
}
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("Session", Session::GetConstructor(isolate)->GetFunction());
dict.Set("Cookies", Cookies::GetConstructor(isolate)->GetFunction());
dict.SetMethod("fromPartition", &FromPartition);
dict.SetMethod("_setWrapSession", &atom::api::SetWrapSession);
}
} // namespace

View File

@@ -8,6 +8,7 @@
#include <string>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_blob_reader.h"
#include "base/values.h"
#include "content/public/browser/download_manager.h"
#include "native_mate/handle.h"
@@ -57,7 +58,7 @@ class Session: public mate::TrackableObject<Session>,
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
// Methods.
void ResolveProxy(const GURL& url, ResolveProxyCallback callback);
@@ -73,9 +74,13 @@ class Session: public mate::TrackableObject<Session>,
void SetPermissionRequestHandler(v8::Local<v8::Value> val,
mate::Arguments* args);
void ClearHostResolverCache(mate::Arguments* args);
void ClearAuthCache(mate::Arguments* args);
void AllowNTLMCredentialsForDomains(const std::string& domains);
void SetUserAgent(const std::string& user_agent, mate::Arguments* args);
std::string GetUserAgent();
void GetBlobData(const std::string& uuid,
const AtomBlobReader::CompletionCallback& callback);
void CreateInterruptedDownload(const mate::Dictionary& options);
v8::Local<v8::Value> Cookies(v8::Isolate* isolate);
v8::Local<v8::Value> Protocol(v8::Isolate* isolate);
v8::Local<v8::Value> WebRequest(v8::Isolate* isolate);

View File

@@ -8,10 +8,7 @@
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"
#if defined(OS_WIN)
#include "ui/base/win/shell.h"
#endif
#include "ui/gfx/color_utils.h"
namespace atom {
@@ -19,16 +16,16 @@ namespace api {
SystemPreferences::SystemPreferences(v8::Isolate* isolate) {
Init(isolate);
#if defined(OS_WIN)
InitializeWindow();
#endif
}
SystemPreferences::~SystemPreferences() {
}
#if defined(OS_WIN)
bool SystemPreferences::IsAeroGlassEnabled() {
return ui::win::IsAeroGlassEnabled();
}
Browser::Get()->RemoveObserver(this);
#endif
}
#if !defined(OS_MACOSX)
bool SystemPreferences::IsDarkMode() {
@@ -36,6 +33,10 @@ bool SystemPreferences::IsDarkMode() {
}
#endif
bool SystemPreferences::IsInvertedColorScheme() {
return color_utils::IsInvertedColorScheme();
}
// static
mate::Handle<SystemPreferences> SystemPreferences::Create(
v8::Isolate* isolate) {
@@ -44,11 +45,18 @@ mate::Handle<SystemPreferences> SystemPreferences::Create(
// static
void SystemPreferences::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "SystemPreferences"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
#if defined(OS_WIN)
.SetMethod("getAccentColor", &SystemPreferences::GetAccentColor)
.SetMethod("isAeroGlassEnabled", &SystemPreferences::IsAeroGlassEnabled)
.SetMethod("getColor", &SystemPreferences::GetColor)
#elif defined(OS_MACOSX)
.SetMethod("postNotification",
&SystemPreferences::PostNotification)
.SetMethod("postLocalNotification",
&SystemPreferences::PostLocalNotification)
.SetMethod("subscribeNotification",
&SystemPreferences::SubscribeNotification)
.SetMethod("unsubscribeNotification",
@@ -58,7 +66,12 @@ void SystemPreferences::BuildPrototype(
.SetMethod("unsubscribeLocalNotification",
&SystemPreferences::UnsubscribeLocalNotification)
.SetMethod("getUserDefault", &SystemPreferences::GetUserDefault)
.SetMethod("setUserDefault", &SystemPreferences::SetUserDefault)
.SetMethod("isSwipeTrackingFromScrollEventsEnabled",
&SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled)
#endif
.SetMethod("isInvertedColorScheme",
&SystemPreferences::IsInvertedColorScheme)
.SetMethod("isDarkMode", &SystemPreferences::IsDarkMode);
}
@@ -68,11 +81,15 @@ void SystemPreferences::BuildPrototype(
namespace {
using atom::api::SystemPreferences;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("systemPreferences", atom::api::SystemPreferences::Create(isolate));
dict.Set("systemPreferences", SystemPreferences::Create(isolate));
dict.Set("SystemPreferences",
SystemPreferences::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -9,8 +9,15 @@
#include "atom/browser/api/event_emitter.h"
#include "base/callback.h"
#include "base/values.h"
#include "native_mate/handle.h"
#if defined(OS_WIN)
#include "atom/browser/browser.h"
#include "atom/browser/browser_observer.h"
#include "ui/gfx/sys_color_change_listener.h"
#endif
namespace base {
class DictionaryValue;
}
@@ -19,19 +26,45 @@ namespace atom {
namespace api {
class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
class SystemPreferences : public mate::EventEmitter<SystemPreferences>
#if defined(OS_WIN)
, public BrowserObserver
, public gfx::SysColorChangeListener
#endif
{
public:
static mate::Handle<SystemPreferences> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
#if defined(OS_WIN)
bool IsAeroGlassEnabled();
typedef HRESULT (STDAPICALLTYPE *DwmGetColorizationColor)(DWORD *, BOOL *);
DwmGetColorizationColor dwmGetColorizationColor =
(DwmGetColorizationColor) GetProcAddress(LoadLibraryW(L"dwmapi.dll"),
"DwmGetColorizationColor");
std::string GetAccentColor();
std::string GetColor(const std::string& color, mate::Arguments* args);
void InitializeWindow();
// gfx::SysColorChangeListener:
void OnSysColorChange() override;
// BrowserObserver:
void OnFinishLaunching(const base::DictionaryValue& launch_info) override;
#elif defined(OS_MACOSX)
using NotificationCallback = base::Callback<
void(const std::string&, const base::DictionaryValue&)>;
void PostNotification(const std::string& name,
const base::DictionaryValue& user_info);
void PostLocalNotification(const std::string& name,
const base::DictionaryValue& user_info);
int SubscribeNotification(const std::string& name,
const NotificationCallback& callback);
void UnsubscribeNotification(int id);
@@ -40,14 +73,22 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
void UnsubscribeLocalNotification(int request_id);
v8::Local<v8::Value> GetUserDefault(const std::string& name,
const std::string& type);
void SetUserDefault(const std::string& name,
const std::string& type,
mate::Arguments* args);
bool IsSwipeTrackingFromScrollEventsEnabled();
#endif
bool IsDarkMode();
bool IsInvertedColorScheme();
protected:
explicit SystemPreferences(v8::Isolate* isolate);
~SystemPreferences() override;
#if defined(OS_MACOSX)
void DoPostNotification(const std::string& name,
const base::DictionaryValue& user_info,
bool is_local);
int DoSubscribeNotification(const std::string& name,
const NotificationCallback& callback,
bool is_local);
@@ -55,6 +96,29 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences> {
#endif
private:
#if defined(OS_WIN)
// Static callback invoked when a message comes in to our messaging window.
static LRESULT CALLBACK
WndProcStatic(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK
WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
// The window class of |window_|.
ATOM atom_;
// The handle of the module that contains the window procedure of |window_|.
HMODULE instance_;
// The window used for processing events.
HWND window_;
std::string current_color_;
bool invertered_color_scheme_;
std::unique_ptr<gfx::ScopedSysColorChangeListener> color_change_listener_;
#endif
DISALLOW_COPY_AND_ASSIGN(SystemPreferences);
};

View File

@@ -28,6 +28,28 @@ std::map<int, id> g_id_map;
} // namespace
void SystemPreferences::PostNotification(const std::string& name,
const base::DictionaryValue& user_info) {
DoPostNotification(name, user_info, false);
}
void SystemPreferences::PostLocalNotification(const std::string& name,
const base::DictionaryValue& user_info) {
DoPostNotification(name, user_info, true);
}
void SystemPreferences::DoPostNotification(const std::string& name,
const base::DictionaryValue& user_info, bool is_local) {
NSNotificationCenter* center = is_local ?
[NSNotificationCenter defaultCenter] :
[NSDistributedNotificationCenter defaultCenter];
[center
postNotificationName:base::SysUTF8ToNSString(name)
object:nil
userInfo:DictionaryValueToNSDictionary(user_info)
];
}
int SystemPreferences::SubscribeNotification(
const std::string& name, const NotificationCallback& callback) {
return DoSubscribeNotification(name, callback, false);
@@ -106,22 +128,117 @@ v8::Local<v8::Value> SystemPreferences::GetUserDefault(
return mate::ConvertToV8(isolate(),
net::GURLWithNSURL([defaults URLForKey:key]));
} else if (type == "array") {
return mate::ConvertToV8(isolate(),
*NSArrayToListValue([defaults arrayForKey:key]));
std::unique_ptr<base::ListValue> list =
NSArrayToListValue([defaults arrayForKey:key]);
if (list == nullptr)
list.reset(new base::ListValue());
return mate::ConvertToV8(isolate(), *list);
} else if (type == "dictionary") {
return mate::ConvertToV8(isolate(),
*NSDictionaryToDictionaryValue([defaults dictionaryForKey:key]));
std::unique_ptr<base::DictionaryValue> dictionary =
NSDictionaryToDictionaryValue([defaults dictionaryForKey:key]);
if (dictionary == nullptr)
dictionary.reset(new base::DictionaryValue());
return mate::ConvertToV8(isolate(), *dictionary);
} else {
return v8::Undefined(isolate());
}
}
void SystemPreferences::SetUserDefault(const std::string& name,
const std::string& type,
mate::Arguments* args) {
const auto throwConversionError = [&] {
args->ThrowError("Unable to convert value to: " + type);
};
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSString* key = base::SysUTF8ToNSString(name);
if (type == "string") {
std::string value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
[defaults setObject:base::SysUTF8ToNSString(value) forKey:key];
} else if (type == "boolean") {
bool value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
[defaults setBool:value forKey:key];
} else if (type == "float") {
float value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
[defaults setFloat:value forKey:key];
} else if (type == "integer") {
int value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
[defaults setInteger:value forKey:key];
} else if (type == "double") {
double value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
[defaults setDouble:value forKey:key];
} else if (type == "url") {
GURL value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
if (NSURL* url = net::NSURLWithGURL(value)) {
[defaults setURL:url forKey:key];
}
} else if (type == "array") {
base::ListValue value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
if (NSArray* array = ListValueToNSArray(value)) {
[defaults setObject:array forKey:key];
}
} else if (type == "dictionary") {
base::DictionaryValue value;
if (!args->GetNext(&value)) {
throwConversionError();
return;
}
if (NSDictionary* dict = DictionaryValueToNSDictionary(value)) {
[defaults setObject:dict forKey:key];
}
} else {
args->ThrowError("Invalid type: " + type);
return;
}
}
bool SystemPreferences::IsDarkMode() {
NSString* mode = [[NSUserDefaults standardUserDefaults]
stringForKey:@"AppleInterfaceStyle"];
return [mode isEqualToString:@"Dark"];
}
bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() {
return [NSEvent isSwipeTrackingFromScrollEventsEnabled];
}
} // namespace api
} // namespace atom

View File

@@ -0,0 +1,190 @@
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_system_preferences.h"
#include "atom/common/color_util.h"
#include "base/win/wrapped_window_proc.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/win/hwnd_util.h"
namespace atom {
namespace {
const wchar_t kSystemPreferencesWindowClass[] =
L"Electron_SystemPreferencesHostWindow";
} // namespace
namespace api {
bool SystemPreferences::IsAeroGlassEnabled() {
return ui::win::IsAeroGlassEnabled();
}
std::string hexColorDWORDToRGBA(DWORD color) {
std::ostringstream stream;
stream << std::hex << color;
std::string hexColor = stream.str();
return hexColor.substr(2) + hexColor.substr(0, 2);
}
std::string SystemPreferences::GetAccentColor() {
DWORD color = 0;
BOOL opaque = FALSE;
if (FAILED(dwmGetColorizationColor(&color, &opaque))) {
return "";
}
return hexColorDWORDToRGBA(color);
}
std::string SystemPreferences::GetColor(const std::string& color,
mate::Arguments* args) {
int id;
if (color == "3d-dark-shadow") {
id = COLOR_3DDKSHADOW;
} else if (color == "3d-face") {
id = COLOR_3DFACE;
} else if (color == "3d-highlight") {
id = COLOR_3DHIGHLIGHT;
} else if (color == "3d-light") {
id = COLOR_3DLIGHT;
} else if (color == "3d-shadow") {
id = COLOR_3DSHADOW;
} else if (color == "active-border") {
id = COLOR_ACTIVEBORDER;
} else if (color == "active-caption") {
id = COLOR_ACTIVECAPTION;
} else if (color == "active-caption-gradient") {
id = COLOR_GRADIENTACTIVECAPTION;
} else if (color == "app-workspace") {
id = COLOR_APPWORKSPACE;
} else if (color == "button-text") {
id = COLOR_BTNTEXT;
} else if (color == "caption-text") {
id = COLOR_CAPTIONTEXT;
} else if (color == "desktop") {
id = COLOR_DESKTOP;
} else if (color == "disabled-text") {
id = COLOR_GRAYTEXT;
} else if (color == "highlight") {
id = COLOR_HIGHLIGHT;
} else if (color == "highlight-text") {
id = COLOR_HIGHLIGHTTEXT;
} else if (color == "hotlight") {
id = COLOR_HOTLIGHT;
} else if (color == "inactive-border") {
id = COLOR_INACTIVEBORDER;
} else if (color == "inactive-caption") {
id = COLOR_INACTIVECAPTION;
} else if (color == "inactive-caption-gradient") {
id = COLOR_GRADIENTINACTIVECAPTION;
} else if (color == "inactive-caption-text") {
id = COLOR_INACTIVECAPTIONTEXT;
} else if (color == "info-background") {
id = COLOR_INFOBK;
} else if (color == "info-text") {
id = COLOR_INFOTEXT;
} else if (color == "menu") {
id = COLOR_MENU;
} else if (color == "menu-highlight") {
id = COLOR_MENUHILIGHT;
} else if (color == "menubar") {
id = COLOR_MENUBAR;
} else if (color == "menu-text") {
id = COLOR_MENUTEXT;
} else if (color == "scrollbar") {
id = COLOR_SCROLLBAR;
} else if (color == "window") {
id = COLOR_WINDOW;
} else if (color == "window-frame") {
id = COLOR_WINDOWFRAME;
} else if (color == "window-text") {
id = COLOR_WINDOWTEXT;
} else {
args->ThrowError("Unknown color: " + color);
return "";
}
return ToRGBHex(color_utils::GetSysSkColor(id));
}
void SystemPreferences::InitializeWindow() {
invertered_color_scheme_ = IsInvertedColorScheme();
// Wait until app is ready before creating sys color listener
// Creating this listener before the app is ready causes global shortcuts
// to not fire
if (Browser::Get()->is_ready())
color_change_listener_.reset(new gfx::ScopedSysColorChangeListener(this));
else
Browser::Get()->AddObserver(this);
WNDCLASSEX window_class;
base::win::InitializeWindowClass(
kSystemPreferencesWindowClass,
&base::win::WrappedWindowProc<SystemPreferences::WndProcStatic>,
0, 0, 0, NULL, NULL, NULL, NULL, NULL,
&window_class);
instance_ = window_class.hInstance;
atom_ = RegisterClassEx(&window_class);
// Create an offscreen window for receiving broadcast messages for the system
// colorization color. Create a hidden WS_POPUP window instead of an
// HWND_MESSAGE window, because only top-level windows such as popups can
// receive broadcast messages like "WM_DWMCOLORIZATIONCOLORCHANGED".
window_ = CreateWindow(MAKEINTATOM(atom_),
0, WS_POPUP, 0, 0, 0, 0, 0, 0, instance_, 0);
gfx::CheckWindowCreated(window_);
gfx::SetWindowUserData(window_, this);
}
LRESULT CALLBACK SystemPreferences::WndProcStatic(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam) {
SystemPreferences* msg_wnd = reinterpret_cast<SystemPreferences*>(
GetWindowLongPtr(hwnd, GWLP_USERDATA));
if (msg_wnd)
return msg_wnd->WndProc(hwnd, message, wparam, lparam);
else
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
LRESULT CALLBACK SystemPreferences::WndProc(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam) {
if (message == WM_DWMCOLORIZATIONCOLORCHANGED) {
DWORD new_color = (DWORD) wparam;
std::string new_color_string = hexColorDWORDToRGBA(new_color);
if (new_color_string != current_color_) {
Emit("accent-color-changed", hexColorDWORDToRGBA(new_color));
current_color_ = new_color_string;
}
}
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
void SystemPreferences::OnSysColorChange() {
bool new_invertered_color_scheme = IsInvertedColorScheme();
if (new_invertered_color_scheme != invertered_color_scheme_) {
invertered_color_scheme_ = new_invertered_color_scheme;
Emit("inverted-color-scheme-changed", new_invertered_color_scheme);
}
Emit("color-changed");
}
void SystemPreferences::OnFinishLaunching(
const base::DictionaryValue& launch_info) {
color_change_listener_.reset(new gfx::ScopedSysColorChangeListener(this));
}
} // namespace api
} // namespace atom

View File

@@ -13,6 +13,7 @@
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/node_includes.h"
#include "base/threading/thread_task_runner_handle.h"
#include "native_mate/constructor.h"
#include "native_mate/dictionary.h"
#include "ui/gfx/image/image.h"
@@ -60,26 +61,29 @@ namespace atom {
namespace api {
Tray::Tray(v8::Isolate* isolate, mate::Handle<NativeImage> image)
Tray::Tray(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
mate::Handle<NativeImage> image)
: tray_icon_(TrayIcon::Create()) {
SetImage(isolate, image);
tray_icon_->AddObserver(this);
InitWith(isolate, wrapper);
}
Tray::~Tray() {
// Destroy the native tray in next tick.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, tray_icon_.release());
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(
FROM_HERE, tray_icon_.release());
}
// static
mate::WrappableBase* Tray::New(v8::Isolate* isolate,
mate::Handle<NativeImage> image) {
mate::WrappableBase* Tray::New(mate::Handle<NativeImage> image,
mate::Arguments* args) {
if (!Browser::Get()->is_ready()) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Cannot create Tray before app is ready")));
args->ThrowError("Cannot create Tray before app is ready");
return nullptr;
}
return new Tray(isolate, image);
return new Tray(args->isolate(), args->GetThis(), image);
}
void Tray::OnClicked(const gfx::Rect& bounds, int modifiers) {
@@ -199,8 +203,9 @@ gfx::Rect Tray::GetBounds() {
// static
void Tray::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Tray"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("setImage", &Tray::SetImage)
.SetMethod("setPressedImage", &Tray::SetPressedImage)
@@ -220,14 +225,15 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
namespace {
using atom::api::Tray;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
using atom::api::Tray;
v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Function> constructor = mate::CreateConstructor<Tray>(
isolate, "Tray", base::Bind(&Tray::New));
Tray::SetConstructor(isolate, base::Bind(&Tray::New));
mate::Dictionary dict(isolate, exports);
dict.Set("Tray", static_cast<v8::Local<v8::Value>>(constructor));
dict.Set("Tray", Tray::GetConstructor(isolate)->GetFunction());
}
} // namespace

View File

@@ -35,14 +35,15 @@ class NativeImage;
class Tray : public mate::TrackableObject<Tray>,
public TrayIconObserver {
public:
static mate::WrappableBase* New(
v8::Isolate* isolate, mate::Handle<NativeImage> image);
static mate::WrappableBase* New(mate::Handle<NativeImage> image,
mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
Tray(v8::Isolate* isolate, mate::Handle<NativeImage> image);
Tray(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
mate::Handle<NativeImage> image);
~Tray() override;
// TrayIconObserver:

View File

@@ -0,0 +1,481 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_url_request.h"
#include <string>
#include "atom/browser/api/atom_api_session.h"
#include "atom/browser/net/atom_url_request.h"
#include "atom/common/api/event_emitter_caller.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/net_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"
namespace mate {
template <>
struct Converter<scoped_refptr<const net::IOBufferWithSize>> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
scoped_refptr<const net::IOBufferWithSize> buffer) {
return node::Buffer::Copy(isolate, buffer->data(), buffer->size())
.ToLocalChecked();
}
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
scoped_refptr<const net::IOBufferWithSize>* out) {
auto size = node::Buffer::Length(val);
if (size == 0) {
// Support conversion from empty buffer. A use case is
// a GET request without body.
// Since zero-sized IOBuffer(s) are not supported, we set the
// out pointer to null.
*out = nullptr;
return true;
}
auto data = node::Buffer::Data(val);
if (!data) {
// This is an error as size is positive but data is null.
return false;
}
*out = new net::IOBufferWithSize(size);
// We do a deep copy. We could have used Buffer's internal memory
// but that is much more complicated to be properly handled.
memcpy((*out)->data(), data, size);
return true;
}
};
} // namespace mate
namespace atom {
namespace api {
template <typename Flags>
URLRequest::StateBase<Flags>::StateBase(Flags initialState)
: state_(initialState) {}
template <typename Flags>
void URLRequest::StateBase<Flags>::SetFlag(Flags flag) {
state_ =
static_cast<Flags>(static_cast<int>(state_) | static_cast<int>(flag));
}
template <typename Flags>
bool URLRequest::StateBase<Flags>::operator==(Flags flag) const {
return state_ == flag;
}
template <typename Flags>
bool URLRequest::StateBase<Flags>::IsFlagSet(Flags flag) const {
return static_cast<int>(state_) & static_cast<int>(flag);
}
URLRequest::RequestState::RequestState()
: StateBase(RequestStateFlags::kNotStarted) {}
bool URLRequest::RequestState::NotStarted() const {
return *this == RequestStateFlags::kNotStarted;
}
bool URLRequest::RequestState::Started() const {
return IsFlagSet(RequestStateFlags::kStarted);
}
bool URLRequest::RequestState::Finished() const {
return IsFlagSet(RequestStateFlags::kFinished);
}
bool URLRequest::RequestState::Canceled() const {
return IsFlagSet(RequestStateFlags::kCanceled);
}
bool URLRequest::RequestState::Failed() const {
return IsFlagSet(RequestStateFlags::kFailed);
}
bool URLRequest::RequestState::Closed() const {
return IsFlagSet(RequestStateFlags::kClosed);
}
URLRequest::ResponseState::ResponseState()
: StateBase(ResponseStateFlags::kNotStarted) {}
bool URLRequest::ResponseState::NotStarted() const {
return *this == ResponseStateFlags::kNotStarted;
}
bool URLRequest::ResponseState::Started() const {
return IsFlagSet(ResponseStateFlags::kStarted);
}
bool URLRequest::ResponseState::Ended() const {
return IsFlagSet(ResponseStateFlags::kEnded);
}
bool URLRequest::ResponseState::Failed() const {
return IsFlagSet(ResponseStateFlags::kFailed);
}
URLRequest::URLRequest(v8::Isolate* isolate, v8::Local<v8::Object> wrapper) {
InitWith(isolate, wrapper);
}
URLRequest::~URLRequest() {
// A request has been created in JS, it was not used and then
// it got collected, no close event to cleanup, only destructor
// is called.
if (atom_request_) {
atom_request_->Terminate();
}
}
// static
mate::WrappableBase* URLRequest::New(mate::Arguments* args) {
auto isolate = args->isolate();
v8::Local<v8::Object> options;
args->GetNext(&options);
mate::Dictionary dict(isolate, options);
std::string method;
dict.Get("method", &method);
std::string url;
dict.Get("url", &url);
std::string redirect_policy;
dict.Get("redirect", &redirect_policy);
std::string partition;
mate::Handle<api::Session> session;
if (dict.Get("session", &session)) {
} else if (dict.Get("partition", &partition)) {
session = Session::FromPartition(isolate, partition);
} else {
// Use the default session if not specified.
session = Session::FromPartition(isolate, "");
}
auto browser_context = session->browser_context();
auto api_url_request = new URLRequest(args->isolate(), args->GetThis());
auto atom_url_request = AtomURLRequest::Create(
browser_context, method, url, redirect_policy, api_url_request);
api_url_request->atom_request_ = atom_url_request;
return api_url_request;
}
// static
void URLRequest::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "URLRequest"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
// Request API
.MakeDestroyable()
.SetMethod("write", &URLRequest::Write)
.SetMethod("cancel", &URLRequest::Cancel)
.SetMethod("setExtraHeader", &URLRequest::SetExtraHeader)
.SetMethod("removeExtraHeader", &URLRequest::RemoveExtraHeader)
.SetMethod("setChunkedUpload", &URLRequest::SetChunkedUpload)
.SetMethod("followRedirect", &URLRequest::FollowRedirect)
.SetMethod("_setLoadFlags", &URLRequest::SetLoadFlags)
.SetProperty("notStarted", &URLRequest::NotStarted)
.SetProperty("finished", &URLRequest::Finished)
// Response APi
.SetProperty("statusCode", &URLRequest::StatusCode)
.SetProperty("statusMessage", &URLRequest::StatusMessage)
.SetProperty("rawResponseHeaders", &URLRequest::RawResponseHeaders)
.SetProperty("httpVersionMajor", &URLRequest::ResponseHttpVersionMajor)
.SetProperty("httpVersionMinor", &URLRequest::ResponseHttpVersionMinor);
}
bool URLRequest::NotStarted() const {
return request_state_.NotStarted();
}
bool URLRequest::Finished() const {
return request_state_.Finished();
}
bool URLRequest::Canceled() const {
return request_state_.Canceled();
}
bool URLRequest::Write(scoped_refptr<const net::IOBufferWithSize> buffer,
bool is_last) {
if (request_state_.Canceled() || request_state_.Failed() ||
request_state_.Finished() || request_state_.Closed()) {
return false;
}
if (request_state_.NotStarted()) {
request_state_.SetFlag(RequestStateFlags::kStarted);
// Pin on first write.
Pin();
}
if (is_last) {
request_state_.SetFlag(RequestStateFlags::kFinished);
EmitRequestEvent(true, "finish");
}
DCHECK(atom_request_);
if (atom_request_) {
return atom_request_->Write(buffer, is_last);
}
return false;
}
void URLRequest::Cancel() {
if (request_state_.Canceled() || request_state_.Closed()) {
// Cancel only once.
return;
}
// Mark as canceled.
request_state_.SetFlag(RequestStateFlags::kCanceled);
DCHECK(atom_request_);
if (atom_request_ && request_state_.Started()) {
// Really cancel if it was started.
atom_request_->Cancel();
}
EmitRequestEvent(true, "abort");
if (response_state_.Started() && !response_state_.Ended()) {
EmitResponseEvent(true, "aborted");
}
Close();
}
void URLRequest::FollowRedirect() {
if (request_state_.Canceled() || request_state_.Closed()) {
return;
}
DCHECK(atom_request_);
if (atom_request_) {
atom_request_->FollowRedirect();
}
}
bool URLRequest::SetExtraHeader(const std::string& name,
const std::string& value) {
// Request state must be in the initial non started state.
if (!request_state_.NotStarted()) {
// Cannot change headers after send.
return false;
}
if (!net::HttpUtil::IsValidHeaderName(name)) {
return false;
}
if (!net::HttpUtil::IsValidHeaderValue(value)) {
return false;
}
DCHECK(atom_request_);
if (atom_request_) {
atom_request_->SetExtraHeader(name, value);
}
return true;
}
void URLRequest::RemoveExtraHeader(const std::string& name) {
// State must be equal to not started.
if (!request_state_.NotStarted()) {
// Cannot change headers after send.
return;
}
DCHECK(atom_request_);
if (atom_request_) {
atom_request_->RemoveExtraHeader(name);
}
}
void URLRequest::SetChunkedUpload(bool is_chunked_upload) {
// State must be equal to not started.
if (!request_state_.NotStarted()) {
// Cannot change headers after send.
return;
}
DCHECK(atom_request_);
if (atom_request_) {
atom_request_->SetChunkedUpload(is_chunked_upload);
}
}
void URLRequest::SetLoadFlags(int flags) {
// State must be equal to not started.
if (!request_state_.NotStarted()) {
// Cannot change load flags after start.
return;
}
DCHECK(atom_request_);
if (atom_request_) {
atom_request_->SetLoadFlags(flags);
}
}
void URLRequest::OnReceivedRedirect(
int status_code,
const std::string& method,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers) {
if (request_state_.Canceled() || request_state_.Closed()) {
return;
}
DCHECK(atom_request_);
if (!atom_request_) {
return;
}
EmitRequestEvent(false, "redirect", status_code, method, url,
response_headers.get());
}
void URLRequest::OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info) {
if (request_state_.Canceled() || request_state_.Closed()) {
return;
}
DCHECK(atom_request_);
if (!atom_request_) {
return;
}
Emit("login", auth_info.get(),
base::Bind(&AtomURLRequest::PassLoginInformation, atom_request_));
}
void URLRequest::OnResponseStarted(
scoped_refptr<net::HttpResponseHeaders> response_headers) {
if (request_state_.Canceled() || request_state_.Failed() ||
request_state_.Closed()) {
// Don't emit any event after request cancel.
return;
}
response_headers_ = response_headers;
response_state_.SetFlag(ResponseStateFlags::kStarted);
Emit("response");
}
void URLRequest::OnResponseData(
scoped_refptr<const net::IOBufferWithSize> buffer) {
if (request_state_.Canceled() || request_state_.Closed() ||
request_state_.Failed() || response_state_.Failed()) {
// In case we received an unexpected event from Chromium net,
// don't emit any data event after request cancel/error/close.
return;
}
if (!buffer || !buffer->data() || !buffer->size()) {
return;
}
Emit("data", buffer);
}
void URLRequest::OnResponseCompleted() {
if (request_state_.Canceled() || request_state_.Closed() ||
request_state_.Failed() || response_state_.Failed()) {
// In case we received an unexpected event from Chromium net,
// don't emit any data event after request cancel/error/close.
return;
}
response_state_.SetFlag(ResponseStateFlags::kEnded);
Emit("end");
Close();
}
void URLRequest::OnError(const std::string& error, bool isRequestError) {
auto error_object = v8::Exception::Error(mate::StringToV8(isolate(), error));
if (isRequestError) {
request_state_.SetFlag(RequestStateFlags::kFailed);
EmitRequestEvent(false, "error", error_object);
} else {
response_state_.SetFlag(ResponseStateFlags::kFailed);
EmitResponseEvent(false, "error", error_object);
}
Close();
}
int URLRequest::StatusCode() const {
if (response_headers_) {
return response_headers_->response_code();
}
return -1;
}
std::string URLRequest::StatusMessage() const {
std::string result;
if (response_headers_) {
result = response_headers_->GetStatusText();
}
return result;
}
net::HttpResponseHeaders* URLRequest::RawResponseHeaders() const {
return response_headers_.get();
}
uint32_t URLRequest::ResponseHttpVersionMajor() const {
if (response_headers_) {
return response_headers_->GetHttpVersion().major_value();
}
return 0;
}
uint32_t URLRequest::ResponseHttpVersionMinor() const {
if (response_headers_) {
return response_headers_->GetHttpVersion().minor_value();
}
return 0;
}
void URLRequest::Close() {
if (!request_state_.Closed()) {
request_state_.SetFlag(RequestStateFlags::kClosed);
if (response_state_.Started()) {
// Emit a close event if we really have a response object.
EmitResponseEvent(true, "close");
}
EmitRequestEvent(true, "close");
}
Unpin();
if (atom_request_) {
// A request has been created in JS, used and then it ended.
// We release unneeded net resources.
atom_request_->Terminate();
}
atom_request_ = nullptr;
}
void URLRequest::Pin() {
if (wrapper_.IsEmpty()) {
wrapper_.Reset(isolate(), GetWrapper());
}
}
void URLRequest::Unpin() {
wrapper_.Reset();
}
template <typename... Args>
void URLRequest::EmitRequestEvent(Args... args) {
v8::HandleScope handle_scope(isolate());
mate::CustomEmit(isolate(), GetWrapper(), "_emitRequestEvent", args...);
}
template <typename... Args>
void URLRequest::EmitResponseEvent(Args... args) {
v8::HandleScope handle_scope(isolate());
mate::CustomEmit(isolate(), GetWrapper(), "_emitResponseEvent", args...);
}
} // namespace api
} // namespace atom

View File

@@ -0,0 +1,213 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_URL_REQUEST_H_
#define ATOM_BROWSER_API_ATOM_API_URL_REQUEST_H_
#include <array>
#include <string>
#include "atom/browser/api/event_emitter.h"
#include "atom/browser/api/trackable_object.h"
#include "base/memory/weak_ptr.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable_base.h"
#include "net/base/auth.h"
#include "net/base/io_buffer.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_context.h"
namespace atom {
class AtomURLRequest;
namespace api {
//
// The URLRequest class implements the V8 binding between the JavaScript API
// and Chromium native net library. It is responsible for handling HTTP/HTTPS
// requests.
//
// The current class provides only the binding layer. Two other JavaScript
// classes (ClientRequest and IncomingMessage) in the net module provide the
// final API, including some state management and arguments validation.
//
// URLRequest's methods fall into two main categories: command and event
// methods. They are always executed on the Browser's UI thread.
// Command methods are called directly from JavaScript code via the API defined
// in BuildPrototype. A command method is generally implemented by forwarding
// the call to a corresponding method on AtomURLRequest which does the
// synchronization on the Browser IO thread. The latter then calls into Chromium
// net library. On the other hand, net library events originate on the IO
// thread in AtomURLRequest and are synchronized back on the UI thread, then
// forwarded to a corresponding event method in URLRequest and then to
// JavaScript via the EmitRequestEvent/EmitResponseEvent helpers.
//
// URLRequest lifetime management: we followed the Wrapper/Wrappable pattern
// defined in native_mate. However, we augment that pattern with a pin/unpin
// mechanism. The main reason is that we want the JS API to provide a similar
// lifetime guarantees as the XMLHttpRequest.
// https://xhr.spec.whatwg.org/#garbage-collection
//
// The primary motivation is to not garbage collect a URLInstance as long as the
// object is emitting network events. For instance, in the following JS code
//
// (function() {
// let request = new URLRequest(...);
// request.on('response', (response)=>{
// response.on('data', (data) = > {
// console.log(data.toString());
// });
// });
// })();
//
// we still want data to be logged even if the response/request objects are n
// more referenced in JavaScript.
//
// Binding by simply following the native_mate Wrapper/Wrappable pattern will
// delete the URLRequest object when the corresponding JS object is collected.
// The v8 handle is a private member in WrappableBase and it is always weak,
// there is no way to make it strong without changing native_mate.
// The solution we implement consists of maintaining some kind of state that
// prevents collection of JS wrappers as long as the request is emitting network
// events. At initialization, the object is unpinned. When the request starts,
// it is pinned. When no more events would be emitted, the object is unpinned
// and lifetime is again managed by the standard native mate Wrapper/Wrappable
// pattern.
//
// pin/unpin: are implemented by constructing/reseting a V8 strong persistent
// handle.
//
// The URLRequest/AtmURLRequest interaction could have been implemented in a
// single class. However, it implies that the resulting class lifetime will be
// managed by two conflicting mechanisms: JavaScript garbage collection and
// Chromium reference counting. Reasoning about lifetime issues become much
// more complex.
//
// We chose to split the implementation into two classes linked via a
// reference counted/raw pointers. A URLRequest instance is deleted if it is
// unpinned and the corresponding JS wrapper object is garbage collected. On the
// other hand, an AtmURLRequest instance lifetime is totally governed by
// reference counting.
//
class URLRequest : public mate::EventEmitter<URLRequest> {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// Methods for reporting events into JavaScript.
void OnReceivedRedirect(
int status_code,
const std::string& method,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info);
void OnResponseStarted(
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnResponseData(scoped_refptr<const net::IOBufferWithSize> data);
void OnResponseCompleted();
void OnError(const std::string& error, bool isRequestError);
protected:
explicit URLRequest(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
~URLRequest() override;
private:
template <typename Flags>
class StateBase {
public:
void SetFlag(Flags flag);
protected:
explicit StateBase(Flags initialState);
bool operator==(Flags flag) const;
bool IsFlagSet(Flags flag) const;
private:
Flags state_;
};
enum class RequestStateFlags {
kNotStarted = 0x0,
kStarted = 0x1,
kFinished = 0x2,
kCanceled = 0x4,
kFailed = 0x8,
kClosed = 0x10
};
class RequestState : public StateBase<RequestStateFlags> {
public:
RequestState();
bool NotStarted() const;
bool Started() const;
bool Finished() const;
bool Canceled() const;
bool Failed() const;
bool Closed() const;
};
enum class ResponseStateFlags {
kNotStarted = 0x0,
kStarted = 0x1,
kEnded = 0x2,
kFailed = 0x4
};
class ResponseState : public StateBase<ResponseStateFlags> {
public:
ResponseState();
bool NotStarted() const;
bool Started() const;
bool Ended() const;
bool Canceled() const;
bool Failed() const;
bool Closed() const;
};
bool NotStarted() const;
bool Finished() const;
bool Canceled() const;
bool Failed() const;
bool Write(scoped_refptr<const net::IOBufferWithSize> buffer, bool is_last);
void Cancel();
void FollowRedirect();
bool SetExtraHeader(const std::string& name, const std::string& value);
void RemoveExtraHeader(const std::string& name);
void SetChunkedUpload(bool is_chunked_upload);
void SetLoadFlags(int flags);
int StatusCode() const;
std::string StatusMessage() const;
net::HttpResponseHeaders* RawResponseHeaders() const;
uint32_t ResponseHttpVersionMajor() const;
uint32_t ResponseHttpVersionMinor() const;
void Close();
void Pin();
void Unpin();
template <typename... Args>
void EmitRequestEvent(Args... args);
template <typename... Args>
void EmitResponseEvent(Args... args);
scoped_refptr<AtomURLRequest> atom_request_;
RequestState request_state_;
ResponseState response_state_;
// Used to implement pin/unpin.
v8::Global<v8::Object> wrapper_;
scoped_refptr<net::HttpResponseHeaders> response_headers_;
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_URL_REQUEST_H_

File diff suppressed because it is too large Load Diff

View File

@@ -12,9 +12,11 @@
#include "atom/browser/api/save_page_handler.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/common_web_contents_delegate.h"
#include "content/common/cursors/webcursor.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/favicon_url.h"
#include "content/common/cursors/webcursor.h"
#include "native_mate/handle.h"
#include "ui/gfx/image/image.h"
@@ -26,6 +28,10 @@ namespace brightray {
class InspectableWebContents;
}
namespace content {
class ResourceRequestBodyImpl;
}
namespace mate {
class Arguments;
class Dictionary;
@@ -35,19 +41,23 @@ namespace atom {
struct SetSizeParams;
class AtomBrowserContext;
class WebContentsZoomController;
class WebViewGuestDelegate;
namespace api {
class WebContents : public mate::TrackableObject<WebContents>,
public CommonWebContentsDelegate,
public content::WebContentsObserver {
public content::WebContentsObserver,
public content::NotificationObserver {
public:
enum Type {
BACKGROUND_PAGE, // A DevTools extension background page.
BROWSER_WINDOW, // Used by BrowserWindow.
REMOTE, // Thin wrap around an existing WebContents.
WEB_VIEW, // Used by <webview>.
BROWSER_WINDOW, // Used by BrowserWindow.
BROWSER_VIEW, // Used by BrowserView.
REMOTE, // Thin wrap around an existing WebContents.
WEB_VIEW, // Used by <webview>.
OFF_SCREEN, // Used for offscreen rendering
};
// For node.js callback function type: function(error, buffer)
@@ -57,17 +67,22 @@ class WebContents : public mate::TrackableObject<WebContents>,
// Create from an existing WebContents.
static mate::Handle<WebContents> CreateFrom(
v8::Isolate* isolate, content::WebContents* web_contents);
static mate::Handle<WebContents> CreateFrom(
v8::Isolate* isolate, content::WebContents* web_contents, Type type);
// Create a new WebContents.
static mate::Handle<WebContents> Create(
v8::Isolate* isolate, const mate::Dictionary& options);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
int GetID() const;
// Notifies to destroy any guest web contents before destroying self.
void DestroyWebContents(bool async);
int64_t GetID() const;
int GetProcessID() const;
Type GetType() const;
bool IsFocused() const;
bool Equal(const WebContents* web_contents) const;
void LoadURL(const GURL& url, const mate::Dictionary& options);
void DownloadURL(const GURL& url);
@@ -81,6 +96,8 @@ class WebContents : public mate::TrackableObject<WebContents>,
void GoBack();
void GoForward();
void GoToOffset(int offset);
const std::string GetWebRTCIPHandlingPolicy() const;
void SetWebRTCIPHandlingPolicy(const std::string& webrtc_ip_handling_policy);
bool IsCrashed() const;
void SetUserAgent(const std::string& user_agent, mate::Arguments* args);
std::string GetUserAgent();
@@ -102,6 +119,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetAudioMuted(bool muted);
bool IsAudioMuted();
void Print(mate::Arguments* args);
void SetEmbedder(const WebContents* embedder);
// Print current page as PDF.
void PrintToPDF(const base::DictionaryValue& setting,
@@ -130,6 +148,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
// Focus.
void Focus();
bool IsFocused() const;
void TabTraverse(bool reverse);
// Send messages to browser.
@@ -155,15 +174,34 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetSize(const SetSizeParams& params);
bool IsGuest() const;
// Methods for offscreen rendering
bool IsOffScreen() const;
void OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap);
void StartPainting();
void StopPainting();
bool IsPainting() const;
void SetFrameRate(int frame_rate);
int GetFrameRate() const;
void Invalidate();
// Methods for zoom handling.
void SetZoomLevel(double level);
double GetZoomLevel();
void SetZoomFactor(double factor);
double GetZoomFactor();
// Callback triggered on permission response.
void OnEnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin,
bool allowed);
// Create window with the given disposition.
void OnCreateWindow(const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition);
void OnCreateWindow(
const GURL& target_url,
const std::string& frame_name,
WindowOpenDisposition disposition,
const std::vector<std::string>& features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body);
// Returns the web preferences of current WebContents.
v8::Local<v8::Value> GetWebPreferences(v8::Isolate* isolate);
@@ -178,17 +216,38 @@ class WebContents : public mate::TrackableObject<WebContents>,
v8::Local<v8::Value> DevToolsWebContents(v8::Isolate* isolate);
v8::Local<v8::Value> Debugger(v8::Isolate* isolate);
WebContentsZoomController* GetZoomController() { return zoom_controller_; }
protected:
WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
WebContents(v8::Isolate* isolate,
content::WebContents* web_contents,
Type type);
WebContents(v8::Isolate* isolate, const mate::Dictionary& options);
~WebContents();
void InitWithSessionAndOptions(v8::Isolate* isolate,
content::WebContents *web_contents,
mate::Handle<class Session> session,
const mate::Dictionary& options);
// content::WebContentsDelegate:
bool AddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
bool DidAddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
void WebContentsCreated(content::WebContents* source_contents,
int opener_render_process_id,
int opener_render_frame_id,
const std::string& frame_name,
const GURL& target_url,
content::WebContents* new_contents) override;
void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) override;
content::WebContents* OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params) override;
@@ -204,10 +263,15 @@ class WebContents : public mate::TrackableObject<WebContents>,
void HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
bool PreHandleKeyboardEvent(content::WebContents* source,
const content::NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) override;
void EnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin) override;
void ExitFullscreenModeForTab(content::WebContents* source) override;
void RendererUnresponsive(content::WebContents* source) override;
void RendererUnresponsive(
content::WebContents* source,
const content::WebContentsUnresponsiveState& unresponsive_state) override;
void RendererResponsive(content::WebContents* source) override;
bool HandleContextMenu(const content::ContextMenuParams& params) override;
bool OnGoToEntryOffset(int offset) override;
@@ -235,6 +299,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
// content::WebContentsObserver:
void BeforeUnloadFired(const base::TimeTicks& proceed_time) override;
void RenderViewCreated(content::RenderViewHost*) override;
void RenderViewDeleted(content::RenderViewHost*) override;
void RenderProcessGone(base::TerminationStatus status) override;
void DocumentLoadedInFrame(
@@ -251,8 +316,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
void DidGetResourceResponseStart(
const content::ResourceRequestDetails& details) override;
void DidGetRedirectForResourceRequest(
content::RenderFrameHost* render_frame_host,
const content::ResourceRedirectDetails& details) override;
void DidStartNavigation(
content::NavigationHandle* navigation_handle) override;
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override;
bool OnMessageReceived(const IPC::Message& message) override;
@@ -264,10 +330,18 @@ class WebContents : public mate::TrackableObject<WebContents>,
const std::vector<content::FaviconURL>& urls) override;
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;
void MediaStartedPlaying(const MediaPlayerId& id) override;
void MediaStoppedPlaying(const MediaPlayerId& id) override;
void MediaStartedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) override;
void MediaStoppedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) override;
void DidChangeThemeColor(SkColor theme_color) override;
// content::NotificationObserver:
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
void BeforeUnloadDialogCancelled() override;
// brightray::InspectableWebContentsDelegate:
void DevToolsReloadPage() override;
@@ -277,6 +351,13 @@ class WebContents : public mate::TrackableObject<WebContents>,
void DevToolsClosed() override;
private:
struct LoadURLParams {
LoadURLParams() : params(GURL()), id(0) {}
content::NavigationController::LoadURLParams params;
int id;
};
AtomBrowserContext* GetBrowserContext() const;
uint32_t GetNextRequestId() {
@@ -295,8 +376,13 @@ class WebContents : public mate::TrackableObject<WebContents>,
const base::ListValue& args,
IPC::Message* message);
// Called when the hosted view gets graphical updates.
void OnViewPainted();
// Called when received a synchronous message from renderer to
// set temporary zoom level.
void OnSetTemporaryZoomLevel(double level, IPC::Message* reply_msg);
// Called when received a synchronous message from renderer to
// get the zoom level.
void OnGetZoomLevel(IPC::Message* reply_msg);
v8::Global<v8::Value> session_;
v8::Global<v8::Value> devtools_web_contents_;
@@ -307,6 +393,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
// The host webcontents that may contain this webcontents.
WebContents* embedder_;
// The zoom controller for this webContents.
WebContentsZoomController* zoom_controller_;
// The type of current WebContents.
Type type_;
@@ -316,6 +405,14 @@ class WebContents : public mate::TrackableObject<WebContents>,
// Whether background throttling is disabled.
bool background_throttling_;
// Whether to enable devtools.
bool enable_devtools_;
// Container to hold url parms for deferred load when
// there is a pending navigation entry.
LoadURLParams deferred_load_url_;
content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(WebContents);
};

View File

@@ -4,25 +4,25 @@
#include "atom/browser/api/atom_api_web_contents.h"
@interface NSWindow
- (BOOL)isKeyWindow;
@end
#import <Cocoa/Cocoa.h>
namespace atom {
namespace api {
bool WebContents::IsFocused() const {
auto view = web_contents()->GetRenderWidgetHostView();
if (!view) return false;
if (GetType() != BACKGROUND_PAGE) {
auto window = web_contents()->GetTopLevelNativeWindow();
auto window = [web_contents()->GetNativeView() window];
// On Mac the render widget host view does not lose focus when the window
// loses focus so check if the top level window is the key window.
if (window && ![window isKeyWindow])
return false;
}
auto view = web_contents()->GetRenderWidgetHostView();
return view && view->HasFocus();
return view->HasFocus();
}
} // namespace api

View File

@@ -20,13 +20,14 @@ using content::BrowserThread;
namespace mate {
template<>
struct Converter<extensions::URLPattern> {
struct Converter<URLPattern> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
extensions::URLPattern* out) {
URLPattern* out) {
std::string pattern;
if (!ConvertFromV8(isolate, val, &pattern))
return false;
return out->Parse(pattern) == extensions::URLPattern::PARSE_SUCCESS;
*out = URLPattern(URLPattern::SCHEME_ALL);
return out->Parse(pattern) == URLPattern::PARSE_SUCCESS;
}
};
@@ -88,8 +89,9 @@ mate::Handle<WebRequest> WebRequest::Create(
// static
void WebRequest::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "WebRequest"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("onBeforeRequest",
&WebRequest::SetResponseListener<
AtomNetworkDelegate::kOnBeforeRequest>)

View File

@@ -22,7 +22,7 @@ class WebRequest : public mate::TrackableObject<WebRequest> {
AtomBrowserContext* browser_context);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
protected:
WebRequest(v8::Isolate* isolate, AtomBrowserContext* browser_context);

View File

@@ -3,10 +3,12 @@
// found in the LICENSE file.
#include "atom/browser/web_contents_preferences.h"
#include "atom/browser/web_contents_zoom_controller.h"
#include "atom/browser/web_view_manager.h"
#include "atom/common/native_mate_converters/content_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
#include "content/public/browser/browser_context.h"
#include "native_mate/dictionary.h"
@@ -24,6 +26,12 @@ void AddGuest(int guest_instance_id,
manager->AddGuest(guest_instance_id, element_instance_id, embedder,
guest_web_contents);
double zoom_factor;
if (options.GetDouble(atom::options::kZoomFactor, &zoom_factor)) {
atom::WebContentsZoomController::FromWebContents(guest_web_contents)
->SetDefaultZoomFactor(zoom_factor);
}
WebContentsPreferences::FromWebContents(guest_web_contents)->Merge(options);
}

View File

@@ -5,18 +5,22 @@
#include "atom/browser/api/atom_api_window.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/browser/api/atom_api_browser_view.h"
#include "atom/browser/api/atom_api_menu.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/browser.h"
#include "atom/browser/native_window.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h"
#include "native_mate/constructor.h"
#include "native_mate/dictionary.h"
#include "ui/gfx/geometry/rect.h"
@@ -27,8 +31,11 @@
#if defined(OS_WIN)
#include "atom/browser/ui/win/taskbar_host.h"
#include "ui/base/win/shell.h"
#endif
#include "atom/common/node_includes.h"
#if defined(OS_WIN)
namespace mate {
@@ -67,18 +74,42 @@ v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
} // namespace
Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
// Use options.webPreferences to create WebContents.
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
const mate::Dictionary& options) {
mate::Handle<class WebContents> web_contents;
// If no WebContents was passed to the constructor, create it from options.
if (!options.Get("webContents", &web_contents)) {
// Use options.webPreferences to create WebContents.
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
// Copy the backgroundColor to webContents.
v8::Local<v8::Value> value;
if (options.Get(options::kBackgroundColor, &value))
web_preferences.Set(options::kBackgroundColor, value);
// Copy the backgroundColor to webContents.
v8::Local<v8::Value> value;
if (options.Get(options::kBackgroundColor, &value))
web_preferences.Set(options::kBackgroundColor, value);
// Creates the WebContents used by BrowserWindow.
auto web_contents = WebContents::Create(isolate, web_preferences);
v8::Local<v8::Value> transparent;
if (options.Get("transparent", &transparent))
web_preferences.Set("transparent", transparent);
// Offscreen windows are always created frameless.
bool offscreen;
if (web_preferences.Get("offscreen", &offscreen) && offscreen) {
auto window_options = const_cast<mate::Dictionary&>(options);
window_options.Set(options::kFrame, false);
}
// Creates the WebContents used by BrowserWindow.
web_contents = WebContents::Create(isolate, web_preferences);
}
Init(isolate, wrapper, options, web_contents);
}
void Window::Init(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options,
mate::Handle<class WebContents> web_contents) {
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents.get();
@@ -107,7 +138,14 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
window_->InitFromOptions(options);
window_->AddObserver(this);
InitWith(isolate, wrapper);
AttachAsUserData(window_.get());
// We can only append this window to parent window's child windows after this
// window's JS wrapper gets initialized.
if (!parent.IsEmpty())
parent->child_windows_.Set(isolate, ID(), wrapper);
}
Window::~Window() {
@@ -116,25 +154,14 @@ Window::~Window() {
// Destroy the native window in next tick because the native code might be
// iterating all windows.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, window_.release());
}
void Window::AfterInit(v8::Isolate* isolate) {
mate::TrackableObject<Window>::AfterInit(isolate);
// We can only append this window to parent window's child windows after this
// window's JS wrapper gets initialized.
mate::Handle<Window> parent;
if (!parent_window_.IsEmpty() &&
mate::ConvertFromV8(isolate, GetParentWindow(), &parent))
parent->child_windows_.Set(isolate, ID(), GetWrapper());
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, window_.release());
}
void Window::WillCloseWindow(bool* prevent_default) {
*prevent_default = Emit("close");
}
void Window::WillDestoryNativeObject() {
void Window::WillDestroyNativeObject() {
// Close all child windows before closing current window.
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
@@ -146,7 +173,7 @@ void Window::WillDestoryNativeObject() {
}
void Window::OnWindowClosed() {
api_web_contents_->DestroyWebContents();
api_web_contents_->DestroyWebContents(true /* async */);
RemoveFromWeakMap();
window_->RemoveObserver(this);
@@ -160,7 +187,12 @@ void Window::OnWindowClosed() {
RemoveFromParentChildWindows();
// Destroy the native class when window is closed.
base::MessageLoop::current()->PostTask(FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
}
void Window::OnWindowEndSession() {
Emit("session-end");
}
void Window::OnWindowBlur() {
@@ -227,10 +259,22 @@ void Window::OnWindowScrollTouchEnd() {
Emit("scroll-touch-end");
}
void Window::OnWindowScrollTouchEdge() {
Emit("scroll-touch-edge");
}
void Window::OnWindowSwipe(const std::string& direction) {
Emit("swipe", direction);
}
void Window::OnWindowSheetBegin() {
Emit("sheet-begin");
}
void Window::OnWindowSheetEnd() {
Emit("sheet-end");
}
void Window::OnWindowEnterHtmlFullScreen() {
Emit("enter-html-full-screen");
}
@@ -251,6 +295,11 @@ void Window::OnExecuteWindowsCommand(const std::string& command_name) {
Emit("app-command", command_name);
}
void Window::OnTouchBarItemResult(const std::string& item_id,
const base::DictionaryValue& details) {
Emit("-touch-bar-interaction", item_id, details);
}
#if defined(OS_WIN)
void Window::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {
if (IsWindowMessageHooked(message)) {
@@ -262,10 +311,9 @@ void Window::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {
#endif
// static
mate::WrappableBase* Window::New(v8::Isolate* isolate, mate::Arguments* args) {
mate::WrappableBase* Window::New(mate::Arguments* args) {
if (!Browser::Get()->is_ready()) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Cannot create BrowserWindow before app is ready")));
args->ThrowError("Cannot create BrowserWindow before app is ready");
return nullptr;
}
@@ -276,10 +324,10 @@ mate::WrappableBase* Window::New(v8::Isolate* isolate, mate::Arguments* args) {
mate::Dictionary options;
if (!(args->Length() == 1 && args->GetNext(&options))) {
options = mate::Dictionary::CreateEmpty(isolate);
options = mate::Dictionary::CreateEmpty(args->isolate());
}
return new Window(isolate, options);
return new Window(args->isolate(), args->GetThis(), options);
}
void Window::Close() {
@@ -364,6 +412,16 @@ gfx::Rect Window::GetBounds() {
return window_->GetBounds();
}
void Window::SetContentBounds(const gfx::Rect& bounds, mate::Arguments* args) {
bool animate = false;
args->GetNext(&animate);
window_->SetContentBounds(bounds, animate);
}
gfx::Rect Window::GetContentBounds() {
return window_->GetContentBounds();
}
void Window::SetSize(int width, int height, mate::Arguments* args) {
bool animate = false;
args->GetNext(&animate);
@@ -470,8 +528,19 @@ bool Window::IsClosable() {
return window_->IsClosable();
}
void Window::SetAlwaysOnTop(bool top) {
window_->SetAlwaysOnTop(top);
void Window::SetAlwaysOnTop(bool top, mate::Arguments* args) {
std::string level = "floating";
int relativeLevel = 0;
std::string error;
args->GetNext(&level);
args->GetNext(&relativeLevel);
window_->SetAlwaysOnTop(top, level, relativeLevel, &error);
if (!error.empty()) {
args->ThrowError(error);
}
}
bool Window::IsAlwaysOnTop() {
@@ -572,8 +641,24 @@ void Window::SetFocusable(bool focusable) {
return window_->SetFocusable(focusable);
}
void Window::SetProgressBar(double progress) {
window_->SetProgressBar(progress);
void Window::SetProgressBar(double progress, mate::Arguments* args) {
mate::Dictionary options;
std::string mode;
NativeWindow::ProgressState state = NativeWindow::PROGRESS_NORMAL;
args->GetNext(&options) && options.Get("mode", &mode);
if (mode == "error") {
state = NativeWindow::PROGRESS_ERROR;
} else if (mode == "paused") {
state = NativeWindow::PROGRESS_PAUSED;
} else if (mode == "indeterminate") {
state = NativeWindow::PROGRESS_INDETERMINATE;
} else if (mode == "none") {
state = NativeWindow::PROGRESS_NONE;
}
window_->SetProgressBar(progress, state);
}
void Window::SetOverlayIcon(const gfx::Image& overlay,
@@ -590,7 +675,7 @@ bool Window::SetThumbarButtons(mate::Arguments* args) {
}
auto window = static_cast<NativeWindowViews*>(window_.get());
return window->taskbar_host().SetThumbarButtons(
window->GetAcceleratedWidget(), buttons);
window_->GetAcceleratedWidget(), buttons);
#else
return false;
#endif
@@ -655,6 +740,31 @@ bool Window::SetThumbnailClip(const gfx::Rect& region) {
return window->taskbar_host().SetThumbnailClip(
window_->GetAcceleratedWidget(), region);
}
bool Window::SetThumbnailToolTip(const std::string& tooltip) {
auto window = static_cast<NativeWindowViews*>(window_.get());
return window->taskbar_host().SetThumbnailToolTip(
window_->GetAcceleratedWidget(), tooltip);
}
void Window::SetAppDetails(const mate::Dictionary& options) {
base::string16 app_id;
base::FilePath app_icon_path;
int app_icon_index = 0;
base::string16 relaunch_command;
base::string16 relaunch_display_name;
options.Get("appId", &app_id);
options.Get("appIconPath", &app_icon_path);
options.Get("appIconIndex", &app_icon_index);
options.Get("relaunchCommand", &relaunch_command);
options.Get("relaunchDisplayName", &relaunch_display_name);
ui::win::SetAppDetailsForWindow(
app_id, app_icon_path, app_icon_index,
relaunch_command, relaunch_display_name,
window_->GetAcceleratedWidget());
}
#endif
#if defined(TOOLKIT_VIEWS)
@@ -676,6 +786,17 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) {
window_->SetAspectRatio(aspect_ratio, extra_size);
}
void Window::PreviewFile(const std::string& path, mate::Arguments* args) {
std::string display_name;
if (!args->GetNext(&display_name))
display_name = path;
window_->PreviewFile(path, display_name);
}
void Window::CloseFilePreview() {
window_->CloseFilePreview();
}
void Window::SetParentWindow(v8::Local<v8::Value> value,
mate::Arguments* args) {
if (IsModal()) {
@@ -708,6 +829,25 @@ std::vector<v8::Local<v8::Object>> Window::GetChildWindows() const {
return child_windows_.Values(isolate());
}
v8::Local<v8::Value> Window::GetBrowserView() const {
if (browser_view_.IsEmpty()) {
return v8::Null(isolate());
}
return v8::Local<v8::Value>::New(isolate(), browser_view_);
}
void Window::SetBrowserView(v8::Local<v8::Value> value) {
mate::Handle<BrowserView> browser_view;
if (value->IsNull()) {
window_->SetBrowserView(nullptr);
browser_view_.Reset();
} else if (mate::ConvertFromV8(isolate(), value, &browser_view)) {
window_->SetBrowserView(browser_view->view());
browser_view_.Reset(isolate(), value);
}
}
bool Window::IsModal() const {
return window_->is_modal();
}
@@ -726,15 +866,39 @@ bool Window::IsVisibleOnAllWorkspaces() {
return window_->IsVisibleOnAllWorkspaces();
}
void Window::SetAutoHideCursor(bool auto_hide) {
window_->SetAutoHideCursor(auto_hide);
}
void Window::SetVibrancy(mate::Arguments* args) {
std::string type;
args->GetNext(&type);
window_->SetVibrancy(type);
}
void Window::SetTouchBar(const std::vector<mate::PersistentDictionary>& items) {
window_->SetTouchBar(items);
}
void Window::RefreshTouchBarItem(const std::string& item_id) {
window_->RefreshTouchBarItem(item_id);
}
void Window::SetEscapeTouchBarItem(const mate::PersistentDictionary& item) {
window_->SetEscapeTouchBarItem(item);
}
int32_t Window::ID() const {
return weak_map_id();
}
v8::Local<v8::Value> Window::WebContents(v8::Isolate* isolate) {
if (web_contents_.IsEmpty())
if (web_contents_.IsEmpty()) {
return v8::Null(isolate);
else
return v8::Local<v8::Value>::New(isolate, web_contents_);
}
return v8::Local<v8::Value>::New(isolate, web_contents_);
}
void Window::RemoveFromParentChildWindows() {
@@ -750,8 +914,9 @@ void Window::RemoveFromParentChildWindows() {
// static
void Window::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "BrowserWindow"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("close", &Window::Close)
.SetMethod("focus", &Window::Focus)
@@ -771,17 +936,23 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setFullScreen", &Window::SetFullScreen)
.SetMethod("isFullScreen", &Window::IsFullscreen)
.SetMethod("setAspectRatio", &Window::SetAspectRatio)
.SetMethod("previewFile", &Window::PreviewFile)
.SetMethod("closeFilePreview", &Window::CloseFilePreview)
#if !defined(OS_WIN)
.SetMethod("setParentWindow", &Window::SetParentWindow)
#endif
.SetMethod("getParentWindow", &Window::GetParentWindow)
.SetMethod("getChildWindows", &Window::GetChildWindows)
.SetMethod("getBrowserView", &Window::GetBrowserView)
.SetMethod("setBrowserView", &Window::SetBrowserView)
.SetMethod("isModal", &Window::IsModal)
.SetMethod("getNativeWindowHandle", &Window::GetNativeWindowHandle)
.SetMethod("getBounds", &Window::GetBounds)
.SetMethod("setBounds", &Window::SetBounds)
.SetMethod("getSize", &Window::GetSize)
.SetMethod("setSize", &Window::SetSize)
.SetMethod("getContentBounds", &Window::GetContentBounds)
.SetMethod("setContentBounds", &Window::SetContentBounds)
.SetMethod("getContentSize", &Window::GetContentSize)
.SetMethod("setContentSize", &Window::SetContentSize)
.SetMethod("setMinimumSize", &Window::SetMinimumSize)
@@ -837,12 +1008,21 @@ void Window::BuildPrototype(v8::Isolate* isolate,
&Window::SetVisibleOnAllWorkspaces)
.SetMethod("isVisibleOnAllWorkspaces",
&Window::IsVisibleOnAllWorkspaces)
#if defined(OS_MACOSX)
.SetMethod("setAutoHideCursor", &Window::SetAutoHideCursor)
#endif
.SetMethod("setVibrancy", &Window::SetVibrancy)
.SetMethod("_setTouchBarItems", &Window::SetTouchBar)
.SetMethod("_refreshTouchBarItem", &Window::RefreshTouchBarItem)
.SetMethod("_setEscapeTouchBarItem", &Window::SetEscapeTouchBarItem)
#if defined(OS_WIN)
.SetMethod("hookWindowMessage", &Window::HookWindowMessage)
.SetMethod("isWindowMessageHooked", &Window::IsWindowMessageHooked)
.SetMethod("unhookWindowMessage", &Window::UnhookWindowMessage)
.SetMethod("unhookAllWindowMessages", &Window::UnhookAllWindowMessages)
.SetMethod("setThumbnailClip", &Window::SetThumbnailClip)
.SetMethod("setThumbnailToolTip", &Window::SetThumbnailToolTip)
.SetMethod("setAppDetails", &Window::SetAppDetails)
#endif
#if defined(TOOLKIT_VIEWS)
.SetMethod("setIcon", &Window::SetIcon)
@@ -873,9 +1053,10 @@ using atom::api::Window;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Function> constructor = mate::CreateConstructor<Window>(
isolate, "BrowserWindow", base::Bind(&Window::New));
mate::Dictionary browser_window(isolate, constructor);
Window::SetConstructor(isolate, base::Bind(&Window::New));
mate::Dictionary browser_window(
isolate, Window::GetConstructor(isolate)->GetFunction());
browser_window.SetMethod("fromId",
&mate::TrackableObject<Window>::FromWeakMapID);
browser_window.SetMethod("getAllWindows",

View File

@@ -10,13 +10,14 @@
#include <string>
#include <vector>
#include "ui/gfx/image/image.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/native_window.h"
#include "atom/browser/native_window_observer.h"
#include "atom/common/api/atom_api_native_image.h"
#include "atom/common/key_weak_map.h"
#include "native_mate/handle.h"
#include "native_mate/persistent_dictionary.h"
#include "ui/gfx/image/image.h"
class GURL;
@@ -40,10 +41,10 @@ class WebContents;
class Window : public mate::TrackableObject<Window>,
public NativeWindowObserver {
public:
static mate::WrappableBase* New(v8::Isolate* isolate, mate::Arguments* args);
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
// Returns the BrowserWindow object from |native_window|.
static v8::Local<v8::Value> From(v8::Isolate* isolate,
@@ -51,17 +52,18 @@ class Window : public mate::TrackableObject<Window>,
NativeWindow* window() const { return window_.get(); }
protected:
Window(v8::Isolate* isolate, const mate::Dictionary& options);
~Window() override;
int32_t ID() const;
// TrackableObject:
void AfterInit(v8::Isolate* isolate) override;
protected:
Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
const mate::Dictionary& options);
~Window() override;
// NativeWindowObserver:
void WillCloseWindow(bool* prevent_default) override;
void WillDestoryNativeObject() override;
void WillDestroyNativeObject() override;
void OnWindowClosed() override;
void OnWindowEndSession() override;
void OnWindowBlur() override;
void OnWindowFocus() override;
void OnWindowShow() override;
@@ -76,7 +78,10 @@ class Window : public mate::TrackableObject<Window>,
void OnWindowMoved() override;
void OnWindowScrollTouchBegin() override;
void OnWindowScrollTouchEnd() override;
void OnWindowScrollTouchEdge() override;
void OnWindowSwipe(const std::string& direction) override;
void OnWindowSheetBegin() override;
void OnWindowSheetEnd() override;
void OnWindowEnterFullScreen() override;
void OnWindowLeaveFullScreen() override;
void OnWindowEnterHtmlFullScreen() override;
@@ -84,12 +89,18 @@ class Window : public mate::TrackableObject<Window>,
void OnRendererUnresponsive() override;
void OnRendererResponsive() override;
void OnExecuteWindowsCommand(const std::string& command_name) override;
void OnTouchBarItemResult(const std::string& item_id,
const base::DictionaryValue& details) override;
#if defined(OS_WIN)
void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) override;
#endif
private:
void Init(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options,
mate::Handle<class WebContents> web_contents);
// APIs for NativeWindow.
void Close();
void Focus();
@@ -114,6 +125,8 @@ class Window : public mate::TrackableObject<Window>,
std::vector<int> GetSize();
void SetContentSize(int width, int height, mate::Arguments* args);
std::vector<int> GetContentSize();
void SetContentBounds(const gfx::Rect& bounds, mate::Arguments* args);
gfx::Rect GetContentBounds();
void SetMinimumSize(int width, int height);
std::vector<int> GetMinimumSize();
void SetMaximumSize(int width, int height);
@@ -131,7 +144,7 @@ class Window : public mate::TrackableObject<Window>,
bool IsFullScreenable();
void SetClosable(bool closable);
bool IsClosable();
void SetAlwaysOnTop(bool top);
void SetAlwaysOnTop(bool top, mate::Arguments* args);
bool IsAlwaysOnTop();
void Center();
void SetPosition(int x, int y, mate::Arguments* args);
@@ -155,7 +168,7 @@ class Window : public mate::TrackableObject<Window>,
void SetIgnoreMouseEvents(bool ignore);
void SetContentProtection(bool enable);
void SetFocusable(bool focusable);
void SetProgressBar(double progress);
void SetProgressBar(double progress, mate::Arguments* args);
void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description);
bool SetThumbarButtons(mate::Arguments* args);
@@ -165,9 +178,13 @@ class Window : public mate::TrackableObject<Window>,
void SetMenuBarVisibility(bool visible);
bool IsMenuBarVisible();
void SetAspectRatio(double aspect_ratio, mate::Arguments* args);
void PreviewFile(const std::string& path, mate::Arguments* args);
void CloseFilePreview();
void SetParentWindow(v8::Local<v8::Value> value, mate::Arguments* args);
v8::Local<v8::Value> GetParentWindow() const;
std::vector<v8::Local<v8::Object>> GetChildWindows() const;
v8::Local<v8::Value> GetBrowserView() const;
void SetBrowserView(v8::Local<v8::Value> value);
bool IsModal() const;
v8::Local<v8::Value> GetNativeWindowHandle();
@@ -180,6 +197,8 @@ class Window : public mate::TrackableObject<Window>,
void UnhookWindowMessage(UINT message);
void UnhookAllWindowMessages();
bool SetThumbnailClip(const gfx::Rect& region);
bool SetThumbnailToolTip(const std::string& tooltip);
void SetAppDetails(const mate::Dictionary& options);
#endif
#if defined(TOOLKIT_VIEWS)
@@ -189,7 +208,13 @@ class Window : public mate::TrackableObject<Window>,
void SetVisibleOnAllWorkspaces(bool visible);
bool IsVisibleOnAllWorkspaces();
int32_t ID() const;
void SetAutoHideCursor(bool auto_hide);
void SetVibrancy(mate::Arguments* args);
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
void RefreshTouchBarItem(const std::string& item_id);
void SetEscapeTouchBarItem(const mate::PersistentDictionary& item);
v8::Local<v8::Value> WebContents(v8::Isolate* isolate);
// Remove this window from parent window's |child_windows_|.
@@ -200,6 +225,7 @@ class Window : public mate::TrackableObject<Window>,
MessageCallbackMap messages_callback_map_;
#endif
v8::Global<v8::Value> browser_view_;
v8::Global<v8::Value> web_contents_;
v8::Global<v8::Value> menu_;
v8::Global<v8::Value> parent_window_;

View File

@@ -58,8 +58,9 @@ Handle<Event> Event::Create(v8::Isolate* isolate) {
// static
void Event::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Event"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("preventDefault", &Event::PreventDefault)
.SetMethod("sendReply", &Event::SendReply);
}

View File

@@ -6,8 +6,8 @@
#define ATOM_BROWSER_API_EVENT_H_
#include "content/public/browser/web_contents_observer.h"
#include "native_mate/wrappable.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
namespace IPC {
class Message;
@@ -21,7 +21,7 @@ class Event : public Wrappable<Event>,
static Handle<Event> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
v8::Local<v8::FunctionTemplate> prototype);
// Pass the sender and message to be replied.
void SetSenderAndMessage(content::WebContents* sender, IPC::Message* message);

View File

@@ -10,6 +10,8 @@
#include "native_mate/object_template_builder.h"
#include "ui/events/event_constants.h"
#include "atom/common/node_includes.h"
namespace mate {
namespace {

View File

@@ -4,10 +4,13 @@
#include "atom/browser/api/frame_subscriber.h"
#include "base/bind.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "atom/common/node_includes.h"
#include "base/bind.h"
#include "content/public/browser/render_widget_host.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "atom/common/node_includes.h"
namespace atom {
@@ -40,6 +43,17 @@ bool FrameSubscriber::ShouldCaptureFrame(
if (only_dirty_)
rect = dirty_rect;
gfx::Size view_size = rect.size();
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view_->GetNativeView();
const float scale =
display::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
.device_scale_factor();
if (scale > 1.0f)
bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
rect = gfx::Rect(rect.origin(), bitmap_size);
host->CopyFromBackingStore(
rect,
rect.size(),

View File

@@ -7,9 +7,9 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/readback_types.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
#include "content/public/browser/readback_types.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/size.h"
#include "v8/include/v8.h"

View File

@@ -29,7 +29,7 @@ class IDUserData : public base::SupportsUserData::Data {
} // namespace
TrackableObjectBase::TrackableObjectBase()
: weak_map_id_(0), wrapped_(nullptr), weak_factory_(this) {
: weak_map_id_(0), weak_factory_(this) {
cleanup_ = RegisterDestructionCallback(GetDestroyClosure());
}
@@ -46,14 +46,7 @@ void TrackableObjectBase::Destroy() {
}
void TrackableObjectBase::AttachAsUserData(base::SupportsUserData* wrapped) {
if (weak_map_id_ != 0) {
wrapped->SetUserData(kTrackedObjectKey, new IDUserData(weak_map_id_));
wrapped_ = nullptr;
} else {
// If the TrackableObjectBase is not ready yet then delay SetUserData until
// AfterInit is called.
wrapped_ = wrapped;
}
wrapped->SetUserData(kTrackedObjectKey, new IDUserData(weak_map_id_));
}
// static

View File

@@ -44,7 +44,6 @@ class TrackableObjectBase {
static base::Closure RegisterDestructionCallback(const base::Closure& c);
int32_t weak_map_id_;
base::SupportsUserData* wrapped_;
private:
void Destroy();
@@ -66,6 +65,12 @@ class TrackableObject : public TrackableObjectBase,
Wrappable<T>::GetWrapper()->SetAlignedPointerInInternalField(0, nullptr);
}
bool IsDestroyed() {
v8::Local<v8::Object> wrapper = Wrappable<T>::GetWrapper();
return wrapper->InternalFieldCount() == 0 ||
wrapper->GetAlignedPointerFromInternalField(0) == nullptr;
}
// Finds out the TrackableObject from its ID in weak map.
static T* FromWeakMapID(v8::Isolate* isolate, int32_t id) {
if (!weak_map_)
@@ -110,14 +115,13 @@ class TrackableObject : public TrackableObjectBase,
RemoveFromWeakMap();
}
void AfterInit(v8::Isolate* isolate) override {
void InitWith(v8::Isolate* isolate, v8::Local<v8::Object> wrapper) override {
WrappableBase::InitWith(isolate, wrapper);
if (!weak_map_) {
weak_map_ = new atom::KeyWeakMap<int32_t>;
}
weak_map_id_ = ++next_id_;
weak_map_->Set(isolate, weak_map_id_, Wrappable<T>::GetWrapper());
if (wrapped_)
AttachAsUserData(wrapped_);
weak_map_->Set(isolate, weak_map_id_, wrapper);
}
private:

View File

@@ -4,28 +4,58 @@
#include "atom/browser/atom_access_token_store.h"
#include <string>
#include <utility>
#include "atom/browser/atom_browser_context.h"
#include "atom/common/google_api_key.h"
#include "base/environment.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/geolocation_provider.h"
#include "device/geolocation/geolocation_provider.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_context_getter.h"
using content::BrowserThread;
namespace atom {
namespace {
namespace internal {
// Notice that we just combined the api key with the url together here, because
// if we use the standard {url: key} format Chromium would override our key with
// the predefined one in common.gypi of libchromiumcontent, which is empty.
const char* kGeolocationProviderURL =
"https://www.googleapis.com/geolocation/v1/geolocate?key="
GOOGLEAPIS_API_KEY;
class GeoURLRequestContextGetter : public net::URLRequestContextGetter {
public:
net::URLRequestContext* GetURLRequestContext() override {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!url_request_context_.get()) {
net::URLRequestContextBuilder builder;
builder.set_proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
url_request_context_ = builder.Build();
}
return url_request_context_.get();
}
} // namespace
scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
const override {
return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
}
AtomAccessTokenStore::AtomAccessTokenStore() {
content::GeolocationProvider::GetInstance()->UserDidOptIntoLocationServices();
private:
friend class atom::AtomAccessTokenStore;
GeoURLRequestContextGetter() {}
~GeoURLRequestContextGetter() override {}
std::unique_ptr<net::URLRequestContext> url_request_context_;
DISALLOW_COPY_AND_ASSIGN(GeoURLRequestContextGetter);
};
} // namespace internal
AtomAccessTokenStore::AtomAccessTokenStore()
: request_context_getter_(new internal::GeoURLRequestContextGetter) {
device::GeolocationProvider::GetInstance()->UserDidOptIntoLocationServices();
}
AtomAccessTokenStore::~AtomAccessTokenStore() {
@@ -33,35 +63,23 @@ AtomAccessTokenStore::~AtomAccessTokenStore() {
void AtomAccessTokenStore::LoadAccessTokens(
const LoadAccessTokensCallback& callback) {
content::BrowserThread::PostTaskAndReply(
content::BrowserThread::UI,
FROM_HERE,
base::Bind(&AtomAccessTokenStore::GetRequestContextOnUIThread, this),
base::Bind(&AtomAccessTokenStore::RespondOnOriginatingThread,
this, callback));
std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string api_key;
if (!env->GetVar("GOOGLE_API_KEY", &api_key))
api_key = GOOGLEAPIS_API_KEY;
// Equivalent to access_token_map[kGeolocationProviderURL].
// Somehow base::string16 is causing compilation errors when used in a pair
// of std::map on Linux, this can work around it.
device::AccessTokenStore::AccessTokenMap access_token_map;
std::pair<GURL, base::string16> token_pair;
token_pair.first = GURL(GOOGLEAPIS_ENDPOINT + api_key);
access_token_map.insert(token_pair);
callback.Run(access_token_map, request_context_getter_.get());
}
void AtomAccessTokenStore::SaveAccessToken(const GURL& server_url,
const base::string16& access_token) {
}
void AtomAccessTokenStore::GetRequestContextOnUIThread() {
auto browser_context = AtomBrowserContext::From("", false);
request_context_getter_ = browser_context->GetRequestContext();
}
void AtomAccessTokenStore::RespondOnOriginatingThread(
const LoadAccessTokensCallback& callback) {
// Equivelent to access_token_map[kGeolocationProviderURL].
// Somehow base::string16 is causing compilation errors when used in a pair
// of std::map on Linux, this can work around it.
AccessTokenMap access_token_map;
std::pair<GURL, base::string16> token_pair;
token_pair.first = GURL(kGeolocationProviderURL);
access_token_map.insert(token_pair);
callback.Run(access_token_map, request_context_getter_.get());
request_context_getter_ = nullptr;
}
} // namespace atom

View File

@@ -5,27 +5,27 @@
#ifndef ATOM_BROWSER_ATOM_ACCESS_TOKEN_STORE_H_
#define ATOM_BROWSER_ATOM_ACCESS_TOKEN_STORE_H_
#include "content/public/browser/access_token_store.h"
#include "device/geolocation/access_token_store.h"
namespace atom {
class AtomAccessTokenStore : public content::AccessTokenStore {
namespace internal {
class GeoURLRequestContextGetter;
}
class AtomAccessTokenStore : public device::AccessTokenStore {
public:
AtomAccessTokenStore();
~AtomAccessTokenStore();
// content::AccessTokenStore:
// device::AccessTokenStore:
void LoadAccessTokens(
const LoadAccessTokensCallback& callback) override;
void SaveAccessToken(const GURL& server_url,
const base::string16& access_token) override;
private:
void GetRequestContextOnUIThread();
void RespondOnOriginatingThread(const LoadAccessTokensCallback& callback);
scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
scoped_refptr<internal::GeoURLRequestContextGetter> request_context_getter_;
DISALLOW_COPY_AND_ASSIGN(AtomAccessTokenStore);
};

View File

@@ -0,0 +1,138 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/atom_blob_reader.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "storage/browser/blob/blob_data_handle.h"
#include "storage/browser/blob/blob_reader.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "storage/browser/fileapi/file_system_context.h"
#include "atom/common/node_includes.h"
using content::BrowserThread;
namespace atom {
namespace {
void FreeNodeBufferData(char* data, void* hint) {
delete[] data;
}
void RunCallbackInUI(
const AtomBlobReader::CompletionCallback& callback,
char* blob_data,
int size) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
if (blob_data) {
v8::Local<v8::Value> buffer = node::Buffer::New(isolate,
blob_data, static_cast<size_t>(size), &FreeNodeBufferData, nullptr)
.ToLocalChecked();
callback.Run(buffer);
} else {
callback.Run(v8::Null(isolate));
}
}
} // namespace
AtomBlobReader::AtomBlobReader(
content::ChromeBlobStorageContext* blob_context,
storage::FileSystemContext* file_system_context)
: blob_context_(blob_context),
file_system_context_(file_system_context) {
}
AtomBlobReader::~AtomBlobReader() {
}
void AtomBlobReader::StartReading(
const std::string& uuid,
const AtomBlobReader::CompletionCallback& completion_callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
auto blob_data_handle =
blob_context_->context()->GetBlobDataFromUUID(uuid);
auto callback = base::Bind(&RunCallbackInUI,
completion_callback);
if (!blob_data_handle) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(callback, nullptr, 0));
return;
}
auto blob_reader = blob_data_handle->CreateReader(
file_system_context_.get(),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get());
BlobReadHelper* blob_read_helper =
new BlobReadHelper(std::move(blob_reader), callback);
blob_read_helper->Read();
}
AtomBlobReader::BlobReadHelper::BlobReadHelper(
std::unique_ptr<storage::BlobReader> blob_reader,
const BlobReadHelper::CompletionCallback& callback)
: blob_reader_(std::move(blob_reader)),
completion_callback_(callback) {
}
AtomBlobReader::BlobReadHelper::~BlobReadHelper() {
}
void AtomBlobReader::BlobReadHelper::Read() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
storage::BlobReader::Status size_status = blob_reader_->CalculateSize(
base::Bind(&AtomBlobReader::BlobReadHelper::DidCalculateSize,
base::Unretained(this)));
if (size_status != storage::BlobReader::Status::IO_PENDING)
DidCalculateSize(net::OK);
}
void AtomBlobReader::BlobReadHelper::DidCalculateSize(int result) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (result != net::OK) {
DidReadBlobData(nullptr, 0);
return;
}
uint64_t total_size = blob_reader_->total_size();
int bytes_read = 0;
scoped_refptr<net::IOBuffer> blob_data =
new net::IOBuffer(static_cast<size_t>(total_size));
auto callback = base::Bind(&AtomBlobReader::BlobReadHelper::DidReadBlobData,
base::Unretained(this),
base::RetainedRef(blob_data));
storage::BlobReader::Status read_status = blob_reader_->Read(
blob_data.get(),
total_size,
&bytes_read,
callback);
if (read_status != storage::BlobReader::Status::IO_PENDING)
callback.Run(bytes_read);
}
void AtomBlobReader::BlobReadHelper::DidReadBlobData(
const scoped_refptr<net::IOBuffer>& blob_data,
int size) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
char* data = new char[size];
memcpy(data, blob_data->data(), size);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(completion_callback_, data, size));
delete this;
}
} // namespace atom

View File

@@ -0,0 +1,80 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_ATOM_BLOB_READER_H_
#define ATOM_BROWSER_ATOM_BLOB_READER_H_
#include <string>
#include "base/callback.h"
namespace content {
class ChromeBlobStorageContext;
}
namespace net {
class IOBuffer;
}
namespace storage {
class BlobDataHandle;
class BlobReader;
class FileSystemContext;
}
namespace v8 {
template <class T>
class Local;
class Value;
}
namespace atom {
// A class to keep track of the blob context. All methods,
// except Ctor are expected to be called on IO thread.
class AtomBlobReader {
public:
using CompletionCallback = base::Callback<void(v8::Local<v8::Value>)>;
AtomBlobReader(content::ChromeBlobStorageContext* blob_context,
storage::FileSystemContext* file_system_context);
~AtomBlobReader();
void StartReading(
const std::string& uuid,
const AtomBlobReader::CompletionCallback& callback);
private:
// A self-destroyed helper class to read the blob data.
// Must be accessed on IO thread.
class BlobReadHelper {
public:
using CompletionCallback = base::Callback<void(char*, int)>;
BlobReadHelper(std::unique_ptr<storage::BlobReader> blob_reader,
const BlobReadHelper::CompletionCallback& callback);
~BlobReadHelper();
void Read();
private:
void DidCalculateSize(int result);
void DidReadBlobData(const scoped_refptr<net::IOBuffer>& blob_data,
int bytes_read);
std::unique_ptr<storage::BlobReader> blob_reader_;
BlobReadHelper::CompletionCallback completion_callback_;
DISALLOW_COPY_AND_ASSIGN(BlobReadHelper);
};
scoped_refptr<content::ChromeBlobStorageContext> blob_context_;
scoped_refptr<storage::FileSystemContext> file_system_context_;
DISALLOW_COPY_AND_ASSIGN(AtomBlobReader);
};
} // namespace atom
#endif // ATOM_BROWSER_ATOM_BLOB_READER_H_

View File

@@ -9,7 +9,7 @@
#endif
#include "atom/browser/api/atom_api_app.h"
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/api/atom_api_protocol.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_quota_permission_context.h"
@@ -22,13 +22,15 @@
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "chrome/browser/printing/printing_message_filter.h"
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
#include "chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.h"
#include "chrome/browser/speech/tts_message_filter.h"
#include "content/common/resource_request_body_impl.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/render_process_host.h"
@@ -36,6 +38,8 @@
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
@@ -76,7 +80,7 @@ AtomBrowserClient::~AtomBrowserClient() {
content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
int process_id) {
// If the process is a pending process, we should use the old one.
if (ContainsKey(pending_processes_, process_id))
if (base::ContainsKey(pending_processes_, process_id))
process_id = pending_processes_[process_id];
// Certain render process will be created with no associated render view,
@@ -84,6 +88,44 @@ content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
return WebContentsPreferences::GetWebContentsFromProcessID(process_id);
}
bool AtomBrowserClient::ShouldCreateNewSiteInstance(
content::BrowserContext* browser_context,
content::SiteInstance* current_instance,
const GURL& url) {
if (url.SchemeIs(url::kJavaScriptScheme))
// "javacript:" scheme should always use same SiteInstance
return false;
if (!IsRendererSandboxed(current_instance->GetProcess()->GetID()))
// non-sandboxed renderers should always create a new SiteInstance
return true;
// Create new a SiteInstance if navigating to a different site.
auto src_url = current_instance->GetSiteURL();
return
!content::SiteInstance::IsSameWebSite(browser_context, src_url, url) &&
// `IsSameWebSite` doesn't seem to work for some URIs such as `file:`,
// handle these scenarios by comparing only the site as defined by
// `GetSiteForURL`.
content::SiteInstance::GetSiteForURL(browser_context, url) != src_url;
}
void AtomBrowserClient::AddSandboxedRendererId(int process_id) {
base::AutoLock auto_lock(sandboxed_renderers_lock_);
sandboxed_renderers_.insert(process_id);
}
void AtomBrowserClient::RemoveSandboxedRendererId(int process_id) {
base::AutoLock auto_lock(sandboxed_renderers_lock_);
sandboxed_renderers_.erase(process_id);
}
bool AtomBrowserClient::IsRendererSandboxed(int process_id) {
base::AutoLock auto_lock(sandboxed_renderers_lock_);
return sandboxed_renderers_.count(process_id);
}
void AtomBrowserClient::RenderProcessWillLaunch(
content::RenderProcessHost* host) {
int process_id = host->GetID();
@@ -91,6 +133,13 @@ void AtomBrowserClient::RenderProcessWillLaunch(
host->AddFilter(new TtsMessageFilter(process_id, host->GetBrowserContext()));
host->AddFilter(
new WidevineCdmMessageFilter(process_id, host->GetBrowserContext()));
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
if (WebContentsPreferences::IsSandboxed(web_contents)) {
AddSandboxedRendererId(host->GetID());
// ensure the sandboxed renderer id is removed later
host->AddObserver(this);
}
}
content::SpeechRecognitionManagerDelegate*
@@ -98,10 +147,6 @@ content::SpeechRecognitionManagerDelegate*
return new AtomSpeechRecognitionManagerDelegate;
}
content::AccessTokenStore* AtomBrowserClient::CreateAccessTokenStore() {
return new AtomAccessTokenStore;
}
void AtomBrowserClient::OverrideWebkitPrefs(
content::RenderViewHost* host, content::WebPreferences* prefs) {
prefs->javascript_enabled = true;
@@ -117,7 +162,6 @@ void AtomBrowserClient::OverrideWebkitPrefs(
prefs->allow_universal_access_from_file_urls = true;
prefs->allow_file_access_from_file_urls = true;
prefs->experimental_webgl_enabled = true;
prefs->allow_displaying_insecure_content = false;
prefs->allow_running_insecure_content = false;
// Custom preferences of guest page.
@@ -130,6 +174,7 @@ std::string AtomBrowserClient::GetApplicationLocale() {
}
void AtomBrowserClient::OverrideSiteInstanceForNavigation(
content::RenderFrameHost* render_frame_host,
content::BrowserContext* browser_context,
content::SiteInstance* current_instance,
const GURL& url,
@@ -139,8 +184,7 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
return;
}
// Restart renderer process for all navigations except "javacript:" scheme.
if (url.SchemeIs(url::kJavaScriptScheme))
if (!ShouldCreateNewSiteInstance(browser_context, current_instance, url))
return;
scoped_refptr<content::SiteInstance> site_instance =
@@ -165,6 +209,11 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
void AtomBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int process_id) {
// Make sure we're about to launch a known executable
base::FilePath child_path;
PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);
std::string process_type = command_line->GetSwitchValueASCII("type");
if (process_type != "renderer")
return;
@@ -172,6 +221,8 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
// Copy following switches to child process.
static const char* const kCommonSwitchNames[] = {
switches::kStandardSchemes,
switches::kEnableSandbox,
switches::kSecureSchemes
};
command_line->CopySwitchesFrom(
*base::CommandLine::ForCurrentProcess(),
@@ -191,6 +242,11 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
}
#endif
if (delegate_) {
auto app_path = static_cast<api::App*>(delegate_)->GetAppPath();
command_line->AppendSwitchPath(switches::kAppPath, app_path);
}
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
if (!web_contents)
return;
@@ -219,13 +275,13 @@ void AtomBrowserClient::AllowCertificateError(
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) {
const base::Callback<void(content::CertificateRequestResultType)>&
callback) {
if (delegate_) {
delegate_->AllowCertificateError(
web_contents, cert_error, ssl_info, request_url,
resource_type, overridable, strict_enforcement,
expired_previous_decision, callback, request);
expired_previous_decision, callback);
}
}
@@ -251,11 +307,13 @@ bool AtomBrowserClient::CanCreateWindow(
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const std::string& frame_name,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
@@ -265,6 +323,11 @@ bool AtomBrowserClient::CanCreateWindow(
bool* no_javascript_access) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (IsRendererSandboxed(render_process_id)) {
*no_javascript_access = false;
return true;
}
if (delegate_) {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(&api::App::OnCreateWindow,
@@ -272,6 +335,8 @@ bool AtomBrowserClient::CanCreateWindow(
target_url,
frame_name,
disposition,
additional_features,
body,
render_process_id,
opener_render_frame_id));
}
@@ -279,6 +344,16 @@ bool AtomBrowserClient::CanCreateWindow(
return false;
}
void AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
std::vector<std::string>* additional_schemes) {
auto schemes_list = api::GetStandardSchemes();
if (!schemes_list.empty())
additional_schemes->insert(additional_schemes->end(),
schemes_list.begin(),
schemes_list.end());
additional_schemes->push_back(content::kChromeDevToolsScheme);
}
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
const content::MainFunctionParams&) {
v8::V8::Initialize(); // Init V8 before creating main parts.
@@ -313,6 +388,7 @@ void AtomBrowserClient::RenderProcessHostDestroyed(
break;
}
}
RemoveSandboxedRendererId(process_id);
}
} // namespace atom

View File

@@ -6,6 +6,7 @@
#define ATOM_BROWSER_ATOM_BROWSER_CLIENT_H_
#include <map>
#include <set>
#include <string>
#include <vector>
@@ -49,11 +50,11 @@ class AtomBrowserClient : public brightray::BrowserClient,
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
content::SpeechRecognitionManagerDelegate*
CreateSpeechRecognitionManagerDelegate() override;
content::AccessTokenStore* CreateAccessTokenStore() override;
void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
content::WebPreferences* prefs) override;
std::string GetApplicationLocale() override;
void OverrideSiteInstanceForNavigation(
content::RenderFrameHost* render_frame_host,
content::BrowserContext* browser_context,
content::SiteInstance* current_instance,
const GURL& dest_url,
@@ -71,29 +72,34 @@ class AtomBrowserClient : public brightray::BrowserClient,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) override;
const base::Callback<void(content::CertificateRequestResultType)>&
callback) override;
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
void ResourceDispatcherHostCreated() override;
bool CanCreateWindow(const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const std::string& frame_name,
const GURL& target_url,
const content::Referrer& referrer,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
int render_process_id,
int opener_render_view_id,
int opener_render_frame_id,
bool* no_javascript_access) override;
bool CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
int render_process_id,
int opener_render_view_id,
int opener_render_frame_id,
bool* no_javascript_access) override;
void GetAdditionalAllowedSchemesForFileSystem(
std::vector<std::string>* schemes) override;
// brightray::BrowserClient:
brightray::BrowserMainParts* OverrideCreateBrowserMainParts(
@@ -106,8 +112,19 @@ class AtomBrowserClient : public brightray::BrowserClient,
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
private:
bool ShouldCreateNewSiteInstance(content::BrowserContext* browser_context,
content::SiteInstance* current_instance,
const GURL& dest_url);
// Add/remove a process id to `sandboxed_renderers_`.
void AddSandboxedRendererId(int process_id);
void RemoveSandboxedRendererId(int process_id);
bool IsRendererSandboxed(int process_id);
// pending_render_process => current_render_process.
std::map<int, int> pending_processes_;
// Set that contains the process ids of all sandboxed renderers
std::set<int> sandboxed_renderers_;
base::Lock sandboxed_renderers_lock_;
std::unique_ptr<AtomResourceDispatcherHostDelegate>
resource_dispatcher_host_delegate_;

View File

@@ -4,16 +4,19 @@
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/api/atom_api_protocol.h"
#include "atom/browser/atom_blob_reader.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_download_manager_delegate.h"
#include "atom/browser/browser.h"
#include "atom/browser/net/atom_cert_verifier.h"
#include "atom/browser/net/atom_network_delegate.h"
#include "atom/browser/net/atom_ssl_config_service.h"
#include "atom/browser/net/atom_url_request_job_factory.h"
#include "atom/browser/net/asar/asar_protocol_handler.h"
#include "atom/browser/net/http_protocol_handler.h"
#include "atom/browser/atom_permission_manager.h"
#include "atom/browser/browser.h"
#include "atom/browser/net/about_protocol_handler.h"
#include "atom/browser/net/asar/asar_protocol_handler.h"
#include "atom/browser/net/atom_cert_verifier.h"
#include "atom/browser/net/atom_ct_delegate.h"
#include "atom/browser/net/atom_network_delegate.h"
#include "atom/browser/net/atom_url_request_job_factory.h"
#include "atom/browser/net/http_protocol_handler.h"
#include "atom/browser/web_view_manager.h"
#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
@@ -29,14 +32,16 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/user_agent.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/ftp_protocol_handler.h"
#include "net/url_request/url_request_intercepting_job_factory.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_intercepting_job_factory.h"
#include "url/url_constants.h"
using content::BrowserThread;
@@ -63,11 +68,13 @@ std::string RemoveWhitespace(const std::string& str) {
} // namespace
AtomBrowserContext::AtomBrowserContext(
const std::string& partition, bool in_memory,
const base::DictionaryValue& options)
AtomBrowserContext::AtomBrowserContext(const std::string& partition,
bool in_memory,
const base::DictionaryValue& options)
: brightray::BrowserContext(partition, in_memory),
network_delegate_(new AtomNetworkDelegate) {
ct_delegate_(new AtomCTDelegate),
network_delegate_(new AtomNetworkDelegate),
cookie_delegate_(new AtomCookieDelegate) {
// Construct user agent string.
Browser* browser = Browser::Get();
std::string name = RemoveWhitespace(browser->GetName());
@@ -103,6 +110,10 @@ net::NetworkDelegate* AtomBrowserContext::CreateNetworkDelegate() {
return network_delegate_;
}
net::CookieMonsterDelegate* AtomBrowserContext::CreateCookieDelegate() {
return cookie_delegate();
}
std::string AtomBrowserContext::GetUserAgent() {
return user_agent_;
}
@@ -119,6 +130,8 @@ AtomBrowserContext::CreateURLRequestJobFactory(
}
protocol_handlers->clear();
job_factory->SetProtocolHandler(url::kAboutScheme,
base::WrapUnique(new AboutProtocolHandler));
job_factory->SetProtocolHandler(
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
job_factory->SetProtocolHandler(
@@ -142,8 +155,7 @@ AtomBrowserContext::CreateURLRequestJobFactory(
url_request_context_getter()->GetURLRequestContext()->host_resolver();
job_factory->SetProtocolHandler(
url::kFtpScheme,
base::WrapUnique(new net::FtpProtocolHandler(
new net::FtpNetworkLayer(host_resolver))));
net::FtpProtocolHandler::Create(host_resolver));
return std::move(job_factory);
}
@@ -181,11 +193,20 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
}
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
return base::WrapUnique(new AtomCertVerifier);
return base::WrapUnique(new AtomCertVerifier(ct_delegate_.get()));
}
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
return new AtomSSLConfigService;
std::vector<std::string> AtomBrowserContext::GetCookieableSchemes() {
auto default_schemes = brightray::BrowserContext::GetCookieableSchemes();
const auto& standard_schemes = atom::api::GetStandardSchemes();
default_schemes.insert(default_schemes.end(),
standard_schemes.begin(), standard_schemes.end());
return default_schemes;
}
net::TransportSecurityState::RequireCTDelegate*
AtomBrowserContext::GetRequireCTDelegate() {
return ct_delegate_.get();
}
void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
@@ -198,6 +219,19 @@ void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
pref_registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
}
AtomBlobReader* AtomBrowserContext::GetBlobReader() {
if (!blob_reader_.get()) {
content::ChromeBlobStorageContext* blob_context =
content::ChromeBlobStorageContext::GetFor(this);
storage::FileSystemContext* file_system_context =
content::BrowserContext::GetStoragePartition(
this, nullptr)->GetFileSystemContext();
blob_reader_.reset(new AtomBlobReader(blob_context,
file_system_context));
}
return blob_reader_.get();
}
// static
scoped_refptr<AtomBrowserContext> AtomBrowserContext::From(
const std::string& partition, bool in_memory,

View File

@@ -6,11 +6,16 @@
#define ATOM_BROWSER_ATOM_BROWSER_CONTEXT_H_
#include <string>
#include <vector>
#include "atom/browser/net/atom_cookie_delegate.h"
#include "brightray/browser/browser_context.h"
#include "net/cookies/cookie_monster.h"
namespace atom {
class AtomBlobReader;
class AtomCTDelegate;
class AtomDownloadManagerDelegate;
class AtomNetworkDelegate;
class AtomPermissionManager;
@@ -29,13 +34,16 @@ class AtomBrowserContext : public brightray::BrowserContext {
// brightray::URLRequestContextGetter::Delegate:
net::NetworkDelegate* CreateNetworkDelegate() override;
net::CookieMonsterDelegate* CreateCookieDelegate() override;
std::string GetUserAgent() override;
std::unique_ptr<net::URLRequestJobFactory> CreateURLRequestJobFactory(
content::ProtocolHandlerMap* protocol_handlers) override;
net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
const base::FilePath& base_path) override;
std::unique_ptr<net::CertVerifier> CreateCertVerifier() override;
net::SSLConfigService* CreateSSLConfigService() override;
std::vector<std::string> GetCookieableSchemes() override;
net::TransportSecurityState::RequireCTDelegate* GetRequireCTDelegate()
override;
// content::BrowserContext:
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
@@ -45,7 +53,11 @@ class AtomBrowserContext : public brightray::BrowserContext {
// brightray::BrowserContext:
void RegisterPrefs(PrefRegistrySimple* pref_registry) override;
AtomBlobReader* GetBlobReader();
AtomNetworkDelegate* network_delegate() const { return network_delegate_; }
AtomCookieDelegate* cookie_delegate() const {
return cookie_delegate_.get();
}
protected:
AtomBrowserContext(const std::string& partition, bool in_memory,
@@ -56,11 +68,14 @@ class AtomBrowserContext : public brightray::BrowserContext {
std::unique_ptr<AtomDownloadManagerDelegate> download_manager_delegate_;
std::unique_ptr<WebViewManager> guest_manager_;
std::unique_ptr<AtomPermissionManager> permission_manager_;
std::unique_ptr<AtomBlobReader> blob_reader_;
std::unique_ptr<AtomCTDelegate> ct_delegate_;
std::string user_agent_;
bool use_cache_;
// Managed by brightray::BrowserContext.
AtomNetworkDelegate* network_delegate_;
scoped_refptr<AtomCookieDelegate> cookie_delegate_;
DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext);
};

View File

@@ -5,32 +5,55 @@
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_web_ui_controller_factory.h"
#include "atom/browser/bridge_task_runner.h"
#include "atom/browser/browser.h"
#include "atom/browser/javascript_environment.h"
#include "atom/browser/node_debugger.h"
#include "atom/common/api/atom_bindings.h"
#include "atom/common/asar/asar_util.h"
#include "atom/common/node_bindings.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "content/public/browser/child_process_security_policy.h"
#include "device/geolocation/geolocation_delegate.h"
#include "device/geolocation/geolocation_provider.h"
#include "v8/include/v8-debug.h"
#if defined(USE_X11)
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
#include "chrome/browser/ui/libgtkui/gtk_util.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#endif
namespace atom {
namespace {
// A provider of Geolocation services to override AccessTokenStore.
class AtomGeolocationDelegate : public device::GeolocationDelegate {
public:
AtomGeolocationDelegate() = default;
scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final {
return new AtomAccessTokenStore();
}
private:
DISALLOW_COPY_AND_ASSIGN(AtomGeolocationDelegate);
};
template<typename T>
void Erase(T* container, typename T::iterator iter) {
container->erase(iter);
}
} // namespace
// static
AtomBrowserMainParts* AtomBrowserMainParts::self_ = nullptr;
@@ -38,14 +61,18 @@ AtomBrowserMainParts::AtomBrowserMainParts()
: fake_browser_process_(new BrowserProcess),
exit_code_(nullptr),
browser_(new Browser),
node_bindings_(NodeBindings::Create(true)),
atom_bindings_(new AtomBindings),
node_bindings_(NodeBindings::Create(NodeBindings::BROWSER)),
atom_bindings_(new AtomBindings(uv_default_loop())),
gc_timer_(true, true) {
DCHECK(!self_) << "Cannot have two AtomBrowserMainParts";
self_ = this;
// Register extension scheme as web safe scheme.
content::ChildProcessSecurityPolicy::GetInstance()->
RegisterWebSafeScheme("chrome-extension");
}
AtomBrowserMainParts::~AtomBrowserMainParts() {
asar::ClearArchives();
// Leak the JavascriptEnvironment on exit.
// This is to work around the bug that V8 would be waiting for background
// tasks to finish on exit, while somehow it waits forever in Electron, more
@@ -108,12 +135,13 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
// Create the global environment.
node::Environment* env =
node_bindings_->CreateEnvironment(js_env_->context());
node_env_.reset(new NodeEnvironment(env));
// Make sure node can get correct environment when debugging.
if (node_debugger_->IsRunning())
env->AssignToContext(v8::Debug::GetDebugContext());
env->AssignToContext(v8::Debug::GetDebugContext(js_env_->isolate()));
// Add atom-shell extended APIs.
// Add Electron extended APIs.
atom_bindings_->BindTo(js_env_->isolate(), env->process_object());
// Load everything.
@@ -141,18 +169,22 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() {
base::Bind(&v8::Isolate::LowMemoryNotification,
base::Unretained(js_env_->isolate())));
content::WebUIControllerFactory::RegisterFactory(
AtomWebUIControllerFactory::GetInstance());
brightray::BrowserMainParts::PreMainMessageLoopRun();
bridge_task_runner_->MessageLoopIsReady();
bridge_task_runner_ = nullptr;
#if defined(USE_X11)
libgtk2ui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess());
libgtkui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess());
#endif
#if !defined(OS_MACOSX)
// The corresponding call in macOS is in AtomApplicationDelegate.
Browser::Get()->WillFinishLaunching();
Browser::Get()->DidFinishLaunching();
std::unique_ptr<base::DictionaryValue> empty_info(new base::DictionaryValue);
Browser::Get()->DidFinishLaunching(*empty_info);
#endif
}
@@ -166,6 +198,8 @@ void AtomBrowserMainParts::PostMainMessageLoopStart() {
#if defined(OS_POSIX)
HandleShutdownSignals();
#endif
device::GeolocationProvider::SetGeolocationDelegate(
new AtomGeolocationDelegate());
}
void AtomBrowserMainParts::PostMainMessageLoopRun() {

View File

@@ -22,6 +22,7 @@ class Browser;
class JavascriptEnvironment;
class NodeBindings;
class NodeDebugger;
class NodeEnvironment;
class BridgeTaskRunner;
class AtomBrowserMainParts : public brightray::BrowserMainParts {
@@ -81,6 +82,7 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts {
std::unique_ptr<JavascriptEnvironment> js_env_;
std::unique_ptr<NodeBindings> node_bindings_;
std::unique_ptr<AtomBindings> atom_bindings_;
std::unique_ptr<NodeEnvironment> node_env_;
std::unique_ptr<NodeDebugger> node_debugger_;
base::Timer gc_timer_;

View File

@@ -18,7 +18,7 @@ void AtomBrowserMainParts::PreMainMessageLoopStart() {
// Set our own application delegate.
AtomApplicationDelegate* delegate = [[AtomApplicationDelegate alloc] init];
[NSApp setDelegate:(id<NSFileManagerDelegate>)delegate];
[NSApp setDelegate:delegate];
brightray::BrowserMainParts::PreMainMessageLoopStart();

View File

@@ -12,8 +12,8 @@
#include "atom/browser/ui/file_dialog.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "components/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
@@ -35,6 +35,17 @@ AtomDownloadManagerDelegate::~AtomDownloadManagerDelegate() {
}
}
void AtomDownloadManagerDelegate::GetItemSavePath(content::DownloadItem* item,
base::FilePath* path) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
api::DownloadItem* download = api::DownloadItem::FromWrappedClass(isolate,
item);
if (download)
*path = download->GetSavePath();
}
void AtomDownloadManagerDelegate::CreateDownloadPath(
const GURL& url,
const std::string& content_disposition,
@@ -49,7 +60,7 @@ void AtomDownloadManagerDelegate::CreateDownloadPath(
std::string(),
suggested_filename,
mime_type,
std::string());
"download");
if (!base::PathExists(default_download_path))
base::CreateDirectory(default_download_path);
@@ -77,14 +88,26 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
window = relay->window.get();
base::FilePath path;
if (file_dialog::ShowSaveDialog(window, item->GetURL().spec(),
"", default_path,
file_dialog::Filters(), &path)) {
GetItemSavePath(item, &path);
// Show save dialog if save path was not set already on item
file_dialog::DialogSettings settings;
settings.parent_window = window;
settings.title = item->GetURL().spec();
settings.default_path = default_path;
if (path.empty() && file_dialog::ShowSaveDialog(settings, &path)) {
// Remember the last selected download directory.
AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
download_manager_->GetBrowserContext());
browser_context->prefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
path.DirName());
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
api::DownloadItem* download_item = api::DownloadItem::FromWrappedClass(
isolate, item);
if (download_item)
download_item->SetSavePath(path);
}
// Running the DownloadTargetCallback with an empty FilePath signals that the
@@ -114,22 +137,14 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget(
}
// Try to get the save path from JS wrapper.
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
api::DownloadItem* download_item = api::DownloadItem::FromWrappedClass(
isolate, download);
if (download_item) {
base::FilePath save_path = download_item->GetSavePath();
if (!save_path.empty()) {
callback.Run(save_path,
content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
save_path);
return true;
}
}
base::FilePath save_path;
GetItemSavePath(download, &save_path);
if (!save_path.empty()) {
callback.Run(save_path,
content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
save_path);
return true;
}
AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(

View File

@@ -46,6 +46,9 @@ class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate {
void GetNextId(const content::DownloadIdCallback& callback) override;
private:
// Get the save path set on the associated api::DownloadItem object
void GetItemSavePath(content::DownloadItem* item, base::FilePath* path);
content::DownloadManager* download_manager_;
base::WeakPtrFactory<AtomDownloadManagerDelegate> weak_ptr_factory_;

View File

@@ -5,20 +5,44 @@
#include "atom/browser/atom_javascript_dialog_manager.h"
#include <string>
#include <vector>
#include "atom/browser/native_window.h"
#include "atom/browser/ui/message_box.h"
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/image/image_skia.h"
using content::JavaScriptMessageType;
namespace atom {
void AtomJavaScriptDialogManager::RunJavaScriptDialog(
content::WebContents* web_contents,
const GURL& origin_url,
content::JavaScriptMessageType javascript_message_type,
JavaScriptMessageType message_type,
const base::string16& message_text,
const base::string16& default_prompt_text,
const DialogClosedCallback& callback,
bool* did_suppress_message) {
callback.Run(false, base::string16());
if (message_type != JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_ALERT &&
message_type != JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) {
callback.Run(false, base::string16());
return;
}
std::vector<std::string> buttons = {"OK"};
if (message_type == JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) {
buttons.push_back("Cancel");
}
atom::ShowMessageBox(NativeWindow::FromWebContents(web_contents),
atom::MessageBoxType::MESSAGE_BOX_TYPE_NONE, buttons, -1,
0, atom::MessageBoxOptions::MESSAGE_BOX_NONE, "",
base::UTF16ToUTF8(message_text), "", "", false,
gfx::ImageSkia(),
base::Bind(&OnMessageBoxCallback, callback));
}
void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
@@ -29,4 +53,18 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
callback.Run(false, base::ASCIIToUTF16("This should not be displayed"));
}
void AtomJavaScriptDialogManager::CancelDialogs(
content::WebContents* web_contents,
bool suppress_callbacks,
bool reset_state) {
}
// static
void AtomJavaScriptDialogManager::OnMessageBoxCallback(
const DialogClosedCallback& callback,
int code,
bool checkbox_checked) {
callback.Run(code == 0, base::string16());
}
} // namespace atom

View File

@@ -26,9 +26,14 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager {
content::WebContents* web_contents,
bool is_reload,
const DialogClosedCallback& callback) override;
void CancelActiveAndPendingDialogs(
content::WebContents* web_contents) override {}
void ResetDialogState(content::WebContents* web_contents) override {};
void CancelDialogs(content::WebContents* web_contents,
bool suppress_callbacks,
bool reset_state) override;
private:
static void OnMessageBoxCallback(const DialogClosedCallback& callback,
int code,
bool checkbox_checked);
};
} // namespace atom

View File

@@ -26,10 +26,52 @@ bool WebContentsDestroyed(int process_id) {
return contents->IsBeingDestroyed();
}
void PermissionRequestResponseCallbackWrapper(
const AtomPermissionManager::StatusCallback& callback,
const std::vector<blink::mojom::PermissionStatus>& vector) {
callback.Run(vector[0]);
}
} // namespace
AtomPermissionManager::AtomPermissionManager()
: request_id_(0) {
class AtomPermissionManager::PendingRequest {
public:
PendingRequest(content::RenderFrameHost* render_frame_host,
const std::vector<content::PermissionType>& permissions,
const StatusesCallback& callback)
: render_process_id_(render_frame_host->GetProcess()->GetID()),
callback_(callback),
results_(permissions.size(), blink::mojom::PermissionStatus::DENIED),
remaining_results_(permissions.size()) {}
void SetPermissionStatus(int permission_id,
blink::mojom::PermissionStatus status) {
DCHECK(!IsComplete());
results_[permission_id] = status;
--remaining_results_;
}
int render_process_id() const {
return render_process_id_;
}
bool IsComplete() const {
return remaining_results_ == 0;
}
void RunCallback() const {
callback_.Run(results_);
}
private:
int render_process_id_;
const StatusesCallback callback_;
std::vector<blink::mojom::PermissionStatus> results_;
size_t remaining_results_;
};
AtomPermissionManager::AtomPermissionManager() {
}
AtomPermissionManager::~AtomPermissionManager() {
@@ -37,12 +79,14 @@ AtomPermissionManager::~AtomPermissionManager() {
void AtomPermissionManager::SetPermissionRequestHandler(
const RequestHandler& handler) {
if (handler.is_null() && !pending_requests_.empty()) {
for (const auto& request : pending_requests_) {
if (!WebContentsDestroyed(request.second.render_process_id))
request.second.callback.Run(blink::mojom::PermissionStatus::DENIED);
if (handler.is_null() && !pending_requests_.IsEmpty()) {
for (PendingRequestsMap::const_iterator iter(&pending_requests_);
!iter.IsAtEnd(); iter.Advance()) {
auto request = iter.GetCurrentValue();
if (!WebContentsDestroyed(request->render_process_id()))
request->RunCallback();
}
pending_requests_.clear();
pending_requests_.Clear();
}
request_handler_ = handler;
}
@@ -51,71 +95,83 @@ int AtomPermissionManager::RequestPermission(
content::PermissionType permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
const ResponseCallback& response_callback) {
int process_id = render_frame_host->GetProcess()->GetID();
if (permission == content::PermissionType::MIDI_SYSEX) {
content::ChildProcessSecurityPolicy::GetInstance()->
GrantSendMidiSysExMessage(process_id);
}
if (!request_handler_.is_null()) {
auto web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
++request_id_;
auto callback = base::Bind(&AtomPermissionManager::OnPermissionResponse,
base::Unretained(this),
request_id_,
requesting_origin,
response_callback);
pending_requests_[request_id_] = { process_id, callback };
request_handler_.Run(web_contents, permission, callback);
return request_id_;
}
response_callback.Run(blink::mojom::PermissionStatus::GRANTED);
return kNoPendingOperation;
bool user_gesture,
const StatusCallback& response_callback) {
return RequestPermissions(
std::vector<content::PermissionType>(1, permission),
render_frame_host,
requesting_origin,
user_gesture,
base::Bind(&PermissionRequestResponseCallbackWrapper, response_callback));
}
int AtomPermissionManager::RequestPermissions(
const std::vector<content::PermissionType>& permissions,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
const base::Callback<void(
const std::vector<blink::mojom::PermissionStatus>&)>& callback) {
// FIXME(zcbenz): Just ignore multiple permissions request for now.
std::vector<blink::mojom::PermissionStatus> permissionStatuses;
for (auto permission : permissions) {
bool user_gesture,
const StatusesCallback& response_callback) {
if (permissions.empty()) {
response_callback.Run(std::vector<blink::mojom::PermissionStatus>());
return kNoPendingOperation;
}
if (request_handler_.is_null()) {
std::vector<blink::mojom::PermissionStatus> statuses;
for (auto permission : permissions) {
if (permission == content::PermissionType::MIDI_SYSEX) {
content::ChildProcessSecurityPolicy::GetInstance()->
GrantSendMidiSysExMessage(render_frame_host->GetProcess()->GetID());
}
statuses.push_back(blink::mojom::PermissionStatus::GRANTED);
}
response_callback.Run(statuses);
return kNoPendingOperation;
}
auto web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
int request_id = pending_requests_.Add(new PendingRequest(
render_frame_host, permissions, response_callback));
for (size_t i = 0; i < permissions.size(); ++i) {
auto permission = permissions[i];
if (permission == content::PermissionType::MIDI_SYSEX) {
content::ChildProcessSecurityPolicy::GetInstance()->
GrantSendMidiSysExMessage(render_frame_host->GetProcess()->GetID());
}
permissionStatuses.push_back(blink::mojom::PermissionStatus::GRANTED);
const auto callback =
base::Bind(&AtomPermissionManager::OnPermissionResponse,
base::Unretained(this), request_id, i);
request_handler_.Run(web_contents, permission, callback);
}
callback.Run(permissionStatuses);
return kNoPendingOperation;
return request_id;
}
void AtomPermissionManager::OnPermissionResponse(
int request_id,
const GURL& origin,
const ResponseCallback& callback,
int permission_id,
blink::mojom::PermissionStatus status) {
auto request = pending_requests_.find(request_id);
if (request != pending_requests_.end()) {
if (!WebContentsDestroyed(request->second.render_process_id))
callback.Run(status);
pending_requests_.erase(request);
auto pending_request = pending_requests_.Lookup(request_id);
if (!pending_request)
return;
pending_request->SetPermissionStatus(permission_id, status);
if (pending_request->IsComplete()) {
pending_request->RunCallback();
pending_requests_.Remove(request_id);
}
}
void AtomPermissionManager::CancelPermissionRequest(int request_id) {
auto request = pending_requests_.find(request_id);
if (request != pending_requests_.end()) {
if (!WebContentsDestroyed(request->second.render_process_id))
request->second.callback.Run(blink::mojom::PermissionStatus::DENIED);
pending_requests_.erase(request);
}
auto pending_request = pending_requests_.Lookup(request_id);
if (!pending_request)
return;
if (!WebContentsDestroyed(pending_request->render_process_id()))
pending_request->RunCallback();
pending_requests_.Remove(request_id);
}
void AtomPermissionManager::ResetPermission(
@@ -141,7 +197,7 @@ int AtomPermissionManager::SubscribePermissionStatusChange(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin,
const ResponseCallback& callback) {
const StatusCallback& callback) {
return -1;
}

Some files were not shown because too many files have changed in this diff Show More