Compare commits

..

3199 Commits

Author SHA1 Message Date
Electron Bot
addf069f26 Bump v2.0.8 2018-08-22 11:10:51 -07:00
Samuel Attard
80221e52d9 fix: inheritance of webPreferences sub properties 2018-08-22 12:20:04 -05:00
trop[bot]
3403b4a4de ci: add better logging around request failures for releasing (#14244) 2018-08-21 13:31:29 -07:00
trop[bot]
a1ac930f4d chore: retry for the meta dumper a few times (#14242) 2018-08-21 13:30:53 -07:00
Electron Bot
ed8396c6f5 Bump v2.0.8-nightly.20180820 2018-08-20 16:54:02 -07:00
Samuel Attard
a457d8823a Revert "Bump v2.0.8-nightly.20180820"
This reverts commit 2d44dcb8be.
2018-08-20 16:44:17 -07:00
Electron Bot
2d44dcb8be Bump v2.0.8-nightly.20180820 2018-08-20 13:33:19 -07:00
Samuel Attard
85da731867 fix: support installing nightlies on <= 2.0.x (#14224) 2018-08-20 11:18:45 -07:00
trop[bot]
3af5fdb831 chore: remove autorelease check logic (#14221) 2018-08-20 10:56:40 -07:00
trop[bot]
f1b197acbb chore: add option to return next version from prepare-release (backport: 2-0-x) (#14216)
* chore: add option to return next version from prepare-release

* shuffle logic
2018-08-20 08:35:28 -07:00
Electron Bot
d483c81887 Bump v2.0.8-nightly.20180819 2018-08-19 16:42:46 -07:00
Samuel Attard
3ef980ae2b chore: use metadumper service to create index.json file (#14158) (#14210) 2018-08-19 16:40:49 -07:00
Samuel Attard
36e68b46df Revert "Bump v2.0.8-nightly.20180819"
This reverts commit 148d0d8d29.
2018-08-19 15:38:56 -07:00
Samuel Attard
f611dfdb5c chore: stop auto releasing from windows CI 2018-08-19 15:38:47 -07:00
Electron Bot
148d0d8d29 Bump v2.0.8-nightly.20180819 2018-08-19 14:48:54 -07:00
trop[bot]
79a1382126 chore: match the bump commit exactly, reverts should not count (#14208) 2018-08-19 14:45:49 -07:00
Samuel Attard
b0d5ba1996 Revert "Bump v2.0.8-nightly.20180819"
This reverts commit 48a4b58cc1.
2018-08-19 14:24:11 -07:00
Samuel Attard
088dc70dae chore: disable tests on release builds, this is already done on master/3-0-x (#14206) 2018-08-19 14:22:57 -07:00
trop[bot]
ad686cca68 fix: #14160 (#14204) 2018-08-19 14:13:56 -07:00
Electron Bot
48a4b58cc1 Bump v2.0.8-nightly.20180819 2018-08-19 13:18:10 -07:00
Samuel Attard
c1ef824e4c chore: fix upload script for nightly support (#14203) 2018-08-19 13:03:15 -07:00
Samuel Attard
a2eb532720 Revert "Bump v2.0.8-nightly.20180819"
This reverts commit 0cb53ceb9d.
2018-08-19 12:57:00 -07:00
Electron Bot
0cb53ceb9d Bump v2.0.8-nightly.20180819 2018-08-19 12:33:38 -07:00
Samuel Attard
afe4e610ae chore: always target master for nightly releases (#14190) (#14202) 2018-08-19 12:28:21 -07:00
Shelley Vohr
74d90fbb33 chore: backport release script updates to 2-0-x (#14191)
* chore: alter release scripts to enable sudowoodo

* add example .env file

* chore: only prepare release if last commit not a bump (#14193)
2018-08-18 19:39:06 -07:00
trop[bot]
f3bd8f6133 docs: fix electron.d.ts typings (#14137) 2018-08-16 11:11:31 -07:00
John Kleinschmidt
863c511fbf Merge pull request #13988 from K900/update-lld
fix: update clang/lld version to fix #13972
2018-08-16 10:29:21 -07:00
trop[bot]
03d8689ded fix: add a hidden option to disable remote dereferencing (#14112) 2018-08-15 08:43:41 -07:00
John Kleinschmidt
ff2bc1d705 Merge pull request #14084 from electron/appveyor-rename-2-0-x
ci: rename appveyor-override to appveyor (2-0-x)
2018-08-14 09:56:17 -07:00
John Kleinschmidt
a1df8befde Rename appveyor-override to appveyor 2018-08-14 09:44:15 -07:00
trop[bot]
75909685f7 Fix flaky sandbox tests (#14055)
Windows apparently has issues running opening two windows at once which is causing flakiness on the mixed sandbox tests.
2018-08-13 15:14:21 -07:00
trop[bot]
2e0a015168 fix: make asarStatsToFsStats nherit from fs.stats (#14040) 2018-08-12 21:13:43 -07:00
K900
740b2797c5 vendor: update clang/lld version to fix #13972
This seems like some sort of a weird linker bug, so just update the
toolchain a bit.
2018-08-10 14:55:13 +03:00
Charles Kerr
5f372f7ecc Bump v2.0.7 2018-08-08 16:23:52 -05:00
Jeremy Apthorp
e4f4a1d9f9 chore: roll libcc (#13974)
Picks up electron/libchromiumcontent#637
2018-08-08 09:59:16 -07:00
John Kleinschmidt
bdc255fa9e Merge pull request #13966 from electron/2-0-x-backport-12809
fix: Prevent menu update while it's open (backport: 2-0-x)
2018-08-07 10:05:44 -04:00
John Kleinschmidt
e8e542b3e8 Merge pull request #13960 from electron/miniak/fix-promisify-2.0
fix: some APIs modified for ASAR support cannot be util.promisify'ed (backport: 2-0-x)
2018-08-07 10:04:56 -04:00
Zhuo Lu
dd89aa6c77 Memory safety 2018-08-06 23:50:00 -07:00
Zhuo Lu
79caff69f5 Fix code style 2018-08-06 23:50:00 -07:00
Zhuo Lu
67b10135b6 Update application menu on default runloop
Menu change should be prevented while the menu is open
2018-08-06 23:49:57 -07:00
Milan Burda
6a86831b7c fix: some APIs modified for ASAR support cannot be util.promisify'ed (#13845) 2018-08-07 00:20:54 +02:00
Birunthan Mohanathas
dffd17ab70 fix: Improve --enable-features/--disable-features handling (2.0.x) (#13921)
As it turns out, we can reinitialize the feature list directly after the
user JS script has been executed instead of much later. This allows
modifications to `--enable-features`/`--disable-features` to work with a
greater set of features.

This backports #13920 to `2-0-x`.
2018-08-03 11:09:53 +10:00
Birunthan Mohanathas
cf98934dd9 build: Bump libcc to latest (2.0.x) (#13919)
This picks up electron/libchromiumcontent#627.
2018-08-03 10:54:39 +10:00
trop[bot]
2fff138740 fix: handle SIGINT and SIGTERM from the Electron CLI helper (#13888)
Fixes #12840
2018-08-01 13:25:37 +10:00
Charles Kerr
82bc83c1de Bump v2.0.6 2018-07-31 18:49:35 -05:00
Birunthan Mohanathas
3a699741da build: Bump libcc to latest (2.0.x) (#13896)
This picks up electron/libchromiumcontent#624.
2018-07-31 15:45:39 -05:00
trop[bot]
237ad9a49d fix: util.promisify(setTimeout) (#13859) 2018-07-30 15:02:28 +10:00
trop[bot]
45158bdad5 docs: fix electron.d.ts typings (#13856) 2018-07-30 11:20:02 +10:00
Birunthan Mohanathas
cf4861b575 build: Bump libcc to latest (2.0.x) (#13825)
This picks up electron/libchromiumcontent#619.
2018-07-27 23:05:49 +10:00
Zeke Sikelianos
a76adba2b3 Merge pull request #13782 from electron/fix-enable-disable-features-2-0-x
fix: Use --enable-features and --disable-features (2.0.x)
2018-07-25 11:09:15 -07:00
Birunthan Mohanathas
6689dce5ba fix: Use --enable-features and --disable-features (2.0.x)
Unlike Chrome, we were not using the --enable-features and
--disable-features command-line arguments to initialize
`base::FeatureList`.
2018-07-24 17:12:39 +02:00
Cheng Zhao
9667b835ca fix: create WebContents for webview on request (#13714) 2018-07-20 10:45:57 -07:00
John Kleinschmidt
58295a3198 Merge pull request #13735 from electron/backport-13727-2-0-x
fix: use context counter as contextId (backport 2-0-x)
2018-07-20 10:22:00 -04:00
Cheng Zhao
b60125f782 fix: use webContentsId with contextId together
After after using `processId-contextCounter` as contextId, it may happen
that contexts in different WebContents sharing the same renderer process
get the same contextId. Using webContentsId as part of key in
ObjectsRegistry can fix this.
2018-07-20 10:53:16 +09:00
Cheng Zhao
2af6d9ced7 fix: use context counter as contextId (backport 2-0-x)
For sandboxed renderer it may not have a node::Environment in the context,
using a increasing counter as contextId works for all cases.
2018-07-19 11:35:49 -07:00
Charles Kerr
664c184fcb Bump v2.0.5 2018-07-13 13:55:07 -05:00
John Kleinschmidt
c125576d48 Merge pull request #13644 from electron/release-updates-2
chore: Updates for release process (2-0-x)
2018-07-12 10:31:19 -04:00
John Kleinschmidt
6030146b45 chore: Updates for release process (2-0-x)
* Fix Appveyor URL

* Update docs to reflect current process

Also added troubleshooting steps.

(cherry picked from commit 6b5ccec0c6)
2018-07-12 09:05:02 -04:00
Cheng Zhao
17297d85f8 Merge pull request #13625 from electron/proxy_resolver_oop
fix: use mojo v8 proxy resolver with a utility process
2018-07-12 21:59:12 +09:00
deepak1556
65bbf21c08 update libcc ref 2018-07-12 19:55:42 +09:00
deepak1556
00da6ab43b link mojo proxy resolver in component build 2018-07-12 19:55:42 +09:00
deepak1556
d6d2a46821 REVIEW: create proxy helper per browser context 2018-07-12 19:55:42 +09:00
deepak1556
423bdda1b1 REVIEW: remove pre early initialization of v8 2018-07-12 19:55:42 +09:00
deepak1556
849aeced8f build: use mojo v8 proxy resolver with a utility process 2018-07-12 19:55:42 +09:00
Cheng Zhao
05a7485880 Merge pull request #13604 from electron/fix-remote-2-0-x
fix: guard against double-freeing remote references (2-0-x)
2018-07-12 11:09:38 +09:00
Cheng Zhao
3db1b5a49a fix double-freeing remote references
After the page does navigations, garbage collection can still happen in
the old context. This commit changes to store references to remote objects
by _pages_, instead of by _WebContents_.
2018-07-12 10:45:00 +09:00
Cheng Zhao
1c272503c3 add API to return an unique ID for page 2018-07-12 10:45:00 +09:00
Cheng Zhao
1ebb8975a8 fix assertion caused by PrefServiceFactory::Create 2018-07-12 10:45:00 +09:00
John Kleinschmidt
fcf4c9cef1 build: Updates to the release process (2-0-x) (#13615)
* Update to run new AppVeyor jobs

AppVeyor builds got split into two jobs, `electron-x64` and `electron-ia32`

(cherry picked from commit 90339b7260)

* Move github release checking to node.js

Our upload script was relying on an old python script to find the GitHub release for uploading.

(cherry picked from commit 2040095b96)
2018-07-11 09:08:09 -05:00
John Kleinschmidt
3e5349bf39 Use Visual Studio 2015 for 2-0-x (#13607) 2018-07-10 09:40:22 -05:00
John Kleinschmidt
66988adb0e Bump v2.0.4 2018-07-03 14:39:36 -04:00
John Kleinschmidt
91be3f343f Merge pull request #13545 from electron/fix-core-bluetooth-linking
Fix crash on startup on macOS 10.9 due to linking with CoreBluetooth
2018-07-03 09:47:35 -04:00
Cheng Zhao
475006c10d fix: weak load CoreBluetooth when building with 10.10 SDK
The CoreBluetooth framework does not exist on OS X 10.9.
2018-07-03 16:37:07 +09:00
John Kleinschmidt
d71a7d89bb Merge pull request #13538 from electron/dwm-backport
fix: Disable chromium's redraw locking on Windows when DWM is disabled (#12501)
2018-07-02 16:10:22 -04:00
John Kleinschmidt
abcba2b509 Merge pull request #13516 from trop-bot/2-0-x-bp-fix--tray-setcontextmenu-crash-1530308984992
Backport (2-0-x) - fix: tray setContextMenu crash
2018-07-02 14:12:51 -04:00
John Kleinschmidt
d06c20f836 Merge branch 'trop-bot-2-0-x-bp-fix--tray-setcontextmenu-crash-1530308984992' into 2-0-x 2018-07-02 14:10:14 -04:00
John Kleinschmidt
3ab99663eb Merge branch '2-0-x-bp-fix--tray-setcontextmenu-crash-1530308984992' of git://github.com/trop-bot/electron into trop-bot-2-0-x-bp-fix--tray-setcontextmenu-crash-1530308984992 2018-07-02 14:08:34 -04:00
trop[bot]
a253323ea1 Do not capture cookies and credentials (#13537) 2018-07-03 02:03:48 +10:00
Heilig Benedek
4abe5a2963 Disable chromium's redraw locking on Windows when DWM is disabled (#12501)
* disable redraw locking on windows

* update libcc ref

(cherry picked from commit a14ebc80d2)
2018-07-02 08:54:37 -07:00
Maxine Whitely
aada5fb167 fix: tray setContextMenu crash
Co-authored-by: Zhuo Lu <sethlu@mintkit.net>
Co-authored-by: Kristine Zhang <kzhang@slack-corp.com>
2018-06-29 21:49:51 +00:00
Robo
4efed0f5ed fix: Revert "remove MarkHghMemoryUsage api" (#13421)
* fix: Revert "remove MarkHghMemoryUsage api"

This reverts commit 0de85fd49f.

* update native_mate ref
2018-06-26 10:44:59 -07:00
John Kleinschmidt
475a1e30d9 Add release build to VSTS 2018-06-21 09:33:06 -04:00
John Kleinschmidt
4aedc2c21a Bump v2.0.3 2018-06-21 09:25:33 -04:00
John Kleinschmidt
71668858db Merge pull request #13345 from electron/miniak/fix-libcc-2-0-x
fix: patches/086-backport-f0c82253.patch in libcc
2018-06-21 09:13:25 -04:00
Milan Burda
2573d52860 Bump libcc 2018-06-21 09:29:14 +02:00
John Kleinschmidt
989c2605b3 Merge pull request #13305 from electron/2-0-x_update-libcc-subreference
update submodule reference for libchromiumcontent
2018-06-20 09:36:17 -04:00
John Kleinschmidt
afcfd473d0 Merge pull request #13330 from trop-bot/2-0-x-bp-fix--pass-down-the-bool-value-of-enableautosize-to-setsize-1529484352071
Backport (2-0-x) - fix: pass down the bool value of enableAutoSize to setSize
2018-06-20 09:24:28 -04:00
Justin Guze
1499bafe59 creating new bool for autosize 2018-06-20 08:45:58 +00:00
Justin Guze
419fae76b4 fix: pass the boolean value of enableAutoSize to setSize
The webContents setSize API takes in an optional enableAutoSize boolean.
Looking in the code, if that property is set, regardless if you pass in
true or false, it will always set it to true. This change passes the
appropriate boolean value down properly.
2018-06-20 08:45:58 +00:00
trop[bot]
c7b85a104a Mark browser window affinity as experimental (#13295) 2018-06-20 17:19:46 +10:00
trop[bot]
c6ea424858 Disable node options in node config (#13324) 2018-06-20 17:06:29 +10:00
trop[bot]
ba23c0d600 set mac protocol to none (#13325) 2018-06-19 22:39:07 -07:00
Charles Kerr
d4e716477e update submodule referefence for libchromiumcontent 2018-06-19 14:43:57 -05:00
Jeremy Apthorp
34dbe5f176 Enable WebFrame method forwarding in sandboxed renderers (#12538) (#13076)
* Enable WebFrame method forwarding in sandboxed renderers

Fixes #9073

* Non-change to kick CI
2018-06-19 09:36:14 +10:00
Milan Burda
a09fa53d80 Add FILE_DIALOG_TREAT_PACKAGE_APP_AS_DIRECTORY to web open file dialog (#13220) (#13277) 2018-06-18 10:34:21 -05:00
Milan Burda
c140c84b32 Backport "Allow lookup of videodecoder service to fix HW video decoding on macOS 10.13" (#13275)
https://chromium-review.googlesource.com/677290
2018-06-18 21:35:37 +10:00
Charles Kerr
55ab1d7370 update submodule referefence for node (#13260) 2018-06-17 14:52:25 -07:00
trop[bot]
cfa247967f fix: tray title not inverting when highlighted (#13262) 2018-06-16 11:59:46 -05:00
John Kleinschmidt
311f7ac6bb Bump v2.0.2 2018-05-22 14:52:16 -04:00
trop[bot]
52a44facfd update locale documentation (#13027) 2018-05-21 15:07:46 -05:00
trop[bot]
5acb7a0226 Backport (2-0-x) - docs: Document missing quit events during shutdown (#13026)
* docs: Document missing events during shutdown

* docs: Better language
2018-05-21 12:52:18 -07:00
trop[bot]
afcf94a85c Add a tag to libchromiumcontent when a release is created. (#13025) 2018-05-21 13:35:56 -05:00
John Kleinschmidt
c42b468966 Merge pull request #13022 from trop-bot/2-0-x-bp-fix--menu.setapplicationmenu(null)-crash-on-linux-1526913387556
Backport (2-0-x) - fix: Menu.setApplicationMenu(null) crash on Linux
2018-05-21 11:06:36 -04:00
John Kleinschmidt
e0257acdf5 Merge pull request #13009 from ajmacd/ajm-libcc
Bump libcc ref to pick up patch file extension correction.
2018-05-21 11:05:34 -04:00
Jeremy Apthorp
b555434aa0 fix: Menu.setApplicationMenu(null) crash on Linux 2018-05-21 14:36:33 +00:00
trop[bot]
9574a4f472 Only expand maximum size constraint if there was a constraint originally (#13014) 2018-05-20 19:45:51 -07:00
Andrew MacDonald
2f167ce3d1 Bump libcc ref to pick up patch file extension correction. 2018-05-19 01:01:05 -07:00
John Kleinschmidt
8655d5e9ae Bump v2.0.1 2018-05-16 13:30:26 -04:00
John Kleinschmidt
2e06e0eccd Merge pull request #12964 from trop-bot/2-0-x-bp-fix--support-multiple-inherited-ubuntu-session-for-indicators-1526485540005
Backport (2-0-x) - fix: support multiple inherited ubuntu session for indicators
2018-05-16 12:14:46 -04:00
John Kleinschmidt
773f08ca43 Merge pull request #12963 from trop-bot/2-0-x-bp-fix-empty-description-when-only-one-extension-is-given-(getfiletypesfromaccepttype)-1526480331702
Backport (2-0-x) - Fix empty description when only one extension is given (GetFileTypesFromAcceptType)
2018-05-16 11:46:51 -04:00
Didier Roche
13850b9dff Fix linting error
Thx @MarshallOfSound
2018-05-16 15:45:46 +00:00
Didier Roche
1c57c76496 fix: more scalable code by factorizing appindicator support
- introduce a currentPlatformSupportsAppIndicator() function determining
  if app indicators are supported here.
- handle undefined process.env.XDG_CURRENT_DESKTOP
- added some comments to ensure that the intents are clear
Thanks MarshallOfSound
2018-05-16 15:45:46 +00:00
Didier Roche
e459b38c5d Support multiple inherited ubuntu session for indicators
Multiple sessions inherits the "ubuntu" base settings properties in ubuntu.
One of the most popular one is communitheme: the next ubuntu default theme
has its dedicated session, with thus duplicated indicators for dropbox.
Rather than a string comparison for ubuntu, only match a substring then.
XDG_CURRENT_DESKTOP can be of form: "communitheme:ubuntu:GNOME",
"ubuntu:GNOME", …
Fixes: #12843.
2018-05-16 15:45:46 +00:00
John Kleinschmidt
9796513b83 Merge pull request #12923 from electron/fix-12875-2-0-x
Allow frameless transparent windows to be sized smaller than 64x64 on Windows
2018-05-16 11:42:35 -04:00
Milan Burda
d3e5f430c7 Fix empty description when only one extension is given 2018-05-16 14:18:57 +00:00
John Kleinschmidt
df22eccfc1 Merge pull request #12946 from trop-bot/2-0-x-bp-make-security-warnings-tests-more-robust-1526401028749
Backport (2-0-x) - Make security-warnings tests more robust
2018-05-15 13:12:10 -04:00
Cheng Zhao
214c352f71 make security-warnings tests more robust 2018-05-15 16:17:14 +00:00
John Kleinschmidt
0070637b5a Fix typescript generation error (#12940) 2018-05-15 11:13:35 -05:00
Milan Burda
72b944f862 Fix contents.setSize(options) documentation in web-contents.md 2018-05-15 11:37:45 +02:00
Heilig Benedek
2fbb371689 Lock electron-typescript-definitions at 1.3.2 2018-05-15 04:05:13 +02:00
Heilig Benedek
e2e70e9b1e Match chromium's workaround when setting size of unresizable windows 2018-05-14 21:57:34 +02:00
Charles Kerr
324b769751 update command-line backlist switches (2.0.x) (#12806)
* update command-line backlist switches

Do a better job of finding edge cases, e.g. network_switch_list.h

**NB: This can't be tropped** because the list is dependent on the libcc version

* update list
2018-05-14 11:03:37 -05:00
John Kleinschmidt
e1d54d55be Merge pull request #12856 from trop-bot/2-0-x-bp-fix--listeners-out-of-limit-warning-1525756284370
Backport (2-0-x) - fix: listeners out of limit warning
2018-05-08 10:49:17 -04:00
biuuu
1d54032ba4 fix: listeners out of limit warning
When the Chrome Extension has too many content scripts (above default
10 counts), there will be a warning: possible EventEmitter memory leak
detected. 11 listeners added.
2018-05-08 05:11:30 +00:00
Andrew MacDonald
c6e4de16de Update 2-0-x libcc ref for electron/libchromiumcontent/#533. (#12785) 2018-05-07 09:29:40 -07:00
trop[bot]
f39cc1cc46 docs: fix the type information in in-app-purchase (#12824)
Method returns Boolean, Manually confirmed the
correctness by running `npm run create-api-json`.
2018-05-04 14:50:33 -07:00
trop[bot]
6af89eb260 don't filter out invisible menu separators (#12831) 2018-05-04 11:26:21 -07:00
trop[bot]
d33b71cc2d Backport (2-0-x) - show file filter name for accessory view of file dialog (#12779)
* Show file filter name for accessory view of file dialog

- Respect filters option of dialog.showOpenDialog() and
  dialog.showSaveDialog(). (#10335)
- Show "All Files" for <input> apart from "accept" attribute. (#11456)

* Fix memory leaks in file_dialog_mac.mm
2018-05-02 09:28:16 -05:00
trop[bot]
d0bbf3fb3c Fix context menu for sandbox devtools (#12731) 2018-05-01 17:53:58 -05:00
trop[bot]
289db66fee fix flaky security-warnings test (#12776) 2018-05-01 17:52:03 -05:00
John Kleinschmidt
6b90807cb8 Bump v2.0.0 2018-05-01 16:00:36 -04:00
John Kleinschmidt
cf4f078aca Merge pull request #12768 from electron/support-policy-2-0-x
Manually backport Support Policy docs from master
2018-05-01 15:55:03 -04:00
Charles Kerr
4eedd1455d Manually backport Support Policy docs from master 2018-05-01 14:49:08 -05:00
trop[bot]
9c167b63f2 Backport (2-0-x) - Add sccache option to bootstrap (#12753)
* Add sccache option to bootstrap

Couldn't see a CC wrapper style option for gyp so we inject the sccache commands directly into the generated ninja files.

* Use CC_wrapper

* Update toolchain.gypi

* s/sccache/cc_wrapper
2018-05-01 01:31:37 +10:00
John Kleinschmidt
d18ab0ca08 Bump v2.0.0-beta.8 2018-04-26 10:56:46 -04:00
trop[bot]
724cbc967c revert to more graceful template structure check (#12703) 2018-04-24 14:17:26 -04:00
trop[bot]
b9d589439f Backport (2-0-x) - Fix transparency (#12683)
* Fix transparent window capture. Transparency is preserved and not converted to black pixels anymore

* Add test to make sure aplha channel exists in captured image
2018-04-23 01:16:18 +10:00
trop[bot]
f37bc4a9d4 Backport (2-0-x) - Correct the default of allowRunningInsecureContent as per docs (#12629)
* Correct the default of allowRunningInsecureContent as per docs

* fix linting

* Update calls to match native_mate API change
2018-04-18 05:53:32 -07:00
Alexey Kuzmin
597c8964f6 Preload doesn't load in sandboxed render if preload path contains special chars (#12037) (#12643)
* Adding missing headers

* adding ut

* Removing the file path exists check

* fixing test

* exposing window.require in UT

(cherry picked from commit 2f4fd3324b)
2018-04-17 11:00:07 -05:00
trop[bot]
652f83fc88 Backport (2-0-x) - Fix event leak on reuse of touchbar item (#12624)
* fix event leak on reuse of touchbar item

* Clean up child touch bar item event listeners and escape item listeners
2018-04-15 11:26:56 -05:00
trop[bot]
d432038aab Use CircleCI for Mac builds (#12573) 2018-04-09 19:45:35 -05:00
trop[bot]
5d8f36c53c Check for devtools in BrowserWindow.getFocusedWindow() (#12554) 2018-04-06 12:45:11 -04:00
trop[bot]
85dfdd6665 Expose IsOffScreen method always to JS. (#12531) 2018-04-04 13:25:28 -05:00
electron
de428ebec0 Bump v2.0.0-beta.7 2018-04-03 12:54:17 -07:00
John Kleinschmidt
c6c49b9e4b Add native arm/arm64 mksnapshot for 2-0-x (#12524)
* Add logic to bundle native mksnapshot for arm/arm64

(cherry picked from commit 79eff95a39)

* Update to latest libchromiumcontent
2018-04-03 14:24:38 -05:00
John Kleinschmidt
98495fabfb Fix pushRelease for autorelease (#12523) 2018-04-03 14:14:25 -05:00
trop[bot]
06c33c7e56 WebFrame.setVisualZoomLevelLimits sets user-agent scale constraints (#12510)
Fixes #11216.
2018-04-03 07:50:37 -05:00
trop[bot]
33aad6ae11 Handle in-app-purchase less fatally on non-Darwin (#12512)
Fixes #12471

Right now it throws a new error when the file is even require()d, but this isn't ideal as there are cases where everything is mass-required, such as Spectron.

Instead, we should throw an error on non-Darwin environments only when the IAP methods are invoked.
2018-04-02 19:23:28 -05:00
Charles Kerr
6c00b37dd1 update libcc submodule reference to electron-2-0-x (#12448)
* update libcc submodule reference to electron-2-0-x

* remove MarkHighMemoryUsage api
2018-04-02 19:12:55 -05:00
trop[bot]
d209e59c30 re-enable null check against menu item accelerators (#12455) 2018-03-28 16:45:34 -05:00
trop[bot]
14f8a2a0e8 Backport (2-0-x) - update doc for setProgressBar (#12454)
* update doc for setProgressBar

The linter was unable to get `paused` as a possible value for `mode`

* update doc for setProgressBar

Addressing PR feedback
2018-03-28 11:35:40 +11:00
John Kleinschmidt
65e1252da0 Bump v2.0.0-beta.6 2018-03-27 16:10:49 -04:00
trop[bot]
2903d7608c Backport (2-0-x) - Fix nil tray title crash (#12356)
* Add check for title_ being nil

* remove print stub
2018-03-23 13:05:59 -05:00
John Kleinschmidt
0bc72961ab Merge pull request #12412 from electron/autorelease-fixes
Fixes for autorelease
2018-03-22 16:08:14 -04:00
John Kleinschmidt
b55a24c025 Fixes for autorelease
1. Allow passing in of branch
2. Validate release before trying to run release
3. Fix upload-index-json.py to allow use of release build.
2018-03-22 11:48:41 -04:00
trop[bot]
51bca764f7 Do not block main process for async dialog (#12407) 2018-03-22 08:46:15 -05:00
Shelley Vohr
35976a0a07 fix tray highlight in darkmode (#12398) 2018-03-22 13:59:50 +11:00
trop[bot]
283ab23524 Use the appname as the tray icon's default tooltip (#12393)
This makes an upstream DCHECK happy in AppIndicatorIcon::SetToolTip.
Empty tooltip strings are discouraged, as discussed in commit log
b6c510aa543193337041517c2d70113840189b06.

Fixes #12386.
2018-03-21 16:02:48 -04:00
John Kleinschmidt
2343f7c287 Bump v2.0.0-beta.5 2018-03-20 15:04:20 -04:00
Birunthan Mohanathas
8991ad31d8 Backport (2-0-x) - Update draggable regions when changing BrowserView (#12370)
* Store InspectableWebContents instead of InspectableWebContentsView in NativeBrowserView

* Rename system_drag_exclude_areas => drag_exclude_rects

* Use NSView convertRect:toView: for BrowserView DragRegionView positioning

* Make BrowserView DragRegionViews children of the WebContents view

Previously they were children of the `InspectableWebContentsView` view,
which caused this assertion to fail:

f993888424/brightray/browser/mac/bry_inspectable_web_contents_view.mm (L162)

* Update draggable regions when changing BrowserView

Fixes #12150.
2018-03-20 13:03:45 -05:00
trop[bot]
fae6167308 Backport (2-0-x) - Remove the race condition between new process creation and context release (#12361)
* Remove the race condition between new process creation and old process releasing remote context

Previously there was a race condition where the getId() method would return the new context ID even
though the release was for the old context.  This changes it to send the "initial" context ID with
the release message to ensure there is no race.

* fetch context ID from remote in sandbox mode
2018-03-20 18:11:39 +11:00
John Kleinschmidt
bd25a5f453 Merge pull request #12353 from trop-bot/2-0-x-bp-update-ci-to-use-node.js-8-1521472101213
Backport (2-0-x) - Update CI to use Node.js 8
2018-03-19 13:03:25 -04:00
John Kleinschmidt
c80021924e Update CI to use Node 8 2018-03-19 15:08:27 +00:00
trop[bot]
0cc4584352 Backport (2-0-x) - Check menu.popup options are an object (#12330)
* check menu.popup options are an object

* Add a spec for menu.popup options check

* remove stray .only
2018-03-17 19:46:48 +09:00
trop[bot]
706f0c436d Backport (2-0-x) - Better GTK+ Menu color support (#12331)
* Better GTK+ Menu color support

 * Fix 'invisible menu' issue (#12275)

 * Now updates menu text color when focus changes!

 * Better caching of colors when system theme changes

 * Removed all GTK+ deprecation warnings from menubar

* Don't highlight menu text on mouseover in GTK+

* Fix textColor declaration scope error

* Simplify FocusManager connection management a bit

* Make the linter happy

* Decouple MenuBar view recoloring from rebuilding

This way we don't need to rebuild the subview each time a recolor
is needed, e.g. when window focus changes or the system theme changes

* Don't iterate child views if we don't need to

* Move variable declaration outside of a loop

* More efficient iteration of MenuBar children

* Cleaner MenuButton bounds testing

* Fix oops

* Add a nullptr check in MenuBar::GetItemCount()

* Simplify iteration in MenuBar::RebuildChildren()

* Make the linter happy

* Fix signed-unsigned comparison

* Remove declarations of nonexistent methods

* Make SubmenuButton accessor const

* Cleaner accelerator iteration

* Windows fixes
2018-03-17 19:45:14 +09:00
Charles Kerr
663e1e059b net: change mime type deduction in Change URLRequestAsarJob (#12319) (#12333) 2018-03-17 19:28:37 +09:00
John Kleinschmidt
433aba34e6 Fix AttributeError: 'dict' object has no attribute 'required' (#12307)
(cherry picked from commit 71c3483f55)
2018-03-16 10:23:22 +09:00
trop[bot]
bd33e7198e 🔧 Fix security warning (#12313) 2018-03-16 07:22:36 +09:00
John Kleinschmidt
e1b19140e5 Bump v2.0.0-beta.4 2018-03-15 08:55:16 -04:00
trop[bot]
4632ade7ae Document BrowserView.{destroy,isDestroyed} (#12299) 2018-03-15 16:37:19 +09:00
trop[bot]
b32f332ce3 Backport (2-0-x) - Set appropriate defaults for webview options (#12292)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values

* Test inherited default propogation

* Refactor to remove coupling from fetching values and defaults

* Test description type

* Fix up tests
2018-03-15 15:06:40 +09:00
trop[bot]
6ff0d744ee Backport (2-0-x) - Fix require on network share path (#12287)
* first pass at server/network require fix

* refactor for clarity
2018-03-15 12:26:52 +09:00
John Kleinschmidt
37cbf5e4f1 Merge pull request #12280 from trop-bot/2-0-x-bp-switching-all-emails-to-@electronjs.org-domain-1521056557166
Backport (2-0-x) - Switching all emails to `@electronjs.org` domain
2018-03-14 16:33:10 -04:00
John Kleinschmidt
f48f486412 Merge pull request #12249 from electron/auto-release-updates
Auto release updates
2018-03-14 16:32:12 -04:00
Jacob Groundwater
018b676efd Change Contact Emails 2018-03-14 19:42:43 +00:00
John Kleinschmidt
c9e5d17950 Fix autogeneration of release notes 2018-03-14 09:22:25 -04:00
John Kleinschmidt
b1dd013425 Upgrade to node 8 2018-03-14 09:22:25 -04:00
John Kleinschmidt
7a91c5668f Skip prompting for version when running auto build 2018-03-14 09:22:24 -04:00
John Kleinschmidt
2f47b71211 Disable mips release builds
mips builds don't currently work for 2.0.0
2018-03-14 09:22:24 -04:00
Samuel Attard
e8a7cc576e fix remote setInterval flake (#12265) 2018-03-14 15:42:44 +09:00
Cheng Zhao
c00b1ac669 Update libcc to fix private API usage in mas build (#12264) 2018-03-14 15:06:42 +09:00
trop[bot]
c4bde8853f add missing report.length > 1 assertion (#12262) 2018-03-14 14:45:06 +09:00
trop[bot]
ab77b55a90 Backport (2-0-x) - Enable easy rebuild of native modules for unreleased electron (#12260)
* Enable easy rebuild of native modules for unreleased electron

Sometimes when developing locally (as I found this morning) you want to rebuild native modules
against an unreleased version of Electron (in this case local master).  This PR adds a simple
script to launch a local HTTP server that generates and hosts the required header and checksum
files to rebuild modules.  So far only tested on macOS but should work on all OS's

* Allow custom port

* clean up serve script

* make optionality more obvious
2018-03-14 13:34:54 +09:00
trop[bot]
05b0948dd0 Fixed passing of exception to the system crash handler (#12259) 2018-03-14 12:58:26 +09:00
trop[bot]
c9e2140bca Backport - fix: Ensure that getLastCrashReport() is actually the last crash report (#12255)
* 🔧 Sort crashes

* 🔧 Actually test the method

* 🔪 Cut typo

* 👷 Fancy test

* 👷 Tests, how do they work

* 🔧 Linter's gotta lint
2018-03-14 11:36:58 +09:00
Cheng Zhao
9843ce743e Merge pull request #12218 from electron/backport_double_preload_2_0_patch
browser: fix preload loading twice in 2.x
2018-03-14 10:27:42 +09:00
Robo
c846f677c9 browser: fix null pointer dereference with getWebPreferences api (#12245)
* add failing spec

* devtools webContents don't have associated webPreferences
2018-03-14 06:06:51 +09:00
John Kleinschmidt
643dd55e07 Merge pull request #12247 from trop-bot/2-0-x-bp-spec--isolate-sw-file-scheme-spec-storage-with-temp-partition-1520962317089
Backport - spec: isolate sw file scheme spec storage with temp partition
2018-03-13 14:33:07 -04:00
deepak1556
d2045b93b7 spec: isolate sw file scheme spec storage with temp partition 2018-03-13 17:32:04 +00:00
John Kleinschmidt
c22d53be5c Merge pull request #12239 from electron/update-libcc-2.x
update libcc ref for 2.x
2018-03-13 11:35:44 -04:00
trop[bot]
e9d28f9b14 Backport - Parent's visibility trumps inherited 'show' option (#12244)
* Parent's visibility trumps inherited 'show' option

* Add tests

* Remove unnecessary work when merging options

* Use idiomatic ES6 when merging options

* Apply further ES6 bikeshedding
2018-03-13 23:27:44 +09:00
deepak1556
7e53a4c72c update libcc ref for https://github.com/electron/libchromiumcontent/pull/476 2018-03-13 11:36:07 +09:00
trop-devel[bot]
515fbb6fc3 Backport - fix: Incorrect warnings in webviews (#12236)
* 🔧 Get correct webContents

* 🔧 Err, webPreferences
2018-03-13 11:34:32 +09:00
trop-devel[bot]
af4dfcf6fe Fix menubar toggle alt key detection on focus (#12235)
Reset alt keypress flag on window blur so switching window via
Alt+* window manager keybindings can't incedentally trigger
annoying menubar toggles
2018-03-13 11:25:55 +09:00
Charles Kerr
176abdbd80 Linux named notifications - 2-0-0 (#12229)
* Newer CI images (#12188)

* Bump electronbuilds/electron* versions

The linux-appname branch has been gathering dust for awhile.
Some of the versions in `master` are higher, and some of the
versions in `linux-appname` are higher to add libnotify.

This commit takes the higher of the two numbers in each case.

* Add libnotify to the Dockerfiles

* Linux named notifications (#12192)

* Set name & desktop-entry on Linux notifications

* DBusMock now honors verbose mode flag

* Disable DBus Notification tests on ia32

* Fix desktop-id notification edge case (#12216)

* Fix desktop-id notification edge case

* Extract-method platform_util::GetDesktopName()

This removes duplicated code from libnotify_notifications.cc
and atom/common/linux/application_info.cc.

* Check for empty case in GetDesktopName().

* Move GetDesktopName() to brightray::util

* Remove unnecessary changes in platform_util

* Add a brightray::platform_util namespace

* Bump CI
2018-03-13 11:13:34 +09:00
Charles Kerr
cda7b8ccc8 clean planned breaking changes for 3.0 (#12145) (#12222) 2018-03-12 16:09:58 +09:00
deepak1556
1a43ba50b6 move ipc from rvh to rfh 2018-03-12 14:30:42 +09:00
Cheng Zhao
1174fc0ab8 Skip client-certificate test for Linux (#12213) 2018-03-12 09:25:43 +09:00
John Kleinschmidt
3c5ba35d63 Bump v2.0.0-beta.3 2018-03-09 09:15:39 -05:00
Cheng Zhao
0f143fdba0 Merge pull request #12182 from electron/update-libcc-2-0-x
Update to latest libchromiumcontent for 2-0-x
2018-03-09 10:16:43 +09:00
John Kleinschmidt
99ae56b782 Add configurable mocha timeout
Adding an environment variable, MOCHA_TIMEOUT that can be set for slower CI platforms
2018-03-08 16:29:31 -05:00
Aleš Pergl
5471bc313f Use content origin in screen coordinates for calculating popup menu position (#12181) 2018-03-09 05:55:31 +09:00
John Kleinschmidt
b0077241ee Update to latest libchromiumcontent for 2-0-x 2018-03-08 15:12:29 -05:00
John Kleinschmidt
bb40bc4aca Add logic to support automatic releases (#12177) 2018-03-09 02:46:06 +09:00
John Kleinschmidt
76fb7ee87c Allow CI testing on arm64 hardware for 2-0-x (#12178)
* Allow CI building on arm64 hardware

* Use bundled freetype from Chromium

(cherry picked from commit 51f89048d6)
2018-03-09 02:21:55 +09:00
Alexey Kuzmin
bfc0e3f266 Merge pull request #12174 from electron/cp-2-0-x/12059
Merge pull request #12059 from electron/add-tabbedwindow-warning
2018-03-08 15:13:37 +01:00
Alexey Kuzmin
48e068997b More vibrancy fixes (#12157) (#12171)
* Only set title bar to transparent when vibrant with a custom titlebar
* Correctly set the transparent state of the GpuSwitcher so vibrancy works on reload
* Document case where using frame: false without custom titleBarStyle and vibrant

(cherry picked from commit 8c138e74be)
2018-03-08 08:51:36 -05:00
Alexey Kuzmin
f443974f3d Merge pull request #12043 from kaylieEB/fix-menu-item (#12170)
Fix context menu click callback

(cherry picked from commit cc608a3fb0)
2018-03-08 08:43:38 -05:00
shelley vohr
36505ae00e Merge pull request #12059 from electron/add-tabbedwindow-warning
add warning when addTabbedWindow is called on self

(cherry picked from commit dfa1dc43df)
2018-03-08 14:33:10 +01:00
Charles Kerr
b330ff8004 Removals come >=1 major release after deprecation. (#12164) 2018-03-08 11:18:36 +09:00
John Kleinschmidt
6cda9460ea Merge pull request #12161 from electron/backport-flake-fixes
Backport flake fixes (2-0-x)
2018-03-07 14:09:14 -05:00
Charles Kerr
2cac654974 Exit gracefully on linux (#12139)
* Fix timing issue in singleton fixture.

Singleton now sends the "we've started" message out only after it's
received a `'ready'` event from `app`. Previously it sent the message
out immediately, resulting in the parent test trying to manipulate it
before Singleton's event loop was fully bootstrapped.

* Check for graceful exits on Linux, too.

Rewrite the "exits gracefully on macos" spec to run on Linux too.

* Check for graceful exits everywhere.

* Tweak comment

* Better error logging in api-app-spec.js. (#12122)

In the 'exits gracefully' test for app.exit(exitCode),
print the relevant error information if the test fails.

* Run the exit-gracefully test on macOS and Linux.

Windows does not support sending signals, but Node.js offers some
emulation with process.kill(), and subprocess.kill(). Sending signal 0
can be used to test for the existence of a process. Sending SIGINT,
SIGTERM, and SIGKILL cause the unconditional termination of the target
process.

So, we'll need a different approach if we want to test this in win32.
2018-03-07 12:45:26 -05:00
shelley vohr
5a210f3d7a Merge pull request #12137 from electron/deprecate-getMenuBatHeight-2.0.x
Deprecate screen.getMenuBarHeight (2.0.x)
2018-03-06 07:38:53 -08:00
Alexey Kuzmin
4bb10c10e4 Merge pull request #12133 from electron/update-libcc
Update libchromiumcontent for 2-0-x
2018-03-06 12:51:58 +01:00
Shelley Vohr
c0076d9c52 remove screen.getMenuBarHeight spec 2018-03-05 21:00:55 -05:00
Shelley Vohr
95539c5b63 deprecate screen.getMenuBarHeight 2018-03-05 21:00:50 -05:00
John Kleinschmidt
4f8ca2f03a Update to latest libchromiumcontent
Update to get electron/libchromiumcontent#463 security fix
2018-03-05 15:12:02 -05:00
John Kleinschmidt
c9b92aebd3 Bump v2.0.0-beta.2 2018-03-05 13:14:27 -05:00
Cheng Zhao
6d3f60374e Merge pull request #12087 from electron/fix-dock-menu-gc-2-0-x
Fix crash when setting dock menu (2.0.x)
2018-03-02 08:39:03 +09:00
Cheng Zhao
8703298e9d spec: Test garbage collecting dock menu 2018-03-01 09:48:39 +09:00
Cheng Zhao
a42057aabd Fix dockMenu not being referenced in JavaScript 2018-03-01 09:48:39 +09:00
Cheng Zhao
bd2ab27c25 Merge pull request #12053 from electron/network-delegate-race
Fix network delegate race condition in 2-0-x
2018-02-27 08:47:20 +09:00
Cheng Zhao
1e6d7295cf Move the arguments instead of const referrencing
Safer and more efficient.
2018-02-26 09:34:49 -08:00
Cheng Zhao
1918da7c2e Remove the evil URLRequestContextGetter::network_delegate 2018-02-26 09:34:40 -08:00
Cheng Zhao
38345c7267 Fix race condition when getting network delegate 2018-02-26 09:34:32 -08:00
shelley vohr
c4742df1ee Merge pull request #12016 from electron/backport-release-updates
Backport fixes from running 2.0.0-beta.1 release to 2-0-x
2018-02-22 15:27:05 -05:00
John Kleinschmidt
5fc485043b Fixes from running 2.0.0-beta.1 release
This provides the following fixes:
1. Remove logic to delete release branch because that branch is no longer used.
2. Fix --validateRelease to not verifyShasums when release is in draft mode.

(cherry picked from commit fa6510a90c)
2018-02-22 11:26:30 -05:00
shelley vohr
967dcd3471 Merge pull request #12014 from electron/backport-version-fix
Fix deprecated API in tools/dump-version-info.js for 2-0-x
2018-02-22 09:28:52 -05:00
John Kleinschmidt
96f800552c Fix deprecated API in tools/dump-version-info.js 2018-02-22 09:00:37 -05:00
John Kleinschmidt
afcbb589b6 Bump v2.0.0-beta.1 2018-02-21 14:45:36 -05:00
John Kleinschmidt
4159103467 Use new release job 2018-02-21 14:41:18 -05:00
John Kleinschmidt
2a97e48465 Merge pull request #11968 from electron/refactor-menu-popup
Refactor menu.popup
2018-02-21 14:29:52 -05:00
John Kleinschmidt
b4ae41b484 Merge pull request #11999 from electron/no_execstack
Explicitly disable executable stack
2018-02-21 14:00:47 -05:00
Shelley Vohr
e3d4358068 bump electron-typescript-defs to 1.3.2 2018-02-21 12:42:07 -05:00
Ales Pergl
89d5e4a2f0 Explicitly disable executable stack in all Linux binaries 2018-02-21 17:57:53 +01:00
Ales Pergl
c3dbba00a6 Use --icf=all on architectures where it's supported 2018-02-21 17:55:28 +01:00
shelley vohr
77b8c81096 Merge pull request #11963 from perlun/patch-1
security.md: Reformat security recommendation checklist
2018-02-21 10:01:15 -05:00
shelley vohr
0ef8f1bdad Add deprecation warnings fot html/rtf methods (#11995) 2018-02-21 06:53:48 -06:00
Cheng Zhao
f7ec346e9f Merge pull request #11956 from brenca/transparent-window-devtools-fix
Fix transparent windows losing transparency when devtools detaches
2018-02-21 19:54:35 +09:00
Heilig Benedek
6f2609f9d2 Remove outdated comments 2018-02-21 11:28:53 +01:00
shelley vohr
772a69e24a deprecate autoSubmit in favor of uploadToServer (#11992) 2018-02-20 22:31:48 -06:00
shelley vohr
193febd18c deprecate boolean highlightMode param (#11993)
* deprecate boolean highlightMode param

* add process.noDeprecations check

* fix native method override

* add todo
2018-02-20 22:30:32 -06:00
shelley vohr
719e5a93b4 deprecation for webContents.openDevTools (#11986)
* deprecate old openDevTools param

* add deprecation check and existence check

* fix method issues
2018-02-20 22:30:02 -06:00
Charles Kerr
f59d078eea Use more idiomatic JS in WebContents' init() 2018-02-20 19:20:11 -06:00
shelley vohr
c2575c4944 remove app.getAppMemoryInfo (#11985)
* remove app.getMemoryInfo

* semicolons are important
2018-02-20 18:52:33 -06:00
Charles Kerr
9c56b81b71 Throw an error if menu.popup() has no window 2018-02-20 18:38:05 -06:00
Charles Kerr
5a25b88b50 Fix browserWindow detection in menu.popup() 2018-02-20 18:35:39 -06:00
Charles Kerr
21de806c80 document menu.popup() option's window argument 2018-02-20 14:30:37 -06:00
Charles Kerr
708f39a1a5 update a few menu.popup() calls to use the new API 2018-02-20 14:02:24 -06:00
John Kleinschmidt
dcaff20cfd Merge pull request #11981 from electron/set-tray-highlightmode
no longer support bool param for setHighlightMode
2018-02-20 12:57:52 -05:00
Charles Kerr
35e90f742b fix menu.popup() sample code 2018-02-20 11:18:57 -06:00
shelley vohr
846be03f1d remove support for hidden-inset (#11975) 2018-02-20 11:09:54 -06:00
shelley vohr
7bcccdec41 remove atom-shell process name (#11979) 2018-02-20 10:33:38 -06:00
Shelley Vohr
5065e159f1 positionItem => positioningItem 2018-02-20 11:28:34 -05:00
shelley vohr
6a3fde6e20 Merge pull request #11973 from electron/remove-clipboard-methods
Remove html/rtf methods marked for 2.0
2018-02-20 11:21:10 -05:00
Charles Kerr
8d086a43cb Fix brightray::GetApplicationName(), ..Version() on Linux (#11980)
* add brightray API to override app version

* in atom browser, use brightray app version API

* on Linux, have GetApplicationVersion() use brightray version API

* on Linux, implement brightray::GetApplicationName()

* fix typo in brightray API

* make browser.GetName() logic follow GetVersion() logic

* improve variable name in OverrideApplicationVersion declaration

* fix typo in brightray impl
2018-02-20 10:16:51 -06:00
Shelley Vohr
ba933ef085 update docs for single param popup 2018-02-20 11:12:39 -05:00
Cheng Zhao
dc62e51ba4 Fix the cyclic reference in menu delegate (#11967)
* Fix the cyclic reference in menu delegate

* Fix menu tests due to delegate change
2018-02-20 10:11:35 -06:00
Shelley Vohr
fb7fb4972d options all the things 2018-02-20 11:10:53 -05:00
shelley vohr
e1b81b8a62 remove support for crashReporter autoSubmit (#11976) 2018-02-20 10:10:35 -06:00
shelley vohr
8d4bf3e29a Merge pull request #11974 from electron/remove-setZoomLevelLimits
remove setZoomLevelLimits
2018-02-20 10:51:41 -05:00
shelley vohr
a2856db982 Remove nativeImage deprecated methods (#11978)
* remove deprecated nativeimage methods

* remove .only from spec
2018-02-20 09:15:27 -06:00
Shelley Vohr
57738e6981 no longer support bool param for setHighlightMode 2018-02-20 10:06:59 -05:00
shelley vohr
98ba120ae2 Merge pull request #11972 from electron/remove-setextra-param
remove setExtraParameter for 2.0
2018-02-20 09:10:38 -05:00
Shelley Vohr
211b542ae4 remove setZoomLevelLimits 2018-02-20 08:57:48 -05:00
Charles Kerr
2a16b28be4 Cache libnotify server caps (#11965)
* cache libnotify server capabilities

* fix broken production cache in NotifierSupportsActions()

* log a warning if LibnotifyNotification::Initialize() fails
2018-02-20 07:53:10 -06:00
Shelley Vohr
e4e20d667b remove html/rtf methods marked for 2.0 2018-02-20 08:41:58 -05:00
Shelley Vohr
1a3661206e remove unused deprecate module from crashreporter 2018-02-20 08:31:38 -05:00
Shelley Vohr
fc025064f7 remove setExtraParameter for 2.0 2018-02-20 08:26:10 -05:00
Shelley Vohr
56f06187d5 forgot to remove old method 2018-02-19 21:03:10 -05:00
Shelley Vohr
73ab87b87f add new and changed specs 2018-02-19 20:59:47 -05:00
Shelley Vohr
6e11a3e53d add restructured window.popup 2018-02-19 20:59:27 -05:00
shelley vohr
459a5e3a1f Merge pull request #11961 from electron/fix-bw-callback
add conditional for menu.popup(window, callback)
2018-02-19 19:54:20 -05:00
Zeke Sikelianos
35faab89a4 add typing cat to first PR comment (#11964)
* add typing cat to first PR comment

* update cat URL
2018-02-19 17:45:14 -06:00
Zeke Sikelianos
af82b2037e Merge pull request #11950 from electron/semver-doc-tweaks
semver documentation tweaks
2018-02-19 13:07:33 -08:00
Per Lundberg
8375d21cae security.md: Update security recommendation checklist 2018-02-19 23:07:03 +02:00
Shelley Vohr
9c52d273dd add spec for menu.popup(window, callback) 2018-02-19 13:15:49 -05:00
Shelley Vohr
cd9e7142e4 add conditional for menu.popup(window, callback) 2018-02-19 13:06:37 -05:00
Heilig Benedek
d31d2087a3 use SK_ColorTRANSPARENT as the default color to fix issue with transparent window devtools detach 2018-02-19 15:07:28 +01:00
Charles Kerr
56859531cd fix floating reference glib warning (#11948)
use gtk_widget_destroy() rather than g_object_unref() on the floating temporary menubar widget that we use to calculate colors
2018-02-19 00:12:54 -06:00
Charles Kerr
fbce7bafd7 capitalize 'Node.js' 2018-02-18 23:14:08 -06:00
Charles Kerr
e3efe4b378 make the table a real table 2018-02-18 11:04:21 -06:00
Charles Kerr
ac57c7625a minor copyediting 2018-02-18 11:00:06 -06:00
shelley vohr
55d4d74624 Merge pull request #11944 from electron/update-native-mate
update native_mate ref
2018-02-18 09:20:22 -05:00
Shelley Vohr
2a46a63833 update native_mate ref 2018-02-18 08:57:22 -05:00
John Kleinschmidt
f3415c04cd Merge pull request #11804 from electron/fix-protocol-origin-filtering
Fix protocol filtering of net.request
2018-02-16 14:17:46 -05:00
Paul Frazee
01a6104727 Add download from custom protocol test (#11931) 2018-02-16 13:03:53 -05:00
Thiago de Arruda
bc76f35691 Fix protocol filtering of net.request
net::URLRequest inherits from base::SupportsUserData, which allows
associating arbitrary data with the request. Use this mechanism as a
condition for filtering requests from custom protocols.

Close #11657
2018-02-16 13:03:53 -05:00
John Kleinschmidt
78ccfa0612 Merge pull request #11879 from electron/fix-gtk-deprecations
Fix GTK+ 3 deprecations
2018-02-16 10:01:01 -05:00
Cheng Zhao
67fa13d7cf Merge pull request #11925 from electron/squirrel-mac-cdn
Update to use Squirrel.Mac that supports CDN releases
2018-02-16 15:28:39 +09:00
Samuel Attard
a20b379f26 fix windows tests 2018-02-16 16:02:10 +11:00
Samuel Attard
549042160f requestHeaders --> headers 2018-02-16 13:41:21 +11:00
Samuel Attard
f84b8bbfdc Update deps for new squirrel 2018-02-16 13:01:00 +11:00
Charles Kerr
5e7a5ce3a9 run clang-format on changed sources 2018-02-15 15:20:55 -06:00
Charles Kerr
d30310a2f2 don't build libgtkui files on non-GTK+ platforms 2018-02-15 15:15:26 -06:00
Charles Kerr
b0469702ad replace gtk2 with gtk3 in cibuild script 2018-02-15 15:10:21 -06:00
Charles Kerr
4774f32065 replace gtk2 with gtk3 in docs 2018-02-15 15:08:55 -06:00
Charles Kerr
c8e64ff870 replace gtk2 with gtk3 in dockerfiles 2018-02-15 15:03:14 -06:00
Charles Kerr
381ed2e2b2 remove GTK+ 2 specific code 2018-02-15 14:57:45 -06:00
Cheng Zhao
af92b04eb9 Merge pull request #11654 from sethlu/set-notification-close-button-text
feat: Set macOS notification close button title
2018-02-15 16:01:30 +09:00
Cheng Zhao
fdda1c55c5 Merge pull request #11647 from sethlu/accept-additional-notification-actions
feat: Accept additional notification actions
2018-02-15 15:46:36 +09:00
Samuel Attard
6318cd781d Update to use Squirrel.Mac that supports CDN releases 2018-02-15 14:00:46 +11:00
shelley vohr
7e2f7602c1 Merge pull request #11921 from electron/allow-osr-console-message
Emit console-message in OSR mode
2018-02-14 11:02:18 -05:00
Zeke Sikelianos
6f0080be4c Merge pull request #11918 from dakeshi/fix-typo-docs
fix typo in electron-versioning.md
2018-02-14 06:46:37 -08:00
Shelley Vohr
31b074ff0e change to return emit 2018-02-14 09:28:21 -05:00
Shelley Vohr
c3d11a51cc emit console-message in OSR mode 2018-02-14 09:09:45 -05:00
Charles Kerr
402201ac39 Fix cppcheck warnings (#11883)
* remove unused variable

* limit scope of variable 'ret'

* pass shared_ptr<SkBitmap> by reference

* silence warning: value reassign before read

* fix oops

* don't refer to 'response' after std::move()ing it

* make the linter happy
2018-02-14 02:21:46 -06:00
shelley vohr
f8b7145c6b update libcc ref (#11916) 2018-02-13 23:13:38 -05:00
Sangjoon Moon
8a84bd8d19 fix typo in electron-versioning.md
- backport
- stabilization branch
- and some typo
2018-02-14 13:04:57 +09:00
shelley vohr
a55fd06aa2 Revert "Merge pull request #11737 from kwonoj/feat-cache-capacity" (#11906)
This reverts commit 181169b743, reversing
changes made to baced3152f.
2018-02-13 10:49:27 -05:00
Cheng Zhao
eba9abdbe5 Merge pull request #11501 from emmkimme/Enh_WebPrefs_Affinity_Option
Feature : Affinity option for gathering several pages in a single process
2018-02-13 16:21:48 +09:00
Cheng Zhao
affa21600c Remove unnecessary methods on WebContentsPreferences 2018-02-13 15:57:54 +09:00
Cheng Zhao
2b623f5d86 docs: More explaination to affinity option 2018-02-13 15:33:11 +09:00
Emmanuel Kimmerlin
9c1b47361f Add an "affinity" option to webPreferences 2018-02-13 15:18:55 +09:00
John Eismeier
8d55334016 Propose fix some typos (#11905) 2018-02-13 00:18:27 -05:00
John Kleinschmidt
546bd6da5e Merge pull request #11903 from electron/update-release-for2
Change release process for 2.0
2018-02-12 16:52:41 -05:00
Felix Rieseberg
4ed5bb9901 fix: Update touch bar type documentation (#11563)
* fix: Update touch bar type documentation

Tiny change: The `escapeItem` in the touch bar constructor accepts a `null`, but our typings do not reflect that.

* Also uppdate the escapeItem instance property type docs
2018-02-12 14:59:01 -05:00
Samuel Attard
9bd7d53cf8 Handle empty handles (#11598)
* Handle empty handles

* Close and dispose window at end of void test

* Dispose of existing window before running void 0 spec
2018-02-12 14:46:29 -05:00
John Kleinschmidt
12a8d90ef0 Change release process for 2.0
Tag release as soon as version bumps
No longer use release branch
Remove merge step as it is no longer needed.
2018-02-12 14:06:09 -05:00
Samuel Attard
181169b743 Merge pull request #11737 from kwonoj/feat-cache-capacity
feat(webframe): export set cache capacity interface
2018-02-13 06:02:25 +11:00
Samuel Attard
baced3152f Mark securityScopedBookmarks as optional and a boolean (#11901) 2018-02-12 13:48:45 -05:00
Samuel Attard
ae65938752 Fix frameless windows with vibrancy (#11886) 2018-02-12 13:38:37 -05:00
acheronfail
d1d50a4c92 Implement App-Scoped Security scoped bookmarks (#11711)
* implementation of security scoped bookmarks

* option is now only available on mas builds
2018-02-12 13:25:06 -05:00
Samuel Attard
9f78ef0179 Merge pull request #11595 from YurySolovyov/fileicon-task-scheduler
Use task scheduler for app.getFileIcon API
2018-02-13 05:11:22 +11:00
Samuel Attard
01dcddef35 Merge pull request #11819 from kwonoj/feat-worditerator
feat(worditerator): bump up worditerator into latest
2018-02-13 05:11:01 +11:00
Samuel Attard
b3234f634b Add ability to set arbitrary arguments in a renderer process (#11850) 2018-02-12 11:54:31 -06:00
Samuel Attard
66b57858b8 Fix child touch bar items not updating (#11812)
* Fix child touch bar items not updating

Deep children of a TouchBar didn't cause the top level touch bar to update, now they do

Fixes #11761.

* Remove unused newValue property in TB setter
2018-02-12 12:53:04 -05:00
shelley vohr
6943ada7e8 Merge pull request #11897 from electron/fix-contrib-links
add links to new contrib docs
2018-02-12 12:48:47 -05:00
John Kleinschmidt
e6ac2637d3 Merge pull request #11728 from brenca/osr-gpu-update-master
Improve OSR API (master)
2018-02-12 12:29:11 -05:00
shelley vohr
fae71f9987 Merge pull request #11880 from nitsakh/better-ipc-logging
Add ability to log atom ipc messages
2018-02-12 09:20:37 -05:00
Shelley Vohr
8987828ecd add links to new contrib docs 2018-02-12 09:16:29 -05:00
shelley vohr
533dfc42a8 enhance documentation around contributing to electron (#11887)
* add issues document

* add documentation coding style to doc

* copyediting

* replace `nodejs/node` with `electron/electron`
* fix commasplice
* fix two most important... s/is/are/
* omit unnecessary words

* add pull requests doc

* copyediting

* add general code style to styleguide

* updates to CONTRIBUTING.md

* copyediting

* mark shell blocks as ```sh
* mitigate phrase duplication e.g. 'best practice'
* lots of opinionated changes to omit unnecessary words

* fix numbering & re-apply changes that I overwrote
2018-02-12 08:09:38 -06:00
shelley vohr
31e0bc02ba add pr template (#11888) 2018-02-12 08:08:32 -06:00
universeroc
069c6187cf Fix #11893 Remove unused member variable content_client_ (#11894) 2018-02-12 08:07:12 -06:00
Nitish Sakhawalkar
e19e2b9242 Address review comments 2018-02-11 10:25:11 -08:00
shelley vohr
647f0f3a57 Merge pull request #11873 from electron/add-file-format-picker
add accessory view for format picker
2018-02-10 23:32:08 -05:00
Shelley Vohr
36cf548114 change weak ptr ref to strong 2018-02-10 21:04:26 -05:00
shelley vohr
1657c37761 Merge pull request #11881 from electron/update-zoom-level-doc
add formula to setZoomLevel doc
2018-02-10 09:08:59 -05:00
Zhuo Lu
e3b70dd029 Fix grammar 2018-02-10 03:20:20 -08:00
Zhuo Lu
d05791c1ac Tweak wording 2018-02-10 03:20:20 -08:00
Zhuo Lu
bf11b09d35 Mention change of default value scenario in doc 2018-02-10 03:20:20 -08:00
Zhuo Lu
69e65e0d5e Update NotificationAction doc 2018-02-10 03:20:20 -08:00
Zhuo Lu
0b7a629a41 Overload method for naming consistency 2018-02-10 03:20:20 -08:00
Zhuo Lu
75b990faff Use std::string::empty to check 2018-02-10 03:20:20 -08:00
Zhuo Lu
1e1087abbb Simplify formatting 2018-02-10 03:20:20 -08:00
Zhuo Lu
31baafab3b NSUserNotification should respond
NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9
2018-02-10 03:20:20 -08:00
Zhuo Lu
3ee3e9a3e8 Fix typo 2018-02-10 03:20:20 -08:00
Zhuo Lu
09d51f0a3d Fix include order 2018-02-10 03:20:20 -08:00
Zhuo Lu
844ee0a3f4 Accept additional notification actions
Change to the existing API definition: The first action with type `button` seen will be displayed on the notification, the rest listed as additional actions (shown when holding down on the primary action button)
2018-02-10 03:20:20 -08:00
Zhuo Lu
38d284590f Add Notification tests 2018-02-10 03:19:47 -08:00
Zhuo Lu
29f9929703 Organize code 2018-02-10 03:19:47 -08:00
Zhuo Lu
0d4c6e327f Update Notification API doc 2018-02-10 03:19:47 -08:00
Zhuo Lu
be118d4f13 Make it able to set close button text 2018-02-10 03:19:47 -08:00
Shelley Vohr
5818353ebc add formula to setZoomLevel doc 2018-02-09 23:20:45 -05:00
Shelley Vohr
3085c78bcf implement selectFormat selector 2018-02-09 21:38:21 -05:00
Nitish Sakhawalkar
5194288fce Add ability to log atom ipc messages 2018-02-09 18:01:14 -08:00
Charles Kerr
3710e0e38b make the linter happier 2018-02-09 19:34:37 -06:00
Charles Kerr
4b766d26df make the linter happy 2018-02-09 19:29:32 -06:00
Charles Kerr
3f5ce6d74f fix gtk3 deprecation warnings setting menubar colors 2018-02-09 19:04:59 -06:00
Charles Kerr
b107d3f440 remove icons from messageboxes on gtk
Icons are deprecated in GtkMessageBoxes as of GTK+ 3.12. The GNOME HIG no longer shows icons in example dialogs; see https://developer.gnome.org/hig/stable/dialogs.html.en and https://developer.gnome.org/gtk3/stable/GtkMessageDialog.html
2018-02-09 17:53:02 -06:00
Charles Kerr
ffff400236 fix 'GTK_STOCK_*' deprecation warnings 2018-02-09 17:45:34 -06:00
shelley vohr
647d04cf92 Add brightray to src code structure (#11878)
* add brightray to src code structure

* try new code flag
2018-02-09 13:21:50 -06:00
Charles Kerr
e5eeab6e29 fix 'GTK_STOCK_*' deprecation warnings 2018-02-09 09:57:39 -06:00
Shelley Vohr
0fff336481 add accessory view for format picker 2018-02-09 09:08:04 -05:00
Aleš Pergl
efb44050db Enable official build (#11847)
* Updated libchromiumcontent submodule

* Use same LTO settings as libcc

* Use whole program optimization, favour speed, remove redundancies

* Don't use variable template as it confuses LTCG

* Use lld and ThinLTO only on limited set of architectures
2018-02-08 13:26:23 -06:00
shelley vohr
8b9b1e5595 Merge pull request #11863 from electron/move-locale-test
Move locale doc to command line switches
2018-02-08 14:10:19 -05:00
Shelley Vohr
1e090b9ee7 remove .only 2018-02-08 13:50:44 -05:00
Shelley Vohr
f6d389b159 fix child process import 2018-02-08 13:50:19 -05:00
Shelley Vohr
e10b5e13e9 move spec to chromium_spec 2018-02-08 13:00:41 -05:00
Shelley Vohr
1018cdc225 move locale doc to command line switches 2018-02-08 11:49:28 -05:00
shelley vohr
ca34978e73 add app.setLocale() (#11469)
* infrastructure for setLocale via klang

* add documentation for setLocale

* add test for setLocale

* fix spec

* add spec and update docs

* fix carriage feeds on windows

* SetLocale() sets LC_ALL on Linux

* in SetLocale() on Linux, use g_setenv()

* fix tyop: '#ifdef OSX_POSIX'

* make the linter happy

* improvements from review
2018-02-08 08:26:37 -06:00
Vanessa Yuen
e3f1d90854 Merge pull request #11855 from electron/vanessayuenn-patch-1
Delete `upgradeing-chrome.md`
2018-02-07 17:53:34 +01:00
Vanessa Yuen
4ab13d9e90 Delete upgradeing-chrome.md 2018-02-07 17:11:16 +01:00
OJ Kwon
e869c27041 feat(worditerator): bump up worditerator into latest 2018-02-06 15:31:18 -08:00
Felix Rieseberg
6c6fa3190f Fix PRE_RELEASE_VERSION (on master) (#11844)
* 🔧 Fix PRE_RELEASE_VERSION

* 🔧 Fix spacing

* 🔧 Fix this, but harder
2018-02-06 16:33:51 -06:00
shelley vohr
64f509ea7a Merge pull request #11832 from electron/enable-window
Add API to enable/disable a window
2018-02-06 14:14:45 -05:00
Shelley Vohr
5b901d9f82 revert TOOLKIT_VIEWS check change 2018-02-06 13:34:27 -05:00
John Kleinschmidt
6fd5b168bc Merge pull request #11841 from electron/vanessayuenn-patch-1
Update snapcraft.md
2018-02-06 11:45:14 -05:00
Vanessa Yuen
4685c46b04 Update snapcraft.md
fix super teeny tiny typo 😬
2018-02-06 17:28:40 +01:00
John Kleinschmidt
a0e584efeb Merge pull request #11793 from electron/release-updates
Improvements to release process
2018-02-06 11:12:41 -05:00
Shelley Vohr
3f6d2eb3ab remove extraneous variable 2018-02-06 09:27:30 -05:00
Shelley Vohr
80aa399f8a updates to mac enable method 2018-02-06 09:16:22 -05:00
Shelley Vohr
131aa38768 typo fix 2018-02-06 08:30:33 -05:00
Shelley Vohr
faf08b2b77 add documentation 2018-02-06 08:28:41 -05:00
Shelley Vohr
ae632193c0 migrate to virtual void and start mac impl 2018-02-06 08:21:53 -05:00
Samuel Attard
8c2c7c3634 Merge pull request #11836 from kaylieEB/master
Replace custom function with Object.values()
2018-02-06 15:45:02 +11:00
kaylie
3c64062f69 Replace custom function with Object.values() 2018-02-05 20:03:28 -08:00
Shelley Vohr
97589bbe33 first pass at api method to enable window 2018-02-05 14:49:59 -05:00
shelley vohr
5240352326 Remove extra menu separators (#11827)
* add function to remove leading/trailing separators

* change const  name for clarity

* add spec to check filtered separators

* clean method and add edge case spec per review
2018-02-05 11:55:12 -06:00
shelley vohr
e6a5990b95 Merge pull request #11774 from nitsakh/fix-invalid-utf
Handle invalid utf8 characters for debugger
2018-02-05 12:44:41 -05:00
John Kleinschmidt
e924781ee5 Improvements to release process
1. Prompt user to verify version before version is created.
2. Fix validateRelease instructions and usage
3. Fix ci-release-build so that you don't have to pass in --ghRelease=true; just --ghRelease will work.
2018-02-05 10:57:48 -05:00
Cheng Zhao
42fa018277 Merge pull request #11492 from timmyhadwen/master
Fixed Bluetooth chooser bug. Closes #11399
2018-02-05 20:44:42 +09:00
Cheng Zhao
8ac52b418b Coding style fixes 2018-02-05 17:29:59 +09:00
Samuel Attard
9676c0a4f9 Fix build and ensure no breaking change 2018-02-05 17:29:59 +09:00
Cheng Zhao
1c43768104 Coding style fixes 2018-02-05 17:29:59 +09:00
Samuel Attard
87c2f0f14f Fix build and ensure no breaking change 2018-02-05 17:29:59 +09:00
Samuel Attard
5f7a173d1d Add missing header import 2018-02-05 17:29:59 +09:00
Samuel Attard
72464a6db5 Fix implicit appUserModelId set 2018-02-05 17:29:59 +09:00
Cheng Zhao
ab015e573b Merge pull request #11417 from electron/power-monitor-shutdown-event-and-delay-api
[RFC] New API: powerMonitor "shutdown" event
2018-02-05 17:29:31 +09:00
Cheng Zhao
9337959f51 The tryToTerminateApp is not really needed 2018-02-05 16:25:50 +09:00
Cheng Zhao
983e1b1a70 Implement shutdown event for macOS 2018-02-05 16:20:57 +09:00
Cheng Zhao
c470e758cc Remove the AllocateSystemIOPorts call
It is no longer needed and it is crashing.
2018-02-05 16:15:49 +09:00
Cheng Zhao
109e2c760f Do not use virtual function to request shutdown
Would make it easier to port to other platforms.
2018-02-05 15:50:55 +09:00
Cheng Zhao
8ae3d9dd0b Simplify the public PowerObserver interface 2018-02-05 15:28:58 +09:00
Thiago de Arruda
e0e7dd2a8f fixup! Implement powerMonitor 'shutdown' event for Linux. 2018-02-05 15:21:31 +09:00
Thiago de Arruda
176c03fa15 Add doc for powerMonitor shutdown event 2018-02-05 15:21:31 +09:00
Thiago de Arruda
f0e210360f fixup! Implement powerMonitor 'shutdown' event for Linux 2018-02-05 15:21:31 +09:00
Thiago de Arruda
45763c0afb fixup! Implement powerMonitor 'shutdown' event for Linux 2018-02-05 15:21:31 +09:00
Thiago de Arruda
df6328e5d7 Add some tests for powerMonitor "shutdown" event 2018-02-05 15:21:31 +09:00
Thiago de Arruda
56b53e71aa Implement powerMonitor 'shutdown' event for Linux.
The event is emitted when the OS is rebooting/shutting down, and allows
an electron app to call `e.preventDefault()` in order to delay shutdown
and exit cleanly.
2018-02-05 15:21:31 +09:00
Cheng Zhao
28d96e2d29 Merge pull request #11354 from elegos/feature/create-dist-chromium-dir-option
Adds --chromium_dir argument to script/create-dist.py
2018-02-05 15:08:57 +09:00
Pranjal
732af93fc9 Updated for arm and armv7l documentation (#11825)
* Updated for arm and armv7l documentation

Cleared up the confusion caused by arm or armv7l  mentioned somewhere and not mentioned elsewhere

* 📝 Improve wording a bit.
2018-02-04 18:29:19 -07:00
Felix Rieseberg
d586ef2f39 feature: Hot security tips (#11810)
* 🔧 Add security issue detection (and logs)

* 🔧 Check for it on load

* 👷 Add some tests

* 👷 Make the linter happy

* 🔧 Allow them to be enabled by force

* 📝 Make message slightly prettier

* 🔧 Fix a typo in the code comment

* 🔧 Classic mistake

* 🚀 Optimize things a bit more

* 👷 Add tests, fix tests

* 📝 Document things

* 🔧 Make linter happy

* 🔧 One more piece of cleanup
2018-02-03 07:50:12 -07:00
Nitish Sakhawalkar
62d2a3472f Fix test BrowserWindow.addTabbedWindow() (#11795)
* Fix test BrowserWindow.addTabbedWindow()

* Address review comments
2018-02-02 19:31:02 -07:00
Charles Kerr
bd06abd523 Merge pull request #11806 from electron/security-docs-improvements
docs: Fixs some errors in the security documentation
2018-02-02 07:47:37 -07:00
Zeke Sikelianos
a033a9cd5d Merge pull request #11794 from electron/snapcraft-documentation
Add snapcraft documentation
2018-02-01 19:22:10 -08:00
Nitish Sakhawalkar
e411b49f4e Fix and update debugger UTF char test 2018-02-01 16:47:52 -08:00
Felix Rieseberg
6cf0c56eaf 📝 Some more words 2018-02-01 16:32:58 -08:00
Charles Kerr
714838d65e Merge pull request #11796 from electron/case-insensitive-blacklist
Case insensitive blacklist
2018-02-01 15:51:02 -07:00
shelley vohr
1545a95782 Merge pull request #11799 from electron/browserview-inherit-fix
Don't inherit isBrowserView preference
2018-02-01 14:36:56 -05:00
Felix Rieseberg
ce969c9326 📝 Fix some errors 2018-02-01 09:58:02 -08:00
Felix Rieseberg
be7e46b3fe 📝 A word on strict 2018-02-01 09:47:15 -08:00
Felix Rieseberg
495c6dcff5 📝 Some more words 2018-02-01 09:43:26 -08:00
Charles Kerr
e51c78f10c fix oops
because compiling before pushing is for wusses
2018-01-31 22:25:57 -07:00
Shelley Vohr
db6d84de74 don't inherit isBrowserView for spawned child windows 2018-02-01 00:09:37 -05:00
Charles Kerr
b32a7d4cb4 Merge pull request #11798 from electron/shadowroot-deprecate-fix
Migrate deprecated web-view method
2018-01-31 22:09:33 -07:00
Felix Rieseberg
77dcddf157 📝 Even more words 2018-01-31 17:00:19 -08:00
Felix Rieseberg
9d0d83a002 📝 Some more words 2018-01-31 16:57:45 -08:00
Felix Rieseberg
45119845e8 📝 Callout forge/builder as easiest 2018-01-31 16:56:46 -08:00
Felix Rieseberg
311c0873db 📝 Link to the guide 2018-01-31 16:54:23 -08:00
Felix Rieseberg
1184eca581 🔧 Fix various typos, implement feedback 2018-01-31 16:52:38 -08:00
Charles Kerr
1106cde687 fix oops 2018-01-31 17:40:11 -07:00
Charles Kerr
09a2c80443 use std::binary_search to search switch blacklist 2018-01-31 17:36:06 -07:00
Charles Kerr
8405fe763e Make a copy-paste recipe for rebuilding the blacklist 2018-01-31 17:35:34 -07:00
Samuel Attard
ce361a12e3 Use case-insensitive switch comparisons 2018-01-31 17:35:09 -07:00
Shelley Vohr
b74304145e createShadowRoot => attachShadow 2018-01-31 19:29:23 -05:00
Felix Rieseberg
b49a284ccf 📝 Add snapcraft documentation 2018-01-31 16:01:38 -08:00
John Kleinschmidt
278c58055e Merge pull request #11776 from electron/parallel-releases
Allow multiple releases to run at once
2018-01-31 13:14:09 -05:00
John Kleinschmidt
7e9131d82b Allow multiple releases to run at once
Find draft release by draft flag and tag name
2018-01-30 17:35:16 -07:00
Charles Kerr
67196bdd3e Merge pull request #11770 from electron/security-documentation
Enhance security documentation
2018-01-30 15:03:43 -07:00
shelley vohr
f24eab74d8 Merge pull request #11726 from electron/faster-compare-blacklist
Make use of sorted list to speed up searching
2018-01-30 09:46:38 -05:00
Felix Rieseberg
93dc38a17b 👷 Put ESLint's mind at ease 2018-01-29 16:27:41 -08:00
Felix Rieseberg
d8d19baad3 ❤️ Even more feedback 2018-01-29 16:02:39 -08:00
Felix Rieseberg
1e1729adad ❤️ More feedback 2018-01-29 16:01:05 -08:00
Zeke Sikelianos
aea06ed95f Merge pull request #11758 from nicknish/nn/fix-typo-remote-api-docs
Fix typo in remote api docs
2018-01-29 14:33:16 -08:00
Felix Rieseberg
8f685e9329 👷 Linter errors 2018-01-29 12:36:51 -08:00
Felix Rieseberg
8804b09188 ❤️ Implement @zeke’s feedback 2018-01-29 12:34:46 -08:00
Felix Rieseberg
536ff0b7e2 👷 Fix failed test 2018-01-29 11:29:15 -08:00
Felix Rieseberg
fb8606dd0c 📝 General cleanup 2018-01-29 11:19:43 -08:00
Felix Rieseberg
c4dc8dacbf 📝 Context Isolation 2018-01-29 11:19:21 -08:00
Felix Rieseberg
4cb22dd2ff 📝 allowpopups 2018-01-29 11:04:02 -08:00
Felix Rieseberg
cdb20d2692 🔧 WebSecurity 2018-01-29 11:03:51 -08:00
Felix Rieseberg
7e79ae750f 📝 Blink Features 2018-01-29 11:03:38 -08:00
Felix Rieseberg
39e0efd9a4 📝 Experimental Features 2018-01-29 11:03:27 -08:00
Felix Rieseberg
e73f142adc 📝 allowRunningInsecureContent 2018-01-29 11:03:06 -08:00
Felix Rieseberg
5418866e87 📝 eval() 2018-01-29 11:02:52 -08:00
Felix Rieseberg
c793ee3aeb 📝 Content Security Policy 2018-01-29 11:02:30 -08:00
Felix Rieseberg
a5c900ac7a 📝 Context Isolation 2018-01-29 11:01:22 -08:00
shelley vohr
12d4f984f3 Merge pull request #11754 from electron/menu-events
Add and document menu events
2018-01-29 12:40:57 -05:00
Felix Rieseberg
f790c24c27 📝 Verify WebView creation 2018-01-28 18:19:49 -08:00
Felix Rieseberg
d67c64b6fa 📝 Disable Node Integration 2018-01-28 17:25:05 -08:00
Felix Rieseberg
2db125890c 📝 Secure content 2018-01-28 16:55:11 -08:00
Felix Rieseberg
601fbc8731 📝 Link to security tutorial 2018-01-28 16:54:58 -08:00
Shelley Vohr
c886803d0f change doc to show working on all platforms 2018-01-28 18:57:44 -05:00
Shelley Vohr
a9dd4c927d update menu docs description string 2018-01-28 13:59:53 -05:00
nicknish
30581f78a2 📝 Fix typo in remote api docs [ci skip] 2018-01-28 04:37:13 +08:00
Shelley Vohr
3d032c2b57 forgot to remove .only from spec 2018-01-27 12:38:55 -05:00
Shelley Vohr
3679a9c37a fix event callback placement in spec 2018-01-27 12:36:51 -05:00
Shelley Vohr
e81265bc7f add documentation for new menu events 2018-01-27 11:28:42 -05:00
Shelley Vohr
e345342e36 add first pass at menu event specs 2018-01-27 11:23:46 -05:00
Shelley Vohr
bef4c84799 turn class into observer 2018-01-27 10:40:50 -05:00
Shelley Vohr
3399480304 first pass at menu event emission 2018-01-27 09:35:58 -05:00
Samuel Attard
b0a1575bb7 Merge pull request #11747 from timfish/patch-1
CrashReport structure in docs does not match API output
2018-01-27 23:24:43 +11:00
Tim Fish
e3383c82d1 CrashReport structure does not match API output
Electron 1.7

Docs:
```typescript
  interface CrashReport {
    date: string;
    ID: number;
  }
```
Actual output of `getLastCrashReport`:
```javascript
{ 
  date: 2018-01-26T21:50:05.000Z,
  id: '989d0469-9eb7-4f70-ba58-3425bc6ffa3b' 
}
```
2018-01-27 12:21:09 +01:00
OJ Kwon
1ab92f7866 docs(webframe): reword api instructions 2018-01-26 10:58:25 -08:00
OJ Kwon
690a9e9483 test(webframe): add basic test case 2018-01-26 10:57:52 -08:00
OJ Kwon
004c9427eb docs(webframe): add interface instruction 2018-01-26 10:57:52 -08:00
Heilig Benedek
df3d94b20d Remove web_contents_impl() helper to clarify code and remove unnecessary guard 2018-01-26 10:30:20 +01:00
OJ Kwon
d172e29270 feat(webframe): export set cache capacity interface 2018-01-25 20:43:01 -08:00
Heilig Benedek
406f171c88 Move OSR api to OsrWCV to allow api calls to take effect sooner 2018-01-25 16:11:56 +01:00
Heilig Benedek
1a8916ed47 Call SetAuthoritativeVsyncInterval on the Compositor directly 2018-01-25 16:11:44 +01:00
Heilig Benedek
099bbfbafb Raise maximum OSR framerate to 240 2018-01-25 16:11:31 +01:00
Heilig Benedek
304fd49e84 Don't generate a frame with GPU OSR if IsPainting is false 2018-01-25 16:11:22 +01:00
Heilig Benedek
708cde92cf Don't generate a paint when StartPainting is called inside paint cb 2018-01-25 16:11:12 +01:00
Heilig Benedek
17d85318c3 Use null accelerated widget to avoid showing GPU accelerated OSR surface 2018-01-25 16:10:38 +01:00
Cheng Zhao
b5d5eca224 Make use of sorted order to speed up searching 2018-01-25 14:42:56 +09:00
Cheng Zhao
b9c0bab8f1 Merge pull request #11704 from brenca/fix-10678
Remove WS_EX_COMPOSITED style from window (master)
2018-01-24 14:44:52 +09:00
Cheng Zhao
0207aebad1 Merge pull request #11664 from loc/use_directx_capturer_win
Use same screen capturer settings for thumbnails as getUserMedia
2018-01-24 14:38:32 +09:00
Aleš Pergl
868e792572 Make run-as-node mode optional (#11701) 2018-01-23 18:17:15 -05:00
shelley vohr
19a5ebce66 update submodule ref for updated node (#11706) 2018-01-23 18:14:04 -05:00
shelley vohr
4757980f9c add license file to npm publish (#11705) 2018-01-23 18:09:08 -05:00
Heilig Benedek
50690d25f1 Remove WS_EX_COMPOSITED style from window 2018-01-23 20:14:34 +01:00
Aleš Pergl
39554566cc Allow IO while constructing an absolute path (prevents DCHECK failure) (#11697) 2018-01-23 10:25:01 -05:00
Aleš Pergl
c49cb29ddf Disallow launching unknown apps via browser client.
CVE-2018-1000006
2018-01-22 16:49:30 -06:00
Samuel Attard
32a1395bcf Merge pull request #11565 from electron/add-load-file-helper
Add window.loadFile and webContents.loadFile helper methods
2018-01-23 09:08:23 +11:00
Shelley Vohr
365fe6b067 fix code fence lint failure 2018-01-22 12:41:46 -05:00
Felix Rieseberg
8a4c76d655 docs: Document custom installation (#11640)
* 📝 Document custom installation

* ❤️ Implement feedback

* 🔧 Fix linting errors
2018-01-19 16:33:36 -05:00
Nitish Sakhawalkar
2b4cc0a525 Fix macos Full Screen Toggle menu item label (#11633) 2018-01-19 09:27:36 -05:00
Charles Kerr
d0af17e601 Merge pull request #11644 from brenca/tooltip-fix-master
Explicitly hide tooltip when the window is deactivated (master)
2018-01-18 23:35:06 -06:00
Ryan Baxley
8387d92cd5 Update CONTRIBUTING.md with link to development docs (#11529)
* Update CONTRIBUTING.md with link to development docs

[ci skip]

* Use relative link to development documentation

[ci skip]
2018-01-18 21:29:10 -05:00
Heilig Benedek
f36fda3f5d don't dereference tooltip_controller if it's null 2018-01-18 20:35:19 +01:00
Heilig Benedek
8d8b8c590d update calls to use new namespaces 2018-01-18 15:23:38 +01:00
Heilig Benedek
5e198d9dc6 add todo comment 2018-01-18 15:23:38 +01:00
Heilig Benedek
8233890e39 lint fix 2018-01-18 15:23:38 +01:00
Heilig Benedek
c6c618acdb explicitly hide tooltip on window deactivation 2018-01-18 15:23:38 +01:00
Andy Locascio
ae65c26469 fix lint 2018-01-17 17:04:57 -08:00
Andy Locascio
8253e50e9c use same settings for screen thumbnails as chrome does webrtc capturing
Following along from http://crrev.com/2961193002: make sure the
thumbnail capturers initialize with the same settings as the capturer
from a getUserMedia request does. Otherwise, there is no guarentee that the
sources on Windows will match.
2018-01-17 15:55:10 -08:00
John Kleinschmidt
ea1da93e5e Merge pull request #11662 from electron/fix-ia32-testing-for-forks
Set DISPLAY variable for xvfb
2018-01-17 13:47:41 -05:00
John Kleinschmidt
565946cdff Set DISPLAY variable for xvfb
PRs submitted from forks need this value for xvfb to run properly.
2018-01-17 12:57:42 -05:00
shelley vohr
4f0e1826e5 properly check checkbox state on callback (#11658) 2018-01-17 08:51:49 -05:00
Cheng Zhao
4dab824c6b Merge pull request #11625 from nitsakh/mac-terminate
Change macos app termination process
2018-01-17 16:28:56 +09:00
Nitish Sakhawalkar
ea2056b513 Replace arrow function 2018-01-17 15:27:11 +09:00
Nitish Sakhawalkar
7aefc73ffd Fix lint 2018-01-17 15:27:11 +09:00
Nitish Sakhawalkar
28f1abcb05 Change macos app termination process 2018-01-17 15:27:11 +09:00
Cheng Zhao
d69c17a96a Merge pull request #11656 from electron/update-gyp
Update gyp: Add Visual Studio 2017 support
2018-01-17 11:43:46 +09:00
Cheng Zhao
b45ce8ff2d Update gyp: Add Visual Studio 2017 support 2018-01-17 10:19:02 +09:00
John Kleinschmidt
a6d3dee321 Removing core dump check (#11621)
It appears that the arm build failing with a core dump is a false positive.  Testing the latest arm build from master on a raspberry pi 2, it does not core dump.
2018-01-13 23:02:10 -05:00
Tiago Danin
74769da9a7 [Docs] Fix URLs and Paths (#11584)
* Fix URLs and Paths in docs/

* Avoiding link break to /docs/development/updgrading-chrome.md

* Fix URLs and Paths in docs/ #2

* Removed double spaces in docs
2018-01-12 10:24:48 -05:00
Charles Kerr
fa43cb6ef0 Merge pull request #11557 from josimi/master
Fixes hexColorDWORDToRGBA for transparent colors
2018-01-11 10:28:53 -06:00
Lee Dohm
f5962538f4 Merge pull request #11545 from m1guelpf-forks/patch-1
Update license year
2018-01-10 09:19:12 -08:00
Cheng Zhao
fce84fbe99 Merge pull request #11292 from AdrienFery/in-app-purchase
Add in-app purchase for MacOS
2018-01-10 19:42:03 +09:00
Cheng Zhao
bd271cffb9 Throw when inAppPurchase is used on unsupported platforms 2018-01-10 18:53:55 +09:00
Cheng Zhao
a883d3d50d Fix build on other platforms 2018-01-10 17:39:16 +09:00
Cheng Zhao
839df0ee5a Remove observer on cleanup 2018-01-10 17:30:30 +09:00
Cheng Zhao
6d9c6645a8 Add inAppPurchase to docs index 2018-01-10 17:25:04 +09:00
Cheng Zhao
e77ddd3221 Pass multiple transactions at the same time
This follows the design of SKPayment API.
2018-01-10 17:19:44 +09:00
Cheng Zhao
2dd545ebda Payment should be part of Transaction
This follows The SKPayment API, and makes our JS wrappers easier to
implement.
2018-01-10 17:06:27 +09:00
Cheng Zhao
635b753ecd No need for SKPaymentTransactionState prefix for states 2018-01-10 16:59:17 +09:00
Cheng Zhao
133bef3deb Turn addTransactionListener into transaction-updated event 2018-01-10 16:57:52 +09:00
Cheng Zhao
ac6f895f64 Turn InAppPurchase into an EventEmitter 2018-01-10 16:37:05 +09:00
Cheng Zhao
400bfb3c5a mac: SKProductsRequest should be freed on end 2018-01-10 15:29:32 +09:00
Cheng Zhao
bdeb979d41 spec: Simple tests for inAppPurchase module 2018-01-10 15:21:53 +09:00
Cheng Zhao
5f1c76c688 Reorgnize the platform-specific files 2018-01-10 14:45:42 +09:00
Adrien Fery
b2542a27c3 Update code style 2018-01-10 13:14:18 +09:00
Adrien Fery
d32632f768 Update filenames.gypi 2018-01-10 13:14:18 +09:00
Adrien Fery
eb2520488f Adapt code style 2018-01-10 13:14:18 +09:00
Adrien Fery
329fddaed1 Put in-app purchase files under macOS check 2018-01-10 13:14:18 +09:00
Adrien Fery
f3ae566164 Add in-app purchase for MacOS 2018-01-10 13:14:18 +09:00
Cheng Zhao
143816bee1 Merge pull request #11272 from syntropy-ai/1-7-x
Removed tracking area for tray to prevent mouse leave race condition crash
2018-01-10 13:13:10 +09:00
Matt Way
5504294a6a Replaces tracking removal with proper mem management 2018-01-10 10:24:37 +09:00
Matt Way
8df4402722 removed unnecessary braces 2018-01-10 10:24:13 +09:00
Matt Way
638d8219c4 Removed tracking area when removing icon to prevent mouse exit race condition crash 2018-01-10 10:24:11 +09:00
Jonathon Simister
9c018744f4 Fixes hexColorDWORDToRGBA for transparent colors 2018-01-09 11:07:29 -08:00
John Kleinschmidt
83b351a8fd Merge pull request #11487 from electron/circleci-cross-arch-testing
Add testing for arm, arm64 and ia32 linux builds
2018-01-08 11:01:55 -05:00
Yury Solovyov
49844b6e5b Move the IconLoader to use the task scheduler.
This follows https://codereview.chromium.org/2953633002
2018-01-08 13:21:22 +03:00
Yury Solovyov
b3743058c0 Make gfx::Image instance a local variable.
This follows https://codereview.chromium.org/2709683002
2018-01-08 12:47:25 +03:00
Cheng Zhao
c1d68974ab Merge pull request #11589 from electron/fix-accelerator-problem
Update libcc: Fix Shift not showing  in menu for certain accelerators
2018-01-08 16:15:28 +09:00
Cheng Zhao
f201969f12 Update libcc: Fix Shift not showing
Fix the Shift key not showing in menu for certain accelerators like
Control+Shift+F.
2018-01-08 12:33:43 +09:00
Cheng Zhao
4298aecb7c Merge pull request #11547 from electron/draggable_regions_patch
fix: draggable region ipc should be frame based
2018-01-07 21:15:50 +09:00
Zeke Sikelianos
4e328a2a08 Merge pull request #11481 from teiles/master
docs: change getBlobData return type from Blob to Buffer
2018-01-05 20:43:26 -08:00
Zeke Sikelianos
33da3153b6 Merge pull request #11538 from TiagoDanin-Forks/MD-PATH
Doc update: New path for web-contents.md
2018-01-05 08:43:08 -08:00
Zeke Sikelianos
c272a18204 Merge pull request #11428 from TechnicalSoup/patch-1
docs: specify string values for DownloadItem
2018-01-05 08:42:10 -08:00
Zeke Sikelianos
aeffef766a Merge pull request #11420 from joeydlee95/master
 Add test to check for relative links in docs
2018-01-05 08:39:34 -08:00
Charles Kerr
435c9c1486 Force uv loop cleanup (#11465)
* ensure all uv handles are closed before ending worker's loop

* add DCHECK to test that the Worker loop is finished

* don't call deprecated uv_loop_new(), uv_loop_delete()

* make cpplint happy

* fix comment error

* empty commit for CI

* tweak DCHECK expression

* extract-method: stop_and_close_uv_loop()

* fix DCHECK oops
2018-01-04 11:16:06 -08:00
Zeke Sikelianos
eb89e12c5b Merge pull request #11532 from sethlu/camelcase-menuitem-role
Make MenuItem roles camelCase-compatible
2018-01-04 09:53:58 -08:00
Cheng Zhao
6bc7c8cc49 Merge pull request #11396 from electron/enable_base_dchecks
fix: enable additional dchecks
2018-01-04 21:19:12 +09:00
Cheng Zhao
9bd192ea17 Update libcc to latest 2018-01-04 16:14:01 +09:00
Zhuo Lu
df841fa397 Revert changes made to test case
The MenuItem role should be lowercase
2018-01-04 14:38:58 +08:00
Samuel Attard
1553b54779 Add window.loadFile and webContents.loadFile helper methods 2018-01-04 11:38:56 +13:00
Cheng Zhao
1ff872519c posix: Fix assertion when freeing ProcessSingleton 2018-01-03 19:47:01 +09:00
Cheng Zhao
1072c75e38 Closing asar file should be syncronous 2018-01-03 19:12:16 +09:00
Cheng Zhao
fb78052b3d Remove unnecessary scope 2018-01-03 19:10:48 +09:00
Cheng Zhao
104585e772 Do not create DIR_USER_DATA on IO thread
It would slowdown the startup time of apps since we have wait for two
message posts between threads.
2018-01-03 19:07:24 +09:00
Cheng Zhao
952928dc79 Singleton must be created on request
The creation of singleton relies on the `userData` dir, which can be
changed by user, we have to ensure singleton uses the `userData` dir set
by user.
2018-01-03 18:59:12 +09:00
Cheng Zhao
0cce6b3d21 Fix cpplint warning 2018-01-03 17:32:18 +09:00
Cheng Zhao
d6068759b6 win: Fix assertion when creating Notification 2018-01-03 17:25:19 +09:00
TechnicalSoup
0ea296b1cb docs: specify string values for DownloadItem
Explicitly list the possible string return values for the updated and done events so that the typescript declaration file can model them more accurately. At present they are represented as a string type.

Fixes : https://github.com/electron/electron-typescript-definitions/issues/71
2018-01-03 13:34:19 +11:00
deepak1556
14de22a8c7 Use cached application locale as default for generating accept-lang header 2018-01-02 17:33:46 +05:30
deepak1556
cbc433d4cb update libcc to fix DCHECK errors in ui::clipboard on windows 2018-01-02 16:32:07 +05:30
Cheng Zhao
de93b30d3c win: Fix assertion when getting exe version 2018-01-02 17:02:12 +09:00
Cheng Zhao
82452e7924 win: Fix assertion when getting printers 2018-01-02 16:54:36 +09:00
Cheng Zhao
7bf156d197 win: Fix assertion "IsWprintfFormatPortable(format)" 2018-01-02 16:45:43 +09:00
deepak1556
7b9dd81018 update libcc for macOS render widget dcheck crash fix 2018-01-02 16:37:12 +09:00
deepak1556
b9ace16959 update libcc for using custom platform with gin 2018-01-02 16:37:12 +09:00
deepak1556
769fbd0d3b REVIEW: register BrowserChildProcessObserver once main message loop is ready 2018-01-02 16:37:11 +09:00
deepak1556
1b30cac372 Don't delay node module initialization 2018-01-02 16:37:11 +09:00
Cheng Zhao
1043f07b42 Fix compilation on Windows 2018-01-02 16:37:11 +09:00
deepak1556
237bd6790b FIXME: allow IO access on main thread for crash reporter 2018-01-02 16:37:11 +09:00
deepak1556
abe1faea5c REVIEW: setup request context for NSS OCSP only once 2018-01-02 16:37:11 +09:00
deepak1556
e3a56240c9 REVIEW: fix base::File helper usage on incorrect task sequence 2018-01-02 16:37:10 +09:00
deepak1556
fd297722a8 Note about incorrect usage of blink::SchemeRegistry methods 2018-01-02 16:37:10 +09:00
deepak1556
73919ea91a update libcc 2018-01-02 16:37:10 +09:00
deepak1556
d27744f455 Some blink::WebSecurityPolicy methods should be invoked before other render threads are created 2018-01-02 16:37:10 +09:00
deepak1556
0df464e16a address review comments 2018-01-02 16:37:09 +09:00
deepak1556
ee80313666 opt into location service on main thread 2018-01-02 16:37:09 +09:00
deepak1556
d29c27dc78 REVIEW: obtain mime type from file path only on IO allowed sequence 2018-01-02 16:37:09 +09:00
deepak1556
e072213923 FIXME: dbus ObjectProxy methods should only be invoked on IO allowed sequence 2018-01-02 16:37:09 +09:00
deepak1556
a1592446da REVIEW: access GetApplicationLocale on sequence that allows IO 2018-01-02 16:37:08 +09:00
deepak1556
1912fbb073 reenable some specs 2018-01-02 16:37:08 +09:00
deepak1556
69bd44edbb REVIEW: add render process lifecycle observer only once 2018-01-02 16:37:08 +09:00
deepak1556
ebb0e46380 REVIEW: create AtomNetworkDelegate on the IO thread 2018-01-02 16:37:08 +09:00
Cheng Zhao
b2cef31bc0 Revert "Fix race condition when calling JsAsker::BeforeStartInUI"
This reverts commit 37317d74adb53afdcb22c85f2d3987fbae290ac7.
2018-01-02 16:37:08 +09:00
Cheng Zhao
6d9b186fa7 Fix race condition when calling JsAsker::BeforeStartInUI 2018-01-02 16:37:07 +09:00
deepak1556
e30131f30b Initialize isolate holder in standalone node mode 2018-01-02 16:37:07 +09:00
deepak1556
88e53b1b5e REVIEW: destroy process singleton on sequence where IO is allowed 2018-01-02 16:37:07 +09:00
deepak1556
c3154d86e0 FIXME: disable some specs 2018-01-02 16:37:07 +09:00
deepak1556
1d95241185 FIXME: refactor and remove usage of ScopedAllowIO where possible 2018-01-02 16:37:06 +09:00
deepak1556
90acb22a58 dont use UI methods on IO thread 2018-01-02 16:37:06 +09:00
deepak1556
a518c5c3c4 derefence weak ptr only on the same sequence runner it was created in 2018-01-02 16:37:06 +09:00
deepak1556
fedf1d889b handle NaN conversion from V8 2018-01-02 16:37:06 +09:00
deepak1556
db156865e7 pref store needs to be loaded on a thread that allows IO 2018-01-02 16:37:06 +09:00
deepak1556
b4e6516ad8 fix dcheck failure with invalid UTF8 string conversion for base::Value 2018-01-02 16:37:05 +09:00
deepak1556
5c25855ac5 create user data dir on thread that allows IO 2018-01-02 16:37:05 +09:00
Cheng Zhao
249bd41e11 Merge pull request #11546 from electron/menu-callback
Add callback parameter for Menu.popup
2018-01-02 16:20:58 +09:00
deepak1556
99e26b8318 fix: draggable region ipc should be frame based 2018-01-01 22:54:02 +05:30
Cheng Zhao
d04ae88426 The RenderWidgetHostView might not be available when showing menu 2018-01-01 19:37:59 +09:00
Cheng Zhao
bc61f2eafa Copy the callback instead of reference
I don't really see how this could be a problem, likely a bug of VS 2017?
2018-01-01 19:37:59 +09:00
Cheng Zhao
46330ac2a9 Remove the closed event of Menu
The callback of Menu.popup does more things, and there is actually no
request for the closed event.
2018-01-01 17:22:07 +09:00
Cheng Zhao
73d78d345a Make callback work for old-style Menu.popup call
While the old-style Menu.popup has been deprecated, it is still being
used widely in apps and even in Electron itself.
2018-01-01 17:17:01 +09:00
Cheng Zhao
2ec3b8ce76 spec: callback for Menu.popup 2018-01-01 16:56:22 +09:00
Cheng Zhao
c3eadd5b63 mac: Call callback when menu is programmely closed 2018-01-01 16:49:25 +09:00
Cheng Zhao
9c6aa9ce90 docs: callback of Menu.popup 2018-01-01 16:42:23 +09:00
Cheng Zhao
7b01a8b860 Add callback parameter to Menu.popup 2018-01-01 16:26:19 +09:00
Cheng Zhao
2e3d940749 Fix "test.py -g Menu" not working 2018-01-01 15:46:39 +09:00
Cheng Zhao
d7bc127c60 mac: Correctly close popup menu 2018-01-01 15:40:15 +09:00
Miguel Piedrafita
46121da765 Update license year 2018-01-01 00:51:40 +01:00
Zhuo Lu
b8ec84c761 Fix syntax 2018-01-01 02:23:32 +08:00
Tiago Danin
e9121936e8 Doc Update: New path for web-contents.md 2017-12-28 18:22:30 -02:00
Felix Rieseberg
5f4b62b6c8 feat: Allow testing of single spec modules (#11409)
* 🔧 ES6 for the spec

* 👷 Allow testing of single modules

* ❤️ Implement feedback

* 📝 Add a testing doc

* 📝 Link to it

* 📝 Cleanup
2017-12-28 06:18:33 -05:00
Zhuo Lu
d45914c3f7 MenuItem roles camelCase-compatible 2017-12-28 13:28:20 +08:00
Cheng Zhao
a161f6e368 Merge pull request #11527 from electron/fix-buffer-crash-master
master: Fix crash when using crypto module
2017-12-27 21:45:32 +09:00
Cheng Zhao
e45a125f65 Update node: Fix crash when doing crypto operation 2017-12-27 20:37:04 +09:00
Cheng Zhao
75ac7d9ff2 spec: Add test for crypto operation 2017-12-27 20:37:04 +09:00
Charles Kerr
0cafc3cf52 Merge pull request #11511 from HayateLaTech/patch-1
Update browser-window.md
2017-12-22 09:05:38 -06:00
Cheng Zhao
fe16e24406 Merge pull request #11510 from electron/gin-use-node-platform
Use Node's V8Platform instead of gin's
2017-12-22 23:40:19 +09:00
HayateLaTech
f2e32791b1 Update browser-window.md 2017-12-22 15:13:12 +01:00
Cheng Zhao
c0c2461245 Do not create duplicate V8Platform in NodeDebugger 2017-12-22 20:29:09 +09:00
Cheng Zhao
00afeaba9a Use Node's V8Platform instead of gin's 2017-12-22 20:29:08 +09:00
Charles Kerr
a0ebde0181 Merge pull request #11504 from kylecorry31/master
Add Support for Pop!_OS GNOME Session
2017-12-21 22:57:54 -06:00
Kyle Corry
5aac091f40 Add Support for Pop!_OS GNOME Session
Similar to this PR: https://github.com/electron/electron/pull/10355 , Pop!_OS suffers from the same problem. Using Ubuntu AppIndicator will not show the icon currently unless the XDG_CURRENT_DESKTOP variable is modified. This commit will add support for pop so that this workaround is not needed. 

Ref: https://github.com/pop-os/pop/issues/84
2017-12-21 14:16:15 -05:00
Cheng Zhao
65871cd567 Merge pull request #11238 from electron/spellchecker_iframe_patch
fix: manually set spellchecker for sub frames
2017-12-21 17:00:01 +09:00
Cheng Zhao
06e1fb923b Merge pull request #11495 from electron/libcc-latency-histogram-macros-patch
win: Correctly close popup menu
2017-12-21 16:59:47 +09:00
Cheng Zhao
7a8864063b mac: Handle the case when closing all menu runners 2017-12-21 15:57:27 +09:00
Cheng Zhao
088042841d win: Correctly close popup menu 2017-12-21 15:26:32 +09:00
Cheng Zhao
459db92052 Merge pull request #11493 from electron/libcc-latency-histogram-macros-patch
Update libcc for latency_histogram_macros.patch
2017-12-21 11:52:53 +09:00
Cheng Zhao
05bd5f456a Update libcc for latency_histogram_macros.patch 2017-12-21 11:20:03 +09:00
Charles Kerr
d3eeb84208 Merge pull request #11466 from electron/cppcheck-diff-mode
add changed-files-only mode to cpplint
2017-12-20 10:55:49 -06:00
John Kleinschmidt
06481b5630 Add testing for arm, arm64 and ia32 linux builds 2017-12-20 11:54:52 -05:00
Cheng Zhao
a6228b97cd Merge pull request #11264 from brenca/flash-menu-fix
Fix flash context menu
2017-12-20 19:37:44 +09:00
Cheng Zhao
e4770c7604 Coding style fixes 2017-12-20 18:48:09 +09:00
deepak1556
83d2917363 fix: manually set spellchecker for sub frames 2017-12-20 12:48:02 +05:30
Heilig Benedek
5bf16c2495 remove async:true from menu tests 2017-12-20 15:41:12 +09:00
Heilig Benedek
ef7357dedc update tests for menu closed event and call cancel on closePopup 2017-12-20 15:40:07 +09:00
Heilig Benedek
14b65467d8 add test for menu closed event 2017-12-20 15:40:07 +09:00
Heilig Benedek
bcef6eb3df document menu closed event and fix styling issue 2017-12-20 15:40:07 +09:00
Heilig Benedek
c586806609 fix flash menu being unresponsive to commands 2017-12-20 15:40:07 +09:00
Cheng Zhao
85ef42d99e Merge pull request #11233 from brenca/devtools-fix
Small devtools fixes
2017-12-20 15:35:09 +09:00
Cheng Zhao
0d9ff95526 Revert "dont change window background after devtools is closed"
This reverts commit fdcac8552f.

We are looking for a better fix.
2017-12-20 15:18:26 +09:00
Heilig Benedek
fdcac8552f dont change window background after devtools is closed 2017-12-20 12:57:02 +09:00
Heilig Benedek
d5ab691fdb fix osr devtools crash introduced during merge 2017-12-20 12:57:02 +09:00
Cheng Zhao
5a9221e1dc Merge pull request #11092 from electron/provide-scheme-with-open-external-request
Give user access to the URL that is attempting to be openExternal'ed
2017-12-20 12:56:00 +09:00
Ted Eiles
5ccfac81ed Reviewed getBlobData source, not return value (void) 2017-12-19 22:21:45 -05:00
Cheng Zhao
b2e6340622 Reduce the number of helpers 2017-12-20 10:49:49 +09:00
Cheng Zhao
4fd8b04329 Better field names for details object 2017-12-20 10:25:31 +09:00
Samuel Attard
4d7b85bd01 Appease the linter 2017-12-20 10:21:38 +09:00
Samuel Attard
98e9311669 Give user access to the URL that is attempting to be openExternal'ed 2017-12-20 10:21:38 +09:00
Cheng Zhao
39ec40b901 Merge pull request #11470 from electron/update-node-upgrade-doc
Update branching steps in upgrading-node.md
2017-12-20 10:08:09 +09:00
Ted Eiles
19f2d42c07 change getBlobData return type from Blob to Buffer, fixes doc and typescript def 2017-12-19 19:52:59 -05:00
Charles Kerr
d36e451301 make IGNORE_FILES more readable 2017-12-19 18:37:02 -06:00
Charles Kerr
0521302940 add atom/node/osfhandle.cc to the do-not-lint list 2017-12-19 17:41:34 -06:00
Charles Kerr
4f533dded3 Revert "fix previously-hidden cppcheck warnings in osfcheck.cc"
This reverts commit 8373e1bf41.
2017-12-19 17:39:03 -06:00
Charles Kerr
2f88e69ed4 fix inconsistent indentation 2017-12-19 16:23:27 -06:00
Charles Kerr
8373e1bf41 fix previously-hidden cppcheck warnings in osfcheck.cc 2017-12-19 16:09:53 -06:00
Charles Kerr
58edfc26ed flake8 --ignore=E111,E121 script/cpplint.py 2017-12-19 16:02:36 -06:00
Charles Kerr
30f8660a20 walk all files in atom/ and brightray/ 2017-12-19 15:57:03 -06:00
Charles Kerr
cab1b81026 give find_files() a filename tester function arg 2017-12-19 15:50:09 -06:00
Charles Kerr
f5f6d99cd7 make file list function names clearer
since they return sets rather than lists, don't use 'list' in the name
2017-12-19 15:40:11 -06:00
Charles Kerr
589c6a5b7e remove unnecessary ignore variable 2017-12-19 15:38:23 -06:00
Charles Kerr
512fb670b4 remove unnecessary changed_files variable 2017-12-19 15:37:41 -06:00
Charles Kerr
b6c16a520a only call cppcheck once 2017-12-19 15:07:11 -06:00
Charles Kerr
6f4e97c53a (copyediting) renumber steps 2017-12-19 09:09:35 -06:00
Charles Kerr
781311aa3c Merge pull request #11431 from electron/notifications-debugging
infra: Allow notifications debugging
2017-12-19 09:06:12 -06:00
Cheng Zhao
c15e2e4d92 Merge pull request #10912 from Ajeey/patch-1
Updated auto-updater.md
2017-12-19 16:22:25 +09:00
Cheng Zhao
5d86da48c7 The missing : 2017-12-19 15:44:58 +09:00
Cheng Zhao
4dee778212 Clearer wording 2017-12-19 15:39:57 +09:00
Ajey Charantimath
8953042ee3 Updated auto-updater.md
Missing documentation on the issue https://github.com/electron/electron/issues/10903
2017-12-19 15:33:13 +09:00
Cheng Zhao
90582dfa4f Merge pull request #11154 from electron/update-release-doc
Update release process for API invoked release builds
2017-12-19 15:30:51 +09:00
Cheng Zhao
81527b71ba Merge pull request #11279 from sethlu/openrecent
Update submenu's title at replacement
2017-12-19 15:28:02 +09:00
Cheng Zhao
a02cb8009e Merge pull request #11131 from hugomano/feature/isolated-world
Add Isolated World API
2017-12-19 11:03:28 +09:00
Cheng Zhao
b27e42f3f7 Fix indentions 2017-12-19 10:42:36 +09:00
Hugo Mano
ae7b96991c Add webFrame.setIsolatedWorldSecurityOrigin
Move vector to cc file

Map executed javascript in isolated world to url

Some 💅

Documentation

Use WebSource[] as argument in executeJavaScriptInIsolatedWorld

Refactor and lint with @poiru’s comments

Remove duplicate call

Typo

Lint
2017-12-19 10:36:03 +09:00
Hugo Mano
389edb6229 Add webFrame.setIsolatedWorldHumanReadableName 2017-12-19 10:36:03 +09:00
Hugo Mano
f74f113d23 Add webFrame.setIsolatedWorldContentSecurityPolicy 2017-12-19 10:36:03 +09:00
Alexandre Lachèze
936d8c1117 Add webframe. executeJavaScriptInIsolatedWorld
Attempt runInIsolatedWorldContext

Replace RunInIsolatedWorldContext by GetIsolatedWorldGlobalObject

Fix linting

Remove useless getIsolatedWorldGlobalObject

Add support for scriptExecutionType
2017-12-19 10:36:03 +09:00
Charles Kerr
f01cbf0482 Merge pull request #11467 from electron/leo-patch-1
Clarify Hazel's purpose
2017-12-18 16:17:14 -06:00
Leo Lamprecht
55db062242 Clarify Hazel's purpose 2017-12-18 21:18:11 +01:00
Charles Kerr
6198bbe963 add changed-only mode to cpplint 2017-12-18 10:22:51 -06:00
timmyhadwen
a6bab71215 Fixed BT bug 2017-12-18 20:46:06 +10:00
Giacomo Furlan
b8231b74f2 refs #11353: pylint 2017-12-16 13:11:04 +01:00
Giacomo Furlan
789dbb2dbb Adds --chromium_dir argument to script/create-dist.py 2017-12-16 13:11:04 +01:00
TheDancingCode
605f5472e5 📝 Fix mixed content warning [ci skip] (#11448) 2017-12-15 16:06:38 -05:00
joeydlee95
ac2caef37f test for relative links adheres to npm run lint 2017-12-13 19:06:16 -08:00
Felix Rieseberg
75cdd9ec70 🔧 Linter's gotta lint 2017-12-13 16:31:02 -08:00
Felix Rieseberg
8a8aaaf16c 🔧 Allow notifications debugging (Windows) 2017-12-13 16:25:49 -08:00
Felix Rieseberg
76d9756fb9 🔧 Use LOG instead of NSLOG 2017-12-13 14:47:23 -08:00
joeydlee95
a4db8e1c55 Add executable test to package.json 2017-12-13 14:39:13 -08:00
Charles Kerr
a8b76e1a80 Merge pull request #11418 from electron/add-reg-defaults
[WIP] add back systemPreferences.registerDefaults()
2017-12-13 15:48:20 -06:00
shelley vohr
5a35a5a2b3 Upgrade Node to v8.9.3 (#11422)
* update submodule referefences for node

* update libcc and node refs

* update for cherry-picked a15d0ce

* update libcc ref to master
2017-12-13 16:32:00 -05:00
Shelley Vohr
26ad37c4d1 remove key and value bullts 2017-12-13 16:02:15 -05:00
Shelley Vohr
3fc844c15a add loop to catch null values 2017-12-13 14:02:43 -05:00
Felix Rieseberg
61ec8df418 🔧 More detailed macOS notification logging 2017-12-13 10:31:59 -08:00
Charles Kerr
0ad99444af Merge pull request #11426 from mikoto2000/patch-1
Fix 'electron-versioning' link in README.md
2017-12-13 09:21:41 -06:00
mikoto2000
ef7c5c8e9c Fix 'electron-versioning' link in README.md 2017-12-13 22:18:00 +09:00
Shelley Vohr
d602a30bbc update a few steps in upgrading-node.md 2017-12-12 22:55:37 -05:00
Charles Kerr
057f08a1f8 Merge pull request #11421 from lurch/patch-1
Fix typos
2017-12-12 21:36:35 -06:00
Andrew Scheller
debe77a910 Fix typos 2017-12-13 03:13:41 +00:00
Charles Kerr
5b6b5fe835 Merge pull request #11419 from electron/menu-bugs-take-two
fix: Menu bugs (take two)
2017-12-12 20:56:41 -06:00
joeydlee95
996c914912 Add test to check for relative links in docs directory 2017-12-12 18:53:13 -08:00
Felix Rieseberg
ffd85bfaac 🔧 Allow notifications debugging (macOS) 2017-12-12 16:09:34 -08:00
Felix Rieseberg
317422f431 👷 Close popup in aftereach 2017-12-12 12:23:02 -08:00
Felix Rieseberg
8166a64f98 🔧 Last round of feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
c4ec8b4545 🔧 Feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
76df41b5d0 👷 Properly test x vs y 2017-12-12 11:25:01 -08:00
Felix Rieseberg
ace558f54a 👷 Hence, better testing 2017-12-12 11:25:01 -08:00
Felix Rieseberg
5b7f7c8a1a 🔧 Menu returns its properties now 2017-12-12 11:25:01 -08:00
Felix Rieseberg
ffc54967e9 🔧 Fix value shift 2017-12-12 11:25:01 -08:00
Felix Rieseberg
5a658fa5f6 👷 Add a spec 2017-12-12 11:25:01 -08:00
Felix Rieseberg
99031834ff 🔧 Cleanup 2017-12-12 11:25:01 -08:00
Felix Rieseberg
3719ee0b53 🔧 Allow for menu.popup({}) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
9e660b1d32 🔧 Always find a window (or error) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
4f901c6d24 🔧 Oh wow, that looks wrong 2017-12-12 11:25:01 -08:00
Shelley Vohr
6252ce466c remove failing badDefault 2017-12-12 13:39:38 -05:00
Shelley Vohr
8b447b9291 fixing error in registerDefaults 2017-12-12 13:08:09 -05:00
Charles Kerr
5720a8e7d5 Merge pull request #11415 from electron/revert-11385-async-menu
Revert "fix: Fix `menu.popup()` bugs"
2017-12-12 08:56:12 -06:00
Charles Kerr
da4af4c90b Merge pull request #11414 from electron/revert-11395-add-reg-defaults
Revert "Add systemPreferences.registerDefaults()"
2017-12-12 08:46:47 -06:00
Alexey Kuzmin
1c8eb03574 Revert "fix: Fix menu.popup() bugs" 2017-12-12 13:59:34 +03:00
Alexey Kuzmin
1caa04c0bf Revert "Add systemPreferences.registerDefaults()" 2017-12-12 13:59:15 +03:00
Cheng Zhao
19f1fef040 Merge pull request #11283 from electron/fix-event-subscriber-race
Fix race condition in event_subscriber.h
2017-12-12 10:49:17 +09:00
Charles Kerr
e73fe100d5 Merge pull request #11385 from electron/async-menu
fix: Fix `menu.popup()` bugs
2017-12-11 18:02:33 -06:00
Charles Kerr
76ee1e1cb6 Merge pull request #11406 from xxczaki/master
Added Polish Electron Community
2017-12-11 17:48:33 -06:00
Charles Kerr
99c980ab40 Merge pull request #11395 from electron/add-reg-defaults
Add systemPreferences.registerDefaults()
2017-12-11 17:45:32 -06:00
Shelley Vohr
a8e67e7f61 fixes from review 2017-12-11 18:20:12 -05:00
Felix Rieseberg
927c63b477 🔧 Last round of feedback 2017-12-11 15:19:33 -08:00
Felix Rieseberg
89b90be6a2 🔧 Feedback 2017-12-11 14:43:35 -08:00
Charles Kerr
dcf2a6f388 Make 'https' explicit in the link to electronpl.github.io 2017-12-11 16:37:14 -06:00
Felix Rieseberg
f7ebfff8ae 👷 Properly test x vs y 2017-12-11 14:05:07 -08:00
Felix Rieseberg
dfd7598d48 👷 Hence, better testing 2017-12-11 14:03:04 -08:00
Felix Rieseberg
22e9d665d2 🔧 Menu returns its properties now 2017-12-11 14:03:01 -08:00
Felix Rieseberg
93b46116f4 🔧 Fix value shift 2017-12-11 13:30:35 -08:00
Anthony
c8bb23a2ff Update README.md 2017-12-11 20:52:56 +01:00
Shelley Vohr
027e78639a update value type to Any 2017-12-11 14:06:02 -05:00
Shelley Vohr
84bab48627 improve error handling 2017-12-11 13:11:03 -05:00
Shelley Vohr
765f223fef update docs and spec 2017-12-11 13:06:23 -05:00
Charles Kerr
87f8bd4ea7 Merge pull request #11359 from electron/fix_spell_checker_crash
Fixed crash in `atom::api::SpellCheckClient`
2017-12-11 10:18:27 -06:00
Shelley Vohr
c5aeda1fdd fixes from code review 2017-12-11 00:20:26 -05:00
Shelley Vohr
5e51ab9791 fix doc parsing error 2017-12-10 14:55:14 -05:00
Shelley Vohr
9a40bbd082 update systemPreferences docs 2017-12-10 14:46:19 -05:00
Shelley Vohr
8a24733ee6 add fail spec and only run mac ci 2017-12-10 12:52:03 -05:00
Shelley Vohr
becabdfff2 add test for registerDefaults 2017-12-10 11:26:07 -05:00
Shelley Vohr
18ee34f1a1 add method binding and error guards 2017-12-10 11:25:43 -05:00
Shelley Vohr
1ccad4a7e9 fix capitalization and clean logic 2017-12-10 11:04:05 -05:00
Shelley Vohr
f82086e6d3 first pass at adding infra for registerDefaults 2017-12-10 00:45:49 -05:00
Felix Rieseberg
725f6c97d6 👷 Add a spec 2017-12-08 14:52:21 -08:00
Felix Rieseberg
abd56eda6f 🔧 Cleanup 2017-12-08 14:40:51 -08:00
Felix Rieseberg
955564abd7 🔧 Allow for menu.popup({}) 2017-12-08 14:37:16 -08:00
Felix Rieseberg
bd6767fac6 🔧 Always find a window (or error) 2017-12-08 14:36:52 -08:00
Felix Rieseberg
38bb9baac5 🔧 Oh wow, that looks wrong 2017-12-08 14:36:29 -08:00
Charles Kerr
6af18895c3 Merge pull request #11380 from electron/cifratila/enable-cfg
Security Improvement: Enable Control Flow Guard compile flag on Windows
2017-12-08 10:09:34 -06:00
Charles Kerr
de1edeea0b Merge pull request #11379 from TiagoDanin-Forks/upgrading_chromium_doc
Fix formatting in documentation
2017-12-08 10:08:44 -06:00
TiagoDanin
079310ab5a fix formatting in upgrading node doc 2017-12-08 11:49:39 -03:00
TiagoDanin
9314d8925e fix formatting in upgrading chromium doc 2017-12-08 11:24:05 -03:00
Catalin Fratila
7faec8e5eb Security Improvement: Enable Control Flow Guard on Windows - https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard 2017-12-08 14:31:29 +01:00
John Kleinschmidt
6a29577ab3 Merge pull request #11356 from electron/replace-app-icon
Replace app icons
2017-12-07 16:53:45 -05:00
simurai
0f54e56389 Replace default_app icon 2017-12-07 16:10:45 -05:00
simurai
fe0f203312 Replace app icons 2017-12-07 16:10:45 -05:00
John Kleinschmidt
f10c279322 Merge pull request #11370 from electron/fix_dchecks
Fix: Re-enable some dchecks
2017-12-07 15:55:33 -05:00
shelley vohr
63c91e7dd3 Merge pull request #11321 from electron/add-setExtraParameter-deprecation
Add back setExtraParameter() deprecation warning
2017-12-07 14:49:18 -05:00
Shelley Vohr
276f758560 remove deprecated method call 2017-12-07 14:26:57 -05:00
Shelley Vohr
24f60dcd1b re-add warning removed in https://github.com/electron/electron/pull/11013 2017-12-07 11:42:18 -05:00
deepak1556
16d96a6ef2 Force MediaCaptureDevicesDispatcher to be created on UI thread 2017-12-07 09:47:32 +05:30
deepak1556
19de41b764 BrowserClient::CanCreateWindow is no longer called on the IO thread
https://codereview.chromium.org/2821473002
2017-12-07 09:47:32 +05:30
Charles Kerr
5fa29fcf58 Merge pull request #11329 from electron/remove-classes-key
fix: Properly cleanup in `removeAsDefaultProtocolClient`
2017-12-06 17:31:50 -06:00
Zeke Sikelianos
69c6a68c22 Merge pull request #11367 from electron/revert-to-old-name-of-versioning-doc
revert to old name of versioning doc
2017-12-06 15:05:01 -08:00
Zeke Sikelianos
61937eac0a fix more relative links 2017-12-06 15:01:09 -08:00
Zeke Sikelianos
fa09ff3cbb update links to versioning doc 2017-12-06 15:01:09 -08:00
Zeke Sikelianos
84c207750c revert to old name of versioning doc 2017-12-06 15:01:09 -08:00
Zeke Sikelianos
af756e2441 Merge pull request #11364 from electron/groundwater-patch-1
docs: README make versioning link relative
2017-12-06 15:00:42 -08:00
Jacob Groundwater
8efeb4b71a Update README.md 2017-12-06 14:32:11 -08:00
John Kleinschmidt
78fd6d6435 Merge pull request #11365 from electron/remove-appveyor-yml
Remove appveyor.yml
2017-12-06 16:26:32 -05:00
John Kleinschmidt
4e3e9c9dbc Remove appveyor.yml
This configuration isn't used anymore - appveyor setup is defined on server
2017-12-06 15:14:09 -05:00
Jacob Groundwater
d8368d36db docs: README make versioning link relative
I think we're making links relative within the docs, and not directly pointing to the electronjs.org website.
2017-12-06 11:15:10 -08:00
Ales Pergl
7a73b1d523 Fixed crash in atom::api::SpellCheckClient
The class didn't save the V8 context for the spell checking JS function. When
it later tried to call the JS function and there was no active context, V8
crashed.

I also optimized the spell checking loop by introducing `SpellCheckScope` and
reusing the V8 handles throughout the whole loop.
2017-12-06 14:50:20 +01:00
Cheng Zhao
4355f554cc Merge pull request #11355 from electron/fix-ci
Fix docs linting error
2017-12-06 19:31:03 +09:00
Cheng Zhao
da66e34dce Fix docs linting error 2017-12-06 19:09:10 +09:00
Cheng Zhao
d8610a3f56 Merge pull request #11342 from electron/add-python-dbusmock
Enable testing with python-dbusmock
2017-12-06 15:02:27 +09:00
Cheng Zhao
46f79146ad Merge pull request #11316 from electron/hide-update-exe
fix: Ensure that update.exe doesn't open up a console window
2017-12-06 14:50:12 +09:00
Cheng Zhao
9c109daa4b Merge pull request #11168 from sethlu/fix-icns-color
fix: Update icns
2017-12-06 14:45:36 +09:00
Felix Rieseberg
bd4c7a114a 👷 Fix the last broken test 2017-12-05 17:07:22 -08:00
Zeke Sikelianos
1e0a181f4b Merge pull request #11032 from electron/version2
New Version Policy for 2.x and Beyond
2017-12-05 14:45:50 -08:00
Zeke Sikelianos
032f5ebc6f update highlights 2017-12-05 14:35:16 -08:00
Zeke Sikelianos
4878cd8d5d update intro 2017-12-05 14:32:33 -08:00
Zeke Sikelianos
4101059323 update semantic commits section 2017-12-05 14:31:19 -08:00
Zeke Sikelianos
770778f9a2 update ignore comment 2017-12-05 14:17:15 -08:00
Jacob Groundwater
85b1cd08d3 docs: use relative links 2017-12-05 14:13:56 -08:00
Felix Rieseberg
bf043c92af 👷 Ugh, whitespace 2017-12-05 13:20:34 -08:00
Felix Rieseberg
e6cbb2f3aa 👷 Cleanup on Windows only 2017-12-05 12:14:19 -08:00
Jacob Groundwater
8eed8bdee7 docs: fix images 2017-12-05 12:08:41 -08:00
Jacob Groundwater
7598e31b16 docs: we _do_ follow semver 2017-12-05 12:04:23 -08:00
John Kleinschmidt
e59aa715fd Enable testing with python-dbusmock 2017-12-05 15:01:01 -05:00
Jacob Groundwater
1bce00545d docs: changes based on review 2017-12-05 11:43:59 -08:00
Jacob Groundwater
07a5d7957b use non-relative image paths to interop with website deploy 2017-12-05 11:38:41 -08:00
Jacob Groundwater
b65b939d18 docs: add tl;dr to version doc 2017-12-05 11:38:41 -08:00
Jacob Groundwater
06371a6082 docs: explain versioning policy 1.x, 2.x, and beyond 2017-12-05 11:38:36 -08:00
Felix Rieseberg
d519bfc5fb 👷 Linter fascism 2017-12-05 11:38:19 -08:00
Felix Rieseberg
997f3f31d2 👷 Cleanup after the test 2017-12-05 11:31:40 -08:00
Felix Rieseberg
e77751aab5 👷 Test registry interaction 2017-12-05 11:28:39 -08:00
Felix Rieseberg
60634cac42 📦 Install winreg 2017-12-05 11:28:19 -08:00
Charles Kerr
f2da3e9a14 Merge pull request #11306 from electron/implement-linux-power-monitor
Implement powerMonitor "suspend"/"resume" events for Linux.
2017-12-05 09:16:59 -06:00
Thiago de Arruda
dfd98e3428 Add linux powerMonitor tests using python-dbusmock 2017-12-05 08:33:36 -03:00
Thiago de Arruda
897712359f Implement powerMonitor "suspend"/"resume" events for Linux. 2017-12-05 08:12:44 -03:00
Cheng Zhao
95cb601f2b Merge pull request #10430 from electron/global-preloads
Add ability to set per-session preload scripts
2017-12-05 19:15:11 +09:00
Cheng Zhao
24b3ee3a4a Revert some unnecessary changes 2017-12-05 16:50:25 +09:00
Cheng Zhao
cb3a9c69ab Add a SessionPreferences to manage session related data
By design the BrowserClient should not be aware of the api:: classes.
2017-12-05 15:59:15 +09:00
Cheng Zhao
776e8afa2b Coding style changes 2017-12-05 11:50:06 +09:00
Samuel Attard
eaa4b71c24 Remove .only 2017-12-05 11:35:54 +09:00
Samuel Attard
009459bd38 Standard JS 2017-12-05 11:35:54 +09:00
Samuel Attard
e535ba4808 Don't know why we suddenly need this, but hey :/ 2017-12-05 11:35:54 +09:00
Samuel Attard
d1aded2831 Appease the almighty linter 2017-12-05 11:35:53 +09:00
Samuel Attard
d9359d8b6c s/global/session in constants 2017-12-05 11:35:53 +09:00
Samuel Attard
d2707315e6 s/global/session 2017-12-05 11:35:53 +09:00
Samuel Attard
3b80ee0655 Move global preload implementation to be session based 2017-12-05 11:35:53 +09:00
Samuel Attard
448ccc261d Use const references 2017-12-05 11:35:27 +09:00
Samuel Attard
0ddd078aaf Add ability to set global preload scripts 2017-12-05 11:35:27 +09:00
Cheng Zhao
d598aa1a67 Merge pull request #11300 from electron/external-devtools
Add API to set arbitrary WebContents as devtools
2017-12-05 10:35:49 +09:00
John Kleinschmidt
bdcdb6e9cf Merge pull request #11330 from electron/add-jenkins-timeout
Add 1 hour timeout to Jenkins CI
2017-12-04 14:49:32 -05:00
Felix Rieseberg
d4275b144b 🔧 Linter fascism 2017-12-04 10:46:53 -08:00
Felix Rieseberg
f62e0a4ed4 🔧 Make it actually work 2017-12-04 10:30:20 -08:00
John Kleinschmidt
e7edc6f24f Add 1 hour timeout 2017-12-04 13:19:51 -05:00
Charles Kerr
3e056eec9e Merge pull request #11297 from electron/remove-travis
Remove Travis references
2017-12-04 10:56:53 -06:00
John Kleinschmidt
1989075d54 Ignore all npmrc and package-lock 2017-12-04 11:05:04 -05:00
John Kleinschmidt
e989005122 Merge pull request #11271 from electron/dchecks
Build with dchecks disabled on subset of targets
2017-12-04 10:33:47 -05:00
Cheng Zhao
52c6f4bcc5 docs: responsiblity of destroying devtoolsWebContents 2017-12-04 18:42:42 +09:00
Charles Kerr
6beaafc7e5 Merge pull request #11282 from Toinane/fix-documentation
typographical revision in Documentation
2017-12-03 09:01:24 -06:00
Charles Kerr
851642f4b8 Merge pull request #11311 from electron/fix-typos-in-structures
fix typos in structures
2017-12-03 08:34:08 -06:00
Charles Kerr
2ffcb27abe Merge pull request #11315 from insideGen/patch-1
Update cookies.md
2017-12-02 08:27:42 -06:00
Charles Kerr
467cce6a8b Merge pull request #11317 from electron/asar-video
Make the asar-video test run faster
2017-12-02 08:26:12 -06:00
Ales Pergl
ecdbe79e29 Make the asar-video test run faster
I cut the video to 3 seconds and removed the audio track, which makes the test
finish a lot sooner. Also the asar file is 160 kB instead of 1 MB.
2017-12-02 11:30:57 +01:00
Ales Pergl
4cf6763e70 Updated libchromiumcontent submodule 2017-12-02 11:09:20 +01:00
Felix Rieseberg
b4b729609a 🔪 Delete classes key if empty 2017-12-01 17:39:54 -08:00
Felix Rieseberg
9646f0c99a 🔧 Sprinkle some ES6 across the file 2017-12-01 17:18:57 -08:00
Felix Rieseberg
c5abe96b39 🔧 Hide subprocess window 2017-12-01 17:18:37 -08:00
Zeke Sikelianos
7c8acb5ea8 Merge pull request #11314 from electron/docs--use-full-image-URL
use full image URL
2017-12-01 17:03:16 -08:00
Jonathan
f32f0fb774 Update cookies.md 2017-12-02 01:27:53 +01:00
Zeke Sikelianos
ba56e5ca65 docs: use full image URL 2017-12-01 15:20:49 -08:00
Charles Kerr
ff6596fd05 Merge pull request #11312 from electron/ipc-spec-split
Split ipc specs into three files
2017-12-01 16:03:51 -06:00
Shelley Vohr
45de1e6a7c remove extraneous variables 2017-12-01 16:11:54 -05:00
Shelley Vohr
af6489576a remove onlys 2017-12-01 16:01:03 -05:00
Shelley Vohr
00e8713eac split ipc tests into three files 2017-12-01 15:57:41 -05:00
Zeke Sikelianos
7dd921811f fix typos in structures 2017-12-01 11:43:04 -08:00
John Kleinschmidt
d182bacd00 Ignore/remove package-lock files 2017-12-01 12:55:55 -05:00
Ales Pergl
dadfbd3a4f Reset embedder_zoom_controller_ before assigning new one 2017-12-01 17:55:22 +01:00
Ales Pergl
fd7af5c1d9 Don't call ui::SetAtomArrayProperty with an empty vector (fails DCHECK) 2017-12-01 17:55:22 +01:00
Ales Pergl
7613afe6d7 Disabled DCHECKs that fail when running tests 2017-12-01 17:55:22 +01:00
Ales Pergl
8357a33d81 Don't leak the taskbar object, reuse it instead 2017-12-01 17:55:21 +01:00
deepak1556
903a5b5100 fix dcheck comparison between unsigned long vs int 2017-12-01 17:55:21 +01:00
John Kleinschmidt
db51dcbe7e Merge pull request #11301 from wlbentley/patch-1
🎨 Tweak for grammar.
2017-12-01 11:48:46 -05:00
John Kleinschmidt
3ab69f2358 Merge pull request #11186 from electron/update-linter-and-ts
update electron-docs-linter and electron-typescript-definitions
2017-12-01 11:47:29 -05:00
Cheng Zhao
c2ee0854f4 Merge pull request #11302 from electron/update_pdf_viewer
fix: update pdf viewer ui for chrome 61.0.3163.100
2017-12-01 19:57:25 +09:00
deepak1556
a48cec9b4a fix: update pdf viewer ui for chrome 61.0.3163.100 2017-12-01 14:09:06 +05:30
W L Bentley
6d779c6ec2 Two grammar tweaks. 2017-11-30 19:37:06 -08:00
Cheng Zhao
88c4fd3f2b docs: Remove unnecessary shows 2017-12-01 12:04:50 +09:00
Cheng Zhao
6b408de884 Allow using docked devtools for webview 2017-12-01 11:56:58 +09:00
Cheng Zhao
ea9771702b spec: setDevToolsWebContents 2017-12-01 10:35:23 +09:00
Cheng Zhao
25c5938c76 docs: Open detached devtools in example 2017-12-01 10:35:23 +09:00
Cheng Zhao
580abedbb7 docs: contents.setDevToolsWebContents 2017-12-01 10:35:23 +09:00
Cheng Zhao
59476f0b30 Create webContents for webview even when src is not set 2017-12-01 10:35:23 +09:00
Cheng Zhao
5e4914700e Enable using external WebContents as devtools 2017-12-01 10:35:23 +09:00
John Kleinschmidt
0ef8f58090 Remove Travis references 2017-11-30 15:39:32 -05:00
Zeke Sikelianos
aab35073ee Merge pull request #11255 from electron/fix-11245
Enable nativeImage module addRepresentation() tests
2017-11-30 10:48:11 -08:00
Zeke Sikelianos
c1728720a7 Merge pull request #11256 from electron/fix-11244
Enable "<webview> tag found-in-page event emits when a request is made"
2017-11-30 10:48:00 -08:00
shelley vohr
2bc8b33c2a Merge pull request #11291 from electron/fix-failing-spec
spec: Fix the failing coffee-script test
2017-11-30 13:43:58 -05:00
John Kleinschmidt
2d75eea82a Merge pull request #11254 from electron/fix-11246
Enable crashReporter module tests
2017-11-30 12:55:49 -05:00
Aleksei Kuzmin
b9ed7380aa Explicitly set alpha type of bitmaps with JPEG data to opaque
Actually fixes #11245.
2017-11-30 17:56:32 +01:00
Aleksei Kuzmin
c0c983d28d Light refactoring of the nativeImage module tests 2017-11-30 17:50:51 +01:00
Cheng Zhao
04872bb001 spec: Fix the failing coffee-script test
The latest version has some regression causing our test to fail.
2017-11-30 21:10:22 +09:00
Thiago de Arruda
68bceb9575 Fix race condition in event_subscriber.h 2017-11-29 12:57:47 -03:00
Aleksei Kuzmin
275815002f Inscrease timeout for crashReporter tests
Fixes #11246.
2017-11-29 12:27:06 +01:00
Toinane
3d4ef66775 add some markdown links 2017-11-29 12:13:45 +01:00
Toinane
0a0d88a5dc remove all double spaces not needed 2017-11-29 11:58:24 +01:00
Toinane
323ea2b27b fix(docs): fix all missing dots and add some links 2017-11-29 11:38:35 +01:00
Cheng Zhao
d09e8cc37f Merge pull request #11108 from oktapodia/feature/add-ansi-color-into-menu-title
Feature/add ansi color into menu title
2017-11-29 18:37:52 +09:00
Zhuo Lu
c274312a3a Update submenu's title 2017-11-28 19:38:07 -08:00
Toinane
59607c9a17 feat(docs): fix 'optional' wording 2017-11-28 18:15:15 +01:00
Cheng Zhao
0dc094fffc Do not change logic on highlighing 2017-11-28 17:37:58 +09:00
Cheng Zhao
d1ebce0395 Remove unused methods 2017-11-28 17:31:13 +09:00
Cheng Zhao
590578c187 Cache the attributed string 2017-11-28 17:26:09 +09:00
Cheng Zhao
eab3342065 Fix the detection of ANSI code 2017-11-28 16:36:07 +09:00
Cheng Zhao
c9acccaddc Fix memory leak in ANSCI parsing code
We do not have ARC enabled.
2017-11-28 16:36:07 +09:00
Cheng Zhao
4ded79801f Remove unused code in NSColor+Hex.h 2017-11-28 16:10:24 +09:00
Cheng Zhao
08f30e4ca6 Add license for the vendored files
Checked the original files and they were compatible with MIT.
2017-11-28 15:38:42 +09:00
Cheng Zhao
edede7f33f Fix cpplint warning 2017-11-28 15:36:45 +09:00
Sebastien Bramille
a4905b3c95 Lint 2017-11-28 15:34:13 +09:00
Sebastien Bramille
e8b0897ea1 Fix margin 2017-11-28 15:34:13 +09:00
Sebastien Bramille
71cfb7441c Update header file 2017-11-28 15:34:13 +09:00
Sebastien Bramille
7a8431086c Update doc 2017-11-28 15:34:13 +09:00
Sebastien Bramille
9f89bd8d8e Add isHighlighted method 2017-11-28 15:34:13 +09:00
Sebastien Bramille
6a1cfafbd8 Clean 2017-11-28 15:34:13 +09:00
Sebastien Bramille
85f254316c Add logic 2017-11-28 15:34:13 +09:00
Sebastien Bramille
d722d20974 Use NSString+ANSI on the Menu title 2017-11-28 15:34:13 +09:00
Sebastien Bramille
1d807c552e Add NSString+ANSI class 2017-11-28 15:34:13 +09:00
Cheng Zhao
124667c29b Merge pull request #11227 from emmkimme/Fix_10470_sandbox_preload
🐞 #10470 - prevent from loading preload in each iframe context
2017-11-28 15:25:34 +09:00
Cheng Zhao
b161a4f515 Merge pull request #11166 from sethlu/openrecent
feat: Recent documents menu item
2017-11-28 10:55:14 +09:00
Charles Kerr
2ad425955b Merge pull request #11249 from electron/upgrading-chromium-tweaks
Apply some of my summit notes to the upgrading-chrome docs.
2017-11-28 00:55:12 +01:00
Charles Kerr
18dc63ce77 fix conflicts 2017-11-27 16:40:10 -06:00
Zeke Sikelianos
2e3550b97f update electron-docs-linter and electron-typescript-definitions to latest 2017-11-27 12:44:24 -08:00
Charles Kerr
e24cd329d9 Merge pull request #11268 from electron/fix_crash
Don't access unique pointer after it was moved from
2017-11-27 19:20:44 +01:00
Ales Pergl
f8b683ca3d Don't access unique pointer after it was moved from 2017-11-27 17:55:21 +01:00
Charles Kerr
defa42b458 Merge pull request #11257 from electron/fix-11242
Remove "async" flag from the `menu.popup()` options
2017-11-27 16:41:56 +01:00
Cheng Zhao
141c4e9a0e Merge pull request #11241 from electron/update-to-the-latest-libcc
Use latest libcc with Chromium 61
2017-11-27 17:49:05 +09:00
Zhuo Lu
104d307a4a Use base::scoped_nsobject 2017-11-27 17:26:23 +09:00
Zhuo Lu
8fa3e71ce4 Format code 2017-11-27 17:26:22 +09:00
Zhuo Lu
2f73f4f77e Fix typo 2017-11-27 17:26:22 +09:00
Zhuo Lu
4934685f53 Declare with static 2017-11-27 17:26:22 +09:00
Zhuo Lu
0c4e425872 Do not autorelease global variables 2017-11-27 17:26:22 +09:00
Zhuo Lu
2de7b338ad Update API docs 2017-11-27 17:26:22 +09:00
Zhuo Lu
dcdc3621ac Rename roles 2017-11-27 17:26:22 +09:00
Zhuo Lu
1ab4504e94 No need to make visible 2017-11-27 17:26:22 +09:00
Zhuo Lu
cf73fb737f Small optimization 2017-11-27 17:26:22 +09:00
Zhuo Lu
3e6e327711 Remove redundant menu item
Already addressed with role: clearrecent
2017-11-27 17:26:22 +09:00
Zhuo Lu
5d44dbaf54 Redesign recent documents role API
- For more flexibility in designing the recent documents menu, now there can be one menu item (known issue: you may specify more but AppKit doens't display more than one) in the submenu list, rather than separating the labels with a tab.
- Also added is the role `clearrecent` that can be given to a menu item that can clear the recent documents.
2017-11-27 17:26:22 +09:00
Zhuo Lu
828d233f2a Rollback duplicated feature 2017-11-27 17:26:22 +09:00
Zhuo Lu
0b9cea334f Specify "Clear Menu" through label option
Like a bit of a hack right now, conforming to the existing menu item definition
2017-11-27 17:26:22 +09:00
Zhuo Lu
970babbfd7 Document openrecent menu item 2017-11-27 17:26:22 +09:00
Zhuo Lu
8b720c120d Hide "Open Recent" in xib 2017-11-27 17:26:22 +09:00
Zhuo Lu
4da2eb9366 Introduce openrecent role
- Does not yet accept any options except label--"Clear Menu" can't be modified through exposed node API
- If `openrecent` is present across multiple menu items, the last seen will be visible in the main menu due to that it is designed to behave like a singleton
2017-11-27 17:26:22 +09:00
Zhuo Lu
0ba2fa5cba Use else if 2017-11-27 17:26:22 +09:00
Zhuo Lu
f0bff74995 Add "Open Recent" submenu to default 2017-11-27 17:26:22 +09:00
Cheng Zhao
c0e9dbcc00 Merge pull request #11144 from dittos/mas-login-helper-again
Re-land MAS login helper (w/ regression fix)
2017-11-27 17:02:57 +09:00
Cheng Zhao
1c0ea0286e Merge pull request #11235 from electron/standard-10
infra: Upgrade to StandardJS 10
2017-11-27 15:42:52 +09:00
Charles Kerr
295945b806 copyediting 2017-11-26 08:44:37 +01:00
Charles Kerr
81bc0efc75 fix styleguide errors 2017-11-26 08:38:58 +01:00
Charles Kerr
a75a85449d sync with master 2017-11-26 08:28:27 +01:00
Charles Kerr
d1ac773e01 Merge pull request #11253 from electron/fix-a-codeblock-in-the-upgrading-node-md
Fix a codeblock markup
2017-11-26 08:00:47 +01:00
deepak1556
084292f3ab fix: focus the webview as a temp workaround 2017-11-25 20:18:01 +05:30
Aleksei Kuzmin
9c5acf6233 Remove "async" flag from the menu.popup() options
All menus have become async after the Chromium 61 upgrade.
Fixes #11242.
2017-11-25 13:31:58 +01:00
Aleksei Kuzmin
3e9f9429d1 Enable "<webview> tag found-in-page event emits when a request is made"
Fixes #11244.
2017-11-25 13:21:26 +01:00
Aleksei Kuzmin
91e4193622 Enable nativeImage module addRepresentation() tests
Fixes #11245.
2017-11-25 12:58:33 +01:00
Zeke Sikelianos
df0c7e2f74 Merge pull request #11250 from electron/docs-lint-fix
🔧 fix remark code flag error
2017-11-24 21:05:26 -08:00
Aleksei Kuzmin
ce6af85f98 Fix a codeblock markup 2017-11-25 00:56:07 +01:00
Aleksei Kuzmin
d9d2a8176e Use latest libcc with Chromium 61 2017-11-24 23:43:32 +01:00
Shelley Vohr
d9c7b95141 fix remark code flag error 2017-11-24 21:40:19 +01:00
Charles Kerr
22c15082a3 partial doc update from my sprint notes 2017-11-24 14:21:41 +01:00
shelley vohr
6941f93627 Merge pull request #11247 from electron/use_sh_in_docs
prefer `sh` to `bash` in the docs
2017-11-24 11:38:10 +01:00
Charles Kerr
b59557569c oops, the upgrading-chrome.md changes belonged in a separate PR 2017-11-24 11:19:53 +01:00
Charles Kerr
3e3cac6f1b prefer sh to bash in the docs 2017-11-24 11:17:43 +01:00
shelley vohr
00999a07d8 Merge pull request #11240 from electron/upgrading_docs
Upgrading docs for node, crashpad, and chromium
2017-11-24 11:16:18 +01:00
Shelley Vohr
bd70ec5e97 finalize node upgrade doc 2017-11-24 11:15:07 +01:00
Charles Kerr
1b0c1842ca prefer sh to bash in the docs 2017-11-24 11:13:57 +01:00
Shelley Vohr
ba6224039c make some things more explicit and style conformity 2017-11-24 11:06:04 +01:00
Shelley Vohr
178462b800 chrome -> chromium and updates to crashpad doc 2017-11-24 10:40:37 +01:00
Charles Kerr
f91020a04d add section for updating submodule references 2017-11-24 10:40:30 +01:00
Charles Kerr
f8858a7577 add rough draft of node, crashpad update notes 2017-11-24 10:40:21 +01:00
shelley vohr
c18afc924b Merge pull request #10213 from electron/upgrade-to-chromium-61
[WIP] Upgrade to Chromium 61
2017-11-24 10:17:52 +01:00
Charles Kerr
fcc8e0924e Merge pull request #11097 from brenca/resizable-win-fix
Fix resizable property not working when taskbar was resized
2017-11-24 10:04:43 +01:00
Cheng Zhao
c30faa4ee8 Use 2xlarge for ARM jobs 2017-11-24 11:03:02 +09:00
Aleksei Kuzmin
8e708692b8 Use latest libcc 2017-11-24 10:58:53 +09:00
Cheng Zhao
a34d45d8c4 Fix uninitialized NodePlatform 2017-11-24 10:58:53 +09:00
Cheng Zhao
3138c85218 Fix linking problem with NodePlatform 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
efd949ea83 Disable a couple of crashReporter tests 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
d61564bfb1 Disable "<webview> tag > found-in-page event > emits when a request is made" test 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
c73ba5802e Disable "nativeImage module > addRepresentation()" tests 2017-11-24 10:58:53 +09:00
deepak1556
0b88873e77 add basic inspector module test 2017-11-24 10:58:53 +09:00
deepak1556
ed4482d7a0 Fix node_debugger api changes
* _debugWaitConnect => _breakFirstLine
  * Use default thread pool size specified by node.cc
2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
11f7bb34fc Fix "nghttp2" build 2017-11-24 10:58:53 +09:00
Tomas Rycl
207150c21c Adding node headers to native modules for tests so they will compile and run on Mac 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
1cf95d2a26 Use node::NodePlatform instead of v8::platform in atom::NodeDebugger 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
ad732b45d2 Use Node.js v8.7.0 2017-11-24 10:58:53 +09:00
Ales Pergl
9ca658238b Made NotificationDelegateImpl final
The class is designed to call `delete` on itself and because it doesn't have
a virtual destructor, it shouldn't be derived from.
2017-11-24 10:58:53 +09:00
deepak1556
505f2ab9e7 Fix crash when destroying NetLog 2017-11-24 10:58:53 +09:00
deepak1556
214cbf357a Fix cpp lint errors 2017-11-24 10:58:53 +09:00
deepak1556
e60557e2e6 simplify URLRequestContextGetter for HttpNetworkSession::Context 2017-11-24 10:58:53 +09:00
deepak1556
e0860ea7a0 Stop file observer of NetLog to finish writing to disk 2017-11-24 10:58:53 +09:00
Ales Pergl
f3c32647af Sanitized notification delegate implementation
I made `brightray::NotificationDelegate` back into just an interface and
extracted the implementation used by `PlatformNotificationService`, so that
the main process notification implementation can inherit only the interface.
2017-11-24 10:58:53 +09:00
Ales Pergl
8750fde6d3 Added libfreetype dependency to ARM64 build 2017-11-24 10:58:53 +09:00
Ales Pergl
19ef7d7a48 Added build dependency information for arm64 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
465f9009ff Update stack string parsing in the CallbacksRegistry
Fixes the "ipc module > remote listeners
> detaches listeners subscribed to destroyed renderers, and shows a warning"
test.
2017-11-24 10:58:53 +09:00
Ales Pergl
82394cc06d Use an existing host name so that it resolves quickly and tests don't time out. 2017-11-24 10:58:53 +09:00
deepak1556
7a9892f151 REVIEW: Inject devtools extensions API via browser
Behavior was changed in https://crbug.com/706169
2017-11-24 10:58:53 +09:00
Ales Pergl
531472bad4 Create a TaskScheduler when initializing run-as-node mode.
It fixes crashes when V8 tries to execute background tasks via the TaskScheduler.
2017-11-24 10:58:53 +09:00
Ales Pergl
334b39ef1e Fixed build issues 2017-11-24 10:58:53 +09:00
deepak1556
2fa0b3d33e Enable client certificate tests 2017-11-24 10:58:53 +09:00
deepak1556
a0be734ccb Fix client certificate private key handling api 2017-11-24 10:58:53 +09:00
Gellert Hegyi
a47497bf18 adds extra param for ui compositor creation 2017-11-24 10:58:53 +09:00
Gellert Hegyi
5d79dbc9a1 upgrades offscreen rendering to latest chromium 2017-11-24 10:58:53 +09:00
Tomas Rycl
c9b7fc2922 It fixes crash in tests on Windows
Notification delegate copies the notification ID string
instead of storing reference.
2017-11-24 10:58:53 +09:00
Tomas Rycl
e321a4a433 Setting raw pointer to nullptr as default so it can be detected as noninitialized 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
3a3eb69d0f Do not specify exception handling mode on Windows
Like Chromium does. Also disable related warnings.
2017-11-24 10:58:53 +09:00
Tomas Rycl
69cd33395a Fixed crash on startup on Windows 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
fe9ae41f98 Use gtk_toggle_button_get_active() 2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
abcda097fb Use GTK3 instead of GTK2 2017-11-24 10:58:53 +09:00
Samuel Attard
ef40bd4786 Remove dead header file for notification delegate 2017-11-24 10:58:17 +09:00
Samuel Attard
797a58bee0 Result of RunMenuAt is now void, no need to ignore it 2017-11-24 10:58:17 +09:00
Samuel Attard
1b46b5ceda Fix printing_handler_win compilation errors 2017-11-24 10:58:17 +09:00
Tomas Rycl
a723e5a4c5 Fixed moved cert x509 function issue on Windows 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
89c1b8043f Do not use SkBitmap.deepCopyTo(), it was removed
Copy of the `sk_tool_utils::copy_to()` is used instead.
Probsbly we should use the function itself.
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
9326ce8cfd allocator: rename use_experimental_allocator_shim to use_allocator_shim
https://codereview.chromium.org/2902043007
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
6d620c24b5 Update link_settings/libraries list in the brightray.gyp 2017-11-24 10:58:17 +09:00
Birunthan Mohanathas
4e859b4718 Remove "async" option from menu.popup()
All menus are async now. See "Cleanup MenuRunner API"
https://codereview.chromium.org/2790773002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
338604239d Cleanup MenuRunner API
https://codereview.chromium.org/2790773002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
14eb2af876 Give CustomButton a focus painter.
https://chromium-review.googlesource.com/c/chromium/src/+/516824
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
e0d7b7d0fc Clean up views::Background.
https://chromium-review.googlesource.com/c/chromium/src/+/520702
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
93b3d8cb49 Changed top/bottom & left/right border parameters on BoxLayout to take single gfx::Insets parameter.
https://chromium-review.googlesource.com/c/chromium/src/+/515902
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
4607a1fd13 make base::SharedMemoryHandle a class on POSIX.
https://codereview.chromium.org/2843113002
2017-11-24 10:58:17 +09:00
Tony Ganch
59550b203f Include objbase.h only for Windows 2017-11-24 10:58:17 +09:00
Tony Ganch
513d4fd225 Remove usage of X11AtomCache
See https://codereview.chromium.org/2914103002/
2017-11-24 10:58:17 +09:00
Tony Ganch
da04cbd4d8 Rename set_background to SetBackground 2017-11-24 10:58:17 +09:00
Tony Ganch
d7e4e8d6cc Rename GetPrefferedSize to CalculatePrefferedSize
See https://chromium-review.googlesource.com/c/chromium/src/+/516542
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
7f5fbb04e2 Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/...
https://codereview.chromium.org/2894483002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
79e59a88b4 Rename ScopedComPtr::Receive to ScopedComPtr::GetAddressOf
https://codereview.chromium.org/2870263002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
485e43636b Rename ScopedComPtr::get() to ScopedComPtr::Get()
https://codereview.chromium.org/2824773002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
1073c9b1ed Fix compilation of atom/browser/api/atom_api_app.cc
Refactor client cert private key handling.
https://codereview.chromium.org/2898573002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
8c40854983 Move handling of DraggableRegionsChanged notification from "view" to "frame".
https://codereview.chromium.org/2929493003
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
624b63a1ca Move "atom/common/node_includes.h" to the end of the includes list
https://github.com/electron/electron/issues/10363
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
3a7b3ba95e Update crashpad revision 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
96ff534248 Update brightray link_settings on Mac 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
7a23a79b58 Add protobuf defines and include_dirs 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
56e7867455 Move IconURLs method from WebFrame to WebLocalFrame
https://codereview.chromium.org/2918903002
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
fe662ccbdc Remove obsolete Blink popup blocker.
https://chromium-review.googlesource.com/c/chromium/src/+/512347
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
dcb9925ddd Fix 'constructor cannot be redeclared' error
Upgrade ICU to 59
https://bugs.chromium.org/p/chromium/issues/detail?id=699469
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
5fb0f005c5 Convert SpellCheckPanel SpellCheckPanelHost IPC to mojo
https://chromium-review.googlesource.com/c/chromium/src/+/515323
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
c6333728d9 Fix brightray::URLRequestContextGetter::GetURLRequestContext()
Split HttpNetworkSession::Params into two structs.
https://codereview.chromium.org/2907463002

Make HttpNetworkSession::host_mapping_rules no longer a pointer.
https://codereview.chromium.org/2906463002
2017-11-24 10:58:17 +09:00
Tony Ganch
491249108e Fix WebLocalFrame API usage
Related CLs:
https://chromium-review.googlesource.com/c/chromium/src/+/506500
https://chromium-review.googlesource.com/c/chromium/src/+/542658
2017-11-24 10:58:17 +09:00
Tony Ganch
0ad967c9a5 Don't specify URLRequestContext when starting logging
Related CL: https://codereview.chromium.org/2698143004
2017-11-24 10:58:17 +09:00
Tony Ganch
4412836e77 Include header for net::URLRequestContext 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
59b2fb054e Use blink::WebLocalFrame instead of blink::WebFrame in printing 2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
d817e23050 [c++11 library] Remove ScopedVector
https://bugs.chromium.org/p/chromium/issues/detail?id=554289
2017-11-24 10:58:17 +09:00
Aleksei Kuzmin
ac8c205fd7 Replace deprecated base::NonThreadSafe in chrome in favor of SequenceChecker.
https://codereview.chromium.org/2911983003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
75b41102ef Remove unused includes 2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
a9eb0cbec0 Ban raw pointers to ref-counted types on base::Bind
https://chromium-review.googlesource.com/c/chromium/src/+/549537
2017-11-24 10:58:16 +09:00
deepak1556
12a4321e2b Reporting: Wire ReportingDelegate into ChromeNetworkDelegate
https://codereview.chromium.org/2891133003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
7d1c1700f8 Implement GetBrowsingDataRemoverDelegate() for BrowserContext subclasses
https://codereview.chromium.org/2898443002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
edb7bc6572 Make BlobReader create its own file TaskRunner.
https://chromium-review.googlesource.com/c/chromium/src/+/570945
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
6ba372f9f2 Move some of IOThread's command line logic to network_session_configurator.
https://codereview.chromium.org/2914893002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
47d683f0ad DevTools: do not set visible size while emulating in case of device mode.
https://chromium-review.googlesource.com/c/chromium/src/+/572222
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
6c7ad3ac58 Remove the dependence on BrowserThread::FILE for
https://codereview.chromium.org/2944313003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
b29c485ec4 Consolidate PowerSaveBlocker and WakeLock inside Device Service.
https://chromium-review.googlesource.com/c/chromium/src/+/563159
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
933bf77a1f printing: Remove BlockingPool use
https://chromium-review.googlesource.com/c/chromium/src/+/541856
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
5a4a1a5574 Use "blink::WebLocalFrame" for "GetMarginsForPdf()"
Fixes "error: no member named 'IsPrintScalingDisabledForPlugin' in 'blink::WebFrame'"
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
f0cda8d88c Move Get/SetScrollOffset methods from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2936423003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
4ac9659114 Move printing-related methods from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2923343005
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
e4d9e12ee5 Use blink::WebLocalFrame instead of blink::WebFrame
Move GetDocument method from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2928033002

Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2923053002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
61797b7802 Move GetDocument method from WebFrame to WebLocalFrame.
https://codereview.chromium.org/2928033002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
7608a0489c Network Traffic Annotation added to DownloadURLParams.
https://chromium-review.googlesource.com/c/530307
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
e926473e5a Partial revert of Provide WebContents::CreateParams to tab helpers.
https://chromium-review.googlesource.com/c/571285
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
9566904838 Speech recognition: Use BindOnce / OnceCallback / OnceClosure where applicable
https://chromium-review.googlesource.com/c/565762
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
5831a5ffa1 Refactor client cert private key handling.
https://codereview.chromium.org/2898573002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
b69913975b chromeos: Check both original and absolute paths for file: scheme
https://codereview.chromium.org/2786583002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
14c61a96af VR: Check focus state browser-side before sending input to renderer.
https://chromium-review.googlesource.com/c/565760
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
fe48a92422 Propagate opener to BackgroundsContents.
https://codereview.chromium.org/2882513005
2017-11-24 10:58:16 +09:00
Tony Ganch
f694b64d71 FIXME: DesktopNotificationDelegate has been removed
Related CL: https://codereview.chromium.org/2906883003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
fe431a9e58 Add WebRTC related defines to the build config 2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
68cbfd9f40 Remove base::ListValue::Set(size_t, base::Value*)
https://codereview.chromium.org/2838893002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
2c063f93ff Remove raw base::DictionaryValue::Set
https://codereview.chromium.org/2911033002
2017-11-24 10:58:16 +09:00
Tony Ganch
cf00fc0661 Rename WriteToFileNetLogObserver to FileNetLogObserver 2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
370476c4af Remove unused RenderViewObserver methods.
https://chromium-review.googlesource.com/c/506027

`DidCreateDocumentElement()` observer method was removed.
So I have to use a different approach to check if a document element
has already been created on a web page.
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
1127452429 PlzNavigate: make NavigationResourceHandler a LayeredResourceHandler
https://codereview.chromium.org/2847443002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
a72a08bccc Convert iOS to use X509CertificateBytes.
https://codereview.chromium.org/2864133002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
ea8e113b19 SkBitmap and SkPixelRef no longer need lock/unlock
https://codereview.chromium.org/2823003002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
ea4a36039a Add Keyboard Latency UMA Metrics.
https://codereview.chromium.org/2756893002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
f03ca53af5 Add blink::WebInputEvent::IsPinchGestureEventType().
https://codereview.chromium.org/2861373004
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
650902c656 Renamed LoadCommittedDetails.is_in_page to is_same_document.
https://codereview.chromium.org/2841833002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
90b0984a14 Add missing IWYU message_loop.h includes.
https://codereview.chromium.org/2876013002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
e2a224c4e6 Remove rendundant WebLocalFrame parameter in various plugin code.
https://codereview.chromium.org/2855123003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
11fa935359 Introduce TaskRunner::RunsTasksInCurrentSequence()
https://codereview.chromium.org/2823103003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
f2bcdab037 Provide WebContents::CreateParams to tab helpers.
https://codereview.chromium.org/2894973002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
c402658c08 Replicate feature policy container policies.
https://codereview.chromium.org/2797813002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
971002a197 Switch to using scoped_ptr with UserData
https://codereview.chromium.org/2815913005
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
fe952d5c65 Get rid of SharedMemory::GiveToProcess.
https://codereview.chromium.org/2847033003

Changes copied from
"printing: Sandboxed processes must ask the browser to allocate shared memory."
https://codereview.chromium.org/1714643002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
ee9a547985 Service CreateNewWindow on the UI thread with a new mojo interface
https://codereview.chromium.org/2821473002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
b81ae1c36f REVIEW: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
https://codereview.chromium.org/2820163002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
ba6e8b4dff Merge ResourceRequestBodyImpl and ResourceRequestBody.
https://codereview.chromium.org/2954343005
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
b77b67bfbe Remove client_certs from SSLCertRequestInfo.
https://codereview.chromium.org/2838243002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
364c330887 Replace uses of hash_map in //base
https://codereview.chromium.org/2830093003
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
ba2f33d629 Remove base::Value::GetAsBinary
https://codereview.chromium.org/2839753005
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
f847291272 [blink] Unique pointers in Platform.h
https://codereview.chromium.org/2846843002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
7ad524fa34 Make base::DictionaryValue::Set* return pointers
https://codereview.chromium.org/2850773002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
75d02f65d9 Remove base::SharedMemory::ShareToProcess
https://codereview.chromium.org/2852803002
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
58e0771e47 Remove base::Value::Get{Buffer,Size}
https://codereview.chromium.org/2841623003
2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
132029ea32 Move components/display_compositor to components/viz/display_compositor
https://codereview.chromium.org/2873243002
2017-11-24 10:58:15 +09:00
Tony Ganch
5315a2e8dc Set clang revision to 307486 2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
2bb95ce41e Update chrome_version.h 2017-11-24 10:58:15 +09:00
Aleksei Kuzmin
fed090a44c Use latest libcc with Chromium 61 2017-11-24 10:58:15 +09:00
Cheng Zhao
f8adaed763 Merge pull request #11208 from electron/mips64el
Add support for mips64el
2017-11-24 10:54:19 +09:00
Cheng Zhao
2db845e202 Disable mips64el CI job 2017-11-24 10:12:19 +09:00
Felix Rieseberg
9f0df695ca 🔧 Spec: Fix style issues 2017-11-23 14:22:58 -08:00
Felix Rieseberg
0278e380de 🔧 Spec: Don’t use deprecated new Buffer() 2017-11-23 14:22:31 -08:00
Felix Rieseberg
f7d6e3fa7b 🔧 Disable standard/no-callback-literal where necessary 2017-11-23 13:53:03 -08:00
Felix Rieseberg
f81bfb7b86 🔧 Fix style issues 2017-11-23 13:42:48 -08:00
Felix Rieseberg
97a084a591 🔧 Script: Reject with error 2017-11-23 13:42:31 -08:00
Felix Rieseberg
d0ef834b4f 🔧 Remove redundant await statements 2017-11-23 13:42:09 -08:00
Felix Rieseberg
451a44c4b5 🔧 Don’t use deprecated new Buffer() 2017-11-23 13:41:47 -08:00
Felix Rieseberg
19df1cf070 📦 Upgrade to StandardJS 10 2017-11-23 13:41:14 -08:00
Heilig Benedek
62594780e0 run the new test only on windows 2017-11-23 21:25:26 +01:00
Heilig Benedek
710ca230f3 update tests to reflect new behaviour 2017-11-23 21:25:25 +01:00
Heilig Benedek
bb5eecc16c Use SizeConstraints instead of window events 2017-11-23 21:25:25 +01:00
Heilig Benedek
ca76dda6a6 remove incorrect checks 2017-11-23 21:25:25 +01:00
Heilig Benedek
7a7f1ee711 dont resize on taskbar resize if resizable is false 2017-11-23 21:25:25 +01:00
Charles Kerr
9c217fc6c7 Merge pull request #11224 from electron/browser-view-window
feature: Add `BrowserWindow.fromBrowserView()`
2017-11-23 14:41:36 +01:00
Charles Kerr
3f21e1240f Merge pull request #11231 from Toinane/fix-doc
fix doc in download-item
2017-11-23 14:39:52 +01:00
Toinane
dd139706ea fix doc in download-item 2017-11-23 13:31:09 +01:00
Charles Kerr
d92e229b3b Merge pull request #11207 from kstar0714/master
fix word docs-translation/README.md, CODE_OF_CONDUCT.md
2017-11-23 10:17:11 +01:00
shelley vohr
96aa0aa2f1 Merge pull request #11217 from him2him2/_fix_README.md_HTTPS
Update README.md URLs to HTTPS
2017-11-23 10:08:44 +01:00
Charles Kerr
3c607394d7 Merge pull request #11225 from electron/get-current-browser-view
feature: BrowserView.getAllViews() & BrowserView.fromWebContents()
2017-11-23 09:49:11 +01:00
Emmanuel Kimmerlin
5f658de19f 🐛 #10470 - prevent to load preload in each iframe context 2017-11-23 09:20:52 +01:00
Cheng Zhao
6930f5c3ba Update libcc to include patch on mips64el v8 pagesize 2017-11-23 16:58:58 +09:00
Felix Rieseberg
037f76c47b 🐛 Ooops, fix that 2017-11-22 17:07:57 -08:00
Felix Rieseberg
690e8cf75b 👷 Add specs 2017-11-22 17:06:14 -08:00
Felix Rieseberg
6298748d0b 📝 Document BrowserView.fromWebContents() 2017-11-22 17:02:01 -08:00
Felix Rieseberg
69e461083a 📝 Document BrowserView.getAllViews() 2017-11-22 17:00:09 -08:00
Felix Rieseberg
4d18cbe728 🔧 BrowserView.fromWebContents() 2017-11-22 16:59:00 -08:00
Felix Rieseberg
3cb062b3d6 🔧 BrowserView.getAllViews() 2017-11-22 16:58:32 -08:00
Cheng Zhao
e4064d8dc2 Do not upload symbols for mips64el 2017-11-23 09:19:01 +09:00
Felix Rieseberg
7630ac6e90 🔧 Return null if not found 2017-11-22 15:48:11 -08:00
Felix Rieseberg
8f20ce6dcf 📝 Docs! 2017-11-22 14:38:22 -08:00
Felix Rieseberg
b7bc4eb586 👷 Let’s test the undefined case, too 2017-11-22 14:38:08 -08:00
Felix Rieseberg
14db204315 👷 Add a spec 2017-11-22 14:37:46 -08:00
Felix Rieseberg
8c5aad8b17 🔧 Add BrowserWindow.fromBrowserView() 2017-11-22 14:36:54 -08:00
Ronald Eddy Jr
061447d34e Update README.md URLs to HTTPS
Updating HTTP protocol to HTTPS on applicable URLS
[ci skip]
2017-11-22 10:20:52 -08:00
Charles Kerr
fded32dc4f Merge pull request #11218 from him2him2/_fix_CI_BuildError
Fix continuous-integration build error
2017-11-22 18:11:01 +01:00
Ronald Eddy Jr
7003a2a19c fix continuous-integration build error
Added Missing code-language flags to upgrading-chrome.md
2017-11-22 08:26:23 -08:00
Cheng Zhao
40bad250aa Update libcc to fix error caused by libdrm 2017-11-22 19:31:04 +09:00
Cheng Zhao
7cc73140f8 Fix creating dist for mips64el
Note that dump_syms can not parse mips64 binaries, so we don't have
symbols archive for mips64 arch.
2017-11-22 19:29:39 +09:00
Cheng Zhao
a2f95c5f90 Add libpulse to dependencies of mips64el 2017-11-22 19:07:03 +09:00
hanbyeol
e25a46378b Merge https://github.com/kstar0714/electron 2017-11-22 00:45:03 -08:00
hanbyeol
2cee035b4e fix docs-translation/README.md 2017-11-22 00:40:37 -08:00
Charles Kerr
5d03f3ca64 Merge pull request #11191 from electron/chromium_updates_guide
Proposed update to Chromium checklist
2017-11-22 08:16:37 +01:00
김한별
6fd6315cb2 Update README.md 2017-11-22 15:42:17 +09:00
Zeke Sikelianos
32edf6a2b8 Merge pull request #11203 from electron/document-chromium_src-directory
document chromium_src directory
2017-11-21 21:10:47 -08:00
Cheng Zhao
db6de6a2b2 Run electron-linux-mips64el CI job 2017-11-22 11:31:23 +09:00
Cheng Zhao
34d108e896 Fix linting error 2017-11-22 11:30:06 +09:00
Cheng Zhao
b2564242e0 Add CI job for mips64el
Note that our CI server is not ready for mips64el yet, so the binaries
of libcc are not available yet. Currently it is downloading the binaries
created by me manually, we should redirect to the official mirror before
merging this PR.
2017-11-22 11:21:28 +09:00
Cheng Zhao
7bc58c6a5f Update libcc to latest with mips64el support 2017-11-22 11:14:46 +09:00
Cheng Zhao
16ffff4aec Fix passing rpath to gcc 2017-11-22 11:14:20 +09:00
hanbyeol
78ccf14e53 fix word CODE_OF_CONDUCT.md 2017-11-21 17:15:14 -08:00
hanbyeol
1445ba5116 fix word docs-translation/README.md 2017-11-21 17:06:43 -08:00
Samuel Attard
be9e6700d9 Merge pull request #11204 from andykog/patch-2
Add mobx-devtools to the Supported section
2017-11-22 09:11:48 +11:00
Andy Kogut
0c47207a0e Add mobx-devtools to the Supported section
The library: https://mobx.js.org/
Extension's repo: https://github.com/andykog/mobx-devtools

![screen shot 2017-11-21 at 21 26 56](https://user-images.githubusercontent.com/6760207/33092485-eda05836-cf02-11e7-81a3-c04f8c3ea73b.png)
2017-11-21 21:38:14 +02:00
Zeke Sikelianos
4b41822a62 document chromium_src directory 2017-11-21 10:55:56 -08:00
Catalin Fratila
3b29adc000 Making it prettier. 2017-11-21 15:19:33 +01:00
Vanessa Yuen
b51396f1cd Merge pull request #11199 from duswlsgur/branch
Fixed wrong words & deleted urls in README.md
2017-11-21 21:01:36 +08:00
Cheng Zhao
0d8cfe8dbe Some compiler flags are clang only 2017-11-21 21:48:06 +09:00
Cheng Zhao
4f9c5310a9 Fix compiler warning when building with gcc 2017-11-21 21:47:51 +09:00
Charles Kerr
70643a865b Merge pull request #11178 from electron/fenced-code-block-lang
enforce rules on code blocks style in docs
2017-11-21 13:38:46 +01:00
Cheng Zhao
b2fdfa2710 Use mips64el toolchain 2017-11-21 20:42:20 +09:00
Cheng Zhao
a83b8e751b Download mips64el toolchain 2017-11-21 19:38:21 +09:00
Cheng Zhao
447e0e6c8b Add mips64el to arch list 2017-11-21 19:06:42 +09:00
JinHyeok Yeon
d8fe846d50 Fixed wrong word electron-i18n & url in README.md 2017-11-21 18:23:08 +09:00
shelley vohr
c7e40a2a64 Merge pull request #11133 from electron/skip-tests-that-should-be-skipped
Explicitly skip tests that should be skipped
2017-11-21 10:13:18 +01:00
JinHyeok Yeon
4a42738db9 Merge branch 'master' of github.com:electron/electron into branch 2017-11-21 17:22:17 +09:00
JinHyeok Yeon
51a023e7bb fixed wrong words & urls in README.md 2017-11-21 17:15:58 +09:00
Vanessa Yuen
c122852f09 make verbose execute and non verbose execute do the same things 2017-11-21 16:07:26 +08:00
Charles Kerr
92872154d4 Copyediting 2017-11-21 08:18:12 +01:00
Charles Kerr
dba9181611 Merge pull request #11164 from electron/nstitlebar-hidden
fix: Explicitally set "setTitlebarAppearsTransparent"
2017-11-21 07:51:47 +01:00
Cheng Zhao
596a61f1ad Merge pull request #11059 from electron/clear-permissions-handler
Document setPermissionRequestHandler(null)
2017-11-21 09:50:17 +09:00
Shelley Vohr
be67fcf62b initial updates from meeting today 2017-11-20 23:02:54 +01:00
Charles Kerr
0711e1e5e1 Merge pull request #11170 from him2him2/fixREADMEHeaders
Standardize README.md headers
2017-11-20 13:45:09 -06:00
Charles Kerr
70fae85451 Merge pull request #11187 from electron/util-is-deprecation
fix: Don’t use deprecated util.is* methods
2017-11-20 13:38:56 -06:00
Charles Kerr
432d050481 Merge pull request #11167 from simast/menu-typings-fix
Improve setApplicationMenu/getApplicationMenu docs
2017-11-20 13:28:37 -06:00
Felix Rieseberg
3c38438303 📦 Update electron-typescript-definitions 2017-11-20 09:54:00 -08:00
Felix Rieseberg
05bae0b4c4 🔧 Util is no longer used here 2017-11-20 09:52:13 -08:00
Felix Rieseberg
b029c088db 🔧 Bonus ; 2017-11-20 09:48:33 -08:00
Felix Rieseberg
b8b3b441a7 🔧 util._extend is deprecated, too 2017-11-20 09:46:02 -08:00
Felix Rieseberg
71b8eaf085 🔧 Don’t use deprecated util.is* methods 2017-11-20 09:40:47 -08:00
Charles Kerr
fa37d49fb6 Merge pull request #11185 from electron/fs-optional-options
fix: fs.readFile: make options optional
2017-11-20 10:57:31 -06:00
Charles Kerr
dafd3d69bc Merge pull request #11184 from electron/document-nucleus
docs: Document Nucleus
2017-11-20 10:51:09 -06:00
Felix Rieseberg
4f6bdc5824 📦 Bump electron-docs-linter 2017-11-20 08:24:39 -08:00
Felix Rieseberg
c9f2080e4b 🔧 fs.readFile: options are optional 2017-11-20 08:20:20 -08:00
Felix Rieseberg
6cacb9838e 📝 Document Nucleus 2017-11-20 08:04:14 -08:00
Charles Kerr
5eb00e45aa Merge pull request #11158 from electron/execute-errors
fix: Pass on errors thrown in `executeJavaScript`
2017-11-20 09:14:05 -06:00
Charles Kerr
4c04f1c7ed Merge pull request #11117 from electron/add_deprecations_spec
Add to deprecations spec
2017-11-20 09:07:06 -06:00
Shelley Vohr
7904be8763 comment out unused methods 2017-11-20 15:12:34 +01:00
Aleksei Kuzmin
cf749a8e18 Explicitly skip tests that should be skipped 2017-11-20 14:43:23 +01:00
shelley vohr
42d7d51b75 Merge pull request #11171 from him2him2/electron.atom.io
Update electron.atom.io -> electronjs.org
2017-11-20 13:05:14 +01:00
Cheng Zhao
cb98ed8674 Merge pull request #11176 from electron/proxy-crash-race
Avoid proxy handler race condition crash
2017-11-20 20:15:02 +09:00
Vanessa Yuen
435e027dc3 fix linting for fenced codeblocks only (see electron/electronjs.org#868) 2017-11-20 14:33:25 +08:00
Vanessa Yuen
2441d51093 add remark lint to ensure fenced codeblocks are formatted properly. 2017-11-20 14:05:47 +08:00
Cheng Zhao
cd5785c410 Merge pull request #10793 from ahmedmohamedali/master
Add support for pdf in sub frames (https://github.com/electron/electr…
2017-11-20 11:37:42 +09:00
Cheng Zhao
dc7eaf8d78 Update to latest libcc 2017-11-20 11:07:00 +09:00
Cheng Zhao
79414d4822 Do not open devtools in tests 2017-11-20 11:05:38 +09:00
Cheng Zhao
3cc8330998 Merge branch 'master' into ahmedmohamedali-master 2017-11-20 11:04:47 +09:00
Ted Kim
71c16ad76f lint 2017-11-20 10:17:34 +09:00
Ted Kim
1660fc8d13 Fix getLoginItemSettings timing issue 2017-11-20 10:15:45 +09:00
Matt Crocker
efaf7a6b85 Avoid race condition where login handler webcontents becomes null 2017-11-19 14:08:11 -08:00
Ronald Eddy Jr
5376df1519 Capitalizing Electron 2017-11-19 09:51:03 -08:00
Ronald Eddy Jr
f2d6d6b6a1 Updated Headers now consistent with styleguide
Made headers consistent with styleguide: 
https://github.com/electron/electron/blob/master/docs/styleguide.md#titles
2017-11-19 09:48:09 -08:00
Ronald Eddy
14c6e78147 Update electron.atom.io -> electronjs.org
Update electron.atom.io -> electronjs.org to reduce redirects and speed navigation.
2017-11-19 04:01:33 -08:00
Ronald Eddy Jr
2a826c7ca9 Standardize README.md headers
Small changes to standardize formatting.
2017-11-19 02:48:06 -08:00
Simas Toleikis
c465257d69 Fix docs for menu setApplicationMenu/getApplicationMenu methods [ci skip] 2017-11-19 11:41:22 +02:00
Zhuo Lu
367f7f123d Update icns 2017-11-19 00:33:33 -08:00
Felix Rieseberg
daad465fcd 🔧 Eh, let's do it for all the types 2017-11-18 20:19:22 -08:00
Felix Rieseberg
e3b6271806 🔧 setTitlebarAppearsTransparent=YES 2017-11-18 20:00:01 -08:00
Felix Rieseberg
5b18bea7e3 🔧 Alex has good ideas 2017-11-18 10:59:09 -08:00
Felix Rieseberg
cf7e9df3a0 🔧 Appease the linter 2017-11-18 01:02:09 -08:00
Felix Rieseberg
3311e0bd67 👷 This calls for tests 2017-11-18 00:51:27 -08:00
Felix Rieseberg
9a2d103e7f :thinking_face: What if we made it an Error again? 2017-11-18 00:51:14 -08:00
Felix Rieseberg
1dea186a6e :thinking_face: What if you could return an Error? 2017-11-18 00:50:53 -08:00
John Kleinschmidt
3e4b73ef8f Update branch determination 2017-11-17 16:21:14 -05:00
John Kleinschmidt
df891d2aae Update for API invoked release builds
Also, fixed links
2017-11-17 16:06:42 -05:00
John Kleinschmidt
f469059e90 Merge pull request #11153 from electron/update-ci-release
Move release build process to API calls
2017-11-17 15:52:20 -05:00
Zeke Sikelianos
e2a91ff689 Merge pull request #11152 from electron/fix-typo-in-styleguide
fix typo in styleguide
2017-11-17 12:26:43 -08:00
Zeke Sikelianos
b525f2f031 fix typo in styleguide 2017-11-17 12:14:33 -08:00
John Kleinschmidt
6f11aa169a Run release builds from API
Remove "Bump" logic to run release
2017-11-17 15:13:30 -05:00
John Kleinschmidt
6fab8cc3a5 Merge pull request #11145 from OuYancey/translation-link
fix: wrong translation link in README
2017-11-17 10:54:17 -05:00
John Kleinschmidt
ccb6651752 Merge pull request #11125 from electron/fix-cert-verification-random-crash-on-exit
Fix random crash on app quit
2017-11-17 10:53:56 -05:00
Thiago de Arruda
a9a9e58b68 Fix random crash on app quit.
Move AtomCTDelegate to brightray as RequireCTDelegate and transfer ownership to
brightray::URLRequestContextGetter. This fixes the wrong lifetime assumptions
that result in AtomCTDelegate being used after free in some scenarios.

Close #10051
2017-11-17 12:03:23 -03:00
OuYancey
780c1b8f56 fix: add nation flags and link translations to one address 2017-11-17 12:44:21 +08:00
Ted Kim
d9481430df Fix test failure 2017-11-17 10:53:21 +09:00
Taeho Kim
ada71eea39 📝 Use separate entitlements for login helper 2017-11-17 10:53:15 +09:00
Ted Kim
8184cbfb06 Implement login helper to manage login item in Mac App Store build 2017-11-17 10:53:09 +09:00
Shelley Vohr
aaae1bb176 Merge pull request #11124 from electron/expose-desktop-capturer
Expose desktopCapturer in sandbox mode.
2017-11-16 17:36:39 -05:00
Charles Kerr
9f922e9932 Merge pull request #11099 from electron/fix-emit-call-crash
Fix crash when emitting unhandled error on native EventEmitter
2017-11-16 15:57:07 -06:00
Charles Kerr
e10feb6be2 Merge pull request #11135 from electron/add_callbacks_spec
add callbacks registry spec
2017-11-16 15:47:34 -06:00
John Kleinschmidt
2138c5bff0 Enable verbose mode 2017-11-16 16:05:02 -05:00
John Kleinschmidt
6243d45946 Add AppVeyor and Jenkins 2017-11-16 16:04:50 -05:00
Thiago de Arruda
be0e3d9555 Expose desktopCapturer in sandbox mode. 2017-11-16 16:57:29 -03:00
Shelley Vohr
7f4c501f81 remove only 2017-11-16 14:51:24 -05:00
Samuel Attard
fc265b7600 linter plz 2017-11-17 06:15:53 +11:00
Samuel Attard
bdbc6bb165 Clean up empty logic 2017-11-17 06:09:35 +11:00
Shelley Vohr
933c7330a5 changes from review 2017-11-16 13:39:07 -05:00
Shelley Vohr
75a117e4e2 edit empty function for platform consistency 2017-11-16 13:27:08 -05:00
Shelley Vohr
f5c04c7037 fix includes 2017-11-16 13:27:08 -05:00
Shelley Vohr
c8b544a47d linting is important 2017-11-16 13:27:08 -05:00
Shelley Vohr
e5983eacd6 add callbacks registry spec 2017-11-16 13:27:07 -05:00
Charles Kerr
0bfbd9b3c4 Merge pull request #11140 from electron/revert-10856-mas-login-helper
Revert "Implement login helper to manage login item in Mac App Store build"
2017-11-16 11:20:46 -06:00
Alexey Kuzmin
8657169017 Revert "Implement login helper to manage login item in Mac App Store build" 2017-11-16 19:05:13 +03:00
Charles Kerr
668b736ef2 Merge pull request #11088 from electron/fix-link-to-crowdin
fix link to crowdin
2017-11-16 09:35:38 -06:00
Charles Kerr
97c64de28e Merge pull request #11139 from electron/shall-we-got-a-cup-of-tea
Add Chai library for tests
2017-11-16 09:14:36 -06:00
Aleksei Kuzmin
b51a9cf4f6 Rewrite "nativeImage module" tests assertions with chai.expect() 2017-11-16 16:00:11 +03:00
Aleksei Kuzmin
367b4b05a1 Add Chai library for tests 2017-11-16 15:59:26 +03:00
Charles Kerr
33bd2aa1a0 Merge pull request #11126 from numaanashraf/patch-1
Fix typo in session docs
2017-11-15 12:00:15 -06:00
John Kleinschmidt
f8dd04e5f7 Fix testing fork prs (#11127)
* Make sure DISPLAY is set before XVFB runs
2017-11-15 10:47:36 -05:00
Numaan Ashraf
b695f1221c 📝 Fix typo in session docs 2017-11-15 20:54:24 +05:30
Samuel Attard
57f934a806 Appease the linter 2017-11-15 18:24:18 +11:00
Samuel Attard
8a8f169628 Add comments and use ToLocal instead of ToLocalChecked 2017-11-15 18:24:18 +11:00
Charles Kerr
3a1106d026 Merge pull request #11103 from electron/full-version-string
fix: Provide full and correct version in `process.version`
2017-11-14 19:18:03 -06:00
Felix Rieseberg
ee2a28b35b 🔧 Clean it up 2017-11-14 13:45:50 -08:00
Shelley Vohr
dc410efa36 rename and fix assoc. test 2017-11-14 14:56:16 -05:00
Shelley Vohr
99d35f7786 a few more updates to tests 2017-11-14 13:33:38 -05:00
Charles Kerr
58bd0986c8 Merge pull request #11100 from Raul6469/docs_translations_link
Link to the new docs translations
2017-11-14 10:57:47 -06:00
Charles Kerr
31172ecaa0 Merge pull request #11008 from electron/implement-stream-protocol
Implement {register,intercept}StreamProtocol
2017-11-14 09:31:57 -06:00
Charles Kerr
f6ce1afad3 Merge pull request #11093 from electron/fix-formatting-in-linux-build-instructions-doc
fix formatting in linux build instructions doc
2017-11-14 07:54:16 -06:00
Cheng Zhao
4b8ab8fc97 Merge pull request #10856 from dittos/mas-login-helper
Implement login helper to manage login item in Mac App Store build
2017-11-14 21:34:50 +09:00
Shelley Vohr
d05a1f8053 first pass at deprecation spec updates 2017-11-13 20:21:57 -05:00
Charles Kerr
bbde795a1f Merge pull request #10923 from electron/nvidia-high-sierra-fix
Fix rendering issues with Nvidia GPU on High Sierra
2017-11-13 18:00:38 -06:00
Ahmed Mohamed Ali
4a92e5fc24 Update libchromiumcontent to commit fe6086f 2017-11-13 22:21:18 +01:00
Ahmed Mohamed Ali
b6109030a1 Fix missing eof missing from html test files 2017-11-13 21:22:36 +01:00
Ahmed Mohamed Ali
1f2c949316 Merge branch 'master' of https://github.com/ahmedmohamedali/electron 2017-11-13 21:16:52 +01:00
Ahmed Mohamed Ali
ff707a0f3d Fix issues in the file for the tests. 2017-11-13 21:13:19 +01:00
Felix Rieseberg
7c446cc61c 🔧 Actually fix the test 2017-11-13 11:22:34 -08:00
Thiago de Arruda
5e8618ec3b Add documentation for {intercept,register}StreamProtocol. 2017-11-13 16:16:14 -03:00
Thiago de Arruda
639dc2377f Add tests for URLRequestStreamJob 2017-11-13 16:16:14 -03:00
Thiago de Arruda
5ea3a5886b Implement {register,intecept}StreamProtocol
These new functions are more flexible than the other
{intercept,register}*ProtocoProtocol functions, since it allows the user to
return a node.js stream to feed the data to the protocol handler.

It also allows the user to specify a response header dictionary, which makes it
possible to correctly intercept any request made from renderers.
2017-11-13 16:16:14 -03:00
Thiago de Arruda
68f514b92f Implement EventSubscriber<T> class.
This class simplifies the task of subscribing/handling javascript events from
C++ classes in the main process.
2017-11-13 15:22:50 -03:00
Thiago de Arruda
64bfabdeba Make BindFunctionWith function visible to other modules. 2017-11-13 15:21:22 -03:00
Thiago de Arruda
6b666b69c0 Implement GetLoadTimingInfo in JsAsker class.
This is required to avoid a crash in blink when implementing a custom protocol
handler that deals with redirects.
2017-11-13 15:20:56 -03:00
Thiago de Arruda
6b2ddc4814 Stop allowing electron.net requests to be intercepted.
Not very useful to intercept requests from `electron.net`, since both the
interception machinery and `electron.net` live in the browser process.
2017-11-13 15:20:46 -03:00
Thiago de Arruda
32113bf7f9 Implement V8 -> C++ conversion of net::HttpResponseHeaders. 2017-11-13 15:20:40 -03:00
Thiago de Arruda
9c04d18387 Modify FillRequestDetails to pass headers dictionary. 2017-11-13 15:19:59 -03:00
Felix Rieseberg
163a33a9db Add fallbacks 2017-11-13 09:27:02 -08:00
Felix Rieseberg
b382dec4a2 🔧 Rename the label 2017-11-13 09:26:52 -08:00
Cheng Zhao
4d364fa27a Merge pull request #10510 from brenca/osr-autofill-devtools-fix
OSR fixes - devtools, dialogs
2017-11-13 18:04:35 +09:00
Cheng Zhao
72440d4ae7 No need to add new methods to WebContentsPreferences 2017-11-13 17:35:49 +09:00
Cheng Zhao
cee1c459c7 Do not accidentally change the behavior of did-change-theme-color 2017-11-13 16:20:54 +09:00
Cheng Zhao
7e0593950c Code style fixes 2017-11-13 16:13:54 +09:00
Felix Rieseberg
8de9d5265a 👷 Fix the spec 2017-11-12 23:06:04 -08:00
Heilig Benedek
276e12ce71 pass on web_contents to properly handle devtools 2017-11-13 15:50:50 +09:00
Heilig Benedek
573f664899 fix devtools again 2017-11-13 15:50:49 +09:00
Heilig Benedek
26daffea9c use smart pointer for paint_canvas 2017-11-13 15:50:49 +09:00
Heilig Benedek
4b10445c2e lint fix 2017-11-13 15:50:49 +09:00
Heilig Benedek
193beb57c9 fix datalist element popup position when menu is hidden 2017-11-13 15:50:49 +09:00
Heilig Benedek
f8b3009ebf restructure code to use web_preferences if possible 2017-11-13 15:50:49 +09:00
Heilig Benedek
cafb9477b0 lint fix 2017-11-13 15:46:46 +09:00
Heilig Benedek
71b36ef54d don't show the dummy window for the rest of the dialogs too on mac 2017-11-13 15:46:46 +09:00
Heilig Benedek
5373afa472 set devtools window to visible to avoid a visual glitch on mac with osr window's devtools 2017-11-13 15:46:46 +09:00
Heilig Benedek
13b86598e8 don't show osr dummy window when dialog is shown on mac 2017-11-13 15:46:46 +09:00
Heilig Benedek
35dc6d03b9 lint fix 2017-11-13 15:46:46 +09:00
Heilig Benedek
45d16d5add don't automatically show window when devtools is opened on mac 2017-11-13 15:46:46 +09:00
Heilig Benedek
e39aacb30e fix a bug that caused a crash when using an offscreen window with detached devtools, related to autofill popups 2017-11-13 15:46:46 +09:00
Heilig Benedek
5daaff91ea fix a bug where datalist elements wouldn't actually set the value of the input associated with them 2017-11-13 15:46:46 +09:00
Felix Rieseberg
12653d36ea 🔧 Update the script, too 2017-11-12 22:37:54 -08:00
Felix Rieseberg
7b0b87bfef 🔧 Use full version string 2017-11-12 22:37:46 -08:00
Samuel Attard
3c0b233d04 Fix line length in caller.cc 2017-11-13 11:42:42 +11:00
Samuel Attard
aa6b9a5025 Fix crash when emitting unhandled error on native EventEmitter 2017-11-13 03:03:58 +11:00
Victor
29438940f6 Link to the new docs translations 2017-11-12 17:03:43 +01:00
Zeke Sikelianos
f0facdc01f fix formatting in linux build instructions doc 2017-11-11 09:49:19 -08:00
Samuel Attard
40b94e97e5 Merge pull request #11087 from electron/abi-version
fix: Bring back --abi
2017-11-11 14:47:45 +11:00
Samuel Attard
a06a8a6f79 Merge pull request #11056 from ajmacd/allow-browser-window-logs
Allow BrowserWindows to emit `console-message` events.
2017-11-11 14:34:39 +11:00
Samuel Attard
ba754cf5c3 Merge pull request #11055 from electron/fix-menu-bug
fix: Don't crash on `setApplicationMenu(null)`
2017-11-11 14:33:18 +11:00
Zeke Sikelianos
9a2a98d522 fix link to crowdin 2017-11-10 15:08:03 -08:00
Felix Rieseberg
ae960027f2 🔧 Bring back —abi 2017-11-10 14:58:21 -08:00
Felix Rieseberg
13749797ec 📝 Document setPermissionRequestHandler(null) 2017-11-10 14:48:15 -08:00
Charles Kerr
9291ab95dd Merge pull request #11039 from electron/deprecate-docs-translations
Deprecate /docs-translations
2017-11-10 13:54:51 -06:00
Charles Kerr
5adbbef6cd Merge pull request #11079 from sdj01044/add-korean-community
Add Korean Community
2017-11-10 11:04:08 -06:00
sdj01044
0c88b073d1 Update README.md
Change the URL
https://electron-kr.slack.com     ->   https://electron-kr.github.io/electron-kr
2017-11-10 18:26:07 +09:00
Dongjo Seo
f5b9e1f732 Add Korean Community 2017-11-10 17:04:21 +09:00
Samuel Attard
912c023c6d Merge pull request #11060 from electron/ts-artifact
Generate API and typescript file as artifact on CircleCI
2017-11-09 15:01:10 +11:00
Zeke Sikelianos
2ad1d8ba28 clean up remaining references to docs-translations content 2017-11-08 19:06:18 -08:00
Zeke Sikelianos
387ed21f94 updates from master 2017-11-08 19:01:58 -08:00
Andrew MacDonald
7c5bd62158 Decrease title size. 2017-11-08 09:37:56 -08:00
Andrew MacDonald
00665b9501 Add documentation to web-contents.md. 2017-11-08 09:35:01 -08:00
Ahmed
26fedcf8da Update chromium-spec.js 2017-11-08 18:12:50 +01:00
Ahmed
9b3960fe90 Merge branch 'master' into master 2017-11-08 18:03:55 +01:00
Charles Kerr
9bf950aa33 Merge pull request #10997 from xxczaki/patch-1
Deleted Korean Community
2017-11-08 09:46:04 -06:00
John Kleinschmidt
26baea58c9 Merge pull request #10990 from electron/fix-10988
Enable "document.visibilityState/hidden" tests
2017-11-08 09:55:40 -05:00
Andrew MacDonald
51f6311f32 Handle the possibility of unexpected logs. 2017-11-08 00:09:54 -08:00
Andrew MacDonald
e51042f5a1 Add console-message test. 2017-11-07 23:45:27 -08:00
Samuel Attard
1986236b19 Merge pull request #11058 from electron/forward-declare-scrubber-layout
Forward declare the scrubber layout
2017-11-08 17:57:19 +11:00
Samuel Attard
ef78805a1c Generate API and typescript file as artifact on CircleCI to make verifying changes easier 2017-11-08 16:55:24 +13:00
Samuel Attard
bb997c2ea4 Forward declare the scrubber layout 2017-11-08 16:48:08 +13:00
Felix Rieseberg
d475eaf011 🔧 One commit per character is now hot 2017-11-07 19:44:24 -08:00
Felix Rieseberg
3dcde82485 🔧 Make this easier to read 2017-11-07 18:26:10 -08:00
Andrew MacDonald
c260a0ab78 Allow BrowserWindows to emit console-message events. 2017-11-07 15:31:15 -08:00
John Kleinschmidt
98eee28cbc Merge pull request #11054 from electron/jenkins-pipeline
Move to using Jenkins pipeline
2017-11-07 16:43:54 -05:00
John Kleinschmidt
a34255ceef Add Jenkinsfile to enable rebuilds
Adding this file will allow us to rerun builds in Jenkins.
2017-11-07 16:32:09 -05:00
Felix Rieseberg
07dea13c77 👷 Let’s add a spec! 2017-11-07 13:29:37 -08:00
Felix Rieseberg
1454783450 🔧 Check menu for being falsy 2017-11-07 13:29:14 -08:00
John Kleinschmidt
546ede19c7 Add Jenkinsfile to use Jenkins pipeline 2017-11-07 16:22:04 -05:00
Zeke Sikelianos
8eb38be153 Merge pull request #11000 from sdj01044/fix-korean-styleguide
Fix Korean grammatic mistakes
2017-11-07 07:33:35 -08:00
Samuel Attard
5e50a9ab8f Merge pull request #11009 from electron/docs-aumi-link
fix: Documentation: Add link to App User Model Id
2017-11-08 01:15:24 +11:00
Samuel Attard
bf42426acc Merge pull request #11048 from Toinane/fix-doc
fix(documentation): link in browserwindows.md
2017-11-08 01:14:36 +11:00
Samuel Attard
6b9e67c972 Merge pull request #11004 from electron/upgrade-ts-defs
Upgrade electron-typescript-definitions to latest
2017-11-08 01:04:55 +11:00
Toinane
247af376fe fix(documentation): link in browserwindows.md 2017-11-07 14:17:00 +01:00
Samuel Attard
43aa555d64 Merge pull request #11038 from dashersw/master
Make ScrubberItem width dynamic
2017-11-07 18:18:52 +11:00
Zeke Sikelianos
5e0fe575c9 remove deprecated docs translations 2017-11-06 15:48:47 -08:00
Zeke Sikelianos
11957b62bb add docs-translations deprecation README 2017-11-06 15:47:28 -08:00
Armagan Amcalar
edd113548a Make ScrubberItem width dynamic
Depending on whether a ScrubberItem has text or an icon, this changeset
calculates the actual width and sizes the TouchBar items accordingly.
Previously, all ScrubberItems, regardless of their content, had a static
width of 50px.

This commit also fixes #10539.
2017-11-07 00:09:14 +01:00
John Kleinschmidt
5383b4809f v1.8.2-beta.2 2017-11-06 16:11:34 -05:00
Charles Kerr
083b6e2bbe Merge pull request #11022 from ChangJoo-Park/patch-2
Fix typo inspector to inspect
2017-11-06 10:32:07 -06:00
ChangJoo Park(박창주)
859bb81b29 Fix typo inspector to inspect 2017-11-06 09:23:18 +09:00
Samuel Attard
ca480948aa Merge pull request #11005 from electron/revert-electron-download-version
revert electron-download dependency to ^3.0.1
2017-11-06 12:55:34 +13:00
Vanessa Yuen
f01e5bee92 Merge pull request #11001 from electron/ci-release-build-api
Decouple building electron for release from the actual release cutting process
2017-11-05 10:22:04 +08:00
Shelley Vohr
d1cdcc5760 Merge pull request #11007 from electron/silly-typo-change
fix: One-character typo change
2017-11-04 20:36:55 -04:00
Samuel Attard
fa795ff4cd Merge pull request #11013 from electron/temporary-remove-a-deprecation-warning-from-crashreporter-setextraparameter
Disable deprecation warning of `crashReported.setExtraParameter()`
2017-11-05 03:41:37 +13:00
Aleksei Kuzmin
bd766067ac Remove unused deprecate var to make linter happy 2017-11-04 07:52:47 +03:00
Aleksei Kuzmin
b3a1fc65e5 Disable deprecation warning of crashReported.setExtraParameter()
It caused a couple of Crash Reported tests to timeout on Mac.
Task to enable it back:
https://github.com/electron/electron/issues/11012
2017-11-04 07:48:39 +03:00
Vanessa Yuen
2063af8ac6 a few changes as per code review comments 2017-11-04 10:53:42 +08:00
Charles Kerr
0aaf961f17 empty commit for CI 2017-11-03 16:33:06 -05:00
Felix Rieseberg
067662b304 📝 Oh look, another typo 2017-11-03 13:02:12 -07:00
Felix Rieseberg
8b85a3be23 📝 Add link to App User Model Id 2017-11-03 11:52:27 -07:00
Felix Rieseberg
43bb74cb13 📝 One-character typo change 2017-11-03 10:54:17 -07:00
Charles Kerr
6f3fdb6ae6 revert electron-download dependency to ^3.0.1
undo last week's dependency bump as per discussion at https://github.com/electron/electron/pull/10922

dependency was bumped @ 0c9e106502
2017-11-03 09:45:09 -05:00
Shelley Vohr
8736a41cfb Merge pull request #10909 from electron/update_remote
Simplify and remove excess code from remote module
2017-11-03 09:16:28 -04:00
Shelley Vohr
803fa35484 fix null value check 2017-11-03 08:47:21 -04:00
Birunthan Mohanathas
ecb11b3a4c Upgrade electron-typescript-definitions to latest for electron/electron-typescript-definitions#80 2017-11-03 14:35:19 +02:00
Vanessa Yuen
85a811db55 make target branch name mandatory and specific ci job optional
add it as an npm script `npm run mock-release -- TARGET_BRANCH`
2017-11-03 14:56:16 +08:00
Vanessa Yuen
63632f1137 fix circle config 2017-11-03 14:36:25 +08:00
Cheng Zhao
42d6fe209c Merge pull request #10936 from robinwassen/tray-docs-update
Removed incorrect optional labels from tray.displayBalloon(options) docs
2017-11-03 15:08:43 +09:00
Dongjo Seo
9c8fcfb723 Fix Korean grammatic mistakes
I fixed wrong words & wrong translations.
2017-11-03 14:45:10 +09:00
Vanessa Yuen
3bd38bd1fd add API flags to all other circle jobs 2017-11-03 12:45:30 +08:00
Shelley Vohr
2b2c7d7f9f fix object serialization test issue 2017-11-02 21:29:17 -04:00
Shelley Vohr
41fa61b446 Merge pull request #10995 from electron/initialize-retroactive-event-emitters
singletons that are retroactively turned into EventEmitters should ca…
2017-11-02 21:22:27 -04:00
Shelley Vohr
5c318932c2 add some structural changes 2017-11-02 21:07:40 -04:00
Vanessa Yuen
7cb408838f skip headers and pdbs for fake release builds 2017-11-03 08:12:54 +08:00
Shelley Vohr
c3930f235a Merge pull request #10992 from electron/address_crash_done
remove function invocation from crash test
2017-11-02 19:51:28 -04:00
Shelley Vohr
18a69b8c48 kick ci 2017-11-02 18:36:33 -04:00
Anthony
4b10c39ca0 Deleted Korean Community
Meetup Group doesn't exist.

https://www.meetup.com/electron-kr/
2017-11-02 20:38:07 +01:00
Charles Kerr
4ceeddc09f Merge pull request #10972 from electron/dpi-issues
Workaround for Windows DPI issues
2017-11-02 10:16:11 -05:00
Shelley Vohr
498742d6b3 remove function invocation from crash test 2017-11-02 07:07:19 -04:00
Vanessa Yuen
4cc8008cfc derp.. why did I make a separate parse_args() 2017-11-02 16:42:09 +08:00
Vanessa Yuen
bf5b9e70bb fix linting errors 2017-11-02 16:20:41 +08:00
Vanessa Yuen
b23fa34470 modify upload script to allow uploading release assets to s3 2017-11-02 16:06:28 +08:00
Vanessa Yuen
f937f971c1 make script to hit circle ci api point to build for release 2017-11-02 15:26:37 +08:00
Shelley Vohr
9727717839 Merge pull request #10974 from electron/add_crashreport_tests
Update Crash Report Tests
2017-11-02 01:45:39 -04:00
Shelley Vohr
a7f059d951 switch from set to add in paramater test 2017-11-02 01:02:16 -04:00
Shelley Vohr
1d6803b234 remove deprecated tests 2017-11-02 00:16:51 -04:00
Charles Kerr
1c09dede1a singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor 2017-11-01 23:05:27 -05:00
Shelley Vohr
65f125a245 wrap deprecation warning 2017-11-01 23:27:20 -04:00
Shelley Vohr
14df9a58c7 remove setExtraParam from docs 2017-11-01 22:30:48 -04:00
Shelley Vohr
dc9c2673d7 docs typo fix 2017-11-01 22:25:10 -04:00
Shelley Vohr
24acd74d15 update deprecation warning 2017-11-01 22:23:33 -04:00
Shelley Vohr
577012370e Merge pull request #10977 from electron/refactor-native-image-tests
Light refactoring of the nativeImage module tests
2017-11-01 22:00:01 -04:00
Shelley Vohr
3af83f1c97 add new method and mark setExtraParameter for deprecation 2017-11-01 21:57:43 -04:00
Shelley Vohr
33092e6324 update docs to reflect parameter method change 2017-11-01 21:21:41 -04:00
Aleksei Kuzmin
2bd44612fd Revert "Merge pull request #10989 from electron/temporary-disable-visibility-state-tests"
This reverts commit f3125358c0, reversing
changes made to 7b9ad5001b.
2017-11-02 03:22:27 +03:00
Shelley Vohr
a106956cfe retriggerci 2017-11-01 20:20:26 -04:00
Aleksei Kuzmin
2f7718265a Light refactoring of the nativeImage module tests 2017-11-02 03:18:32 +03:00
Shelley Vohr
f3125358c0 Merge pull request #10989 from electron/temporary-disable-visibility-state-tests
Temporary disable "document.visibilityState/hidden" tests
2017-11-01 20:13:54 -04:00
Aleksei Kuzmin
0df058dc1e Temporary disable "document.visibilityState/hidden" tests
Task to enable them:
https://github.com/electron/electron/issues/10988
2017-11-02 00:06:38 +03:00
Shelley Vohr
7b9ad5001b Merge pull request #10987 from electron/upgrade_last_few_specs
convert shell and browser spec to ES6
2017-11-01 14:30:54 -04:00
Felix Rieseberg
e8f8100e19 🔧 Add fixme 2017-11-01 11:30:32 -07:00
Shelley Vohr
6961162636 another try at fixing travis test 2017-11-01 14:26:39 -04:00
Shelley Vohr
28c009fcc0 linting is important 2017-11-01 10:56:53 -04:00
Shelley Vohr
d2e1705c80 convert app and browser spec to ES6 2017-11-01 10:48:09 -04:00
Shelley Vohr
0adf775d9a clean fixture and fix failing travis test 2017-11-01 08:57:22 -04:00
Shelley Vohr
7f89cd0774 remove const from non-member function 2017-10-31 23:55:22 -04:00
Shelley Vohr
93df164485 add const and other small edits 2017-10-31 23:42:25 -04:00
Shelley Vohr
7b08a93549 remove pesky 'only' 2017-10-31 18:31:44 -04:00
Shelley Vohr
a538e47994 complete GetParameters method & all tests passing 2017-10-31 18:19:04 -04:00
Shelley Vohr
3136f833a5 fixes and updates to GetParameters 2017-10-31 13:51:44 -04:00
Felix Rieseberg
58708d6242 🔧 Lowercase 2017-10-31 10:31:05 -07:00
Shelley Vohr
a9c13359dc first attempt to add new GetParameters method to CrashReporter 2017-10-31 13:06:54 -04:00
Felix Rieseberg
08b8f2df55 📝 Typo! 2017-10-31 08:38:33 -07:00
Shelley Vohr
cd19d7c705 add crashReporter parameter tests 2017-10-31 10:38:48 -04:00
Vanessa Yuen
b2a735ef4f test build script super rough draft 2017-10-31 17:21:13 +08:00
Shelley Vohr
cb78e4875b fix two failing tests 2017-10-30 23:15:57 -04:00
Shelley Vohr
06075c4499 extrapolate removeExtraParameter into new method 2017-10-30 23:12:04 -04:00
Shelley Vohr
603060f051 add new tests 2017-10-30 22:51:22 -04:00
Felix Rieseberg
91414dde62 🔧 I can't believe this helps 2017-10-30 11:22:07 -07:00
Samuel Attard
c9926bed9f Merge pull request #10954 from electron/less-process-metrics-warnings
fix: Don't call idleWakeupsPerSecond on Windows
2017-10-28 12:36:45 +13:00
Samuel Attard
5c6d418b59 Merge pull request #10943 from electron/ensure-contents-clicked
Ensure the click event is only dispatched on ContentsClicked activation type
2017-10-28 12:35:07 +13:00
Samuel Attard
dc8b583363 Merge pull request #10944 from electron/fix-notification-ref-crash
Close the previous notification on multiple calls to show
2017-10-28 12:33:30 +13:00
Felix Rieseberg
da21d6cdda 🔧 Don't call idleWakeupsPerSecond on Windows 2017-10-27 14:23:06 -07:00
Shelley Vohr
e4214a6cbe [WIP] Upgrade more specs (#10945)
Finish upgrading specs to ES6
2017-10-27 16:45:58 -04:00
John Kleinschmidt
04cce89fdc Merge pull request #10953 from electron/get-browser-view
Document and test `getBrowserView`
2017-10-27 16:05:51 -04:00
John Kleinschmidt
60f539789d Merge pull request #10922 from Siilwyn/patch-1
Update electron-download to version 4.1.0
2017-10-27 15:56:06 -04:00
Felix Rieseberg
2e487adf8a 📝 Add a line to the docs 2017-10-27 12:17:30 -07:00
Felix Rieseberg
7bad679a69 📝 Correct types 2017-10-27 12:14:09 -07:00
Felix Rieseberg
29a85bc928 📝 Document it 2017-10-27 11:44:48 -07:00
Felix Rieseberg
541b369175 👷 Add a spec 2017-10-27 11:44:41 -07:00
John Kleinschmidt
ce20f45a45 Update to latest from libcc master 2017-10-27 14:24:14 -04:00
John Kleinschmidt
b429dafa38 Merge pull request #10889 from electron/avoid-eventemitter-crashes
Avoid EventEmitter crashes
2017-10-27 11:39:49 -04:00
Shelley Vohr
9292c7ec53 Merge pull request #10938 from electron/update_protocol_test
Upgrade protocol spec
2017-10-27 09:48:33 -04:00
Matt Crocker
42da83f8ca Update native-mate to pick up related changes 2017-10-27 00:11:16 -07:00
Matt Crocker
b6fb016a9a Cleanup per review comment 2017-10-27 00:07:54 -07:00
Matt Crocker
77a26882a3 Make linter happy 2017-10-27 00:04:19 -07:00
Matt Crocker
c5914516c8 Upstream good ideas from Muon 2017-10-27 00:04:19 -07:00
Matt Crocker
ca8f45a501 Notifications should emit close on close, not eventual GC 2017-10-27 00:04:19 -07:00
Samuel Attard
8719e9f098 Definitely didn't forget to push the header file 2017-10-27 16:27:37 +13:00
Samuel Attard
fe9069c028 Close the previous notification on multiple calls to show 2017-10-27 16:22:21 +13:00
Samuel Attard
85ef4c6d91 Ensure the click event is only dispatched on ContentsClicked activation type 2017-10-27 16:08:15 +13:00
Shelley Vohr
e2d5aaf0f3 Merge pull request #10942 from electron/upgrade_specs
[WIP] Upgrade specs
2017-10-26 22:12:19 -04:00
Shelley Vohr
eed54a18c4 fix comment typo 2017-10-26 22:09:38 -04:00
Shelley Vohr
7a3efd1543 stop leaving onlys there 2017-10-26 21:41:29 -04:00
Shelley Vohr
abecde0572 fix shortcut spec error 2017-10-26 21:41:06 -04:00
Shelley Vohr
ada9dfdc5e Merge pull request #10941 from electron/update_browser_view_spec
migrate api-browser-view-spec to ES6
2017-10-26 21:17:35 -04:00
Shelley Vohr
0317189213 update touch bar spec 2017-10-26 21:08:47 -04:00
Shelley Vohr
1130ccf69b upgrade system pref spec 2017-10-26 20:58:48 -04:00
Shelley Vohr
d8f2183b3d upgrade screen spec 2017-10-26 20:55:07 -04:00
Shelley Vohr
e64e9995b6 small tweak to process spec 2017-10-26 20:53:47 -04:00
Shelley Vohr
13fc080213 small tweaks to global shortcut spec 2017-10-26 20:49:21 -04:00
Shelley Vohr
6feff1d6e8 update desktop capturer spec 2017-10-26 20:44:06 -04:00
Shelley Vohr
6cd308f9ad update deprecations spec 2017-10-26 20:37:35 -04:00
Shelley Vohr
83a290a411 update debugger spec 2017-10-26 20:32:04 -04:00
Shelley Vohr
d4350079c9 update crash reporter spec 2017-10-26 20:21:36 -04:00
Shelley Vohr
56979804ec update clipboard spec 2017-10-26 20:12:51 -04:00
Shelley Vohr
68314dbc05 remove stray only 2017-10-26 20:11:12 -04:00
Shelley Vohr
b53e41af42 migrate api-browser-view-spec to ES6 2017-10-26 20:05:15 -04:00
Shelley Vohr
17f4e53d6b match earlier tests to ES6 later ones 2017-10-26 16:30:07 -04:00
Robin Andersson
08845c9903 Removed incorrect optional labels from tray.displayBalloon(options) docs 2017-10-26 20:21:09 +02:00
John Kleinschmidt
beb06c0787 Merge pull request #10537 from qazbnm456/improve-content_scripts.css
[Security] Use textContent instead innerHTML to remediate DOM based XSS
2017-10-26 11:51:43 -04:00
Charles Kerr
c72e0c1508 Merge pull request #10902 from mattlyons0/master
🐧 Don't wait for xdg-open to exit
2017-10-26 09:43:34 -05:00
John Kleinschmidt
b635962d2b Fix rendering issues with Nvidia GPU on High Sierra 2017-10-26 10:29:24 -04:00
John Kleinschmidt
166fb476a3 Merge pull request #10899 from electron/turn-off-escape-analysis
fix: Apply escape analysis patch
2017-10-26 09:46:31 -04:00
Selwyn
0c9e106502 Update electron-download to version 4.1.0
Respects the OS cache location and be able to set he cache location by setting the environment variable `ELECTRON_CACHE`.
2017-10-26 14:17:34 +02:00
Cheng Zhao
3230048f81 Merge pull request #10918 from pfrazee/fix-protocol-crash-error
Fix crash in custom protocols caused by bad callback exec
2017-10-26 18:35:31 +09:00
Shelley Vohr
52cbec2438 Merge pull request #10911 from electron/fix_window_log_folder
🔧 Fix windows app log path
2017-10-26 01:01:42 -04:00
Shelley Vohr
bb04b22ec8 Merge pull request #10888 from electron/menu_refactor
refactor menu.js to bring it up to readability and es6 standards
2017-10-26 00:31:47 -04:00
Shelley Vohr
fc920ffd06 base::UTF8ToWide --> base::FromUTF8Unsafe 2017-10-26 00:27:27 -04:00
Shelley Vohr
c9dca6b8ad remove unnecessary boolean 2017-10-26 00:21:52 -04:00
Shelley Vohr
246c808222 move away from wstring 2017-10-26 00:18:55 -04:00
Shelley Vohr
a431aa8c4a Merge pull request #10762 from nuriu/patch-1
[docs] [tr-TR] Update README.md
2017-10-26 00:04:32 -04:00
Shelley Vohr
46b775bf46 Merge pull request #10890 from demopark/patch-4
Add a little translation for zh-CN
2017-10-26 00:03:11 -04:00
Shelley Vohr
5f6f117bad changes from review 2017-10-25 23:41:11 -04:00
Paul Frazee
c2d9e082cb Fix crash in custom protocols caused by bad callback exec 2017-10-25 21:01:53 -05:00
Cheng Zhao
4db34ff092 Merge pull request #10711 from yuya-oc/did-attach-webview
Add did-attach-webview event
2017-10-26 10:55:50 +09:00
Shelley Vohr
d4880b135a revert ipc lookup table 2017-10-25 15:36:16 -04:00
Shelley Vohr
bccaf56200 remove common sense comments 2017-10-25 12:23:41 -04:00
Shelley Vohr
06811cc557 appropriately cast pointers to strings 2017-10-25 12:02:50 -04:00
Shelley Vohr
3c1c5a4099 combine homepath and homedrive into single line 2017-10-25 11:46:51 -04:00
Shelley Vohr
1e8bdc15e2 use _wgetenv to get windows env variables 2017-10-25 10:40:38 -04:00
Shelley Vohr
ffd43c1886 remove quotes and const replaces 2017-10-25 10:17:41 -04:00
Shelley Vohr
c0f2a7b44a fix standard issues 2017-10-25 09:56:02 -04:00
Shelley Vohr
f129622446 clean up remote 2017-10-25 09:51:21 -04:00
Shelley Vohr
042f84140d Merge pull request #10896 from electron/update_desktop_capturer
Update desktop capturer to ES6
2017-10-25 08:56:30 -04:00
Shelley Vohr
135454342d remove .only from spec 2017-10-24 22:41:28 -04:00
Shelley Vohr
f7bc5481f3 add a few more tests to api_menu_spec 2017-10-24 22:40:31 -04:00
Matt Lyons
424f9aeae6 🐧 Don't wait for xdg-open to exit
Waiting for xdg-open to return freezes Electron application.
Some file managers (ex: Nemo) don't return until some time after they are closed, this freezes the Electron application until the process returns.
The same is true about any application that can potentially be opened with OpenItem
2017-10-24 19:39:54 -07:00
Shelley Vohr
d54148de4e remove from spec 2017-10-24 20:31:02 -04:00
Shelley Vohr
0e6100ae17 upgrade menu spec to ES6 2017-10-24 20:27:26 -04:00
Felix Rieseberg
8d1ff1c59a Merge pull request #10900 from electron/issue-10877
fix: Ensure that -r isn’t considered interactive
2017-10-24 17:21:08 -07:00
Felix Rieseberg
c38f66cc1b 🔧 Ensure that -r isn’t considered interactive 2017-10-24 17:00:42 -07:00
Shelley Vohr
7593bec687 update reviewed items 2017-10-24 19:36:06 -04:00
Shelley Vohr
e8935232b1 clean falsy statements 2017-10-24 18:52:12 -04:00
John Kleinschmidt
7e1adfcab7 Apply escape analysis patch 2017-10-24 16:28:05 -04:00
Shelley Vohr
98df153750 convert to map and remove shift param 2017-10-24 15:47:09 -04:00
Shelley Vohr
491a00fd84 clean main process desktop_capturer 2017-10-24 12:49:37 -04:00
Vanessa Yuen
aaa8aec946 trying out parameterized builds in circle 2017-10-24 12:42:45 -04:00
Shelley Vohr
b58ceae69c appease linter gods 2017-10-24 12:28:15 -04:00
Shelley Vohr
43e118fe45 update desktop capturer and remove unnessary vars 2017-10-24 12:01:51 -04:00
John Kleinschmidt
36a51bbf4d Merge pull request #10893 from maxibanki/patch-1
Fixed typo
2017-10-24 10:52:14 -04:00
Max Schmitt
c1cad655c8 Fixed typo
`thrid-party` => `third-party`
2017-10-24 11:46:14 +02:00
Jonas Zhang
e7649a800a Add a little translation for zh-CN
Add a little translation for zh-CN
2017-10-24 14:02:07 +08:00
Shelley Vohr
75f32afcd5 clean up excess code from generateGroupId 2017-10-24 00:24:57 -04:00
Shelley Vohr
f93121b226 don't reassign parameters in Menu.prototype.popup 2017-10-24 00:07:39 -04:00
Shelley Vohr
b1e707d535 abstract out switch case from Menu.prototype.insert 2017-10-23 23:46:39 -04:00
Shelley Vohr
7c0f7329d9 appease the linter overlords 2017-10-23 22:35:42 -04:00
Shelley Vohr
508b614769 remove excess code in delegate 2017-10-23 22:33:23 -04:00
Shelley Vohr
9b364d5be3 refactor menuWillShow 2017-10-23 22:22:39 -04:00
Shelley Vohr
9038987e1d significant cleanup; all tests still passing 2017-10-23 20:04:22 -04:00
Zeke Sikelianos
1672fd22e1 Merge pull request #10874 from Toinane/master
Update OSR with more details
2017-10-23 15:54:31 -07:00
Shelley Vohr
3fc5d51a96 clean up delegate 2017-10-23 18:35:16 -04:00
Shelley Vohr
577c0042b0 update to ES6 2017-10-23 14:47:47 -04:00
Toinane
db5a429948 fixe grammar 2017-10-23 18:36:52 +02:00
Shelley Vohr
87802b2c17 initial port of things into a Menu class 2017-10-23 12:11:59 -04:00
John Kleinschmidt
66846bff97 Automate release (#10827)
* Create prepare-release script

* Add script to merge release

* Cleanup/add logging

* Move release process out of upload.py

* Add cleanup release branch

* Update release doc to reflect new scripts

* Fix to allow running with notesOnly

Also fixup release name and body when beta release.

* Fix issues found during release

* Use getRelease instead of getAssets

github.repos.getAssets is limited to 30 entries which means we may not get back the file we are looking for.

* Documentation corrections
2017-10-23 11:02:50 -04:00
John Kleinschmidt
67f0eb7b3b Merge pull request #10873 from ahmedmohamedali/fix_issue_10697
Fixes #10697
2017-10-23 09:32:28 -04:00
Shelley Vohr
61a93c711c clean up popup 2017-10-23 00:47:02 -04:00
Shelley Vohr
f9c3123f5f clean up menuWillShow 2017-10-23 00:16:35 -04:00
Shelley Vohr
1cd53768ab clean up indexToInsertByPosition 2017-10-22 23:57:23 -04:00
Shelley Vohr
b7ebee985b refactor indexOfItemById 2017-10-22 23:51:33 -04:00
Toinane
42f51850cc Update OSR with more details 2017-10-22 00:15:30 +02:00
Ahmed Mohamed Ali
463260b249 Electron crashes if user clicks Dev Tools & Zoom options #10697 2017-10-21 22:21:24 +02:00
Taeho Kim
f8048977ac 📝 Use separate entitlements for login helper 2017-10-21 20:52:20 +09:00
Ahmed Mohamed Ali
1e9942c1bf Fix js coding style errors 2017-10-20 08:46:41 +02:00
Ted Kim
4119da607f Implement login helper to manage login item in Mac App Store build 2017-10-20 11:44:19 +09:00
Ahmed Mohamed Ali
9f3cfa2dbd Fix crash that happens when the PDF viewer is refreshed.
The root cause is the PdfViewerHandler instanceis destroyed but not removed from the list of observer in WebContentsZoomController
2017-10-19 16:27:08 +02:00
Ahmed Mohamed Ali
44f91e12e1 Add tests for fix described in #10793 2017-10-19 16:15:02 +02:00
Zeke Sikelianos
306b627090 Merge pull request #10839 from qazbnm456/update_docs
[docs] update app.md
2017-10-18 20:35:11 -07:00
John Kleinschmidt
90e7d7e112 v1.8.2-beta.1 2017-10-18 16:49:32 -04:00
Boik
7be79613b8 according to https://github.com/electron/electron/pull/10670, update app.md 2017-10-19 00:56:05 +08:00
Ahmed Mohamed Ali
05035eb1e3 Fix linefeeds 2017-10-18 17:36:56 +02:00
John Kleinschmidt
cf12d31875 Merge pull request #10834 from Vehemos/master
Updated online-offline-events.md
2017-10-18 10:06:27 -04:00
Sarthak Tripathi
32f92f7a90 Updated online-offline-events.md
Improved readability and simplicity.
2017-10-18 19:26:19 +05:30
Sarthak Tripathi
392f4b44f0 Updated online-offline-events.md
Added links, removed grammatical error.
2017-10-18 19:11:05 +05:30
John Kleinschmidt
a65ab1d5a7 Merge pull request #10829 from zombieleet/master
update docs to show usage of ipcRenderer.sendTo
2017-10-18 09:33:57 -04:00
John Kleinschmidt
57537ea10e Merge pull request #10810 from qazbnm456/add_error_code_to_session_set_certificate_verify_proc
Add error code to session.setCertificateVerifyProc
2017-10-18 09:33:37 -04:00
John Kleinschmidt
51cbd977f0 Merge pull request #10534 from robbix1206/npx_in_quickstart
[Docs] Add npx command for node version 8.2.0 and later in quickstart guide
2017-10-18 09:32:30 -04:00
Sarthak Tripathi
392e88db34 Updated online-offline-events.md
Added more info, to clarify things.
2017-10-18 16:28:18 +05:30
73mp74710n
0a0897ef28 Update ipc-renderer.md 2017-10-18 02:52:02 +01:00
73mp74710n
5b193bad4b Merge pull request #1 from zombieleet/zombieleet-patch-1
update docs to show usage of ipcRenderer.sendTo
2017-10-18 02:35:51 +01:00
73mp74710n
c647b0c65e update docs to show usage of ipcRenderer.sendTo 2017-10-18 02:35:19 +01:00
Zeke Sikelianos
9193720789 Merge pull request #10825 from electron/vanessayuenn-patch-1
Fix link to version change rules
2017-10-17 14:53:02 -07:00
Vanessa Yuen
3208a77bf3 Fix link to version-change-rules 2017-10-17 13:37:05 -04:00
John Kleinschmidt
cbda307ebf Merge pull request #10696 from primalmotion/patch-1
🍎 skip tabbing category if macOS < Sierra
2017-10-17 10:24:11 -04:00
Cheng Zhao
0358862066 Merge pull request #10812 from electron/fix_symbol_file_names
Use real shared library names for symbol files
2017-10-17 15:27:35 +08:00
Cheng Zhao
d901504ea9 Merge pull request #10804 from robinwassen/optional-cpplint
cpplint skip to run if dependencies has not been bootstrapped
2017-10-17 15:26:49 +08:00
Cheng Zhao
4dc74776c1 Merge pull request #10709 from electron/fix-notification-actions-hs
Fix notification actions not working on High Sierra
2017-10-17 15:18:53 +08:00
Zeke Sikelianos
71f13620d3 Merge pull request #10795 from samthomson/docs/shell-open-external
updated docs
2017-10-16 19:32:09 -07:00
Zeke Sikelianos
a914d3c534 Merge pull request #10612 from electron/notification-docs-fix
Add `string` to notification doc
2017-10-16 19:31:47 -07:00
Vanessa Yuen
242a55aa60 Merge pull request #10740 from demopark/patch-1
Add notification docs translation in Chinese
2017-10-16 21:16:47 -04:00
Vanessa Yuen
9045171ad7 Merge pull request #10748 from demopark/patch-2
Add notifications tutoral in Chinese
2017-10-16 21:07:23 -04:00
Vanessa Yuen
e5797a57a7 Merge pull request #10749 from demopark/patch-3
Add notification-action.md file in Chinese
2017-10-16 21:03:32 -04:00
Ales Pergl
3a571bbdb4 Use real shared library names for symbol files 2017-10-16 16:48:52 +02:00
Boik
f40cc5ab54 add error code to session.setCertificateVerifyProc 2017-10-16 17:17:21 +08:00
Robin Andersson
60e614b10c cpplint skip to run if dependencies has not been bootstrapped
See #10593 for the discussion regarding this
2017-10-15 21:18:20 +02:00
Sam Thomson
f57b619097 updated docs 2017-10-14 13:11:44 +01:00
Ahmed Mohamed Ali
8763e8ee35 Fixing coding style 2017-10-14 11:17:52 +02:00
Ahmed Mohamed Ali
5030db000a Applying changes requested by @deepak1556 after the review:
- Move RenderFrameHost methods in the UI thread
- Check GetAssociatedRenderFrame return value
2017-10-14 11:09:05 +02:00
Zeke Sikelianos
4c9d432bd9 Merge pull request #10777 from reviforks/fix-korean-typo
WIP: Fix Korean translation's minor mistakes
2017-10-13 15:42:12 -07:00
Ahmed Mohamed Ali
1ad95eca4a Add support for pdf in sub frames (https://github.com/electron/electron/issues/9192#issuecomment-335543866) 2017-10-13 19:56:20 +02:00
Yongmin Hong
7b8dc38e88 Fix Korean grammatic mistakes
Mostly spacing errors. Haven't look at full Korean translation, but
will do.

Signed-off-by: Yongmin Hong <revi@pobox.com>
2017-10-13 02:58:44 +09:00
Samuel Attard
bce7d37086 Merge pull request #10773 from jeroenvisser101/patch-1
Fix link to libnotify spec
2017-10-13 02:09:05 +11:00
Birunthan Mohanathas
13b9b5c0c0 Merge pull request #10746 from electron/removeuserdefault
Add systemPreferences.removeUserDefault()
2017-10-12 16:08:57 +03:00
Jeroen Visser
cf6e3ca087 Fix link to libnotify spec
Link was broken
2017-10-12 14:55:21 +02:00
Nuri Uzunoğlu
b79e61db1d [docs] [tr-TR] Update README.md
Minor changes.
2017-10-12 09:22:40 +03:00
Samuel Attard
bdf3552be6 Merge pull request #10727 from electron/named-nativeimage
Add an API to get a nativeImage from a named NSImage
2017-10-12 10:02:07 +11:00
Felix Rieseberg
26220f2b31 Merge pull request #10758 from electron/felixrieseberg-patch-1
Don't be quiet on default loglevel
2017-10-11 15:18:11 -07:00
John Kleinschmidt
f2a1f0124d Merge pull request #10759 from electron/revert-official-build
Revert official build
2017-10-11 15:37:02 -04:00
Felix Rieseberg
2b510d7a06 Update install.js 2017-10-11 11:10:38 -07:00
Felix Rieseberg
d07529feca 🔧 Don't be quiet on default loglevel 2017-10-11 10:56:40 -07:00
John Kleinschmidt
6381f28847 Revert official build
Release builds are not currently building with official build
2017-10-11 11:38:50 -04:00
Jonas Zhang
af99e65876 Add notification-action.md file in Chinese
Add notification-action.md file in Chinese
2017-10-11 09:51:52 +08:00
Jonas Zhang
6fa9249062 Add notification.md file in Chinese
Add notification.md file in Chinese
2017-10-11 09:42:34 +08:00
Birunthan Mohanathas
06d782279c Add systemPreferences.removeUserDefault()
This can be used to restore the default or global value of a `key`
previously set with `setUserDefault`.
2017-10-10 22:57:47 +03:00
John Kleinschmidt
88616df2e5 Merge pull request #10744 from robinwassen/docs-vs-download-link
📝 Updated with link to VS 2015
2017-10-10 15:51:16 -04:00
Robin Andersson
c51ac6048d 📝 Updated with link to VS 2015
The previous link pointed to VS 2017 download location.
2017-10-10 21:33:14 +02:00
John Kleinschmidt
30abdbccf8 Merge pull request #10688 from electron/retry-uploads
Add logic to retry github uploads
2017-10-10 09:46:20 -04:00
Jonas Zhang
66df065e31 Add notification.md file in Chinese
Add notification.md file in Chinese
2017-10-10 21:34:39 +08:00
Samuel Attard
ed25941c65 Add basic specs 2017-10-10 17:30:27 +11:00
Samuel Attard
2c7787900f Follow style guide 2017-10-10 17:20:55 +11:00
Samuel Attard
9308c96f95 Appease the linting overlords 2017-10-10 17:17:51 +11:00
Samuel Attard
4ffb6c5f75 Merge pull request #10725 from electron/version-lock-escape-item
Ensure that the touchbar's esape item can be set before setting it
2017-10-10 17:07:04 +11:00
Samuel Attard
b5ba8699f3 Enable hsl shifting of named images 2017-10-10 17:05:13 +11:00
Zeke Sikelianos
19ac2179fb Merge pull request #10715 from electron/fix_toast_dpi_scaling
Fixed font DPI scaling
2017-10-09 12:56:45 -07:00
Zeke Sikelianos
1e6d51642c Merge pull request #10728 from excfergodst/patch-1
Create updates.md
2017-10-09 12:56:26 -07:00
Zeke Sikelianos
878813f968 Merge pull request #10730 from excfergodst/excfergodst-smalldoc
Adding few simple docs
2017-10-09 12:56:03 -07:00
Zeke Sikelianos
d7e5855ebf Merge pull request #10719 from yunzhenhuan/patch-1
Update build-instructions-linux.md
2017-10-09 12:55:29 -07:00
Zeke Sikelianos
a48219ecf2 Merge pull request #10731 from excfergodst/patch-7
Create v8-development.md
2017-10-09 12:54:58 -07:00
DaLun
995dccc726 Create v8-development.md 2017-10-09 13:00:35 -05:00
DaLun
0572b395ba Delete v8-development.md 2017-10-09 12:55:49 -05:00
DaLun
6e08682a7f Merge pull request #5 from excfergodst/patch-6
Create crash-report.md
2017-10-09 12:52:09 -05:00
DaLun
000ea8febd Merge pull request #4 from excfergodst/patch-5
Create upload-blob.md
2017-10-09 12:52:00 -05:00
DaLun
b02691cebd Merge pull request #3 from excfergodst/patch-4
Create size.md
2017-10-09 12:51:44 -05:00
DaLun
909fc98e1b Merge pull request #2 from excfergodst/patch-3
Create point.md
2017-10-09 12:51:33 -05:00
DaLun
53d138505a Create crash-report.md 2017-10-09 12:47:42 -05:00
DaLun
e655222d2f Create upload-blob.md 2017-10-09 12:45:56 -05:00
DaLun
d096fc8acf Create size.md 2017-10-09 12:37:48 -05:00
DaLun
48be4e765a Create point.md 2017-10-09 12:36:27 -05:00
DaLun
841763326a Create v8-development.md 2017-10-09 12:29:59 -05:00
DaLun
2ed2aedb00 Create updates.md 2017-10-09 12:13:00 -05:00
Samuel Attard
767a178bd1 Do not throw if the named image can not be found 2017-10-10 03:18:44 +11:00
Samuel Attard
ec610cd97b Document new nativeImage.createFromNamedImage method 2017-10-10 03:16:24 +11:00
Samuel Attard
e027ba9c47 Add nativeImage.createFromNamedImage API 2017-10-10 03:13:40 +11:00
Samuel Attard
d350134c4f Ensure that the touchbar's esape item can be set before setting it 2017-10-10 02:24:49 +11:00
XiYang
b8a58d0fce Update build-instructions-linux.md 2017-10-09 17:30:05 +08:00
Ales Pergl
1d25d58c26 Fixed font DPI scaling 2017-10-09 10:17:00 +02:00
Zeke Sikelianos
c85b159d46 Merge pull request #10712 from electron/remove-default-deprecation
remove potential deprecation and fix app close
2017-10-07 22:03:32 -07:00
Felix Rieseberg
77d4927e8b Merge pull request #10713 from electron/remote-node-warning-2
Tiny fix: String comparison for remote node warning
2017-10-07 10:04:49 -07:00
Felix Rieseberg
2bd8877be3 🔧 String comparison 2017-10-07 08:26:32 -07:00
Shelley Vohr
242e097e9b Merge pull request #10670 from electron/add-linuxdefaultprotocol
add setAsDefaultProtocolClient for Linux
2017-10-07 10:07:02 -05:00
Shelley Vohr
443c30890b remove dummy check 2017-10-07 10:38:08 -04:00
Yuya Ochiai
6326c6727e Add did-attach-webview event 2017-10-07 22:52:20 +09:00
Zeke Sikelianos
61e606bedc Merge pull request #10336 from electron/document-prereleases
document new release and versioning process
2017-10-06 22:14:42 -07:00
Shelley Vohr
bedb8ca191 remove potential deprecation and fix app close 2017-10-07 01:03:54 -04:00
Shelley Vohr
35eea8bea5 remove unused xdg setting 2017-10-07 00:38:25 -04:00
Shelley Vohr
66827755e7 remove chrome check and change protocol handler 2017-10-07 00:36:18 -04:00
Shelley Vohr
85ef1ee21f Merge pull request #10633 from electron/update-default-app
updates to default app and cli usage
2017-10-06 23:08:23 -05:00
Samuel Attard
e5d4574d3a Use NSUserNotification identifiers to uniquely find the correct notification from CocoaNotification 2017-10-07 14:51:28 +11:00
Shelley Vohr
a1347f67a1 remove a space from a comment wow thanks linter 2017-10-06 23:40:58 -04:00
Shelley Vohr
c9da806c84 slight refactor and lin cleanup 2017-10-06 23:32:46 -04:00
Shelley Vohr
a45b1625fc remove newline and add deprecation warning 2017-10-06 23:29:54 -04:00
Felix Rieseberg
1761d5da06 Merge pull request #10708 from electron/remote-node-warning
Warn if loading remote content with nodeIntegration
2017-10-06 16:17:52 -07:00
Felix Rieseberg
63749e281d 🔧 Linters gotta lint 2017-10-06 13:36:54 -07:00
Felix Rieseberg
11ac780caf 🔧 Add security warning 2017-10-06 13:02:54 -07:00
Vanessa Yuen
31eb83223b Update the documentation on the release process to reflect the new versioning policy. 2017-10-06 11:48:09 -04:00
Vanessa Yuen
7062a6e55d remove the condition where release draft has to have a prerelease flag 2017-10-06 11:47:28 -04:00
Antoine
5e6b683cfb fixed: trying to fix the build 2017-10-05 15:57:27 -07:00
Antoine
8e1945f768 🍎 skip tabbing category if macOS < Sierra
Previously, the macro was ensuring the` MAC_OS_X_VERSION_10_12` was not defined to decide to compile a `NSWindow` category back porting native tabs or not.

This patch ensures to compile the `NSWindow` category only if the min required version is lesser than 1012 (`MAC_OS_X_VERSION_10_12`)
2017-10-05 14:11:58 -07:00
John Kleinschmidt
0ae12c2b3d Add success message
Also increase retries to 5 attempts.
2017-10-05 16:31:54 -04:00
John Kleinschmidt
54563dc94c Add logic to retry github uploads
When doing release, sometimes the GitHub upload fails, so try to retry it once before bailing.
2017-10-05 16:31:18 -04:00
Zeke Sikelianos
f81e4ec972 order change reasons major, minor, patch 2017-10-05 10:52:38 -07:00
John Kleinschmidt
d7aa0b0ddb Merge pull request #10694 from electron/official-build
Update libchromiumcontent with official_build turned on
2017-10-05 09:48:49 -04:00
Cheng Zhao
e098f414e4 Update libchromiumcontent with official_build turned on 2017-10-05 18:14:12 +09:00
Shelley Vohr
f8f21815eb syntax updates and pointer conversion 2017-10-05 00:30:14 -04:00
Cheng Zhao
80e6a64e47 Merge pull request #10361 from sbannigan/feature/tray-events
add mouse-move event and click event position for tray
2017-10-05 12:20:00 +09:00
Cheng Zhao
bb71b09452 Fix building on Windows 2017-10-05 11:51:41 +09:00
Cheng Zhao
4342480473 Fix cpplint warnings 2017-10-05 11:49:26 +09:00
Sean Bannigan
0b205019b6 add mouse-move event and click event position for tray 2017-10-05 11:41:08 +09:00
Cheng Zhao
ee519b7552 Merge pull request #10693 from makerGeek/patch-1
Update atom-shell-vs-node-webkit.md
2017-10-05 10:21:10 +09:00
Zeke Sikelianos
fae918be59 Merge pull request #10681 from fplucas/master
📝 Translation of environment-variables.md to pt-br [ci skip]
2017-10-04 12:45:37 -07:00
Zeke Sikelianos
b77fe4ca12 add more details to versioning docs 2017-10-04 12:41:12 -07:00
Daniel Imms
3a0de7e24a New release schedule proposal 2017-10-04 12:12:11 -07:00
Zeke Sikelianos
44572dce7d add sh to code block 2017-10-04 12:05:34 -07:00
Zeke Sikelianos
ba6f01a109 add missing backtick 2017-10-04 12:05:34 -07:00
Vanessa Yuen
9f55e162a3 add section on dist-tags 2017-10-04 12:05:34 -07:00
Zeke Sikelianos
d51a8accee tweak versioning doc 2017-10-04 12:05:34 -07:00
Zeke Sikelianos
cd411a5c36 document how we define stable 2017-10-04 12:05:34 -07:00
Zeke Sikelianos
fe7c827e30 remove section on semver, as electron does not fit its mold 2017-10-04 12:05:34 -07:00
Zeke Sikelianos
cc80930e2b document prereleases 2017-10-04 12:05:34 -07:00
Moetaz
d20ce404ef Update atom-shell-vs-node-webkit.md
nwjs now supports a js script as entrypoint.
cf. http://docs.nwjs.io/en/latest/References/Manifest%20Format/#main
2017-10-04 21:01:39 +02:00
John Kleinschmidt
2d269fb7f1 Merge pull request #10690 from electron/fix-tabbed-window-test
Fix failing tests on master
2017-10-04 14:29:38 -04:00
John Kleinschmidt
15bfb86eec Make sure test closes window
Newly added test was leaving window open causing tests to fail
2017-10-04 11:35:41 -04:00
Cheng Zhao
8c5bb5969c Merge pull request #10667 from dittos/window-opacity
Add window opacity support
2017-10-04 15:03:45 +09:00
Felix Rieseberg
a337b12877 Merge pull request #10680 from electron/idlewakeups-windows
Don't call GetIdleWakeupsPerSecond on Win
2017-10-03 22:04:55 -07:00
Felix Rieseberg
4e05d24d1b Merge pull request #10661 from electron/browserview-multiple-screens
BrowserView: Allow dragging of window to screen above menubar
2017-10-03 16:09:11 -07:00
John Kleinschmidt
5c94e23004 Merge pull request #10683 from electron/format-fix-bump-version
Fix formatting on bump-version.
2017-10-03 16:07:24 -04:00
John Kleinschmidt
587c49f6b1 Fix formatting on bump-version. 2017-10-03 15:35:49 -04:00
John Kleinschmidt
211688453c Merge pull request #10403 from electron/modify-bump-version
Modify `bump-version.py`
2017-10-03 14:23:33 -04:00
Lucas Pugliesi
5e7a45d6da Fix link to environment-variables.md in pt-br 2017-10-03 15:22:53 -03:00
Lucas Pugliesi
f72c72f4d4 Fix link to environment-variables.md in pt-br 2017-10-03 15:20:41 -03:00
Lucas Pugliesi
028bab0320 Merge remote-tracking branch 'upstream/master' 2017-10-03 14:57:37 -03:00
Lucas Pugliesi
ee2168b94d 📝 Translation of environment-variables.md to pt-br [ci skip] 2017-10-03 14:54:58 -03:00
Felix Rieseberg
c4de658964 📝 Make a note in the docs 2017-10-03 10:25:42 -07:00
Felix Rieseberg
9fcf7eb27c 🔧 Don't call GetIdleWakeupsPerSecond on Win 2017-10-03 10:21:31 -07:00
Shelley Vohr
6131a523dc add xdg helper method 2017-10-03 11:10:38 -04:00
John Kleinschmidt
93e40ee79c Merge pull request #10677 from rhysd/fix-doc-findInPage
Fix findInPage() documentation for correcting type definition
2017-10-03 10:16:39 -04:00
Cheng Zhao
150a4797a4 Merge pull request #10676 from qazbnm456/fix-unhandle-null-pointer
Add a null-pointer check before processing base::SupportsUserData::GetUserData
2017-10-03 20:18:51 +09:00
Cheng Zhao
745fa707dd Merge pull request #10508 from danielma/dma/native-tab-new-button
feat(NativeWindowMac): addTabbedWindow
2017-10-03 20:16:50 +09:00
Cheng Zhao
09b93aa164 No need of example for such simple API 2017-10-03 20:12:05 +09:00
Daniel Ma
1bb042a661 feat(NativeWindowMac): addTabbedWindow
Add support for the [`NSWindow addTabbedWindow`][nsw] method on MacOSX

This plays nicely with the changes from #9052 and #9725

Usage samples available in [this commit][c] in my fork of
`electron-quick-start`

[nsw]: https://developer.apple.com/documentation/appkit/nswindow/1855947-addtabbedwindow
[c]: 79f06591df
2017-10-03 20:11:16 +09:00
rhysd
32ad59de26 Fix findInPage() documentation for correcting type definition
This update fixes the return type of `findInPage()`, which is currently
typed as `void` but actually it should be `number`.
2017-10-03 16:39:37 +09:00
Boik
d594092675 add a null-pointer check before processing base::SupportsUserData::GetUserData 2017-10-03 12:42:35 +08:00
Taeho Kim
7570ec9d39 Add BrowserWindow.getOpacity for consistency 2017-10-03 00:08:10 +09:00
Shelley Vohr
3f73e000ee first pass at adding linux setAsDefaultProtocolClient 2017-10-02 10:21:30 -04:00
Taeho Kim
7df5182901 Fix lint 2017-10-02 09:52:27 +09:00
Taeho Kim
7c1c8f323c Update browser-window.md 2017-10-01 17:36:22 +09:00
Shelley Vohr
68d35dbeb1 Merge pull request #10660 from electron/add_probot_stale
add initial file for stale bot
2017-09-29 19:47:08 -04:00
Shelley Vohr
7a163ef0cc add issue maintenance and closure information 2017-09-29 18:37:45 -04:00
John Kleinschmidt
b77467ca8f Update CI information (#10644)
* Update CI information

* Formatting updates
2017-09-29 16:11:42 -04:00
Zeke Sikelianos
e8ec1a6ed4 add utm source to outbound links 2017-09-29 12:31:17 -07:00
Zeke Sikelianos
bf2b6b3ac4 fix link behavior 2017-09-29 12:26:03 -07:00
Zeke Sikelianos
56581b416d improve command prompt styles 2017-09-29 12:13:31 -07:00
Zeke Sikelianos
a2f178b664 fix octicon alignment 2017-09-29 12:03:28 -07:00
Zeke Sikelianos
01ca3ae07f make nav link text clickable 2017-09-29 12:03:12 -07:00
Zeke Sikelianos
cc6803b358 remove unused styles 2017-09-29 11:35:39 -07:00
Zeke Sikelianos
33394f76d4 make styles more consistent with website 2017-09-29 11:35:22 -07:00
Zeke Sikelianos
f0048d54b0 make it roomy 2017-09-29 11:34:48 -07:00
Felix Rieseberg
0cc1ebc021 🔧 Allow dragging window to screen above menubar (for real) 2017-09-29 14:20:34 -04:00
Vadim Macagon
3ad1cccb1d [ci skip] Fix link to Chromium Runtime Features JSON file (#10639) 2017-09-29 14:17:00 -04:00
Zeke Sikelianos
9f895879bf Merge pull request #10191 from electron/add_log_path_support
add ability to access logs in getPath()
2017-09-29 11:11:29 -07:00
Zeke Sikelianos
9db9ffd3e4 chrome -> chromium 2017-09-29 10:41:48 -07:00
Zeke Sikelianos
0ca53420d5 use relative path to electron 2017-09-29 10:41:20 -07:00
Shelley Vohr
6932a42b0a updates to probot config 2017-09-29 13:28:49 -04:00
Shelley Vohr
b1e6845409 add initial file for stale bot 2017-09-29 10:38:38 -04:00
Shelley Vohr
96f1a25bbd convert to wstring for windows 2017-09-29 10:29:45 -04:00
Shelley Vohr
e7bb553d3b consolidate code and rename for clarity 2017-09-29 09:32:30 -04:00
Ted Kim
7f2c4a9e06 Add window opacity support 2017-09-29 17:49:10 +09:00
Shelley Vohr
c620d0de05 move overrides into the appropriate namespace 2017-09-28 23:03:01 -04:00
John Kleinschmidt
04430c6dda Bump to use large machine for arm64 build 2017-09-28 13:55:06 -04:00
Shelley Vohr
0dfadf7c09 remove unresolved external symbol 2017-09-28 13:35:24 -04:00
Shelley Vohr
911e266e9a add function signature declaration 2017-09-28 13:35:24 -04:00
Shelley Vohr
223942bf99 fix incorrect std namespacing 2017-09-28 13:35:24 -04:00
Zeke Sikelianos
94f46c9059 fix typo in comment 2017-09-28 13:35:24 -04:00
Shelley Vohr
fc443a8c2c fix header and line length lint errors 2017-09-28 13:35:24 -04:00
Shelley
e05f6102c2 update docs for new getPath() path 2017-09-28 13:35:24 -04:00
Shelley Vohr
d2d4b4cc23 fix escape backslashes 2017-09-28 13:35:24 -04:00
Shelley Vohr
c1c8f7b0f1 fix string concat errors 2017-09-28 13:35:23 -04:00
Shelley Vohr
2353fdb400 add dir creation if none exists 2017-09-28 13:35:23 -04:00
Shelley Vohr
e81cf74b39 add windows override path and cleanup linux 2017-09-28 13:35:23 -04:00
Shelley Vohr
e096b5ce83 fix override path 2017-09-28 13:35:23 -04:00
Shelley Vohr
3de008035a appeasing the linter 2017-09-28 13:35:23 -04:00
Shelley Vohr
f026bbb454 add first go at linux log path override 2017-09-28 13:35:23 -04:00
Shelley Vohr
5ef4caf8ab add ability to access logs in getPath() 2017-09-28 13:35:22 -04:00
John Kleinschmidt
7788b33dc9 Bump v1.8.1 2017-09-28 13:13:49 -04:00
John Kleinschmidt
d9d557dcc5 CircleCI updates (#10647)
* Update CircleCi for release and test

* Update test storage dir
2017-09-28 13:05:42 -04:00
Shelley Vohr
2915617c5c dear god never run beautifier again 2017-09-28 00:10:52 -04:00
Shelley Vohr
0f34967648 redesign and add versions/links 2017-09-27 23:51:53 -04:00
Zeke Sikelianos
0c9ada08a4 Merge pull request #10326 from develar/patch-4
docs: add note about electron-updater
2017-09-27 15:14:44 -07:00
Felix Rieseberg
89246f3714 🔧 Allow dragging over menubar 2017-09-27 17:43:09 -04:00
Shelley Vohr
24913a5ef9 remove drag functions 2017-09-27 14:50:46 -04:00
Shelley Vohr
2289d085fa first pass at reorganizing default usage 2017-09-27 14:23:42 -04:00
Birunthan Mohanathas
945fef8a5a Merge pull request #10483 from jublonet/fix-double-downloads
Use Squirrel.Windows --checkForUpdate
2017-09-27 20:26:24 +03:00
Zeke Sikelianos
928d2f78c3 Merge pull request #10555 from electron/CODEOWNERS
add CODEOWNERS file
2017-09-27 09:07:38 -07:00
Felix Rieseberg
04373b8658 Merge pull request #10627 from electron/fullscreen-drag
Don't drag fullscreen window
2017-09-27 08:08:08 -07:00
Birunthan Mohanathas
044a3a29a6 Simplify checking for NSFullScreenWindowMask 2017-09-27 16:36:18 +03:00
Vladimir Krivosheev
2e747e72cf change wording 2017-09-27 07:11:21 +02:00
Zeke Sikelianos
494000114c Merge pull request #10614 from electron/upload-overwrite
Document how to fix a published release
2017-09-26 21:56:37 -07:00
Zeke Sikelianos
415f1ca3a4 clarify bootstrapping command arg 2017-09-26 21:55:56 -07:00
Zeke Sikelianos
750f59cb55 make the @hubbers team own the .github directory 2017-09-26 20:11:41 -07:00
Cheng Zhao
18589a498c Merge pull request #10620 from electron/v8-promise-field
Update libchromiumcontent to fix crash in Node
2017-09-27 12:11:27 +09:00
Shelley Vohr
15b0878a17 Merge pull request #10618 from electron/add-menuitembyid
[WIP] add getMenuItemById to Menu API
2017-09-26 22:33:05 -04:00
Shelley Vohr
05c50b0a2e fix docs typo 2017-09-26 21:30:27 -04:00
Cheng Zhao
8062962d01 Define V8_PROMISE_INTERNAL_FIELD_COUNT=1 2017-09-27 10:20:06 +09:00
Shelley Vohr
31bf873c20 add docs update for new api call 2017-09-26 21:14:44 -04:00
Cheng Zhao
6e85f82d7a Update libchromiumcontent to fix crash in Node 2017-09-27 10:11:37 +09:00
Shelley Vohr
c932871bb1 change default to null 2017-09-26 20:35:14 -04:00
Shelley Vohr
3c6a7c332a add unit test for getMenuItemById 2017-09-26 20:05:51 -04:00
Felix Rieseberg
d45788a7b8 🔧 Don't drag fullscreen window 2017-09-26 18:03:44 -04:00
Shelley Vohr
f49f7d65a5 remove check on items instance 2017-09-26 14:38:34 -04:00
Zeke Sikelianos
9b6f9a0b18 fix typos in releasing doc 2017-09-26 11:10:29 -07:00
Shelley Vohr
afe033a6e1 stray semicolon fml 2017-09-26 12:10:16 -04:00
Shelley Vohr
4753ada7a9 rewrite method with only id parameter 2017-09-26 12:05:45 -04:00
Shelley Vohr
5217718d7b conform to linter standard 2017-09-26 09:50:47 -04:00
Shelley Vohr
ea42851c9b add first pass at getMenuItemById 2017-09-26 09:47:13 -04:00
Cheng Zhao
91e11f8e6f Merge pull request #10609 from electron/win32_toast_update
Fix for narrowing conversion warnings, minor style change
2017-09-26 10:50:45 +09:00
Cheng Zhao
3545280e1d Add --overwrite to the upload script 2017-09-26 10:43:43 +09:00
Cheng Zhao
c70508edb1 docs: How to re-upload binaries manually 2017-09-26 10:30:42 +09:00
Cheng Zhao
de4cb9022b Use same -ing form and remove trailing whitespaces 2017-09-26 10:18:38 +09:00
Felix Rieseberg
dfd90c3526 Merge pull request #10611 from electron/fix-notification-source
Browser-process notifications: Ensure correct icon on Windows
2017-09-26 09:54:43 +09:00
Felix Rieseberg
ff97817668 Add string to notification doc
Tiny fix: The docs suggest `NativeImage` for `icon`, but a string is also allowed.
2017-09-25 14:02:59 -07:00
Felix Rieseberg
741dc1eb0b 🔧 Ensure correct path 2017-09-25 13:51:16 -07:00
Zeke Sikelianos
c33c21e174 Merge pull request #10573 from electron/add-clarification-about-main-process
add clarification about main process
2017-09-25 12:40:45 -07:00
Ales Pergl
75feb495ad Fix for narrowing conversion warnings, minor style change 2017-09-25 18:08:54 +02:00
Aleš Pergl
2abde14a7c Merge pull request #10517 from yuya-oc/win7-notification-duration
Set duration for Windows 7 notifications based on Control Panel
2017-09-25 17:04:08 +02:00
Cheng Zhao
aeb568b41f Merge pull request #10052 from electron/views-browserview-bounds
Fix BrowserView auto-resize and BrowserWindow resize event on Windows
2017-09-25 14:12:31 +09:00
Birunthan Mohanathas
e1ddd3bdbc Stop sending resize event for minimized windows on Windows
This makes it consistent with macOS.

This also fixes BrowserView auto-resize on Windows when minimizing and
restoring the window. Previously it would incorrectly grow too in some
cases.
2017-09-25 11:44:32 +09:00
Birunthan Mohanathas
f3f6bedf8e Make BrowserView auto-resize relative to window size on Windows/Linux
Previously it was relative to the window web contents size, which was
not consistent with macOS.
2017-09-25 11:44:32 +09:00
Cheng Zhao
42a2126273 Merge pull request #10602 from electron/fix-singleton-test
Fix the flaky test of app.makeSingleInstance
2017-09-25 11:44:00 +09:00
Cheng Zhao
d87ea5713d spec: It is not certain which process starts first 2017-09-25 11:19:25 +09:00
Cheng Zhao
5940231b76 spec: Do not assume which process exits first in singleton test 2017-09-25 10:49:54 +09:00
Zeke Sikelianos
d54cb307d5 do not use globs 2017-09-24 11:34:08 +09:00
Zeke Sikelianos
2bb26b30dc add CODEOWNERS file 2017-09-24 11:34:08 +09:00
Zeke Sikelianos
696c7d59fd Merge pull request #10592 from electron/revert-9603-printer-info-options
Revert "PrinterInfo options object causes TypeScript error"
2017-09-24 11:29:54 +09:00
Zeke Sikelianos
d27f7c25b3 Revert "PrinterInfo options object causes TypeScript error" 2017-09-24 11:11:04 +09:00
Zeke Sikelianos
5843c98153 Merge pull request #10505 from qazbnm456/update-docs
docs: update web-request.md
2017-09-24 09:36:23 +09:00
Zeke Sikelianos
d552c97599 Merge pull request #10542 from EthianWong/master
Remove non-existent option
2017-09-24 09:33:43 +09:00
Zeke Sikelianos
a99280398b Merge pull request #10550 from ColMugX/patch-1
fix menu-item.md chinese version: a typo.
2017-09-24 09:32:51 +09:00
John Kleinschmidt
cb7f8e256e Change GitHub upload to use JS GitHub lib
Needed for Appveyor when running releases
2017-09-24 06:26:04 +09:00
Yuya Ochiai
d621471eb2 🏁 Set duration for Windows 7 notifications based on Control Panel 2017-09-22 21:28:29 +09:00
Cheng Zhao
ec587032b2 Merge pull request #10516 from electron/fix_notification_crash
Fixed potential crash in Win32 notifications.
2017-09-22 12:29:53 +09:00
Cheng Zhao
df098c2b2b Merge pull request #10520 from Alex-D/patch-1
Bump node version number
2017-09-22 12:20:38 +09:00
Zeke Sikelianos
5b5c4787e9 add-clarification-about-main-process 2017-09-22 10:52:43 +09:00
Samuel Attard
c4cfb3e711 Merge pull request #10518 from electron/fix-makesingleinstance
Fix app.makeSingleInstance hanging on posix systems
2017-09-20 13:54:47 +10:00
Cheng Zhao
b4075bed87 spec: Add test case for app.makeSingleInstance 2017-09-20 11:58:32 +09:00
Cheng Zhao
b7119b5756 Create watcher when message loop is ready 2017-09-20 11:58:32 +09:00
Samuel Attard
4147fa4629 Appease the linting gods 2017-09-20 11:58:32 +09:00
Samuel Attard
0ab83b301d Refactor as per @zcbenz comments
Also fix issue where we run the single instance callback *not* on the UI thread,
this apparently results in a hung process.
2017-09-20 11:58:32 +09:00
Samuel Attard
ecbeb0d117 Woops, how did that happen ;) 2017-09-20 11:58:32 +09:00
Samuel Attard
f928a399ae Move OnBrowserReady call to PreMainMessageLoopRun to account for timing issues on macOS 2017-09-20 11:58:32 +09:00
Samuel Attard
28900a9b63 Fix app.makeSingleInstance hanging on posix systems
Wait for the IO thread to be a thing before attempting to listen on the socket

Fixes #9880
2017-09-20 11:58:32 +09:00
Shelley Vohr
fb6a4febb0 Merge pull request #10552 from electron/fix-shell-openItem
update shell.OpenItem to use NSWorkspace
2017-09-19 22:00:40 -04:00
Shelley Vohr
27fd2dad59 update shell.OpenItem to use NSWorkspace 2017-09-19 18:15:37 -04:00
Co1MugX
639f445f5e zh-CN doc had a typo.
zh-CN doc had a typo.
2017-09-19 22:48:33 +08:00
WangYunjian
fa8649e671 Remove non-existent attributes
More details: 8d3e09747a
2017-09-18 13:31:54 +08:00
Samuel Attard
fa444dd029 Merge pull request #10540 from bpasero/touchbar-docs
Docs: set iconPosition as optional
2017-09-18 13:01:02 +10:00
Benjamin Pasero
ba5fe1d161 set iconPosition as optional 2017-09-17 17:44:36 +02:00
Milan Burda
9cfadbe6af Merge pull request #10509 from kewde/patch-1
docs: fix examples for sandbox
2017-09-17 12:26:27 +02:00
Boik
16499358b3 fix lint 2017-09-17 14:09:12 +08:00
Boik
d86724f17a code improvement 2017-09-17 13:56:22 +08:00
Boik
26e6f2c46c use textContent instead innerHTML to remediateDOM based XSS vulnerbilities 2017-09-17 11:27:03 +08:00
robbix1206
0bcc5d37ab Put npx as last option 2017-09-16 15:37:26 +02:00
robbix1206
564ca27679 Forget a # 2017-09-16 14:09:31 +02:00
robbix1206
9fecf4b2f7 Add npx command for node version 8.2.0 and later 2017-09-16 14:03:09 +02:00
Cheng Zhao
800ba9a325 Merge pull request #9950 from alexstrat/fix-content-script-insecure-contents
Fix mixed content errors when loading content from `chrome-extension`
2017-09-15 20:45:57 +09:00
Cheng Zhao
b277353238 Set secure schemes in native code
Code with same functionalities should be put together.
2017-09-15 16:48:55 +09:00
Alexandre Lachèze
5eb4b9ad6f Fix insecure content errors when loading content from chrome-extension 2017-09-15 16:32:47 +09:00
Alexandre Demode
8ebab10cb0 Bump node version number 2017-09-15 00:58:31 +02:00
Cheng Zhao
fc99785314 Merge pull request #10076 from alexstrat/add/add-support-for-content_scripts.css
Add support for css in content_scripts
2017-09-14 21:19:11 +09:00
Ales Pergl
af92a639be Fixed potential crash in Win32 notifications. 2017-09-14 11:52:53 +02:00
Alexandre Lachèze
e1a232e7c8 Add support for css in content_scripts 2017-09-14 17:23:33 +09:00
Cheng Zhao
6bf2ec4188 Merge pull request #10514 from electron/mac-crash
Suppress the destroy() spec on all platforms
2017-09-14 17:21:53 +09:00
Cheng Zhao
af329a9429 Suppress the destroy() spec on all platforms
It is also crashing on mac, but just not as frequent as other platforms.
2017-09-14 17:20:14 +09:00
Cheng Zhao
07840906dd Merge pull request #9869 from rafaelnobrepd/handoff-enhancements
Exposes more Handoff related APIs to Electron
2017-09-14 17:18:14 +09:00
Cheng Zhao
ff023115f5 Style fixes 2017-09-14 16:12:34 +09:00
Rafael Nobre
33dd5e26fb Updates documentation for Handoff related API. 2017-09-14 15:59:43 +09:00
Rafael Nobre
77a1c5d7fc Avoids deadlock in case NSUserActivityDelegate method start being called from main thread. 2017-09-14 15:59:43 +09:00
Rafael Nobre
9483f0fc14 Adds synchronization logic to allow NSUserActivityDelegate to wait Javascript updating the NSUserActiity UserInfo if requested. 2017-09-14 15:59:43 +09:00
Rafael Nobre
c23b4a48ec Fixes NSUserActivityDelegate that was called on a background thread thus not working. 2017-09-14 15:59:43 +09:00
Rafael Nobre
76efee675f Requests updated user info data before each Handoff operation. 2017-09-14 15:59:43 +09:00
Rafael Nobre
f6ac00532f Fix typo and remove extraneous doc entries. 2017-09-14 15:59:43 +09:00
Rafael Nobre
a870799c32 Exposes more Handoff related APIs to Electron. 2017-09-14 15:59:43 +09:00
Cheng Zhao
787675ab08 Merge pull request #9343 from xaviergonz/fix-osx-child-window-show
Make OSX child windows honor the show option to fix #8836
2017-09-14 15:50:13 +09:00
Cheng Zhao
ac55c358e9 Merge pull request #9603 from electron/printer-info-options
PrinterInfo options object causes TypeScript error
2017-09-14 15:49:41 +09:00
Kevin Sawicki
53b0698ee2 Add options object 2017-09-14 14:57:59 +09:00
Cheng Zhao
073583ff3d spec: The parent option should not affect show option 2017-09-14 14:48:42 +09:00
Cheng Zhao
19a7c7ac39 Styling fixes 2017-09-14 14:43:22 +09:00
xaviergonz
0d69738bd6 using standard javascript 2017-09-14 14:38:54 +09:00
xaviergonz
0301961c25 Update api-browser-window-spec.js 2017-09-14 14:38:54 +09:00
xaviergonz
e18cdc185a add the fix for showinactive 2017-09-14 14:35:53 +09:00
xaviergonz
d0c91daaed make sure setparentwindow only shows the window if already visible 2017-09-14 14:35:53 +09:00
xaviergonz
dc7cc6921e fix for mac child windows so they honor show option 2017-09-14 14:35:53 +09:00
xaviergonz
dae63d323c add new internal set parent window method 2017-09-14 14:33:24 +09:00
Cheng Zhao
a19a229a59 Merge pull request #10254 from zachflower/feature/simple-fullscreen-mode
Feature/simple fullscreen mode
2017-09-14 09:39:50 +09:00
Kewde
589585a269 Fix examples
w -> win
2017-09-13 20:53:30 +00:00
Zachary Flower
432b912c6a 🎨 Rename ambiguous simple_fullscreen_ variable to always_simple_fullscreen_ 2017-09-13 12:16:37 -06:00
John Kleinschmidt
5819acfd3d Rerun builds 2017-09-13 10:25:42 -04:00
Boik
0d312f3674 docs: update web-request.md 2017-09-13 22:09:21 +08:00
John Kleinschmidt
64c8ff62af Add CircleCI for Linux builds (#10344) 2017-09-13 09:48:19 -04:00
Cheng Zhao
2048a1a638 Merge pull request #10429 from qazbnm456/web-request-origin
Track the origin of webRequest events
2017-09-13 22:23:44 +09:00
Cheng Zhao
c34fb146f6 Fix styling 2017-09-13 21:40:29 +09:00
Vanessa Yuen
c39f5f1fad Merge pull request #9814 from shubham2892/fix-fullscreen-with-resizable-flag
Fix full screen when resizable is set to true
2017-09-12 20:20:19 -04:00
Vanessa Yuen
9a7d8a0511 merge master into fix-fullscreen-with-resizable-flag. 2017-09-12 18:34:23 -04:00
Vladimir Krivosheev
6bded6bf7b Fix link 2017-09-12 21:37:29 +02:00
Zachary Flower
fa4d52f042 🎨 Track/restore original stylemask, rather than individual states. 2017-09-12 12:27:30 -06:00
Zeke Sikelianos
618f8a9d06 Merge pull request #10497 from Toinane/fix-word-docs
Add markdown linking when missing
2017-09-12 08:49:35 -07:00
Milan Burda
ddb1d92c77 Merge pull request #10499 from miniak/doc-fix
Fix app.getGPUFeatureStatus in app.md
2017-09-12 16:04:17 +02:00
Toinane
1cb13be65f style: fix the word incompatible in docs 2017-09-12 15:51:53 +02:00
Milan Burda
d6bab3043c Fix app.getGPUFeatureStatus in app.md 2017-09-12 15:31:00 +02:00
Boik
e66341ec59 add back the missing 'resourceType' property 2017-09-12 21:27:49 +08:00
Boik
a01abd0fee fix lint-cpp 2017-09-12 20:28:30 +08:00
Boik
2d771674bb get webContentsId instead 2017-09-12 20:17:11 +08:00
Toinane
74cb673ce1 style: add uppercase 2017-09-12 12:07:33 +02:00
Toinane
b9f0131165 style: add link to when missing 2017-09-12 12:05:09 +02:00
Boik
13d363d1f1 fix lint-cpp 2017-09-12 15:40:35 +08:00
Boik
9f60673e4b remove package-lock.json 2017-09-12 15:40:35 +08:00
Boik
549c30f9b2 first attempt to track the origin requesters of webRequest events 2017-09-12 15:40:35 +08:00
Cheng Zhao
59cadf9e4b Merge pull request #10366 from syohex/window-close-order
Close window in order from newer one on macOS
2017-09-12 16:22:38 +09:00
Cheng Zhao
bca71fcfc1 Merge pull request #10393 from j3l11234/fix_mac_crack
fix mac ime crack
2017-09-12 16:19:08 +09:00
Cheng Zhao
1430faa2fd Merge pull request #10492 from electron/libcc-latest
Update libcc to latest
2017-09-12 16:18:47 +09:00
Cheng Zhao
8493d5707e Fix cpplint warnings 2017-09-12 15:35:24 +09:00
Cheng Zhao
92d0772eba Update libcc to latest
It was using a branch that had been deleted.
2017-09-12 15:25:29 +09:00
Cheng Zhao
6ebd00267e Merge pull request #10355 from owais/master
Add support for indicators in Ubuntu Gnome Session
2017-09-12 15:22:31 +09:00
Cheng Zhao
894bcdf749 Merge pull request #9896 from ferreus/dev/vladimir_8017
Fix #8017: Crash copying cropped image to clipboard
2017-09-12 15:02:44 +09:00
Zachary Flower
f256967414 📝 make clear what simple fullscreen mode is 2017-09-11 23:09:45 -06:00
Zeke Sikelianos
64c447bf04 Merge pull request #10487 from Toinane/fix-word-docs
Fix word in documentation
2017-09-11 10:08:01 -07:00
Toinane
2c56b67ea5 style: fix directory word in docs 2017-09-11 17:49:58 +02:00
Cheng Zhao
10ab870237 Merge pull request #10321 from kaylanm/macos-native-tab-api
🍎 Add macOS native tab methods to window API
2017-09-11 18:49:56 +09:00
Cheng Zhao
cc9771a3d0 Merge pull request #10307 from liusy182/10240-theme-color-2
return null when theme color is transparent or not found
2017-09-11 18:40:35 +09:00
Cheng Zhao
e6733b4b23 Merge pull request #10305 from ivmirx/macos-accessibility
Special attribute for macOS accessibility
2017-09-11 17:58:20 +09:00
Cheng Zhao
0694334487 Merge pull request #10271 from kaylanm/macos-native-tab-menu-items
🍎 Add roles for macOS native tab menu items
2017-09-11 17:41:31 +09:00
Zeke Sikelianos
c51e3c2882 Merge pull request #10481 from John2143/fix-docs
Redirect dead link in docs
2017-09-10 17:28:57 -07:00
J.M
6442e6b5e8 Use Squirrel.Windows --checkForUpdate
Avoid downloading updates twice. Fix #5057.
2017-09-11 00:54:08 +02:00
John Schmidt
38342fbe48 📝 Redirect dead link [ci skip] 2017-09-10 08:27:10 -04:00
Zeke Sikelianos
f293e1422b Merge pull request #10472 from lucaslopes/patch-1
Update coding-style.md
2017-09-09 12:38:07 -07:00
Lucas Lopes
20325b9952 Update coding-style.md 2017-09-09 08:08:28 -03:00
Birunthan Mohanathas
c265ea21c2 Merge pull request #10469 from electron/fix-save-dialog-extension-macos
Fix missing extension when saving a file without filters
2017-09-08 07:22:18 -07:00
Zeke Sikelianos
fbfd781426 Merge pull request #10454 from electron/MarshallOfSound-patch-1
Mark filters as optional inside webRequest
2017-09-07 21:45:24 -07:00
Samuel Attard
195cb91721 Make crashesDirectory optional 2017-09-08 13:21:35 +10:00
Birunthan Mohanathas
511e82de67 Fix missing extension when saving a file without filters
Previously, when triggering the save dialog through e.g. `<a download>`
links (e.g. http://jsfiddle.net/koldev/cW7W5/), the extension was only
saved if Finder was set to show all extensions by default. We now always
display the extension to make sure that it is saved.

If we want to keep the extension hidden, we could also populate the
allowed file types array with the extension from the default filename,
but that would have interfered with how we set the filters.
2017-09-07 16:48:14 -07:00
Samuel Attard
8e9b98360a Mark filters as optional inside webRequest 2017-09-07 14:26:37 +10:00
Samuel Attard
6ba3ee3950 Merge pull request #10453 from bpasero/fix-10448
Docs: add crashesDirectory to crash reporter options
2017-09-07 14:19:18 +10:00
Benjamin Pasero
54bd60d657 add crashesDirectory to crash reporter options 2017-09-07 06:07:28 +02:00
Vanessa Yuen
4fb800a899 more docs edit 2017-09-06 16:44:41 -04:00
Vanessa Yuen
a81ea1ffde Update release documentation to reflect new usage of bump-version script. 2017-09-06 16:41:51 -04:00
Vanessa Yuen
c56d8b4fe9 Add examples to make usage description clearer. 2017-09-06 16:31:58 -04:00
John Kleinschmidt
5bb7b4bb42 Bump v1.8.0 2017-08-31 16:31:59 -04:00
John Kleinschmidt
4b1e2b42a4 Bump v1.8.0 2017-08-31 16:16:19 -04:00
Vanessa Yuen
c784968e85 Merge pull request #10303 from MathieuDebit/doc/fix-desktopcapture-example
📝 Fix desktopCapturer example
2017-08-31 14:49:16 -04:00
Samuel Attard
6b010614e2 Implement moveToApplicationsFolder (#10142)
* Implement moveToApplicationsFolder

* Fix tabs / spaces

* Fix linting

* Use Browser::Quit, instead of exit

* Update documentation as per feedback

* Fix spec
2017-08-31 10:37:12 -04:00
John Kleinschmidt
14eea98566 Merge pull request #10333 from electron/more-releasing-tips
add more releasing tips
2017-08-30 10:42:59 -04:00
Cheng Zhao
c2ab4f711f Merge pull request #10396 from electron/cleanup
Cleanup obsolete code
2017-08-30 19:05:05 +09:00
Cheng Zhao
1630f14b99 Merge pull request #10395 from electron/fix_exit_crash2
Fixed crash on process exit on Windows
2017-08-30 17:43:46 +09:00
Ales Pergl
64d9e5b861 Removed obsolete io.h wrappers, included atlbase.h in atom_main.cc 2017-08-30 10:43:29 +02:00
Cheng Zhao
346a4bee0b Merge pull request #10394 from electron/another-async-crash
Fix another crash caused by assertion of asyncContext
2017-08-30 17:42:03 +09:00
Cheng Zhao
db0aeaa26e Fix another crash caused by assertion of asyncContext 2017-08-30 17:05:20 +09:00
Ales Pergl
7cd64f1bd1 Fixed crash on process exit on Windows 2017-08-30 09:23:19 +02:00
allenliu
5978775ce1 fix mac ime crack 2017-08-30 12:07:04 +08:00
Vanessa Yuen
a936430fd5 fix lint errors 2017-08-29 19:55:34 -04:00
Vanessa Yuen
b54804d449 change process.versions.electron to reflect suffixes in version name. 2017-08-29 19:37:49 -04:00
Vanessa Yuen
74c970c25f add dry run option 2017-08-29 18:56:16 -04:00
Vanessa Yuen
8fe675e56c Update bump-version.py to handle prerelease versions 2017-08-29 18:33:49 -04:00
Zeke Sikelianos
cc666c727f Merge pull request #10389 from electron/move-issue-template
move issue template to .github directory
2017-08-29 13:26:27 -07:00
Zeke Sikelianos
178b39b5a8 Merge pull request #10380 from electron/MarshallOfSound-patch-1
Mark channel as non-optional in ipcRenderer
2017-08-29 13:22:41 -07:00
Zeke Sikelianos
6c201fcae4 move issue template to .github directory 2017-08-29 12:51:02 -07:00
Cheng Zhao
39a366cf76 Merge pull request #10277 from electron/re-enable_debug_mode
Re-enabled debug mode
2017-08-29 19:22:37 +09:00
Cheng Zhao
0550a4a9b8 Fix crash when emitting render-view-deleted event 2017-08-29 17:46:46 +09:00
Cheng Zhao
7f4b74f8c6 spec: Compare id instead of the object
Otherwise it is impossible to see what's wrong.
2017-08-29 15:45:16 +09:00
Samuel Attard
e58ba1dc8e Update ipc-renderer.md 2017-08-29 16:12:55 +10:00
Cheng Zhao
f0f17fffd8 spec: Do not test window positions
They were too flaky.
2017-08-29 14:23:39 +09:00
Cheng Zhao
4febbec102 Fix crash when switching menus in menubar 2017-08-29 14:19:23 +09:00
Cheng Zhao
b2f3625eaa Fix deprecated node::MakeCallback call 2017-08-29 14:19:23 +09:00
Cheng Zhao
593ae7bf0e Fix crash caused by freeing capturer task 2017-08-29 14:19:22 +09:00
Cheng Zhao
5510d8cfb1 Revert "Revert "spec: Suppress the select-client-certificate test""
This reverts commit 8e989170f1.
2017-08-29 14:19:22 +09:00
Cheng Zhao
68e0fbfd60 Revert "Revert "spec: Suppress the app.importCertificate test""
This reverts commit a7cb89aeb5.
2017-08-29 14:19:21 +09:00
Cheng Zhao
9337e29482 Fix the crash caused by asyncContext 2017-08-29 14:19:20 +09:00
John Kleinschmidt
56233054ae Fix CI for Linux 2017-08-29 14:19:20 +09:00
Cheng Zhao
6e6b097968 Revert "Revert "spec: Suppress the test that destroys WebContents in event listener""
This reverts commit 210652ed54.
2017-08-29 14:19:19 +09:00
Ales Pergl
a7bae32527 Re-enabled debug mode 2017-08-29 14:19:19 +09:00
Zeke Sikelianos
c6918966c2 Merge pull request #10214 from psh0628/contextisolation-sandbox-fix
fix contextIsolation issue while webPreference sandbox is on
2017-08-28 21:20:04 -07:00
Ivan Mir
93a8e75238 Add clarifications to the documentation 2017-08-28 20:33:16 -03:00
Zeke Sikelianos
66a5ac4d67 Merge pull request #10215 from electron/update-chromium-upgrade-docs
Update Chromium Upgrade docs
2017-08-28 08:42:14 -07:00
Zeke Sikelianos
e1c4962312 add sh to code fences 2017-08-28 08:41:52 -07:00
Shohei YOSHIDA
55f2b524e7 Close window in order from newer one on macOS
A parent window is not closed if a child modal window still exists.
So a child window should be closed before parent window closed.
2017-08-28 13:56:05 +09:00
Ivan Mir
75b2915fee Change the parameter name for consistency 2017-08-27 11:53:25 -03:00
Tony Ganch
6a285e2e76 Update Chromium Upgrade docs 2017-08-27 17:51:47 +03:00
Aleksei Kuzmin
c4634f7e98 Update Chromium Upgrade docs 2017-08-27 17:51:47 +03:00
Zeke Sikelianos
87d4666648 Merge pull request #10356 from electron/update-browser-window-docs
update browser-window.md
2017-08-26 20:03:55 -07:00
Vanessa Yuen
deb7ccbef3 fix lint error 2017-08-25 17:24:50 -04:00
Vanessa Yuen
bb153ee79e update browser-window.md
Add a note about the subtle difference between `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', handler)`.
2017-08-25 17:14:20 -04:00
Owais Lone
dc43dc2a13 Add support for indicators in Ubuntu Gnome Session
Ubuntu is switching to Gnome in 17.10 but it's not going to be the stock Gnome session. It's going to support the existing Unity APIs. Support has already landed for application indicators and likely other APIs (Launcher,etc) will be supported soon. The Ubuntu Gnome session will have `XDG_CURRENT_DESKTOP=ubuntu:GNOME` environment variable.

Ref: https://didrocks.fr/2017/08/23/ubuntu-gnome-shell-in-artful-day-7/
2017-08-25 23:25:08 +05:30
sungpark
65eb4e1994 fix compile error 2017-08-24 14:31:25 -07:00
Ivan Mir
6717f0d2bb Add accessibility setter to the app 2017-08-24 11:22:28 -03:00
Cheng Zhao
6a93052f7d Merge pull request #10298 from electron/update-external-binaries
Bump external binaries to 1.2.2
2017-08-24 19:29:13 +09:00
Samuel Attard
7ecac42214 Merge pull request #10232 from electron/drag-browser-view
Add -webkit-app-region support to BrowserView
2017-08-24 10:30:56 +10:00
Felix Rieseberg
fdfbf3abfa 🔧 Respect the header 2017-08-23 17:26:18 -07:00
Felix Rieseberg
a44c2d5dcc 🔧 Extend interface 2017-08-23 16:10:31 -07:00
sungpark
f984bd2ff5 use spaces instead of hard tabs for indentation and add the supported modules as a sub-list 2017-08-23 10:52:02 -07:00
sungpark
eca7ff986c add webFrame to sandboxed renderer 2017-08-23 10:52:02 -07:00
sungpark
bf07c5aebd fix contextIsolation issue while webPreference sandbox is on
contextIsolation didn't work while sandbox is on. The fix is contextIsolation picked up while sandbox on
2017-08-23 10:52:02 -07:00
Liu Siyuan
e64d4e5bd7 update web-content.md based on review 2017-08-23 23:37:37 +08:00
Liu Siyuan
15d2cfe458 update docs 2017-08-23 23:04:00 +08:00
Zeke Sikelianos
88b3109137 change backport branch creation steps 2017-08-22 21:03:03 -07:00
Siyuan Liu
5cb58cd42f use nullptr instead of nullptr_t() 2017-08-23 09:30:58 +08:00
Zeke Sikelianos
485b9099f1 Merge pull request #10328 from electron/bump-@types-node-to-8
bump @types/node to 8
2017-08-22 15:03:04 -07:00
Felix Rieseberg
cd5cd25f74 🔪 Bonus colon 2017-08-22 11:14:21 -07:00
Zeke Sikelianos
18e7354b4a bump @types/node to 8 2017-08-22 11:01:40 -07:00
Ivan Mir
9605e6cb40 Add documentation for macOS accessibility 2017-08-22 13:01:33 -03:00
Vladimir Krivosheev
d3f30e7a9c docs: add note about electron-updater 2017-08-22 16:51:57 +02:00
Cheng Zhao
1f604c0826 Merge pull request #10219 from HAMIDx9/master
Add arm64 build support
2017-08-22 17:02:23 +09:00
Cheng Zhao
2bfc2be8c9 Merge pull request #10279 from electron/fix-10279
Fix 'BrowserWindow module "webPreferences" option "sandbox" option can print to PDF'
2017-08-22 15:25:37 +09:00
Cheng Zhao
d233fc044a Pass dpiVertical and dpiHorizontal to print settings 2017-08-22 13:54:49 +09:00
Michael Kaylan
b4428e7e41 🍎 Add macOS native tab methods to window API 2017-08-21 23:24:30 -04:00
Aleksei Kuzmin
8b55e6e2f5 Revert "Disable a failing test"
This reverts commit 9487222726.
2017-08-22 11:49:53 +09:00
Cheng Zhao
94ab1c790f Verify arm64 builds in prerelease 2017-08-22 10:08:27 +09:00
Cheng Zhao
de67e42fc9 Update breakpad for ia32/arm fix 2017-08-22 10:02:51 +09:00
Cheng Zhao
136857952e Add arm64 task in travis ci 2017-08-22 10:02:51 +09:00
HAMIDx9
cd42133651 Add arm64 build support 2017-08-22 10:02:51 +09:00
Cheng Zhao
0c93e4b8d7 Merge pull request #10318 from electron/module-version
Use 57 as node module version in Electron 1.8
2017-08-22 10:02:15 +09:00
Cheng Zhao
f954b60119 Use 57 as node module version
This matches Node v8, which uses 57 for V8 5.8 - 6.0.
2017-08-22 09:24:18 +09:00
Cheng Zhao
565ece6986 Merge pull request #10308 from electron/native-view
Add WebContents.getNativeView() API
2017-08-22 09:19:27 +09:00
Felix Rieseberg
f0680587fa 🔧 Linter fascism 2017-08-21 16:52:59 -07:00
Charlie Hess
f17bd040ad Merge pull request #10293 from electron/notification-sounds
Add support for soundName in main process notifications
2017-08-21 16:15:47 -07:00
Zeke Sikelianos
b1011768e5 Merge pull request #10251 from electron/new-update-docs
New guide for implementing updates
2017-08-21 15:22:43 -07:00
Zeke Sikelianos
b6787dbbb3 link to updates guide from docs readme 2017-08-21 15:22:13 -07:00
Zeke Sikelianos
1731359a17 tweak the updates guide 2017-08-21 15:19:59 -07:00
Charlie Hess
f2c0d1f0c5 📝 Little cleanup. 2017-08-21 13:56:10 -07:00
Charlie Hess
db081d95d5 Review CommentZ. 2017-08-21 13:53:50 -07:00
Zeke Sikelianos
a50e36d256 Merge pull request #10304 from kyo-ago/patch-1
Fix typo on japanese document
2017-08-21 09:17:26 -07:00
Zeke Sikelianos
6c60c6ca76 Merge pull request #10306 from lisurc/patch-1
📝 Fix markdown syntax
2017-08-21 09:14:56 -07:00
Cheng Zhao
2c1984b6ed Add WebContents.getNativeView API 2017-08-21 19:50:12 +09:00
Cheng Zhao
dede3d6213 Merge pull request #10280 from electron/fix-10280
Fix 'BrowserWindow module window states resizable state works for a frameless window'
2017-08-21 19:28:13 +09:00
Cheng Zhao
70fd42808e Fix build on Linux 2017-08-21 17:42:45 +09:00
Cheng Zhao
19323c88f9 win: Fix "thickFrame: false" not working for normal window 2017-08-21 17:21:59 +09:00
Aleksei Kuzmin
c0331673da Revert "Disable a failing test"
This reverts commit 25c0cf0612.
2017-08-21 16:48:24 +09:00
Siyuan Liu
eeb2e58ad8 return null when theme color is not found 2017-08-20 22:48:13 +08:00
Bastien
39c2a4721b 📝 Fix markdown syntax
Also fix some grammar and syntax typing mistakes.
[ci skip]
2017-08-19 22:29:34 +02:00
Ivan Mir
94dd068e15 Special attribute for macOS accessibility #7206
In the linked issue we were discussing that Electron apps are inaccessible unless VoiceOver is enabled. While it's a working solution for users with vision impairment, all other users and apps that require accessibility can't interact with Electron-based software because they don't keep VoiceOver running.

I suggest adding `AXManualAccessibility` for programmatically enabling it in Electron apps. The reason for a new attribute is that `AXEnhancedUserInterface` is already reserved by VoiceOver.

Adding this attribute will allow both Electron developers and 3rd party developers to enable and disable accessibility from their code by calling `accessibilitySetValue:forAttribute:` on the application.

It will be also possible to create a small utility app to switch accessibility in Electron-based apps until there's a native UI solution (like the accessibility settings page in Chrome).
2017-08-19 17:18:12 -03:00
kyo_ago
8695672082 fix typo 2017-08-19 15:37:07 +09:00
Samuel Attard
15db4ee450 Merge pull request #10275 from electron/windowclose-exception
Fixing uncaught exception on window close
2017-08-19 13:58:55 +10:00
Mathieu Débit
81f7b422e4 📝 Fix desktopCapturer example (#10303)
[ci skip]

Based on MDN example:
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Examples
2017-08-18 22:02:28 +02:00
Josh Abernathy
766b604de5 Bump external binaries to 1.2.2 2017-08-18 08:20:07 -04:00
Cheng Zhao
ac6a44f0ac Merge pull request #10273 from rhysd/doc-fix-optional-args
fix some optional args docs
2017-08-18 19:07:56 +09:00
Charlie Hess
2b9b186fd1 Rename soundName → sound. 2017-08-17 17:28:14 -07:00
Charlie Hess
0cfae1cc2b Plumb in the macOS soundName property for notifications. 2017-08-17 13:31:20 -07:00
Hari Juturu
340431750b Removing try/catch 2017-08-17 10:56:37 -07:00
Cheng Zhao
4bc4a0c45b Merge pull request #10289 from electron/fix-compile
Fix compilation on mac
2017-08-17 17:41:13 +09:00
rhysd
01f549628f fix signature of <webview>.executeJavaScript 2017-08-17 17:06:30 +09:00
Cheng Zhao
9c552644d8 Fix compilation on mac 2017-08-17 16:47:12 +09:00
Cheng Zhao
f6792c0232 Merge pull request #10264 from electron/fix-sandbox-crash-on-background-tab
Fix sandbox crash when opening a background tab
2017-08-17 15:57:29 +09:00
Cheng Zhao
ecff620528 Merge pull request #10081 from renaesop/master
Add a callback option to `webContents.print`
2017-08-17 15:56:02 +09:00
Cheng Zhao
f908678e8e Merge pull request #10183 from andens/mouse_forward
Mouse forward functionality on Windows
2017-08-17 15:54:22 +09:00
Vanessa Yuen
32121b9c38 Merge pull request #10283 from electron/welcome-probots-config
add welcome probots
2017-08-16 15:56:19 -04:00
Vanessa Yuen
c4d1fb929c Update config.yml 2017-08-16 15:04:34 -04:00
Vanessa Yuen
65908bbb87 Create config.yml 2017-08-16 14:54:10 -04:00
John Kleinschmidt
44481db1ee Merge pull request #9946 from electron/upgrade-to-chromium-59
Upgrade to Chromium 59
2017-08-16 10:00:34 -04:00
Aleksei Kuzmin
5543bfc278 Use the latest libcc version with Chromium 59 2017-08-16 14:29:03 +03:00
Andreas Flöjt
d4bbd7c7ab Add example of using mouse forwarding. 2017-08-16 03:28:52 +02:00
Andreas Flöjt
814702f5b8 Cleanup potential mouse forwarding resources when window is destroyed. 2017-08-16 03:28:07 +02:00
Felix Rieseberg
6191e6e787 🔧 Implement feedback 2017-08-15 16:14:58 -07:00
Hari Juturu
9120774c00 Fixing uncaught exception on window close 2017-08-15 14:59:48 -07:00
Leo Lamprecht
78c87d4bd3 Made dialog message clear 2017-08-15 22:55:55 +02:00
Zeke Sikelianos
5f82168213 lint 2017-08-15 13:09:06 -07:00
Zeke Sikelianos
a84d49fe5c add newline 2017-08-15 13:06:45 -07:00
Zeke Sikelianos
2ec223ba11 use an arrow function 2017-08-15 13:04:52 -07:00
Zeke Sikelianos
35b2bc6b51 implement a dialog in the download handler 2017-08-15 12:53:46 -07:00
Leo Lamprecht
68250d80cd Improved error logging 2017-08-15 21:38:31 +02:00
rhysd
2edf4da859 fix some optional args docs 2017-08-16 02:23:36 +09:00
Michael Kaylan
7741a0e6ad 🍎 Add roles for macOS native tab menu items
Fixes #9086, #10064.
2017-08-15 11:30:39 -04:00
Aleksei Kuzmin
25c0cf0612 Disable a failing test
BrowserWindow module window states resizable state works for a frameless window
2017-08-15 16:19:29 +03:00
Aleksei Kuzmin
9487222726 Disable a failing test
BrowserWindow module "webPreferences" option "sandbox" option can print to PDF
2017-08-15 16:19:29 +03:00
Catalin Fratila
60b363fa3b Fixing Windows tray icon content menu - based on chrome/browser/ui/views/status_icons/status_icon_win.cc 2017-08-15 16:19:23 +03:00
Kevin Sawicki
90fbe5c06c Disable warnings in node.cc and string_bytes.cc 2017-08-15 16:19:23 +03:00
Kevin Sawicki
7226adee29 Upgrade node for windows build fixes 2017-08-15 16:19:23 +03:00
Kevin Sawicki
27c1612f44 Upgrade to node 8.2.1 2017-08-15 16:19:23 +03:00
Kevin Sawicki
fb6759b5e0 Downgrade to node 8.1.4 since 8.2.0 will be against v8 6.0 2017-08-15 16:19:23 +03:00
Kevin Sawicki
eabbac4ca1 Upgrade node for version module change 2017-08-15 16:19:23 +03:00
Kevin Sawicki
d943519fb4 Update text expectation for new --inspect-brk message 2017-08-15 16:19:23 +03:00
Kevin Sawicki
9d2aa6f1c7 Upgrade to node 8.2.0 2017-08-15 16:19:23 +03:00
Ales Pergl
9f8f95f4c9 Lock pixels before calling SkBitmap::getPixels and copy bitmap row-wise in case (stride != width) 2017-08-15 16:19:23 +03:00
John Kleinschmidt
924a345fac Try fix to boto on Trusty 2017-08-15 16:19:23 +03:00
John Kleinschmidt
59238a915e Require sudo 2017-08-15 16:19:23 +03:00
John Kleinschmidt
03d15809be Explicity use Precise for Travis CI 2017-08-15 16:19:23 +03:00
deepak1556
778772710a intialize WebTextCheckClient https://codereview.chromium.org/2791753003 2017-08-15 16:19:22 +03:00
Kevin Sawicki
fb02343ec0 Remove unneeded volumes and env 2017-08-15 16:19:22 +03:00
Kevin Sawicki
dc6e451010 Only start xvfb when tests will be run 2017-08-15 16:19:22 +03:00
Kevin Sawicki
1f71a2e94c Simplify xvfb init script 2017-08-15 16:19:22 +03:00
Kevin Sawicki
b407834ed7 Remove default 2017-08-15 16:19:22 +03:00
Kevin Sawicki
f1036f7305 Add xvfb-init.sh to docker context 2017-08-15 16:19:22 +03:00
Kevin Sawicki
c3e0e4682d Use xvfb from container on CI 2017-08-15 16:19:22 +03:00
Kevin Sawicki
a0fd37c8a3 Try always using DISPLAY=unix:99:0 on Linux CI 2017-08-15 16:19:22 +03:00
Kevin Sawicki
23b35af7f2 Use DISPLAY=:99.0 on Linux CI 2017-08-15 16:19:22 +03:00
Kevin Sawicki
ddefc08ec5 Remove command logging 2017-08-15 16:19:22 +03:00
Kevin Sawicki
f79a90161c Extend libcc Dockerfile for Electron Linux build 2017-08-15 16:19:22 +03:00
Kevin Sawicki
29dc06c89d Configure spec UI to run in docker container 2017-08-15 16:19:22 +03:00
Kevin Sawicki
5737f8b74e Remove unneeded nodenv setup 2017-08-15 16:19:22 +03:00
Kevin Sawicki
bbd1b325fb Initial docker-based linux builds 2017-08-15 16:19:22 +03:00
Kevin Sawicki
152d573fbd Build with jessie sysroot on ARM 2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
adaec2d32b Fix brightray.gyp 2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
b6f0d04813 net: remove CryptoModule class
https://codereview.chromium.org/2724013002
2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
fe0a96200d Use Jessie sysroot for building on amd64 and i386 2017-08-15 16:19:22 +03:00
Gellert Hegyi
c6ba812d79 re-enables OSR 2017-08-15 16:19:22 +03:00
Gellert Hegyi
6ab0a8a287 removes unused autoresizelock from osrrwhv 2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
90ec61fbe9 Revert "Enable OSR"
This reverts commit 5925d737afcd1b8dbbccc1d2b52ced025e291436.
2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
ba0c43e1fc Do not run navigator.getUserMedia related test on CI build machines 2017-08-15 16:19:22 +03:00
Gellert Hegyi
1d10654a22 fixes bitmap to canvas conversion 2017-08-15 16:19:22 +03:00
Gellert Hegyi
76d46ce509 adds compositor resize lock client implementation 2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
5ef668de64 Enable OSR 2017-08-15 16:19:22 +03:00
Gellert Hegyi
ca4a6e4692 fixes offscreen rendering on macos 2017-08-15 16:19:22 +03:00
Aleksei Kuzmin
1d132565c9 FIXME: enable_osr=0 2017-08-15 16:19:21 +03:00
Kevin Sawicki
7d1a49db48 Use kPointsPerInch instead of desired_dpi
Changed in https://codereview.chromium.org/2788343003
2017-08-15 16:19:21 +03:00
Kevin Sawicki
9945fc5148 Don't destroy menu delegate until OnMenuClosed fires 2017-08-15 16:19:21 +03:00
Kevin Sawicki
ad33e569d6 Register default layout provider 2017-08-15 16:19:21 +03:00
Kevin Sawicki
34fff57646 Grant the devtools access to the extension origins 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
4fc2b3e642 Make download item drags look like bookmark
https://codereview.chromium.org/2750253002
2017-08-15 16:19:21 +03:00
Kevin Sawicki
4bb95acc2b 👕 Remove linter errors 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
c7cf844bcd Update CHROME_VERSION_STRING 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
ba9b8719ac The Blink Rename 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
f4411889a9 Fix free memory calculation.
https://codereview.chromium.org/2558043007
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
627eb30409 The Blink Rename 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
b8b7d0ab1a Rename methods in autofill 2017-08-15 16:19:21 +03:00
Kevin Sawicki
45db999593 Extend blink::WebTextCheckClient in atom::api::SpellCheckClient 2017-08-15 16:19:21 +03:00
Tony Ganch
4d9f309888 Fix HasServiceWorker check
Revert cb2014f9e8ae0283e5f20d4e2167be1592228887.
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
e2fe95894f Require explicit selection of traits for LazyInstance
https://codereview.chromium.org/2733283002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
e16e1e2854 Remove URLRequestJobFactory::IsHandledURL.
https://codereview.chromium.org/2783343002
2017-08-15 16:19:21 +03:00
Tony Ganch
90574160db Replace x/y in WebMouseEvent with proper getters/setters 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
b997c2ffc1 Don't call deprecated copyPixelsTo
don't call deprecated copyPixelsTo
https://codereview.chromium.org/2812853002

stop using copyPixelsTo -- deprecated
https://codereview.chromium.org/2798413002

remove unused SkBitmap::copyPixelsTo
https://skia-review.googlesource.com/c/13171/
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
f824b1e9d4 Migrate base::TaskRunner from Closure to OnceClosure
Migrate base::TaskRunner from Closure to OnceClosure
https://codereview.chromium.org/2637843002

Pass Callback to TaskRunner by value and consume it on invocation (1)
https://codereview.chromium.org/2726523002

Replace base::get with std::get
https://codereview.chromium.org/2797133002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
48821a6d2a Fix compilation 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
d09cab2e21 Migrate base::TaskRunner from Closure to OnceClosure
Migrate base::TaskRunner from Closure to OnceClosure
https://codereview.chromium.org/2637843002

Pass Callback to TaskRunner by value and consume it on invocation (1)
https://codereview.chromium.org/2726523002

Replace base::get with std::get
https://codereview.chromium.org/2797133002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
ffbb16e854 Adds a basic offline check to InstallableManager.
https://codereview.chromium.org/2751343002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
30fafc2772 Fix CompositorResizeLock to do something.
https://codereview.chromium.org/2773433003
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
9b8a77f0d8 Adds the ability for WebContentsDelegate to decide if event should be updated
https://codereview.chromium.org/2775553002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
d322769de8 WebMouseEvent coordinates are now fractional & private
https://codereview.chromium.org/2782893002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
faaeab7e4a Add EME support for new VP9 codec string in WebM.
https://codereview.chromium.org/2793163003
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
567646e624 Fix cc/paint skia type mismatches
https://codereview.chromium.org/2717943002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
adddff3ee2 Move PrefRegistrySimple to use unique_ptr<Value>
https://codereview.chromium.org/2784513002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
99e57f9072 Add display::GetDisplayNearestView
https://codereview.chromium.org/2751833004
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
6415f181ca Downloads: Added transient flag to download item and download database
https://codereview.chromium.org/2720613002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
bd971b6371 Added last_access_time to DownloadItem and History DB
https://codereview.chromium.org/2705283003
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
0adc887b32 [downloads] Allow download target determination to indicate an error.
https://chromium-review.googlesource.com/c/465526/
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
7c7300ff82 Make GetDisplayedNotifications asynchronous.
https://codereview.chromium.org/2749453002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
bda5e4efcb Moving LatencyInfo into a separate component.
https://codereview.chromium.org/2783973002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
cc350efbd8 Remove base::BinaryValue
https://codereview.chromium.org/2799093006
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
49fbb52b01 Add X509CertificateBytes which uses CRYPTO_BUFFER instead of macOS-native certificate types.
https://codereview.chromium.org/2746103003
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
3d700ee49f Remove base::Value::CreateNullValue
https://codereview.chromium.org/2792573002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
c7f2e2731c Allow content embedder to set a cursor for RenderWidgetHost
https://codereview.chromium.org/2808763009
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
1126719e7f Separate ContentSettingsClient out from LocalFrameClient
https://codereview.chromium.org/2786673002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
a20f633272 Remove base::StringValue
https://codereview.chromium.org/2664753002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
fb7bd8f11e Remove desired DPI
https://codereview.chromium.org/2788343003
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
7a4ca08a8d The Blink Rename 2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
3939359354 Update clang revision to match Chromium 59.0.3071.104 2017-08-15 16:19:20 +03:00
Thiago de Arruda
1709b8e39d Fix sandbox crash when opening a background tab
When a link is clicked with the middle mouse button, chrome opens a window with
"background-tab" disposition. This is not currently handled in sandbox mode,
causing an api::WebContents to leak leading to eventual crash(since it has no
wrapper).

Also fix the event handler for "-add-new-contents" by having it call
`event.preventDefault()` when the window creation should be cancelled.
2017-08-15 09:55:39 -03:00
Cheng Zhao
a419fe75ca Merge pull request #10253 from electron/improvements-for-libcc-development
Improve development workflow with built libchromiumcontent
2017-08-15 19:40:06 +09:00
Leo Lamprecht
4ba4fe4f62 Examples for events 2017-08-15 11:38:54 +02:00
Leo Lamprecht
3062027bab Better wording about Now deployment 2017-08-15 11:29:28 +02:00
Leo Lamprecht
78f11df6e4 Full Windows section is back 2017-08-15 11:27:33 +02:00
Leo Lamprecht
3405596983 Brought back Windows section 2017-08-15 11:24:59 +02:00
Thiago de Arruda
d6fbf5f1bb Improve development workflow with built libchromiumcontent
- Add `--debug_libchromiumcontent` to build libchromiumcontent for debugging
  (shared library build).
- By default, only invoke `gclient sync` the first time to checkout chromium
  source tree. Add `--force_update_libchromiumcontent` switch to force updating.
- Document new options.

The goal is to allow faster edit/compile cycles when debugging/making changes
to libchromiumcontent.
2017-08-15 05:40:22 -03:00
renaesop
6d16eb81d2 Add a callback option to webContents.print 2017-08-15 14:44:24 +08:00
Zeke Sikelianos
6a872dd938 update the updates doc 2017-08-14 13:26:33 -07:00
Zeke Sikelianos
796664ef1c Merge pull request #10266 from electron/revert-10250-remove-preinstall-no-op
Revert "remove no-op preinstall script"
2017-08-14 11:34:44 -07:00
Zeke Sikelianos
10f2c80162 Revert "remove no-op preinstall script" 2017-08-14 11:33:32 -07:00
Andreas Flöjt
3d33da7696 Make mouse forward option of setIgnoreMouseMessages and update documentation. 2017-08-14 20:21:00 +02:00
Andreas Flöjt
60c0bf1636 Set up legacy window subclass and mouse hook during setForwardMouseMessages.
As opposed to when a legacy window is created/destroyed. This enables forwarding on a per-window basis.
2017-08-14 18:12:55 +02:00
Zeke Sikelianos
646a8eb753 Merge pull request #10250 from electron/remove-preinstall-no-op
remove no-op preinstall script
2017-08-13 21:19:29 -07:00
Zachary Flower
8a2c35023f 📝 Document simple fullscreen functionality [ci skip] 2017-08-13 00:58:28 -06:00
Zachary Flower
ba5fa2c8b1 Add support for simple (pre-Lion) fullscreen on Mac OS 2017-08-13 00:28:33 -06:00
Leo Lamprecht
235ae0989f Mention that the app needs to check for updates 2017-08-12 12:48:49 +02:00
Leo Lamprecht
837a34cf71 Indicate that Nuts supports private repositories 2017-08-12 12:44:21 +02:00
Leo Lamprecht
01f31edb95 Cut down platform notices a little 2017-08-12 01:30:29 +02:00
Leo Lamprecht
cfe914ff83 Fixed wording 2017-08-12 01:24:56 +02:00
Leo Lamprecht
06f4c1b337 Be clear about the usage example 2017-08-12 01:23:54 +02:00
Leo Lamprecht
3815ed8af4 Fixed a typo 2017-08-12 01:18:34 +02:00
Leo Lamprecht
c1a40fbd98 Linked guide about implementing updates 2017-08-12 01:10:20 +02:00
Leo Lamprecht
bb1627a69b Added guide for updates 2017-08-12 01:04:25 +02:00
John Kleinschmidt
ad90de0c82 Merge pull request #10230 from electron/prerelease
add a prerelease check
2017-08-11 16:41:08 -04:00
Zeke Sikelianos
0cd99d9815 remove no-op preinstall script 2017-08-11 12:18:51 -07:00
John Kleinschmidt
6956f2fc69 Merge pull request #10246 from electron/another-final-step-in-releasing
edit release on github after promoting to latest
2017-08-11 09:50:08 -04:00
Zeke Sikelianos
fd6aeda6f6 edit release on github after promoting to latest 2017-08-10 20:53:02 -07:00
Felix Rieseberg
b4bb00843b 🔧 Spaces for the Spacelord 2017-08-10 09:38:01 -07:00
Felix Rieseberg
4c48908a31 Merge branch 'drag-browser-view' of https://github.com/electron/electron into drag-browser-view 2017-08-10 09:36:12 -07:00
Zeke Sikelianos
404589d9b5 add more releasing tips 2017-08-10 09:26:22 -07:00
Felix Rieseberg
d913b53fea 🔧 Handle offset BrowserView 2017-08-10 08:00:21 -07:00
Cheng Zhao
c6289ef219 Merge pull request #10223 from ajmacd/shutdown-desktop-capturers
Ensure DesktopCapturers are destroyed when no longer needed.
2017-08-10 21:28:31 +09:00
Felix Rieseberg
47d652b5a2 🔧 Properly derive 2017-08-09 15:21:58 -07:00
Felix Rieseberg
7bfece1144 🔧 Make work with complex shapes 2017-08-09 15:21:58 -07:00
Felix Rieseberg
a55015d63d 🔧 Support older versions of macOS 2017-08-09 15:21:58 -07:00
Felix Rieseberg
a5dfb09037 🔧 Draggable (using the window’s regions) 2017-08-09 15:21:58 -07:00
Felix Rieseberg
ae5c8e63d9 🔧 Properly derive 2017-08-10 07:09:03 +09:00
Felix Rieseberg
ebe058e7cb 🔧 Make work with complex shapes 2017-08-09 14:53:36 -07:00
Zeke Sikelianos
96dd9b9ab8 update prerelease to check for files on s3 2017-08-09 13:40:52 -07:00
Vanessa Yuen
b81aab9eae Bump v1.7.6 2017-08-09 15:28:55 -04:00
Felix Rieseberg
fdd0d67fd3 🔧 Support older versions of macOS 2017-08-09 11:57:57 -07:00
Zeke Sikelianos
a16c4167eb standardize 2017-08-09 11:06:16 -07:00
Zeke Sikelianos
1a6f0ae437 add a prerelease check 2017-08-09 10:49:31 -07:00
Zeke Sikelianos
1e9109f3c6 Merge pull request #10225 from electron/more-installation-tips
add more installation tips
2017-08-08 20:55:15 -07:00
Zeke Sikelianos
3a1d6e7a42 recommend fixing permissions over using sudo 2017-08-08 20:43:57 -07:00
Felix Rieseberg
df66223f4c 🔧 Draggable (using the window’s regions) 2017-08-08 17:00:00 -07:00
Zeke Sikelianos
1e4232eb3a add more installation tips 2017-08-08 15:22:52 -07:00
Vanessa Yuen
aac9ea1371 Merge pull request #10172 from electron/publish-prebuilt
publish to npm directly from electron repo
2017-08-08 13:59:37 -04:00
Zeke Sikelianos
259e1f0804 restore links to translated READMEs 2017-08-08 10:55:09 -07:00
Zeke Sikelianos
525eedc036 remove prebuilt readme in favor of top-level readme 2017-08-08 10:20:30 -07:00
Zeke Sikelianos
bc090ac67a Merge branch 'publish-prebuilt' of https://github.com/electron/electron into publish-prebuilt 2017-08-08 10:18:45 -07:00
Zeke Sikelianos
58af0778b7 update the readme 2017-08-08 10:18:40 -07:00
Zeke Sikelianos
5ae01bceee add an installation guide 2017-08-08 10:18:22 -07:00
Vanessa Yuen
8db0a10372 use root README instead of the one for prebuilt 2017-08-08 13:12:49 -04:00
Zeke Sikelianos
3f295d6664 remove duplicate list of translations from readme 2017-08-08 09:28:43 -07:00
Vladimir Vainer
39c46a9b75 added comment to mention sk_tools_utils::copy_to 2017-08-08 13:06:39 +03:00
Vladimir Vainer
e6abfa959a Revert "Do not use deprecated deepCopyTo"
This reverts commit 517184b89b.
2017-08-08 13:02:20 +03:00
Zeke Sikelianos
d0130e1b09 Merge pull request #9988 from kant2002/patch-1
Allow TypeScript definitions work with strictNullChecks
2017-08-07 20:37:26 -07:00
John Kleinschmidt
72d2e176dd Merge pull request #10160 from liusy182/liusy182-10128-asar
Return empty string when fs.readFile with 'utf8' option from asar file
2017-08-07 21:42:15 -04:00
John Kleinschmidt
ccdff72ee4 Merge pull request #9918 from alexstrat/add-extensions-loading-api
Introduce Chrome extensions management APIs independent of Dev Tools Extensions
2017-08-07 20:06:22 -04:00
John Kleinschmidt
29331af767 Merge pull request #10209 from electron/rollback_debug_mode
Rollback debug mode changes
2017-08-07 18:21:50 -04:00
Kevin Sawicki
dfec48dd44 End response and set status code for unexpected URLs 2017-08-07 13:33:01 -07:00
Kevin Sawicki
8e989170f1 Revert "spec: Suppress the select-client-certificate test"
This reverts commit dc1269615a.
2017-08-07 12:57:01 -07:00
Kevin Sawicki
a7cb89aeb5 Revert "spec: Suppress the app.importCertificate test"
This reverts commit 5ccae79ea7.
2017-08-07 12:56:54 -07:00
Kevin Sawicki
210652ed54 Revert "spec: Suppress the test that destroys WebContents in event listener"
This reverts commit b315eb83fd.
2017-08-07 12:56:48 -07:00
John Kleinschmidt
3d5acdf682 Rollback debug mode changes 2017-08-07 15:54:44 -04:00
John Kleinschmidt
d06eeeede8 Merge pull request #10204 from electron/revert-9961-fix-window-opener
Revert "Fix window.opener being null when nativeWindowOpen is used"
2017-08-07 14:14:47 -04:00
Cheng Zhao
eeca6fcb55 Revert "Fix window.opener being null when nativeWindowOpen is used" 2017-08-07 19:50:23 +09:00
Andrew MacDonald
a8759a3176 Ensure DesktopCapturers are destroyed when no longer needed. 2017-08-04 15:06:58 -07:00
Zeke Sikelianos
f1f43c51bb Merge pull request #10190 from electron/update-releasing-guide
improve the releasing guide
2017-08-04 13:52:26 -07:00
Vanessa Yuen
5f1a683869 Merge pull request #10157 from runinspring/patch-2
Create keyboard-shortcuts
2017-08-04 13:46:16 -04:00
Cheng Zhao
63d7aee1a6 Merge pull request #9961 from electron/fix-window-opener
Fix window.opener being null when nativeWindowOpen is used
2017-08-04 21:18:47 +09:00
Andreas Flöjt
0736de1e8d Fix lint errors 2017-08-03 23:23:42 +02:00
Zeke Sikelianos
e8af45e130 document npm promotion 2017-08-03 13:24:18 -07:00
Zeke Sikelianos
01283c26a8 improve the releasing guide 2017-08-03 12:55:33 -07:00
Andreas Flöjt
12dbcfa2ea 📝 Documentation for setForwardMouseMessages. 2017-08-02 21:50:42 +02:00
Andreas Flöjt
a84fa0eecb 🏁 Add API to forward mouse messages.
As opposed to the existing setIgnoreMouseEvents this call makes Chromium aware of mouse movements, allowing the user to stop forwarding according to movements in the webpage.
2017-08-02 21:16:37 +02:00
Vanessa Yuen
c8e2e37146 Merge branch 'master' into publish-prebuilt 2017-08-02 14:57:28 -04:00
John Kleinschmidt
7961a97d7d Merge pull request #10181 from electron/mocha-grep-docs
Parse --grep and --invert for mocha
2017-08-02 14:03:34 -04:00
Kevin Sawicki
7cf34c6f62 Parse --grep and --invert for mocha 2017-08-02 10:57:15 -07:00
Cheng Zhao
5e06ac11e9 Merge pull request #10175 from electron/fix-more-crashes
Fix a few more crashes in tests
2017-08-02 19:03:13 +09:00
Cheng Zhao
dc1269615a spec: Suppress the select-client-certificate test
Not sure why it is not working
2017-08-02 16:07:46 +09:00
Cheng Zhao
7d7bb1581b spec: Disable crashReporter tests for some CI machines
Have no idea why it is failing on our CI machines, but at least Appveyor
works fine.
2017-08-02 15:54:50 +09:00
Cheng Zhao
5ccae79ea7 spec: Suppress the app.importCertificate test
I have no idea why it failed, somehow the page can not load with the
provided certificated.
2017-08-02 15:17:18 +09:00
Cheng Zhao
28959da2b7 spec: Fix the event test calling done for multiple times 2017-08-02 15:06:06 +09:00
Cheng Zhao
d166d08dd5 spec: Enable passing -g to test.py 2017-08-02 14:45:06 +09:00
Cheng Zhao
4e2cb549c7 Notify net error asyncronously
Notifying net error syncronously would result in crash.
2017-08-02 11:14:06 +09:00
Cheng Zhao
b315eb83fd spec: Suppress the test that destroys WebContents in event listener
It is crashing when Electron is built in Debug mode.
2017-08-02 11:14:06 +09:00
Cheng Zhao
bd697275c2 Ignore all node_modules/ dirs 2017-08-02 10:31:27 +09:00
Vanessa Yuen
c0f68af458 minor changes as per code review comments 2017-08-01 21:06:50 -04:00
Vanessa Yuen
f251799049 Merge pull request #10173 from electron/update-glosssary
update glossary entries for brightray, libcc, V8
2017-08-01 16:19:41 -04:00
Vanessa Yuen
6e86a95f5e remove package-lock from /npm 2017-08-01 16:15:24 -04:00
Vanessa Yuen
cc2edba049 remove github authentication since it's not needed to access published release assets on gh 2017-08-01 16:10:29 -04:00
Vanessa Yuen
511bd84ece work with published release instead of draft release
add beta/latest tag with `npm publish`
2017-08-01 16:08:30 -04:00
Vanessa Yuen
cd1c5103c7 remove unnecessary tests & dependencies from /npm 2017-08-01 16:07:51 -04:00
Zeke Sikelianos
5ab38f7674 update glossary entries for brightray, libcc, V8 2017-08-01 10:58:33 -07:00
Vanessa Yuen
1577360312 fix lint errors 2017-08-01 11:50:57 -04:00
Siyuan Liu
f56abac7a8 fix linting error 2017-08-01 17:52:48 +08:00
Vanessa Yuen
eaa63c880e add final "integration test" before running npm publish on the prebuilt 2017-08-01 00:50:40 -04:00
Cheng Zhao
761eca052a Merge pull request #10162 from electron/native-image-crashes
Fix crashes due to using Debug version of libc++
2017-07-31 17:11:28 +09:00
Cheng Zhao
0ee2ab8a6e Fix accessing empty vector in V8FunctionInvoker 2017-07-31 16:47:14 +09:00
Cheng Zhao
4b46eca329 spec: Always run crash-reporter at last
So when a test crashed we can always see the stack trace.
2017-07-31 16:36:52 +09:00
Cheng Zhao
9ced85d860 Terminate tests when renderer process crashed 2017-07-31 16:24:23 +09:00
Cheng Zhao
6ee95f9529 Fix crash when converting invalid image to JPEG 2017-07-31 15:48:54 +09:00
Cheng Zhao
a6c8329a68 Remove unneeded heap allocation 2017-07-31 15:45:59 +09:00
Cheng Zhao
2d644a1560 Merge pull request #10161 from electron/fix-cross-linux
Fix Linux ia32/arm build
2017-07-31 15:34:40 +09:00
Cheng Zhao
22bf43ecc0 Fix Linux ia32/arm build 2017-07-31 12:37:56 +09:00
Cheng Zhao
e10ebfa7f3 Merge pull request #10148 from electron/fix-arm-deps
Fix conflicting dependencies for building arm
2017-07-31 11:16:20 +09:00
Cheng Zhao
a7035b08d5 Merge pull request #10070 from electron/fix-dbus-menu
Only update dbus menu when it has been changed
2017-07-31 10:42:08 +09:00
Cheng Zhao
5b7cf19ced Merge pull request #10099 from electron/leak-node-environment
Leak the Node environment when context is released
2017-07-31 10:41:45 +09:00
Siyuan Liu
5a48c1feed fixes 10128 2017-07-31 09:32:45 +08:00
Samuel Attard
bd99bcbf64 Fix typo in comment 2017-07-31 11:00:00 +10:00
Samuel Attard
32327b77a5 Remove unneeded check but document why it is not there now 2017-07-31 10:47:25 +10:00
ZhangYu
783ba397e7 Create keyboard-shortcuts 2017-07-30 22:31:23 +08:00
Samuel Attard
3ac2f674bc Fix nativeWindowOpen's opener being null 2017-07-29 19:21:28 +10:00
John Kleinschmidt
d38c9a4644 Merge pull request #10138 from electron/improve-linux-build-instructions
improve linux build instructions
2017-07-28 16:36:04 -04:00
John Kleinschmidt
b17d34a88c Update with better instructions for building libchromiumcontent 2017-07-28 16:27:33 -04:00
John Kleinschmidt
7d8f62293f Fix conflicting dependencies for building arm 2017-07-28 12:24:44 -04:00
Birunthan Mohanathas
20ae611dd9 Merge pull request #10097 from liusy182/liusy182-browserview
#10039 add BrowserView.fromId
2017-07-28 01:27:47 +03:00
John Kleinschmidt
fa8d12cb66 Merge pull request #10126 from electron/fix-travis
Fix No module named google_compute_engine error
2017-07-27 17:21:23 -04:00
Zeke Sikelianos
5e7651d282 Merge pull request #10131 from alopix/patch-1
Remove mention of SegmentedControl in description
2017-07-27 11:09:11 -07:00
Zeke Sikelianos
c62d1bbf41 improve linux build instructions 2017-07-27 10:29:41 -07:00
Zeke Sikelianos
6dfc7dc489 Merge pull request #10133 from electron/fix-scrubber-continuous
Fix Scrubber touch bar item defaults
2017-07-27 10:19:36 -07:00
Samuel Attard
59e85c0f33 Fix stupid or check in scrubber defaults 2017-07-27 17:49:05 +10:00
Shelley Vohr
768e8388d2 Merge pull request #10125 from electron/autoupdater_prefix_error_string
prefix autoupdater error with statuscode and domain
2017-07-26 23:49:08 -07:00
Dustin
bdc7d38f48 Removed mention of SegmentedControl in description 2017-07-27 07:51:19 +02:00
Samuel Attard
f385e19594 Indenting stuff 2017-07-27 11:54:06 +10:00
Shelley Vohr
ed717a9b45 revert accidental overbeautification 2017-07-26 18:41:25 -07:00
Shelley Vohr
24ab5075e7 appease the linter 2017-07-26 18:29:10 -07:00
Shelley Vohr
919d7fa22e Add header declarations in auto_updater 2017-07-26 18:10:09 -07:00
Shelley Vohr
8cf00fece6 add onError with three params and move to atom-auto-updater 2017-07-26 17:33:32 -07:00
John Kleinschmidt
85d76acebb Fix No module named google_compute_engine error 2017-07-26 14:18:55 -07:00
Shelley Vohr
1cfd20f861 prefix autoupdater error with statuscode and domain 2017-07-26 14:18:53 -07:00
Zeke Sikelianos
2467d91f27 Merge pull request #10127 from electron/fix-heading-levels-for-class-docs
fix heading levels for class docs
2017-07-26 14:16:21 -07:00
Zeke Sikelianos
1811b0cbda fix heading levels for class docs 2017-07-26 13:02:40 -07:00
Vanessa Yuen
cb93f035aa fix previous merge conflict resolution for .gitignore 2017-07-26 15:22:06 -04:00
Vanessa Yuen
0c3d15d890 Merge branch 'master' into publish-prebuilt 2017-07-26 15:07:33 -04:00
John Kleinschmidt
e80f9d7e49 Merge pull request #10116 from electron/ignore-npmrc
ignore .env and .npmrc
2017-07-26 11:05:17 -04:00
Zeke Sikelianos
ac248e79a4 Merge pull request #10113 from lsegal/patch-1
Mark certain Notification options as optional
2017-07-25 17:04:13 -07:00
Zeke Sikelianos
f0a12af707 ignore node-inspect's npmrc 2017-07-25 16:59:35 -07:00
Zeke Sikelianos
98d27d5abb gitignore .env and .npmrc 2017-07-25 16:58:12 -07:00
Zeke Sikelianos
3f53524b90 sort gitignore alphabetically 2017-07-25 16:57:35 -07:00
Zeke Sikelianos
1d9adbd0cf nothing 2017-07-25 16:54:30 -07:00
Zeke Sikelianos
2be31c1c0d Merge pull request #10062 from joe-re/translate-keyboard-shortcut-doc-to-japanese
translate keyboard shortcuts doc to japanese
2017-07-25 16:32:24 -07:00
Zeke Sikelianos
71602f106b Merge pull request #10085 from electron/fix-windows-store-guide-typo
fix typo in windows store guide
2017-07-25 16:30:18 -07:00
Zeke Sikelianos
3980f66f05 Merge pull request #10103 from fab1an/doc-fixes
consistency updates for the docs
2017-07-25 16:23:11 -07:00
Loren Segal
205954fa27 Mark certain Notification options as optional
This change makes the `subtitle` and `actions` options optional to the
Notification constructor, since they are only available on macOS.
2017-07-25 13:24:15 -04:00
Fabian Zeindl
5db02ffaa9 updates to the docs 2017-07-24 10:29:45 +02:00
Cheng Zhao
cb3c5ded0f Merge pull request #9975 from wayne-kim/patch-5
this code is not care a bubbling event
2017-07-24 16:07:44 +09:00
Cheng Zhao
bd87982b5c Merge pull request #10075 from alexstrat/fix/fix-content_scripts-match
Fix content scripts matches
2017-07-24 15:27:55 +09:00
Cheng Zhao
0719650315 Leak the Node environment when context is released 2017-07-24 14:56:56 +09:00
Cheng Zhao
25f168cecb Merge pull request #9951 from alexstrat/fix-chrome-storage
Fix chrome storage access scope
2017-07-24 14:01:15 +09:00
Siyuan Liu
ae7c1ae741 #10039 add BrowserView.fromId 2017-07-24 11:32:30 +08:00
Aleš Pergl
54e03d6edd Merge pull request #10053 from electron/debug_mode 2017-07-23 00:44:45 +02:00
Ales Pergl
8e34aad410 Fixed invalid empty vector subscript access 2017-07-22 14:45:50 +02:00
Ales Pergl
bdbf9e5d6a Suppress assert dialog boxes when running CI tests 2017-07-22 14:45:50 +02:00
Ales Pergl
cd9d0c1b0f Enabled true debug mode 2017-07-22 14:45:46 +02:00
Kevin Sawicki
fac32e52fc Merge pull request #10071 from electron/update-external-binaries
Update the external binaries version
2017-07-21 09:04:50 -07:00
Zeke Sikelianos
840dba385a fix type in windows store guide 2017-07-21 08:26:39 -07:00
Alexandre Lachèze
a2ba4e0a6a fix content scripts matches 2017-07-20 20:01:49 +02:00
Alexandre Lachèze
498f344e2e Correct mkdir 2017-07-20 19:50:55 +02:00
Josh Abernathy
ad14ccd195 Update the external binaries version 2017-07-20 10:04:21 -04:00
Cheng Zhao
edc2dae496 Make the status string shorter 2017-07-20 22:45:06 +09:00
Cheng Zhao
74df5f84fd Only update dbus menu when it has been changed
The dbus menu implementaion of KDE would send the about-to-show signal
whenever the menu has been changed, resulting in infinite loop on our
side.
2017-07-20 20:50:14 +09:00
joe-re
71ebb0d3e6 translate keyboard shortcuts doc to japanese 2017-07-20 02:56:23 +09:00
Zeke Sikelianos
3283238555 Merge pull request #10058 from electron/installation-woes-q-and-a
add installation advice to FAQ
2017-07-19 09:35:26 -07:00
Cheng Zhao
52c6c7e676 Merge pull request #9819 from ferreus/dev/vladimir_fix9231
🐛 Fix #9231: Don't load url when detached.
2017-07-19 11:15:30 +09:00
Zeke Sikelianos
eeeee2cde8 Merge pull request #9989 from electron/check-for-leaks
check for secrets before git push and npm publish
2017-07-18 15:30:03 -07:00
Zeke Sikelianos
f5ed6c36cc add installation advice to FAQ 2017-07-18 13:23:03 -07:00
Vanessa Yuen
40555371ba add tests for npm install 2017-07-18 13:38:57 -04:00
Kevin Sawicki
959231f766 Merge pull request #9834 from shubham2892/input-type-file-treating-packaged-app-as-directory
Fix treat packaged app as directory
2017-07-18 10:21:07 -07:00
Kevin Sawicki
7db3009234 Remove s 2017-07-18 10:19:00 -07:00
Kevin Sawicki
908c1fdfa0 Mark treatPackageAsDirectory as mac only 2017-07-18 10:18:23 -07:00
Shubham
b25a1d10a2 🍎 Add treatPackageasDirectory as an option 2017-07-18 10:13:25 -07:00
Kevin Sawicki
1d9f69e742 Merge pull request #10008 from qazbnm456/fix-pdf-viewer
Fix a query string parsing problem happend to PDF Viewer
2017-07-18 09:10:55 -07:00
Kevin Sawicki
2bac358064 Merge pull request #10015 from electron/input-dialog-filter-titles
Add filter descriptions for common accept types
2017-07-18 09:10:11 -07:00
Kevin Sawicki
5b9d31d3ff Bump v1.7.5 2017-07-17 12:45:30 -07:00
Kevin Sawicki
8ae7401f7c Merge pull request #10050 from electron/native-window-open-experimental
Mark nativeWindowOpen as experimental
2017-07-17 12:45:04 -07:00
Kevin Sawicki
a2554080ea Mark nativeWindowOpen as experimental 2017-07-17 12:40:59 -07:00
Kevin Sawicki
c567448cf6 Merge pull request #10049 from electron/debugging-typo
fix typo in macOS debugging doc
2017-07-17 12:39:14 -07:00
Kevin Sawicki
65fe703dc2 Merge pull request #9972 from electron/merge-web-preferences
Inherit webPreferences in windows opened via sandbox or nativeWindowOpen
2017-07-17 12:38:50 -07:00
Zeke Sikelianos
34c27468dd fix typo in macOS debugging doc 2017-07-17 12:12:44 -07:00
Kevin Sawicki
fc53ac3d38 Always register closed listeners 2017-07-17 11:55:16 -07:00
Kevin Sawicki
208be2a542 Set preload script on opened windows 2017-07-17 11:55:16 -07:00
Kevin Sawicki
fdb1fddc26 Only reset preferences when conversion succeeds 2017-07-17 11:55:16 -07:00
Kevin Sawicki
3925bfde8e Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
Kevin Sawicki
0c8f773dec Remove debug logging 2017-07-17 11:55:15 -07:00
Kevin Sawicki
9d7c2e2294 Add specs for nativeWindowOpen inheritance and new-window support 2017-07-17 11:55:15 -07:00
Kevin Sawicki
86b1deedfa Inherit enabled-sandbox in opened windows 2017-07-17 11:55:15 -07:00
Kevin Sawicki
c71b0a5441 Add spec for configuring web preferences from sandboxed new-window event 2017-07-17 11:55:15 -07:00
Kevin Sawicki
06e60e5d4d Map pending process id to webContents for frame host initiating navigation 2017-07-17 11:55:15 -07:00
Kevin Sawicki
34c5abfe43 Update web preferences when creating with existing webContents 2017-07-17 11:55:15 -07:00
Kevin Sawicki
61167ca296 Inherit nativeWindowOpen from parent window 2017-07-17 11:55:15 -07:00
Kevin Sawicki
553021bc9c Only assign opener when not using nativeWindowOpen 2017-07-17 11:55:15 -07:00
Kevin Sawicki
25e1ed97b5 Use constants from content_switches.h 2017-07-17 11:55:15 -07:00
Kevin Sawicki
eb0022363e Merge pull request #10048 from electron/revert-debug-build-9934
Revert #9934
2017-07-17 11:54:25 -07:00
Kevin Sawicki
968759b823 Revert "Suppress assert dialog boxes when running CI tests"
This reverts commit 3574bcacca.
2017-07-17 10:05:21 -07:00
Kevin Sawicki
fa7c006a3d Revert "Enabled true debug mode"
This reverts commit df90fb7f75.
2017-07-17 10:05:12 -07:00
Kevin Sawicki
0298f9e00a Merge pull request #10046 from omerfarukozdemir/master
Update readme.md
2017-07-17 09:48:19 -07:00
Ales Pergl
3574bcacca Suppress assert dialog boxes when running CI tests 2017-07-17 17:59:40 +02:00
Ales Pergl
df90fb7f75 Enabled true debug mode 2017-07-17 17:59:40 +02:00
Ömer Faruk ÖZDEMİR
3e946dfe55 Update readme.md
Typo fix
2017-07-17 17:25:36 +03:00
Vladimir Vainer
e0518444da Minor changes to match style, init variables 2017-07-17 16:52:02 +03:00
Cheng Zhao
a43553aa25 Merge pull request #9962 from ferreus/dev/vladimir_fix_8768
Fix #8768: Show() on already open modal
2017-07-17 10:49:18 +03:00
Zeke Sikelianos
fb519274e0 Merge pull request #10004 from TiagoDanin/RevisionDoc-PT_BR
[docs-translations] Correct words in PT-BR
2017-07-15 21:47:37 -07:00
Vladimir Vainer
517184b89b Do not use deprecated deepCopyTo 2017-07-16 06:33:37 +03:00
Boik
01d021e6a3 add a new spec for https://github.com/electron/electron/pull/10008 2017-07-15 15:00:30 +08:00
Boik
4fb1fffe44 fix lint 2017-07-15 10:57:16 +08:00
Boik
8d6ee5aad2 add some minor fixes 2017-07-15 10:34:25 +08:00
Kevin Sawicki
0b13ccac34 Merge pull request #9855 from electron/paulcbetts-patch-1
Recommend electron-forge in auto-updater, fix some Windows stuffs
2017-07-14 14:33:39 -07:00
Kevin Sawicki
03c8943997 Merge pull request #9953 from alexstrat/fix-content-scripts-url-used-in-match
Fix page's URL used to test against content_scripts[].matches
2017-07-14 14:16:42 -07:00
Kevin Sawicki
42496e1231 Merge pull request #9947 from njbmartin/patch-1
Add known issue to MAS submission guide
2017-07-14 14:10:22 -07:00
Kevin Sawicki
1ade2dbfa2 Minor formatting changes to shell.openItem issue 2017-07-14 14:10:06 -07:00
Kevin Sawicki
5581d1d652 Merge pull request #9788 from shubham2892/Add-option-to-show-title-text-in-titlebar-in-fullscreen
Add alwaysShowTitleTextInFullscreen flag
2017-07-14 11:58:12 -07:00
Kevin Sawicki
c4ffb91190 🎨 2017-07-14 11:49:40 -07:00
Kevin Sawicki
9102c07ec7 always_show_title_text_in_full_screen -> fullscreen_window_title 2017-07-14 11:48:10 -07:00
Kevin Sawicki
c4956132d2 Add filter descriptions for common accept types 2017-07-14 11:04:06 -07:00
Kevin Sawicki
720755e124 Merge pull request #9745 from yuya-oc/input-allow-all-files
Add 'All Files (*.*)' filter for <input> file dialog
2017-07-14 10:41:11 -07:00
Kevin Sawicki
0a71a9b992 Merge pull request #9695 from shubham2892/alwaysOnTop-window-disappears-when-restored-fix
Fix an issue where alwaysOnTop window disappears when restore…
2017-07-14 10:09:13 -07:00
Kevin Sawicki
4935e8567f Initialize level_ in initWithShell 2017-07-14 10:07:06 -07:00
Kevin Sawicki
48f5a66f87 Merge pull request #9983 from electron/devtools-mixed-sandbox
Fix devtools open in mixed sandbox
2017-07-14 09:41:56 -07:00
Birunthan Mohanathas
149c723c51 Merge pull request #10003 from electron/disabledomainblocking
Add app.disableDomainBlockingFor3DAPIs()
2017-07-14 16:40:27 +03:00
Boik
9a7651a93f fix a pdf-viewer's parsing logic, and this should resolve the related issue at https://github.com/electron/electron/issues/10007 2017-07-14 12:09:14 +08:00
TiagoDanin
c0cf679ed0 Correct words in PT-BR 2017-07-13 21:23:23 -03:00
Birunthan Mohanathas
812b529881 Add app.disableDomainBlockingFor3DAPIs()
By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a
per domain basis if the GPU processes crashes too frequently. This
function disables that behaviour.
2017-07-14 01:41:43 +03:00
Vanessa Yuen
663710e8eb script to publish electron to npm directly 2017-07-13 17:09:21 -04:00
Kevin Sawicki
1d32f300f3 Merge pull request #9991 from electron/surface-runas-require-errors
Surface require errors via answer IPC message
2017-07-13 08:55:06 -07:00
Kevin Sawicki
60f563ae5f Surface require errors so spec does not hang 2017-07-13 08:36:58 -07:00
Zeke Sikelianos
0b1d264fc8 check for secrets before git push and npm pack 2017-07-12 10:18:40 -07:00
Andrey Kurdyumov
189be18dd2 Allow TypeScript definitions work with strictNullChecks
See https://github.com/electron/electron-typescript-definitions/issues/25
2017-07-12 20:29:32 +06:00
Hari Juturu
80bd6a3e91 🎨 2017-07-11 18:36:01 -07:00
Hari Juturu
9a3b78d9fe Fix devtools open in mixed sandbox mode 2017-07-11 18:36:00 -07:00
Zeke Sikelianos
30df0f3306 Merge pull request #9974 from wan-qy/master
Fix typo
2017-07-11 11:31:39 -07:00
Wayne Loopy
bc0f3b1bf8 this code is not care a bubbling event
So If you do not care bubbling equally, I think it should change like this.
2017-07-11 15:44:08 +09:00
wan-qy
7c2467b221 Fix typo 2017-07-11 10:55:59 +08:00
Kevin Sawicki
0a1b5a0d7e Merge pull request #9959 from electron/add-OSR-to-glossary
add OSR to glossary
2017-07-10 17:56:05 -07:00
Alexandre Lachèze
ec8407c65d Recursively mkdir the parent directories 2017-07-11 00:56:45 +02:00
Alexandre Lachèze
c85f3cbd2c Change storage implementation to async 2017-07-11 00:35:53 +02:00
Alexandre Lachèze
9aac8967aa 👕 2017-07-10 23:56:44 +02:00
Alexandre Lachèze
969c74b886 Use es6 string templating 2017-07-10 23:50:59 +02:00
Kevin Sawicki
8ae55dae6c Merge pull request #9967 from electron/upgrade-libcc
Upgrade to electron/libchromiumcontent@8cfd08f84e
2017-07-10 14:31:28 -07:00
Kevin Sawicki
adc5e9693c Upgrade to electron/libchromiumcontent@8cfd08f84e 2017-07-10 08:23:32 -07:00
Kevin Sawicki
6341749b82 Merge pull request #9963 from wayne-kim/patch-3
404 Error
2017-07-10 08:19:53 -07:00
Zeke Sikelianos
0dcedff24b Merge pull request #9964 from Raul6469/master
Fix french language mistakes in documentation
2017-07-09 15:21:16 -07:00
Victor
9ff054d82f One more correction 2017-07-09 18:01:13 +02:00
Raul6469
882f1002d5 Fix french language mistakes in documentation 2017-07-09 09:48:39 +02:00
Wayne Loopy
b486814c77 404 Error
i think should remove a "s" in tutorial"s"/mac-app-store-submission-guide.md
2017-07-09 14:26:35 +09:00
Vladimir Vainer
5f2dd2ef6c Fix #8017: Crash copying croped image to clipboard 2017-07-09 06:56:14 +03:00
Vladimir Vainer
42cb3461af 🐛 Fix #9231: Don't load url when detached. 2017-07-09 06:54:22 +03:00
Vladimir Vainer
06b5acdac0 Fix #8768: Show() on already open modal
Calling show() on an already open modal causes the parent to become unusable
2017-07-09 06:49:12 +03:00
Zeke Sikelianos
7d402d8c88 add OSR to glossary 2017-07-07 13:43:54 -07:00
Alexandre Lachèze
73e8769b1f content_scripts[].matches use the URL without hash part 2017-07-07 04:14:36 +02:00
Alexandre Lachèze
ec10338364 Per-extension storage 2017-07-07 03:13:19 +02:00
Alexandre Lachèze
d2002ff3fc Use a file as Chrome Storage rather than localStorage 2017-07-07 03:06:53 +02:00
Vanessa Yuen
5dfee2a23c remove files no longer needed in /npm 2017-07-06 14:31:02 -04:00
Kevin Sawicki
9cd5f0cddd Import electron-prebuilt history into npm folder 2017-07-06 11:20:31 -07:00
Nico
fea6190bbb Add known issue to MAS submission guide 2017-07-06 10:28:41 +01:00
Kevin Sawicki
8a62d81fc5 Merge pull request #9931 from fasterthanlime/patch-1
📝 mixed devtools behavior with mixed sandbox
2017-07-05 12:41:42 -07:00
Alexandre Lachèze
6e3407d4a4 Forgot a describe.only 2017-07-05 19:10:02 +02:00
Kevin Sawicki
adaa409c71 Merge pull request #9929 from alexeykuzmin/fix-assert-message
Fix error message of `assertWithinDelta()`
2017-07-05 09:08:14 -07:00
Alexandre Lachèze
2231673b03 Remove already tested part 2017-07-05 17:36:39 +02:00
Alexandre Lachèze
03ec155ecb Oops 2017-07-05 17:34:04 +02:00
Alexandre Lachèze
67cec5fd26 add tests for BrowserWindow.addExtension 2017-07-05 17:21:06 +02:00
Alexandre Lachèze
f09e448d4d 📝 2017-07-05 17:01:30 +02:00
Amos Wenger
bd8459841b 📝 mixed devtools behavior with mixed sandbox 2017-07-04 14:20:18 +02:00
Aleksei Kuzmin
120b05e075 Fix error message of assertWithinDelta() 2017-07-04 11:56:21 +02:00
Alexandre Lachèze
cba53604eb Introduce extensions management APIs indépendant of Dev Tools Extensions
- introduce API BrowserWindow#[add,remove,get]Extension
- make [add,remove, get]DevToolsExtension use newly introduced API
- make the app persist only the extensions added via
#addDevToolsExtension
2017-07-03 20:01:08 +02:00
Milan Burda
d58a5dfe3a Merge pull request #9903 from miniak/notification-subtitle
Notification subtitle on Mac
2017-06-30 19:08:51 +02:00
Milan Burda
d5df114bb4 🎨 Make Notification getters const methods 2017-06-30 16:54:31 +02:00
Milan Burda
a196bf97bc 🍎 Add subtitle to Notification properties 2017-06-30 16:54:28 +02:00
Ales Pergl
440b238157 Fixed build issues in debug mode 2017-06-30 12:28:01 +02:00
Kevin Sawicki
1c1cf0d1f2 Merge pull request #9857 from alexeykuzmin/add-enable-osr-flag
[WIP] Add enable_osr flag
2017-06-29 12:30:44 -07:00
Kevin Sawicki
7fbd54b2e4 Remove OSR disabling 2017-06-29 12:26:59 -07:00
Kevin Sawicki
449776f228 Don't run it statements when OSR is disabled 2017-06-29 12:26:45 -07:00
Electron Bot
21657c6289 Update to Electron v1.7.4 2017-06-28 16:47:26 -07:00
Kevin Sawicki
3cabefe998 Merge pull request #269 from electron-userland/typescript-1-7-4
Upgrade .d.ts file to 1.7.4
2017-06-28 15:42:28 -07:00
Kevin Sawicki
97d0c6e505 Upgrade .d.ts file to 1.7.4 2017-06-28 15:18:59 -07:00
Kevin Sawicki
4a7eb5077e Bump v1.7.4 2017-06-28 14:37:04 -07:00
Kevin Sawicki
e37fc0e30a Mark mixed sandbox as macOS/Windows only 2017-06-28 14:36:34 -07:00
Kevin Sawicki
04c87cd1c3 Merge pull request #9892 from electron/upgrade-pdf-viewer
Upgrade to electron/pdf-viewer@beb36874a6
2017-06-28 14:05:02 -07:00
Kevin Sawicki
506b354c1b 👕 Remove lint 2017-06-28 13:40:28 -07:00
Kevin Sawicki
6d2a5145c9 Assert loaded state 2017-06-28 13:01:22 -07:00
Kevin Sawicki
0f83180377 Merge pull request #9837 from electron/notification-actions
Notification actions
2017-06-28 12:59:10 -07:00
Kevin Sawicki
9f0d2cd39d Use pdf-loaded event in specs 2017-06-28 12:57:05 -07:00
Kevin Sawicki
06a550b412 Autorelease tracking area 2017-06-28 12:37:31 -07:00
Kevin Sawicki
e44f655503 Merge pull request #9760 from shubham2892/Add-mouse-enter-and-mouse-exit-event-for-Tray
Add mouse-enter and mouse-exit events for tray
2017-06-28 12:15:32 -07:00
Kevin Sawicki
d53f07cc20 🎨 2017-06-28 12:13:12 -07:00
Kevin Sawicki
70544440f9 Add location and keyboard modifiers to tray mouse events 2017-06-28 12:10:24 -07:00
Kevin Sawicki
2406d6c279 Rename to mouse-leave for consistency with drag-leave 2017-06-28 11:40:21 -07:00
Kevin Sawicki
1aa3217899 Upgrade to electron/pdf-viewer@beb36874a6 2017-06-28 10:48:37 -07:00
Kevin Sawicki
4958771b8a Merge pull request #9852 from electron/webcontents-ignorekeyboardshortcuts
Add webContents.setIgnoreMenuShortcuts()
2017-06-28 10:35:02 -07:00
Aleksei Kuzmin
2007f3cb99 FIXME: enable_osr=0 2017-06-28 19:34:57 +02:00
Aleksei Kuzmin
25e1c5d6e7 Skip "offscreen rendering" tests if OSR is not available 2017-06-28 19:34:57 +02:00
Kevin Sawicki
9dd27ba3ec Add explicit expected value 2017-06-28 10:21:25 -07:00
Kevin Sawicki
0d1cf8af35 Mark contents.setIgnoreMenuShortcuts as experimental 2017-06-28 10:20:22 -07:00
Kevin Sawicki
2cd49f3036 Merge pull request #9644 from electron/webview-sandbox
Enable sandbox on webview
2017-06-28 10:10:25 -07:00
Aleksei Kuzmin
da36bdfcc4 Add enable_osr build flag 2017-06-28 18:58:52 +02:00
Kevin Sawicki
5822e718e6 Add finish helper to ensure connection 2017-06-28 09:58:23 -07:00
Kevin Sawicki
523fbe2df9 Send messages between app via socket connection 2017-06-28 09:27:19 -07:00
Kevin Sawicki
628744f9e1 Put enableMixedSandbox before deprecation TODO 2017-06-28 08:37:56 -07:00
Kevin Sawicki
f1dbfb1925 Mark app.enableMixedSandbox() as experimental 2017-06-28 08:36:29 -07:00
Kevin Sawicki
2df9e57b50 Remove unused require 2017-06-28 08:35:17 -07:00
Kevin Sawicki
7fcc00f137 Add spec for app.enableMixedSandbox() 2017-06-28 08:33:11 -07:00
Kevin Sawicki
f0ec9c68b0 Merge pull request #9883 from electron/ipc-return-value
document the return value of ipcRenderer.sendSync
2017-06-28 08:03:27 -07:00
Kevin Sawicki
abff9891ea Merge pull request #9881 from electron/fix-crash-reporter-typo
fix crash reporter typo
2017-06-28 08:02:57 -07:00
Samuel Attard
3774482859 Update notification PR as per feedback 2017-06-28 17:00:19 +10:00
Zeke Sikelianos
f646be2981 document the return value of ipcRenderer.sendSync 2017-06-27 12:01:39 -07:00
Zeke Sikelianos
d3ac9a3f3b fix crash reporter typo 2017-06-27 10:40:14 -07:00
Kevin Sawicki
ab174f5e74 Updated libchromiumcontent submodule 2017-06-27 08:02:25 +02:00
Hari Juturu
1258240067 fixing build error 2017-06-26 16:20:12 -07:00
Kevin Sawicki
f7539e6e8d Remove increased timeout 2017-06-26 14:15:26 -07:00
Kevin Sawicki
c01248ce47 Remove unused require 2017-06-26 14:14:44 -07:00
Hari Krishna Reddy Juturu
74196b96a1 Adding enableMixedSandbox api 2017-06-26 14:13:41 -07:00
Kevin Sawicki
0eaddd1565 Verify --enable-sandbox/--no-sandbox command line 2017-06-26 14:12:03 -07:00
Birunthan Mohanathas
f20f87829b Add webContents.setIgnoreMenuShortcuts()
This allows you to disable application menu shortcut handling on a per
web contents basis.
2017-06-26 14:01:17 -07:00
Shubham
a38f0f5f46 rename alwaysShowTitleTextInFullscreen to fullscreenWindowTitle 2017-06-26 16:58:45 -04:00
Kevin Sawicki
14178d9826 Expose argv to preload process object 2017-06-26 13:52:19 -07:00
Kevin Sawicki
55c8b1fc52 Merge pull request #9870 from electron/IME
add IME to glossary
2017-06-26 13:31:45 -07:00
Zeke Sikelianos
0a01af527a add IME to glossary 2017-06-26 13:28:24 -07:00
Kevin Sawicki
bda21216e7 Merge pull request #9743 from electron/number-accelerator-modifier
Don't mutate the accelerator character with the shift key if it's a number
2017-06-26 11:20:52 -07:00
Kevin Sawicki
4c8592b8ef Merge pull request #9828 from electron/fix-browserview-file-chooser-crash
Fix crash when using file chooser in BrowserView
2017-06-26 09:54:31 -07:00
Kevin Sawicki
361d8aebf5 Merge pull request #9853 from electron/before-input-event
recommend before-input-event in keyboard shortcuts tutorial
2017-06-26 09:38:54 -07:00
Kevin Sawicki
02026d65f6 Merge pull request #9856 from electron/paulcbetts-patch-2
Remove grunt-build-atom-shell
2017-06-26 08:55:51 -07:00
Kevin Sawicki
a916be3ffd Merge pull request #9754 from t-hofmann/patch-1
Create app.md
2017-06-26 08:53:44 -07:00
Kevin Sawicki
da001940e2 isNotFirstInstance -> isSecondInstance 2017-06-26 08:53:29 -07:00
Kevin Sawicki
3804bc5eb2 Merge pull request #9847 from timfish/patch-1
Fixes electron/electron-typescript-definitions/issues/63
2017-06-26 08:50:49 -07:00
Kevin Sawicki
43f7e42bf7 Mark silent/printBackground as optional 2017-06-26 08:50:00 -07:00
Kevin Sawicki
23285b3dc3 Merge pull request #9772 from electron/add-crt-to-glossary
add CRT to glossary
2017-06-26 08:37:11 -07:00
Kevin Sawicki
ef38122388 Merge pull request #9778 from lepinay/patch-1
Extra properties must be less than 63 characters
2017-06-26 08:36:43 -07:00
Kevin Sawicki
cbaf3d4787 Tweak character limit description 2017-06-26 08:35:57 -07:00
Birunthan Mohanathas
79e9926f40 Merge pull request #9826 from ccnokes/patch-1
Fix docs: app.md `setLoginItemSettings`
2017-06-26 08:07:15 -07:00
Cheng Zhao
00d023cd71 Merge pull request #9725 from danielma/dma/native-tab-new-button
Add "New Tab" button for Native macOS Tabs
2017-06-26 15:07:10 +09:00
Cheng Zhao
5fbcb6ef4e Merge pull request #9396 from drulm/printtopdf-custom-pagesize
Add Math.ceil to pageSize.height and pageSize.width to printToPDF() o…
2017-06-26 14:48:44 +09:00
Paul Betts
06744f1bf3 Remove grunt-build-atom-shell
That thing is deprecated for _sure_
2017-06-25 22:14:24 -07:00
Paul Betts
97a9708c03 Recommend electron-forge in auto-updater, fix some Windows stuffs
We should point people to electron-forge, it's the modern way to package Electron apps
2017-06-25 22:10:48 -07:00
Cheng Zhao
727da46971 Merge pull request #9824 from electron/fix-9139
Add process properties in lieu of command line options.
2017-06-26 11:16:33 +09:00
Zeke Sikelianos
637cec2a3d recommend before-input-event in keyboard shortcuts tutorial 2017-06-25 17:36:38 -07:00
Tim Fish
58a42682d8 Fixes electron/electron-typescript-definitions/issues/63 2017-06-25 10:43:47 +02:00
Samuel Attard
7eb14243eb Refactor notification options 2017-06-24 21:39:06 +10:00
Samuel Attard
b8be81f101 Fix structure docs 2017-06-24 00:30:13 +10:00
Samuel Attard
17e737eba2 s/label/text 2017-06-23 21:04:39 +10:00
Samuel Attard
96f9dba595 Document the reply / button compatibility state 2017-06-23 20:56:55 +10:00
Samuel Attard
a9bf9d26ab Fix typo in Notification docs 2017-06-23 20:50:50 +10:00
Samuel Attard
4f0d48f164 Add support for notification actions on macOS 2017-06-23 20:50:20 +10:00
Aleš Pergl
873a315538 Merge pull request #9764 from electron/dynamic_crt
Use dynamic CRT in the release build
2017-06-23 08:03:47 +02:00
Birunthan Mohanathas
3cc0429388 Merge pull request #9798 from electron/tonyganch/10.13-transparent-titlebar
Fix invisible titlebar on macOS 10.13
2017-06-22 14:27:23 -07:00
Shubham
80e35b6682 🍎 Fix treat packaged app as directory 2017-06-22 17:10:22 -04:00
Ales Pergl
0bdd35a482 Updated libchromiumcontent submodule 2017-06-22 16:02:55 +02:00
Birunthan Mohanathas
eb19562316 Fix crash when using file chooser in BrowserView
The crash was a segfault caused by a null `WebDialogHelper::window_`.
2017-06-21 16:26:38 -07:00
Cameron Nokes
3239da37dd Fix docs: app.md setLoginItemSettings
`app.setLoginItemSettings` documented arguments are misleading -- `path` and `args` should be passed in the `settings` object, not as separate params, like the code sample below it or in the test file here: 9250b559f9/spec/api-app-spec.js (L336)
and in the actual C++ function declaration here: f5a75c4e87/atom/browser/browser.h (L104)
2017-06-21 16:24:00 -06:00
John Kleinschmidt
a4e0af2fbf Updated referenced command line flag. 2017-06-21 15:01:55 -04:00
John Kleinschmidt
671f5c20f7 Add process properties in lieu of command line options.
Resolves #9139
For certain node command line options, those options can be set via the
process object (process.noDeprecation, process.throwDeprecation,
process.traceDeprecation, and process.traceProcessWarnings) so they are
documented here.

Also, sorted properties and methods alphabetically for easier
readability.
2017-06-21 14:58:44 -04:00
Shubham
1b8963ff6e 🍎 Fix full screen when resizable is set to true 2017-06-20 16:11:28 -04:00
Kevin Sawicki
3abeb6e2bc Merge pull request #9808 from Gryff/master
Remove `bash` from windows commands to stop syntax highlighting errors
2017-06-20 09:48:58 -07:00
Liam Griffin
3decb5eb28 Remove bash from windows commands to prevent syntax highlighting errors (#1) 2017-06-20 15:25:42 +01:00
Kevin Sawicki
4337c44af8 Merge pull request #9801 from electron/update-electron-email
atom@github.com -> electron@github.com
2017-06-19 20:45:45 -07:00
Zeke Sikelianos
07d6fd3fe1 Merge pull request #9800 from electron/fix-typo
fix typo in linux build instructions
2017-06-19 13:20:58 -07:00
Hari Krishna Reddy Juturu
cf392e402c Adding docs 2017-06-19 11:21:31 -07:00
Zeke Sikelianos
e644b98d07 atom@github.com -> electron@github.com 2017-06-19 09:33:20 -07:00
Zeke Sikelianos
57d81f6961 fix typo in linux build instructions 2017-06-19 08:45:06 -07:00
Hari Krishna Reddy Juturu
902b34ba39 🎨 2017-06-19 08:03:02 -07:00
Hari Krishna Reddy Juturu
e546820a4a Completing UTs 2017-06-19 07:46:14 -07:00
Tony Ganch
471f6e0fa5 Fix invisible titlebar on macOS 10.13 2017-06-19 14:34:37 +02:00
Shubham
25c651c40a add alwaysShowTitleTextInFullscreen flag 2017-06-17 20:45:29 -04:00
Kevin Sawicki
c1ac0bac62 Merge pull request #9784 from calmandniceperson/master
Add German translation for README and Contributor Covenant
2017-06-16 16:32:13 -07:00
Michael Köppl
189c3af0dd Fix broken link to Atom 2017-06-17 01:23:50 +02:00
Michael Köppl
b0ba6c8d3d Fix typo 2017-06-17 01:23:11 +02:00
Michael Köppl
8d080b36e6 Fix hyperlink text containing space 2017-06-17 01:21:37 +02:00
Michael Köppl
3f8b953616 Add link to German translation 2017-06-17 01:19:15 +02:00
Michael Köppl
53a6237525 Add German translation for README and Contributor Covenant 2017-06-17 01:17:16 +02:00
Hari Krishna Reddy Juturu
0b7e7458c9 WIP: Adding UT 2017-06-16 15:34:11 -07:00
Kevin Sawicki
89cb211451 Merge pull request #9782 from jotafeldmann/patch-1
Change NSIS topic level from 2 to 3
2017-06-16 15:06:57 -07:00
Samuel Attard
231d4f7581 Use the isdigit helper 2017-06-17 03:52:19 +10:00
Jorge Feldmann (Jota)
c329ab4ad2 Change NSIS topic level from 2 to 3
Why: this can mislead interpretation of the rest of the document. The `NSIS` is just one more topic at the same level of Process and Native Modules.
2017-06-16 14:45:49 -03:00
Zeke Sikelianos
ab3ca416b4 not just a microsoft thing 2017-06-16 10:21:24 -07:00
foo bar code
4bed743417 Extra properties must be less than 63 characters
I found out that after trying to putting some long text in my extra properties that it was truncated, digging around I found these:

897d58bde1/atom/common/crash_reporter/crash_reporter_win.cc
const int kNameMaxLength = 64;
const int kValueMaxLength = 64;
2017-06-16 14:41:12 +02:00
Zeke Sikelianos
a456fc800e add CRT to glossary 2017-06-15 17:28:00 -07:00
Shubham
12b90a2304 🐛 store current level fix 2017-06-15 18:05:58 -04:00
Kevin Sawicki
493cfd38d6 Merge pull request #9768 from electron/update-breaking-changes
mention ARM and FIXME in breaking changes doc
2017-06-15 13:50:37 -07:00
Zeke Sikelianos
6c94c265f3 Merge pull request #9769 from electron/deprecate-hidden-inset
Add titleBarStyle: 'hidden-inset' to planned breaking changes
2017-06-15 13:13:02 -07:00
Kevin Sawicki
d612b08871 Add titleBarStyle: 'hidden-inset' to planned breaking changes 2017-06-15 12:54:07 -07:00
Zeke Sikelianos
36696dbbba mention ARM and FIXME in breaking changes doc 2017-06-15 12:46:25 -07:00
Kevin Sawicki
e8911fe48c Merge pull request #9610 from shubham2892/incorrect-file-extension-with-showSaveDialog-fix
Fix incorrect extension when filters is used
2017-06-15 10:29:11 -07:00
Kevin Sawicki
15dd0eb583 Add braces to if statement 2017-06-15 10:27:34 -07:00
Kevin Sawicki
1602c07fac Merge pull request #9767 from electron/document-wc-focus
Document webContents.focus()
2017-06-15 10:25:17 -07:00
Birunthan Mohanathas
ece50c036d Document webContents.focus() 2017-06-15 10:19:27 -07:00
Kevin Sawicki
e94698d7cd Merge pull request #9751 from electron/optional-spelling
use lowercase for optional annotation
2017-06-15 10:12:15 -07:00
Ales Pergl
b72da0a509 Include VC runtime and UCRT in the Windows distribution 2017-06-15 09:50:09 +02:00
Ales Pergl
9610e656bb Use dynamic CRT in the release build 2017-06-15 09:42:15 +02:00
Zeke Sikelianos
7587fc22f1 Merge pull request #9724 from electron/bump-standard-markdown
Bump standard-markdown
2017-06-14 17:26:53 -07:00
Kevin Sawicki
5b0290bf88 Merge pull request #9741 from electron/webview-visibility-state
Send window visibility to webview after DOM ready
2017-06-14 15:22:55 -07:00
Shubham
8dbb8ccbab add mouse-enter and mouse-exit events for tray 2017-06-14 18:00:29 -04:00
Kevin Sawicki
dae27de504 Merge pull request #9588 from electron/poiru/dialog-default-file-name
Use last selected directory when using default file name in dialog.showSaveDialog()
2017-06-14 14:41:45 -07:00
Kevin Sawicki
f9f697298d Add FIXME link to #6828 2017-06-14 14:12:51 -07:00
Kevin Sawicki
626a1550dc Send cached visibility state when guest DOM is ready 2017-06-14 14:11:38 -07:00
Kevin Sawicki
f1a72ad108 Add spec for webview visibility change on show 2017-06-14 14:11:38 -07:00
Kevin Sawicki
ce0684aada Merge pull request #9755 from Nirmal4G/docs-fixes
Update windows-store-guide.md
2017-06-14 14:10:43 -07:00
Kevin Sawicki
45dc6fc04f Merge pull request #9645 from dharders/issue6036-fix-windows-fullscreen-startup-toggle
Fix unresponsive app after fullscreen->normal state toggle (Windows)
2017-06-14 14:10:00 -07:00
Nirmal Guru
bf52b77480 📝 Update zh-CN/windows-store-guide.md
[ci skip] Replace "Windows 8" to "Windows 10"
2017-06-14 17:18:52 +05:30
Nirmal Guru
c681001fb5 📝 Update ko-KR/windows-store-guide.md
[ci skip] Replace "Windows 8" to "Windows 10"
2017-06-14 17:18:33 +05:30
Nirmal Guru
e44a8916df 📝 Update id/windows-store-guide.md
[ci skip] Replace "Windows 8" to "Windows 10"
2017-06-14 17:18:13 +05:30
Nirmal Guru
fffc64f28b 📝 Update windows-store-guide.md
[ci skip] Replace "Windows 8" to "Windows 10"
2017-06-14 17:17:47 +05:30
Cheng Zhao
fd0a742683 Merge pull request #9700 from brenca/pdf-zoom-improvements
Zoom controller improvements
2017-06-14 19:15:28 +09:00
Thomas Hofmann
1a6f6fd497 Create app.md 2017-06-14 12:12:30 +02:00
Hari Juturu
421bf71b98 Adding no-sandbox to non sandbox webcontents 2017-06-13 18:45:24 -07:00
dharders
112f4656c3 👕 fix lint warning 2017-06-14 11:30:33 +10:00
dharders
909344415e 🎨 Use leave-full-screen event instead of setTimeout() 2017-06-14 11:06:33 +10:00
dharders
265ab45bd7 🎨 Reuse existing function 2017-06-14 11:05:39 +10:00
Heilig Benedek
a3ec28ddf3 remove unused includes 2017-06-14 00:49:11 +02:00
Zeke Sikelianos
56ee50f3a3 use lowercase for optional annotation 2017-06-13 13:50:10 -07:00
Zeke Sikelianos
b328a238a6 Merge pull request #9750 from electron/path-csd-props
Make clearStorageData options object's property optional
2017-06-13 13:48:10 -07:00
Vanessa Yuen
f91409b2e8 Merge pull request #9721 from brianfajardo/patch-1
Update rectangle.md (issue #9552)
2017-06-13 11:53:49 -07:00
Vanessa Yuen
cd28bdd815 add integer note to each parameter 2017-06-13 11:51:55 -07:00
Vanessa Yuen
de545aabce Merge pull request #9733 from qazbnm456/patch-1
Use Buffer.from instead of deprecated new Buffer
2017-06-13 11:44:34 -07:00
Samuel Attard
de066b8d13 Make clearStorageData options object's property optional
Fixes #9749
2017-06-14 04:34:13 +10:00
Yuya Ochiai
be9463b7b7 Add 'All Files (*.*)' filter for <input> file dialog
The dialog would filter files as well as Chrome.
2017-06-13 22:33:06 +09:00
Samuel Attard
29dbb93f16 Don't mutate the accelerator character wuth the shift key if it's a number 2017-06-13 20:29:54 +10:00
Kevin Sawicki
014aaccfc6 Merge pull request #9739 from electron/inspect_flag_fork_patch
app: add support for inspect/inspect-brk in forked node process
2017-06-12 14:23:33 -07:00
Kevin Sawicki
fc00bf0cc3 Add initial spec for ELECTRON_RUN_AS_NODE with --inspect-brk 2017-06-12 14:04:57 -07:00
deepak1556
538b97582a app: add support for inspect/inspect-brk in forked node process 2017-06-13 00:23:11 +05:30
Kevin Sawicki
3370be0360 Merge pull request #9738 from electron/upgrade-crashpad
Upgrade crashpad for http status fix
2017-06-12 10:30:35 -07:00
Kevin Sawicki
96484405da Upgrade crashpad for http status fix 2017-06-12 10:04:39 -07:00
Boik
2e9ace6f59 Use Buffer.from instead of deprecated new Buffer
Use Buffer.from instead of deprecated new Buffer.
2017-06-12 16:57:42 +08:00
Daniel Ma
4fb9f825b1 Add "New Tab" button for Native macOS Tabs
Adds responders for `newWindowForTab` to `AtomApplicationDelegate` and
`NativeWindowMac`, so that `BrowserWindow`s with a `tabbingIdentifier`
will get the new tab button, and both `app` and `window` will emit a
`new-tab-for-window` event.
2017-06-11 02:26:26 -07:00
Zeke Sikelianos
4cf2481293 use latest standard-markdown 2017-06-10 12:22:51 -07:00
Zeke Sikelianos
229b726251 remove blank lines 2017-06-10 12:22:41 -07:00
Zeke Sikelianos
3d2c622ba7 use new Buffer.from 2017-06-10 12:22:27 -07:00
Zeke Sikelianos
18dec9c39c fix typo in jp docs 2017-06-10 12:21:53 -07:00
Vanessa Yuen
a6ea316a5d Merge pull request #9716 from dakira/fix-9046
Add tray icon workaround for newer Ubuntu releases (fixes #9046)
2017-06-09 15:01:32 -07:00
Vanessa Yuen
43271c162a use includes instead of indexOf 2017-06-09 14:45:47 -07:00
Brian Fajardo
1f73942922 Update rectangle.md (issue #9552)
Clear confusion regarding rectangle object parameter values
2017-06-09 17:13:57 -04:00
Kevin Sawicki
206bca52b7 Merge pull request #9706 from KagamiChan/master
📝  add notes for peak working set size on macOS
2017-06-09 08:43:06 -07:00
Matthias Niess
254dcdaa45 add tray icon workaround for newer Ubuntu releases (fixes #9046) 2017-06-09 15:22:18 +02:00
Hari Juturu
3ee55d9cd3 lint error 2017-06-08 23:46:37 -07:00
Hari Juturu
7bdd259d2e Lint error 2017-06-08 23:39:53 -07:00
Hari Juturu
cbbd4a4a3b Indentation 2017-06-08 23:31:58 -07:00
Hari Juturu
07f550a748 enable-mixed-sandbox option 2017-06-08 23:29:35 -07:00
Kevin Sawicki
d7ee2068c5 Merge pull request #262 from electron-userland/ts-1-7-3
Add electron.d.ts@1.7.3
2017-06-08 15:48:56 -07:00
Electron Bot
68164aeff2 Update to Electron v1.7.3 2017-06-08 15:46:02 -07:00
Kevin Sawicki
51126c7c35 Add electron.d.ts@1.7.3 2017-06-08 15:31:29 -07:00
Kevin Sawicki
4c00176599 Bump v1.7.3 2017-06-08 10:43:50 -07:00
Kevin Sawicki
f3e4acf6f9 Merge pull request #9703 from electron/patch-cookies-docs
Fix typings for cookies.get
2017-06-08 10:43:41 -07:00
Zeke Sikelianos
6360576d9e link to cookie structure 2017-06-08 10:09:40 -07:00
Kagami
a702f8a5f5 add peak working set size comment 2017-06-09 01:05:53 +08:00
Kevin Sawicki
c61397a802 Merge pull request #9704 from electron/upgrade-libcc-gpu-fix
Upgrade to electron/libchromiumcontent@3d692b2280
2017-06-08 09:39:42 -07:00
Kevin Sawicki
d9c4ba3db2 Upgrade to electron/libchromiumcontent@3d692b2280 2017-06-08 07:25:13 -07:00
Kevin Sawicki
785f131a98 Merge pull request #9694 from yuit/FixLinkToThaiDoc
📝 Fix link to Thai documentation
2017-06-08 06:56:34 -07:00
Samuel Attard
dd394b0d5c Fix typings for cookies.get 2017-06-08 23:03:57 +10:00
Heilig Benedek
f8d3b363ea 🎨 lint fix 2017-06-08 09:57:24 +02:00
Heilig Benedek
0f4341da42 add zoom behaviour code from chromium and make pdf viewer use manual zoom behaviour to match chromium 2017-06-08 02:15:17 +02:00
Heilig Benedek
a47fe715d1 pass ref part of url to allow #page= for pdf viewer 2017-06-08 02:15:17 +02:00
Shubham
373decd07e 🎨 2017-06-07 19:01:06 -04:00
Yui
88791a7cb1 📝 [ci skip] Fix link to Thai documentation 2017-06-07 09:38:57 -07:00
Shubham
f001377493 🍎 Fix an issue where alwaysOnTop window disappears when restored from the application icon 2017-06-07 12:28:50 -04:00
Zeke Sikelianos
0732329a38 Merge pull request #9599 from electron/fix-type-defs
Fix type definitions for getCPUUsage / getIOCounters
2017-06-07 09:21:46 -07:00
Kevin Sawicki
7a3a092c72 Merge pull request #9687 from electron/fix-custom-window-button-view
Simplify customButtonsOnHover implementation
2017-06-06 18:54:04 -07:00
Birunthan Mohanathas
391c07b80a Simplify custom window button positioning 2017-06-07 03:33:33 +03:00
Kevin Sawicki
915f6a6f54 Merge pull request #9178 from electron/visibilitystate
Let Chromium manage `document.visibilityState` and `document.hidden`
2017-06-06 17:32:49 -07:00
Kevin Sawicki
dc5221d551 Guard against null window like before 2017-06-06 17:02:23 -07:00
Kevin Sawicki
c60a9d242e Disable minimize spec on Linux CI 2017-06-06 16:58:28 -07:00
Kevin Sawicki
a53e98c0f3 Add visibilitystate test for showInactive 2017-06-06 16:45:46 -07:00
Kevin Sawicki
52137485f2 Add separate specs for hide/show/minimize visibilitychange events 2017-06-06 16:22:07 -07:00
Kevin Sawicki
28cd973805 Mention document.hidden in spec description 2017-06-06 15:20:08 -07:00
Birunthan Mohanathas
f60315141b Remove unnecessary if check 2017-06-07 01:19:53 +03:00
Kevin Sawicki
d2d28c42f1 Remove unused constant 2017-06-06 15:19:29 -07:00
Birunthan Mohanathas
3106478510 Rename SemaphoreView to CustomWindowButtonView 2017-06-07 01:18:22 +03:00
Birunthan Mohanathas
7d2226e05e Let Chromium manage document.visibilityState and document.hidden
Chromium already includes the necessary plumbing to manage the
visibility properties and `visibilitychange` event so this gets rid of
most of our custom logic for `BrowserWindow` and `BrowserView`.

Note that `webview` remains unchanged and is still affected by the issues
listed below.

User facing changes:

- The `document` visibility properties and `visibilitychange` event are
  now also updated/fired in response to occlusion changes on macOS. In
  other words, `document.visibilityState` will now be `hidden` on macOS
  if the window is occluded by another window.

- Previously, `visibilitychange` was also fired by *both* Electron and
  Chromium in some cases (e.g. when hiding the window). Now it is only
  fired by Chromium so you no longer get duplicate events.

- The visiblity state of `BrowserWindow`s created with `{ show: false }`
  is now initially `visible` until the window is shown and hidden.

- The visibility state of `BrowserWindow`s with `backgroundThrottling`
  disabled is now permanently `visible`.

This should also fix #6860 (but not for `webview`).
2017-06-06 15:16:01 -07:00
Kevin Sawicki
d40a7569cc Merge pull request #9686 from awaigand/patch-2
📝 Fixed typo
2017-06-06 14:33:26 -07:00
Andreas Waigand
f608c2b2d9 📝 Fixed typo
[ci skip]
2017-06-06 23:30:45 +02:00
Kevin Sawicki
21439a138b Merge pull request #9682 from electron/release-detection
Rebuild native modules when configuration starts with R
2017-06-06 13:37:48 -07:00
Kevin Sawicki
5fa9cd646f Rebuild test modules when configuration starts with R 2017-06-06 08:41:40 -07:00
Kevin Sawicki
53b6ee0e3f Merge pull request #9468 from tonyganch/9296-history-state
Remove page url check during `history.pushState`
2017-06-05 14:47:49 -07:00
Kevin Sawicki
af1d0c45ca Load URL after registering listener 2017-06-05 14:47:11 -07:00
Kevin Sawicki
777b5b17de Move pushState spec chromium-spec with other history specs 2017-06-05 14:45:45 -07:00
Kevin Sawicki
dfa4af2210 Merge pull request #8958 from mst128256/8730
Area near the top border in frameless window is clickable
2017-06-05 14:30:41 -07:00
Kevin Sawicki
4989b21dbc Autorelease semaphore view 2017-06-05 14:28:58 -07:00
Kevin Sawicki
1adc94b650 Mention customButtonsOnHover is for frameless windows 2017-06-05 14:18:08 -07:00
Kevin Sawicki
d5dc849c7a Doc customButtonsOnHover in frameless window guide 2017-06-05 14:16:44 -07:00
Kevin Sawicki
41d582f689 Add back hidden-inset as a deprecated option 2017-06-05 14:16:23 -07:00
Kevin Sawicki
594302fcff Update docs to use hiddenInset 2017-06-05 14:07:57 -07:00
Kevin Sawicki
3a2abde804 Add TODO for hidden-inset deprecation 2017-06-05 13:58:50 -07:00
Kevin Sawicki
9537303e9a Remove unused customWindowButtons switch 2017-06-05 13:57:25 -07:00
Kevin Sawicki
de0daa2481 Autorelease tracking area 2017-06-05 13:48:30 -07:00
Kevin Sawicki
7d10bf229d Switch to titleBarStyle for custom window buttons on hover 2017-06-05 13:30:32 -07:00
Kevin Sawicki
566e04f1c0 🎨 2017-06-05 13:13:16 -07:00
Kevin Sawicki
410e5bce60 Document customWindowButtons option 2017-06-05 13:04:17 -07:00
Kevin Sawicki
37ba1b0a6b Declare mouse inside variable in interface 2017-06-05 12:55:39 -07:00
Kevin Sawicki
1493d6763c Make custom window buttons an option 2017-06-05 12:50:18 -07:00
Kevin Sawicki
2880cfdc9c 🎨 Minor formatting tweaks 2017-06-05 11:08:05 -07:00
mst128256
96251e55de Removed commented code 2017-06-05 10:41:52 -07:00
mst128256
9b4664daa5 Area near the top border in frameless window is clickable 2017-06-05 10:41:52 -07:00
Kevin Sawicki
9a362eed53 Merge pull request #9572 from shubham2892/api-height-menubar-macos
API height menubar macos
2017-06-05 10:35:16 -07:00
Kevin Sawicki
653ef6f839 🎨 2017-06-05 10:33:46 -07:00
Kevin Sawicki
352a9268ad Merge pull request #9674 from electron/revert_8724
Revert "Merge pull request #8724 from electron/defer_load_url"
2017-06-05 10:21:18 -07:00
Kevin Sawicki
f5989dc12f Merge pull request #9615 from rajatsingla28/web
Docs: Add requirement for `webContents.sendInputEvent()` to work.
2017-06-05 10:03:48 -07:00
Kevin Sawicki
afa2dd5ce5 Minor updates to focus note 2017-06-05 10:03:25 -07:00
Kevin Sawicki
7f974c9990 Merge pull request #9667 from solinium/master
change 'request' version
2017-06-05 10:00:08 -07:00
Kevin Sawicki
5bf2d23700 Merge pull request #9657 from electron/menu-docs-patch
Typescript menu popup fix
2017-06-05 08:55:57 -07:00
Kevin Sawicki
fb47dc9e48 🎨 2017-06-05 08:55:42 -07:00
deepak1556
50ac7b2edd Revert "Merge pull request #8724 from electron/defer_load_url"
Possible cause for #9121

This reverts commit 886b47e713, reversing
changes made to 479af3c9e2.
2017-06-05 19:04:21 +05:30
dharders
aeb68c2369 Add test for Windows fullscreen state toggle. Fix #6036 2017-06-05 11:39:15 +10:00
Alexander Gujral
43ff2e8ec1 change request version
https://nodesecurity.io/advisories/request_remote-memory-exposure
security vulnerability for earlier versions
2017-06-04 13:49:59 -04:00
Rajat
2df7680d24 Docs: Add requirement for webContents.sendInputEvent() to work. 2017-06-03 23:47:15 +05:30
Shubham
c2603aaac2 🎨 Add documentation 2017-06-03 11:48:18 -04:00
Shubham
e9aa9eaf5e :art:code structure fix 2017-06-03 10:56:37 -04:00
Samuel Attard
af09d85125 Update menu.md 2017-06-03 14:50:10 +10:00
Zeke Sikelianos
bd8a1c233d Merge pull request #255 from jpiepkow/master
added force option for electron-download inside install.js
2017-06-01 12:31:30 -07:00
Jordan Piepkow
063df81231 Update README.md 2017-06-01 14:30:39 -04:00
Hari Juturu
3ba0e288f7 fix lint error 2017-05-31 23:20:13 -07:00
Hari Juturu
b5239754ba Enable sandbox on webview 2017-05-31 23:01:14 -07:00
dharders
4c09b357a7 🏁 Fix #6036. Ensure window is visible after fullscreen toggle 2017-06-01 14:38:51 +10:00
Zeke Sikelianos
dfab1043d9 Merge pull request #9640 from electron/bump-ts
bump ts linter with fixes for numeric keys
2017-05-31 15:16:56 -07:00
Kevin Sawicki
6a9de535c7 Merge pull request #9636 from electron/typescript-fixes
Add return type to systemPreferences.isAeroGlassEnabled()
2017-05-31 13:22:30 -07:00
Zeke Sikelianos
175f3e41f1 bump ts linter with fixes for numeric keys 2017-05-31 12:44:26 -07:00
Zeke Sikelianos
c6c3aa0b97 add typescript to the linting mix 2017-05-31 12:42:15 -07:00
Kevin Sawicki
b964c304de Add return type to systemPreferences.isAeroGlassEnabled() 2017-05-31 10:34:14 -07:00
Kevin Sawicki
02972fac86 Merge pull request #9634 from electron/assert-fail
Use assert.fail for unexpected values
2017-05-31 09:52:22 -07:00
Kevin Sawicki
2508159a25 Use assert.fail for unexpected values 2017-05-31 08:39:49 -07:00
Kevin Sawicki
9250b559f9 Merge pull request #9623 from miniak/gpu-info
Add app.getGPUFeatureStatus
2017-05-31 08:11:50 -07:00
Kevin Sawicki
55fcb286a5 Run getGPUFeatureStatus spec on all platforms 2017-05-31 08:10:55 -07:00
Kevin Sawicki
dfac5e5dd1 Merge pull request #9630 from electron/cifratila/bump-node-version
Bump Node.JS version in .node-version
2017-05-31 08:10:05 -07:00
Kevin Sawicki
e5675c83b3 Merge pull request #9627 from electron/remove-empty-grit-file
Remove unused generated_resources.h file
2017-05-31 08:09:50 -07:00
Cheng Zhao
e82af41591 Merge pull request #9269 from electron/main-notifications
Notifications from the main process
2017-05-31 17:21:05 +09:00
Catalin Fratila
0330a30fdb Bump Node.JS version in .node-version 2017-05-31 10:06:38 +02:00
Cheng Zhao
9d4588a5d0 Remove test code 2017-05-31 16:39:53 +09:00
Cheng Zhao
5fa2831756 Coding style fixes 2017-05-31 16:17:29 +09:00
Kevin Sawicki
0b2ef6e9bd Remove unused generated_resources.h file 2017-05-30 16:08:21 -07:00
Shubham
6537238c0d 🎨 code structure fix 2017-05-30 17:40:06 -04:00
Shubham
62d9bf9bae 🎨 code comments and test for getMenuBarHeight function 2017-05-30 17:26:02 -04:00
Kevin Sawicki
bf2fca3dd1 Use base::DictionaryValue converter 2017-05-30 13:00:55 -07:00
Kevin Sawicki
4a5831a733 Add initial getGPUFeatureStatus spec 2017-05-30 13:00:00 -07:00
Milan Burda
0ecfb4e2f8 Add app.getGPUFeatureStatus 2017-05-30 20:35:14 +02:00
Kevin Sawicki
717a1a666c Merge pull request #9589 from electron/rebuild-before-specs
Rebuild native modules before specs run
2017-05-30 09:50:15 -07:00
Kevin Sawicki
e83d66294e Remove unused function 2017-05-30 09:17:05 -07:00
Kevin Sawicki
5cf4995f2e DRY up logic to check if native modules should be loaded 2017-05-30 09:15:38 -07:00
Kevin Sawicki
90964290a6 Add separate run script just to rebuild test modules 2017-05-30 09:13:51 -07:00
Kevin Sawicki
24f0813ef1 Add missing update_node_modules import 2017-05-30 09:13:51 -07:00
Kevin Sawicki
18a80c0ed7 Add missing safe_mkdir import 2017-05-30 09:13:51 -07:00
Kevin Sawicki
dd0601e674 Rebuild native modules used in specs on each CI run 2017-05-30 09:13:51 -07:00
Kevin Sawicki
0d4a397656 Only rebuild test modules on non-Windows or release builds 2017-05-30 09:13:51 -07:00
Kevin Sawicki
9971f0d54c Add option to rebuild test modules before running 2017-05-30 09:13:51 -07:00
Kevin Sawicki
54f4644660 Rebuild modules after installing 2017-05-30 09:13:51 -07:00
Kevin Sawicki
29f776c57d Allow headers directory to be specified on cli 2017-05-30 09:13:51 -07:00
Kevin Sawicki
22bc1b004e Move npm helpers to lib/util 2017-05-30 09:13:51 -07:00
Kevin Sawicki
7e867f478e Don't build helpers or rebuild modules during bootstrap 2017-05-30 09:13:51 -07:00
Kevin Sawicki
f67968d244 Parse args in test.py 2017-05-30 09:13:51 -07:00
Kevin Sawicki
6b787ae4e0 Merge pull request #9591 from electron/remove-runas
Remove runas dependency from root package.json
2017-05-30 09:13:23 -07:00
Kevin Sawicki
b307b6e602 Remove runas and code no longer using it 2017-05-30 08:49:54 -07:00
Samuel Attard
227a2bd5dc Fix reference typed reply placeholder 2017-05-30 20:29:27 +10:00
Samuel Attard
3938373ecb Fix linting errors and add isSupported 2017-05-30 20:27:24 +10:00
Samuel Attard
686b1388b1 Fix linting issues 2017-05-30 19:12:36 +10:00
Samuel Attard
5048425e6e Update implementation as per feedback 2017-05-30 19:06:51 +10:00
Rajat
a1da54047a Docs : Add requirement for 'webContents.sendInputEvent()` to work. 2017-05-29 20:19:28 +05:30
Rajat
973945a8e3 Docs: Add BrowserWindow needs to be focused for webContents.sendInputEvent() to work. 2017-05-29 20:10:32 +05:30
Samuel Attard
6cdfb43e4e Emit a close event 2017-05-29 21:33:43 +10:00
Samuel Attard
9aa6b83f86 Fix compilation and click events on macOS 2017-05-29 21:22:44 +10:00
Samuel Attard
c741b584a1 Remove OS specific implementations 2017-05-29 21:18:18 +10:00
Samuel Attard
058bdfbced Use NotificationPresenter - macOS 2017-05-29 20:02:33 +10:00
Cheng Zhao
7d994f2a9e Merge pull request #9535 from brenca/datalist-element
Add datalist element support
2017-05-29 16:01:40 +09:00
Shubham
217ddd629d 🍎 Fix incorrect extension when filters is used 2017-05-28 15:20:22 -04:00
Zeke Sikelianos
116403ed03 remove electron prefix 2017-05-26 15:57:39 -07:00
Charlie Hess
49f76b8bc3 Add Electron prefixes. 2017-05-26 15:56:54 -07:00
Charlie Hess
b88327e025 Type definitions for getCPUUsage / getIOCounters 2017-05-26 15:56:54 -07:00
Kevin Sawicki
eb81eeacce Merge pull request #9602 from electron/missing-return-types
Add backticks around return types
2017-05-26 14:28:48 -07:00
Kevin Sawicki
b9a25113a6 Add backticks to Object 2017-05-26 14:04:28 -07:00
Kevin Sawicki
b0d4bf81a0 Add backticks around return types 2017-05-26 13:58:14 -07:00
Electron Bot
256b5c8a17 Update to Electron v1.7.2 2017-05-26 13:39:08 -07:00
Kevin Sawicki
44862a131c Bump v1.7.2 2017-05-26 13:33:15 -07:00
Kevin Sawicki
385d6faf1a Remove options to appease typescript definitions 2017-05-26 13:33:09 -07:00
Kevin Sawicki
dcb22d34b5 Mark deviceName as optional 2017-05-26 13:33:03 -07:00
Kevin Sawicki
f6931e7a27 Merge pull request #259 from electron-userland/typescript-1-7-2
Upgrade typescript file to 1.7.2
2017-05-26 13:30:18 -07:00
Kevin Sawicki
3647095415 Upgrade typescript file to 1.7.2 2017-05-26 13:09:34 -07:00
Kevin Sawicki
8ae36c250c Merge pull request #9568 from electron/webview-native-window-open
Support nativeWindowOpen from <webview> tags
2017-05-26 11:11:32 -07:00
Kevin Sawicki
edd840fcc0 Only assert GPU process on macOS 2017-05-26 10:10:56 -07:00
Kevin Sawicki
9f49b71b89 Add cross-origin frame webview spec 2017-05-26 10:10:36 -07:00
Kevin Sawicki
36989e19f8 Add spec for cross-origin blockage 2017-05-26 10:10:36 -07:00
Kevin Sawicki
e735aa7dee web-preferences -> webPreferences 2017-05-26 10:10:36 -07:00
Kevin Sawicki
f5cf6d4ddd Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
Kevin Sawicki
8f22e6a265 Add webview example to nativeWindowOpen docs 2017-05-26 10:10:36 -07:00
Kevin Sawicki
0dff863e30 Add comment about CreateNewGuestWindow origins 2017-05-26 10:10:36 -07:00
Kevin Sawicki
9ac2cf0d44 Add comment about disablePopups setting 2017-05-26 10:10:36 -07:00
Kevin Sawicki
6c520a5f40 Fix typo in option name 2017-05-26 10:10:36 -07:00
Kevin Sawicki
dbd240a7cb Return null from native window.open when allowpopups is unset 2017-05-26 10:10:36 -07:00
Kevin Sawicki
a0571e3c72 Add failing spec for native window.open returning null without allowpopups 2017-05-26 10:10:36 -07:00
Kevin Sawicki
4e9efebf47 🎨 2017-05-26 10:10:36 -07:00
Kevin Sawicki
ef01c16c6a Add tests for more nativeWindowOpen events 2017-05-26 10:10:36 -07:00
Kevin Sawicki
9f06b6dc21 Set allowpopups attribute in nativeWindow open specs 2017-05-26 10:10:36 -07:00
Kevin Sawicki
a32b7e5cdb Co-locate nativeWindowOpen specs 2017-05-26 10:10:36 -07:00
Kevin Sawicki
47759a01de Only forward events when nativeWindowOpen is set 2017-05-26 10:10:36 -07:00
Kevin Sawicki
a2a7a1d8c7 Add new-window <webview> spec with nativeWindowOpen 2017-05-26 10:10:36 -07:00
Kevin Sawicki
da2b29796f Add same domain webview nativeWindowOpen spec 2017-05-26 10:10:36 -07:00
Kevin Sawicki
7baf472c0f Implement BrowserPluginGuestDelegate::CreateNewGuestWindow for nativeWindowOpen 2017-05-26 10:10:36 -07:00
Kevin Sawicki
a16cd0bd03 Add failing <webview> with nativeWindowOpen spec 2017-05-26 10:10:36 -07:00
Kevin Sawicki
aceea50f41 Merge pull request #9597 from electron/revert-9358
Revert #9358
2017-05-26 10:09:37 -07:00
Kevin Sawicki
c43c3b3d80 Revert "protocol: use streaming interface between fetcher and requestjob"
This reverts commit 71b5d946e0.
2017-05-26 09:47:22 -07:00
Kevin Sawicki
d53de947b6 Merge pull request #9596 from electron/beta-release-by-default
Create prereleases by default
2017-05-26 09:47:11 -07:00
Kevin Sawicki
9137a2279a Merge pull request #9486 from electron/child-observer
Adding CPU & Memory metrics for App
2017-05-26 09:28:22 -07:00
Kevin Sawicki
14c43f654f 🎨 2017-05-26 09:25:35 -07:00
Kevin Sawicki
8b14df143a Don't assert GPU process on Linux 2017-05-26 09:14:17 -07:00
Kevin Sawicki
2b2b431486 Create prereleases by default 2017-05-26 09:10:26 -07:00
Kevin Sawicki
1e4dd9b163 Store process type as int 2017-05-26 08:53:26 -07:00
Kevin Sawicki
cabcd0ef8f Fix typos in ProcessMetric doc 2017-05-26 08:36:51 -07:00
Kevin Sawicki
7794cabd13 🎨 2017-05-26 08:35:43 -07:00
Kevin Sawicki
d6e626c7e3 Remove crashed render processes from metrics 2017-05-26 08:32:08 -07:00
Kevin Sawicki
b5879b7399 🎨 Minor formatting/doc changes 2017-05-26 07:51:17 -07:00
Birunthan Mohanathas
5e149c827e Merge pull request #9592 from electron/upgrade-libcc-wheel
Upgrade to libchromiumcontent@94c5817
2017-05-26 07:10:23 +03:00
Birunthan Mohanathas
ea11f8bf7d Upgrade to libchromiumcontent@94c5817
This pulls in electron/libchromiumcontent#306.
2017-05-26 06:57:09 +03:00
Heilig Benedek
192cd7787b move popup related code to nativewindow 2017-05-26 03:39:36 +02:00
Kevin Sawicki
8a3b2997c3 Merge pull request #9570 from electron/re-enable-crash-reporter-specs
Re enable crash reporter specs on Linux CI
2017-05-25 17:05:30 -07:00
Kevin Sawicki
d202c35be9 Enable crash reporter specs on Linux CI 2017-05-25 16:58:37 -07:00
Kevin Sawicki
5adc8299d6 Merge pull request #9590 from electron/add-pre-cibuild
Enable LIMIT_OUTPUT_IGNORE_SEGFAULTS on Linux CI
2017-05-25 16:57:24 -07:00
Kevin Sawicki
9b7dde99d8 Enable LIMIT_OUTPUT_IGNORE_SEGFAULTS on Linux CI 2017-05-25 16:50:17 -07:00
Birunthan Mohanathas
19555bbab2 Use last selected directory when using default file name in dialog.showSaveDialog()
Prior to this change, attempting to use
`dialog.showSaveDialog({ defaultPath: 'foo.png' })` would open the save
dialog to the current directory with the default file name set to
`foo.png`. We now use the last selected directory instead of the current
directory.

Absolute paths are not affected by this change.
2017-05-26 02:18:23 +03:00
Electron Bot
85d6b74be2 Update to Electron v1.6.11 2017-05-25 12:52:38 -07:00
Kevin Sawicki
fea165bef8 Merge pull request #9582 from EnterTheNameHere/patch-1
Update webview-tag.md
2017-05-25 08:52:33 -07:00
Kevin Sawicki
5ce5964260 Merge pull request #9579 from electron/link-with-cups-on-mac
Add -lcups to link settings on mac
2017-05-25 08:51:13 -07:00
Jan Němeček
1b96f66541 Update webview-tag.md
Spelling correction.
2017-05-25 13:32:20 +02:00
Hari Krishna Reddy Juturu
c4e5ba6015 Fixing indentations 2017-05-24 21:15:34 -07:00
Hari Krishna Reddy Juturu
e5a9ef296d Using process handle from RenderProcessHost 2017-05-24 21:07:35 -07:00
Hari Juturu
de5eaf9336 Remove .only 2017-05-24 21:07:35 -07:00
Hari Juturu
5e04fab2ba Adding deprecations 2017-05-24 21:07:35 -07:00
Hari Juturu
d73004f1df revert mistaken added brightray 2017-05-24 21:07:35 -07:00
Hari Juturu
939747945e Adding CPU & Memory metrics for App 2017-05-24 21:07:35 -07:00
Kevin Sawicki
0d2aa5c027 Merge pull request #9580 from rajatsingla28/staging
Docs: Remove optional parameter for removeAllListeners.
2017-05-24 16:31:06 -07:00
Rajat
ec6eb74ccc Docs: Remove optional parameter for removeAllListeners.
Fixes #9277
2017-05-25 00:36:14 +05:30
Kevin Sawicki
4d1eb1e4a7 Add -lcups on mac 2017-05-24 09:43:37 -07:00
Cheng Zhao
1257dee0b5 Merge pull request #9547 from electron/jessie-sysroot
Build with Debian Jessie sysroot image
2017-05-24 16:25:39 +09:00
Shubham
793d5fd191 🎨 Fix documentation 2017-05-23 23:27:55 -04:00
Shubham
ec0e33e258 Add mac_os tag to documentation 2017-05-23 22:39:54 -04:00
Shubham
b2f1cdfbae Add API to get top bar height on macOS 2017-05-23 22:24:56 -04:00
Tony Ganch
3a9b035d36 Remove page url check in history.pushState
Current implementation of NavigationController does not allow using
`history.pushState()` if page url is not changed.
It worked by mistake in versions < 1.3.6 and got visible after fix 180a77e6.
2017-05-23 22:42:33 +02:00
Tony Ganch
6d64336978 Add test for #9468 2017-05-23 22:42:32 +02:00
Jordan Piepkow
ffc22ef926 switched to the more standard approach in this file
Switched to defaulting back to string 'false' as that is how it was already doing strictSSL and electron-download treats and checks both against bools so would make sense to keep it the same across the document.
2017-05-23 16:16:01 -04:00
Jordan Piepkow
28100a8695 added force option in electron-download.
Downloading from cache causes a checksum check that causes some builds to fail(see https://github.com/electron/electron/issues/8653) that  that rely on stable electron releases(pre electron v1.7.0 beta) where chromedrive is not named based on electron version. This will add the option to always force a redownload.
2017-05-23 15:26:22 -04:00
Kevin Sawicki
2ed1c122ca Merge pull request #9557 from electron/upgrade-libcc
Upgrade to electron/libchromiumcontent@93c2e1877e
2017-05-23 08:58:46 -07:00
Kevin Sawicki
35299a82fa Upgrade to electron/libchromiumcontent@93c2e1877e 2017-05-23 07:54:21 -07:00
gellert
039908a244 various fixes for macos 2017-05-23 11:41:59 +02:00
Cheng Zhao
a6854c89b7 Link with correct targets in toolchain.gypi 2017-05-23 16:30:07 +09:00
Cheng Zhao
9f3fe5804f Revert "Don't run tests on Janky CI"
This reverts commit b5b2df8e6c.
2017-05-23 16:17:09 +09:00
Cheng Zhao
ff08c36478 Only build against Jessie for arm64 arch 2017-05-23 16:10:54 +09:00
Kevin Sawicki
021b5a9ae0 Merge pull request #9507 from rreimann/pdf-plugins-preference
Suppress dispatching to PDF viewer if plugins are disabled
2017-05-22 14:34:35 -07:00
Kevin Sawicki
647e88da5a Delete mock.pdf after download completes 2017-05-22 14:24:28 -07:00
rreimann
25015c4c63 Fix naming and formatting 2017-05-22 14:14:59 -07:00
rreimann
791486433d Extract common code into IsPreferenceEnabled method 2017-05-22 14:14:59 -07:00
rreimann
65da983ccb Move preferences check to OnPdfResourceIntercepted 2017-05-22 14:14:59 -07:00
rreimann
13665090d5 Add new test and enable plugins for existing tests 2017-05-22 14:14:59 -07:00
rreimann
7982754958 Fix linting violations 2017-05-22 14:14:59 -07:00
rreimann
1b75e45a62 Suppress pdf plugin dispatch if plugins are disabled 2017-05-22 14:14:59 -07:00
Kevin Sawicki
337f61af98 Merge pull request #9243 from seanchas116/custom-clipboard-data
Support writing custom formats into clipboard
2017-05-22 14:01:05 -07:00
Kevin Sawicki
ad9496144f Remove buffers setting in write spec 2017-05-22 13:55:35 -07:00
Kevin Sawicki
6b7ec621e3 Throw error when non-Buffer specified instead of crashing 2017-05-22 13:53:58 -07:00
Kevin Sawicki
5adf9c47fc Remove buffers option since only a single is supported 2017-05-22 13:49:26 -07:00
Ryohei Ikegami
8f35afd941 Include map 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
a26e360e82 Remove console.log 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
fd313ad578 Tweak doc text 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
f2471cb1b7 Rename buffer -> buffers 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
6ec344a499 Add experimental 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
44840ab6cc Add docs 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
03fdc7aa28 Add buffer support in clipboard.write() 2017-05-22 13:43:21 -07:00
Ryohei Ikegami
66cc07d8e9 Add clipboard.writeBuffer 2017-05-22 13:43:21 -07:00
Kevin Sawicki
6bcf3597c2 Merge pull request #9554 from javan/patch-2
Update BrowserView docs. Fixes #9553
2017-05-22 10:43:15 -07:00
Javan Makhmali
b07a6af713 Update BrowserView docs. Fixes #9553 2017-05-22 13:41:01 -04:00
Kevin Sawicki
8b22108b5a Merge pull request #9551 from electron/upgrade-libcc
Upgrade libcc
2017-05-22 09:59:04 -07:00
Kevin Sawicki
285c0b1757 Upgrade libcc to electron/libchromiumcontent@a3cff0522 2017-05-22 09:27:58 -07:00
Kevin Sawicki
77ec648740 Obtain SHA-1 of libcc commit from submodule 2017-05-22 09:27:32 -07:00
Samuel Attard
193c561815 Remove sample notification code 2017-05-23 02:19:03 +10:00
Samuel Attard
d1fc832ca0 Update for the brightray move 2017-05-23 02:18:34 +10:00
Samuel Attard
f5de57dbdb Mark notification API as experimental 2017-05-23 02:05:13 +10:00
Samuel Attard
8815da314f Add Notification API docs 2017-05-23 02:05:13 +10:00
Samuel Attard
e7569ed499 Remove shell link validation, users should do this themselves 2017-05-23 02:05:13 +10:00
Samuel Attard
da31615de5 Basic linux impl 2017-05-23 02:05:13 +10:00
Samuel Attard
c6196810a6 Code cleanup 2017-05-23 02:05:13 +10:00
Samuel Attard
03688b9415 Get image notifications working on Win7 + Win10 2017-05-23 02:05:13 +10:00
Samuel Attard
6bbc4c3113 Support Windows 7 notifications from brightray 2017-05-23 02:05:13 +10:00
Samuel Attard
a4bd26fab0 Fix string16 init on macOS 2017-05-23 02:05:13 +10:00
Samuel Attard
7c38633d1e Initial semi-working windows implementation 2017-05-23 02:05:13 +10:00
Samuel Attard
5dd4d6a961 macOS implementation of notifications in the main process 2017-05-23 02:05:13 +10:00
Kevin Sawicki
433a827cc3 Upgrade libcc to electron/libchromiumcontent@a3cff0522 2017-05-22 09:04:23 -07:00
Kevin Sawicki
37ed44cf1c Merge pull request #9544 from kyokutyo/fix-typo-in-japanese-docs
Fix typo in Japanese docs
2017-05-22 08:56:29 -07:00
Kevin Sawicki
559d13091e Merge pull request #9540 from RevoluPowered/patch-1
Fixed tutorial debugger launching electron incorrectly
2017-05-22 08:55:58 -07:00
Birunthan Mohanathas
cd2e6f497f Fix missing return value type for systemPreferences.getUserDefault 2017-05-22 17:19:03 +03:00
Birunthan Mohanathas
a8e4a0e765 Add BrowserView to docs index 2017-05-22 17:12:17 +03:00
Cheng Zhao
b5b2df8e6c Don't run tests on Janky CI 2017-05-22 19:17:59 +09:00
Cheng Zhao
57551cfad9 Fix missing dep of libdatrie1 2017-05-22 19:06:46 +09:00
Cheng Zhao
27c5d98c49 Fix missing deps when building for ia32 and arm 2017-05-22 17:45:24 +09:00
Cheng Zhao
5baffd49e7 Fix pylint warnings 2017-05-22 17:19:34 +09:00
Cheng Zhao
28f11516fe Build with jessie sysroot image 2017-05-22 16:53:45 +09:00
Cheng Zhao
94be438ab9 Download debian jessie sysroot images 2017-05-22 16:31:54 +09:00
kyokutyo
9cbc5a1cdd Fix typo in Japanese docs 2017-05-22 14:31:26 +09:00
Heilig Benedek
df911593d8 Fix menubar animations being incorrect in RTL layout 2017-05-21 22:36:10 +02:00
Heilig Benedek
d5c038a7fb ci build fix 2017-05-21 20:57:19 +02:00
Heilig Benedek
218e28b136 minor fixes and enable datalist elements in OSR 2017-05-21 19:55:19 +02:00
Gordon MacPherson
9b4fef3c38 Fixed vscode debugging code
Fixes app.getPath("userData") pointing to the wrong folder. (electron in %appdata%)

The old debugger essentially runs:
.\node_modules\.bin\electron main.js

Which makes userData incorrect and various other things wrong related to app launch.

The new version correctly executes:
.\node_modules\.bin\electron .

Which means when you call app.getPath("userData") it will return the correct folder name, and not 'electron', which is what my app was doing even though the folder was named properly.
2017-05-20 14:56:26 +01:00
Heilig Benedek
a95d6b997b add ability to open popup on second click 2017-05-20 04:21:11 +02:00
Heilig Benedek
4949531f57 🎨 lint fix 2017-05-19 21:52:18 +02:00
Heilig Benedek
f360104bee add datalist element view 2017-05-19 21:36:37 +02:00
Kevin Sawicki
8404bdd568 Merge pull request #9397 from electron/enable-webview
Allow enabling <webview> tag with node integration disabled
2017-05-19 10:58:10 -07:00
Kevin Sawicki
6a3f2e90db Tweak webviewTag option description 2017-05-19 10:22:28 -07:00
Kevin Sawicki
74b7afbec7 Merge origin/master into enable-webview 2017-05-19 10:17:34 -07:00
Kevin Sawicki
dcde0a00fb Merge pull request #9527 from electron/brightray-cleanup
Brightray cleanup after import
2017-05-19 09:07:35 -07:00
Kevin Sawicki
09a3e26716 Add full prefix to main_delegate.h include 2017-05-19 08:46:15 -07:00
Kevin Sawicki
7e185ef1a3 Remove extra newlines 2017-05-19 08:46:15 -07:00
Kevin Sawicki
7aacf786d6 Remove unneeded brightray folder from include dirs 2017-05-19 08:46:15 -07:00
Kevin Sawicki
43f7520d4f Add missing brightray prefix 2017-05-19 08:46:15 -07:00
Kevin Sawicki
e19eef025d Remove lint from inspectable_web_contents_view_views.h/cc 2017-05-19 08:46:15 -07:00
Kevin Sawicki
4625159310 Add memory include for std::unique_ptr 2017-05-19 08:46:15 -07:00
Kevin Sawicki
278a283801 🎨 Group includes 2017-05-19 08:46:15 -07:00
Kevin Sawicki
d7321ed980 Add brightray prefix to include paths from within brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
c4608c0f37 Fix build/include_alpha linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
b6992436a0 Remove exclusion of runtime/references rule 2017-05-19 08:46:15 -07:00
Kevin Sawicki
f193b2b2a6 Fix build/include_what_you_use linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
cfb5b6ac89 Fix build/header_guard linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
bb4a61c7ff Remove unused includes 2017-05-19 08:46:15 -07:00
Kevin Sawicki
6e3a0b50cc Remove 10.8 foundation_util workaround 2017-05-19 08:46:15 -07:00
Kevin Sawicki
c6190dc094 Remove unused BRYApplication class 2017-05-19 08:46:15 -07:00
Kevin Sawicki
ca274f7be0 Use kIgnoreCertificateErrors from content_switches.h 2017-05-19 08:46:15 -07:00
Kevin Sawicki
db6d75ca90 Merge pull request #9518 from TingPing/tingping/gio-trash
Support `gio` as trash implementation
2017-05-19 08:44:56 -07:00
Cheng Zhao
f793db2b2a Merge pull request #9519 from electron/better-patch
Use v8::ArrayBuffer::Allocator inside Node
2017-05-19 17:49:02 +09:00
Kevin Sawicki
e0b9395a13 Merge pull request #8596 from renaesop/master
Print enhancement
2017-05-18 11:42:02 -07:00
Kevin Sawicki
73b49f0dfe Fix JSON issue in example block 2017-05-18 11:28:10 -07:00
Kevin Sawicki
97160ffa63 Make isDefault a bool 2017-05-18 10:51:44 -07:00
Kevin Sawicki
a8d25d6855 Add printer info structure file 2017-05-18 10:50:08 -07:00
Kevin Sawicki
d5e66f7cd9 Add parameter name 2017-05-18 10:40:03 -07:00
Kevin Sawicki
aa29bf8019 🎨 2017-05-18 10:26:22 -07:00
Kevin Sawicki
e0b39247a9 Tweak print docs 2017-05-18 10:17:08 -07:00
Kevin Sawicki
92f14f8d52 printerList() -> getPrinters() 2017-05-18 10:14:55 -07:00
Kevin Sawicki
84a9b6a42d Merge remote-tracking branch 'origin/master' into renaesop_master 2017-05-18 10:08:40 -07:00
Kevin Sawicki
f556d1924d Merge pull request #9358 from electron/fetch_job_uaf_patch
protocol: use streaming interface between fetcher and requestjob
2017-05-18 09:58:05 -07:00
Cheng Zhao
f4420b449f Use v8::ArrayBuffer::Allocator inside Node 2017-05-18 16:26:46 +09:00
TingPing
98186c4143 Support gio as trash implementation
Ideally this will become the default as `gvfs-trash` is deprecated and nothing more than a wrapper to `gio`
but at least allow easily opting into the modern method.
2017-05-17 23:46:29 -04:00
Kevin Sawicki
9ce3a8c3a7 Merge pull request #9516 from electron/flaky-pid-test
Assert OS pid after load finishes
2017-05-17 17:11:03 -07:00
Kevin Sawicki
65ab71c894 Assert pid after load finishes 2017-05-17 17:10:41 -07:00
Kevin Sawicki
251a61a151 Merge pull request #9513 from electron/download-url
atom-shell -> electron in node_release_urlbase
2017-05-17 16:58:11 -07:00
Kevin Sawicki
e75c0e47c2 atom-shell -> electron in node_release_urlbase 2017-05-17 14:58:09 -07:00
Kevin Sawicki
a285a3e64b Default webviewTag to false 2017-05-17 14:01:45 -07:00
Kevin Sawicki
1a210ed114 Remote stray © 2017-05-17 14:00:40 -07:00
Kevin Sawicki
6fccb75dfb Mention preloadURL is in webPreferences 2017-05-17 13:59:48 -07:00
Kevin Sawicki
27a4522d65 Add will-attach-webview advice to security.md 2017-05-17 13:56:19 -07:00
Kevin Sawicki
fd782706b2 Add explicit spec for removing preload from webview 2017-05-17 13:47:00 -07:00
Kevin Sawicki
9e88d337ec Inherit webviewTag setting from parent window 2017-05-17 13:37:23 -07:00
Kevin Sawicki
e817dbf50a Add failing spec for webviewTag inheritance 2017-05-17 13:27:28 -07:00
Kevin Sawicki
bde13353fb Rename option to webviewTag and default to nodeIntegration value 2017-05-17 13:12:23 -07:00
Kevin Sawicki
837ea884de Merge remote-tracking branch 'origin/master' into enable-webview 2017-05-17 12:45:29 -07:00
Kevin Sawicki
5a88f76762 Merge pull request #9508 from electron/upgrade-libcc
Upgrade libchromiumcontent
2017-05-17 10:51:41 -07:00
Kevin Sawicki
3f4abc6323 Upgrade to electron/libchromiumcontent@ecc5298428 2017-05-17 08:53:29 -07:00
Cheng Zhao
9bed0ffdbf Merge pull request #9440 from brenca/osr-fixes
Additional small OSR fixes
2017-05-17 17:14:27 +09:00
Cheng Zhao
6826595e9e Merge pull request #9389 from electron/fix-remote-exception-sandbox
Keep track of remote object reference count.
2017-05-17 16:20:26 +09:00
Kevin Sawicki
d66b32b959 Merge pull request #9473 from electron/dash-dash-inspect
Support --inspect option to debug main process
2017-05-16 15:38:08 -07:00
Kevin Sawicki
d34be4c0a6 Upgrade node for protocol from libcc 2017-05-16 15:13:53 -07:00
Kevin Sawicki
d8aca08da7 Set _debugWaitConnect on --inspect-brk 2017-05-16 14:50:49 -07:00
Kevin Sawicki
c419ebdd6d Remove unused test server 2017-05-16 14:44:28 -07:00
Kevin Sawicki
3f87880990 Bump node for inspector Windows fixes 2017-05-16 14:44:28 -07:00
Kevin Sawicki
5337b4ad94 Only define ICU constants in release builds 2017-05-16 14:44:28 -07:00
Kevin Sawicki
b549b20d2c Convert arg string to utf8 on Windows 2017-05-16 14:44:28 -07:00
Kevin Sawicki
e3160126d6 Update debug CLI flags 2017-05-16 14:44:28 -07:00
Kevin Sawicki
03c2d6f435 Make chrome instructions a list item 2017-05-16 14:44:28 -07:00
Kevin Sawicki
690b2e91c4 Update docs for new --inspect support 2017-05-16 14:44:28 -07:00
Kevin Sawicki
a33643c518 Start node inspector agent when --inspect is present 2017-05-16 14:44:28 -07:00
Kevin Sawicki
7469d09dae Build v8 inspector through ndoe 2017-05-16 14:44:28 -07:00
Kevin Sawicki
98cce37e3d Upgrade node enable inspector target 2017-05-16 14:44:28 -07:00
Electron Bot
09f31f559d Update to Electron v1.7.1 2017-05-16 14:41:41 -07:00
Kevin Sawicki
25eb8f7c26 Merge pull request #252 from electron-userland/typescript-1-7-1
Update to electron.d.ts@1.7.1
2017-05-16 14:38:20 -07:00
Kevin Sawicki
1206689caa Update to electron.d.ts@1.7.1 2017-05-16 14:37:10 -07:00
Electron Bot
3898a13e57 Update to Electron v1.6.10 2017-05-16 12:37:38 -07:00
Kevin Sawicki
bffd5b49c2 Merge pull request #251 from electron-userland/typescript-1-6-10
Update to electron.d.ts@1.6.10
2017-05-16 12:35:58 -07:00
Kevin Sawicki
a12d7356d9 Update to electron.d.ts@1.6.10 2017-05-16 12:33:38 -07:00
Thiago de Arruda
5654ff0d43 Add test for #9387 2017-05-16 09:07:41 -03:00
Thiago de Arruda
6b5bd3b6ce 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-16 09:05:52 -03:00
Zeke Sikelianos
25a2480bd8 Merge pull request #249 from electron-userland/vendor-node-typings
add @types/node
2017-05-14 18:25:25 -07:00
Heilig Benedek
802501fb04 update osr specs 2017-05-13 02:14:30 +02:00
gellert
af2c5d1845 fixes not expected scale factor change 2017-05-13 00:59:25 +02:00
Heilig Benedek
9f682ee36b fix osr window initial sizing 2017-05-11 23:48:14 +02:00
deepak1556
71b5d946e0 protocol: use streaming interface between fetcher and requestjob 2017-05-11 22:52:49 +05:30
Zeke Sikelianos
b6a05a684f add @types/node 2017-05-10 23:38:51 -07:00
Electron Bot
18615da075 Update to Electron v1.7.0 2017-05-10 12:58:24 -07:00
Kevin Sawicki
2b694195ff Merge pull request #248 from electron-userland/1-7-0-typescript
Update to electron.d.ts@1.7.0
2017-05-10 12:55:42 -07:00
Kevin Sawicki
9d8b9ece5c Update to electron.d.ts@1.7.0 2017-05-10 12:52:00 -07:00
Electron Bot
584cffe7c8 Update to Electron v1.6.9 2017-05-10 09:39:34 -07:00
Kevin Sawicki
878b7e373f Merge pull request #247 from electron-userland/update-typescript-definition
Update electron.d.ts for 1.6.9
2017-05-10 09:37:50 -07:00
Kevin Sawicki
8dde4075e4 Update electron.d.ts for 1.6.9 2017-05-10 09:25:04 -07:00
Hari Juturu
277c3155a6 use will-create-webview event 2017-05-09 10:12:44 -07:00
renaesop
dfcc882dcc Add a test for webcontents.printerList. 2017-05-09 10:38:03 +08:00
HariJ
a05eb9047e Fixing missed variable name 2017-05-08 18:50:20 -07:00
renaesop
cba5e96496 Merge remote-tracking branch 'ups/master' 2017-05-09 09:44:24 +08:00
Hari Krishna Reddy Juturu
3321f7d39c Changing command line option name 2017-05-08 17:27:31 -07:00
Hari Krishna Reddy Juturu
357caf8991 fixing spec 2017-05-06 22:41:05 -07:00
Hari Krishna Reddy Juturu
939885bc66 Remove .only on spec 2017-05-06 22:14:52 -07:00
Hari Krishna Reddy Juturu
94d054cf11 Add option to override webview security 2017-05-06 22:10:42 -07:00
Hari Krishna Reddy Juturu
b4a8ed01f1 PR 44648: Enabling creation on webview with node-integration disabled and raising events
- Enabling creation on webview with node-integration disabled and raising events

Conflicts:
	lib/browser/guest-view-manager.js
2017-05-06 20:50:01 -07:00
Darrell Ulm
fa2bfd3ff5 Add Math.ceil to pageSize.height and pageSize.width to printToPDF() options to prevent error on display. 2017-05-06 19:19:31 -04:00
Zeke Sikelianos
9fc8f92cd9 Merge pull request #209 from electron-userland/bundle-typescript-declaration-file
add electron.d.ts for built-in TypeScript support
2017-05-05 14:09:25 -07:00
Zeke Sikelianos
974d78a603 update electron.d.ts 2017-05-05 13:54:18 -07:00
Zeke Sikelianos
5e253443b1 update electron.d.ts 2017-05-05 13:39:26 -07:00
Zeke Sikelianos
8dde27af40 update electron.d.ts to 0.0.8 2017-05-05 13:39:26 -07:00
Zeke Sikelianos
3f74a2ab48 add electron.d.ts file and reference in package.json 2017-05-05 13:39:26 -07:00
Electron Bot
b0b5fef317 Update to Electron v1.6.8 2017-05-01 15:56:30 -07:00
Electron Bot
703dbb22e2 Update to Electron v1.3.15 2017-04-20 17:04:43 -07:00
Electron Bot
26a28b7447 Update to Electron v1.6.7 2017-04-18 13:58:20 -07:00
Electron Bot
a2d6c231e0 Update to Electron v1.6.6 2017-04-07 13:04:07 -07:00
Electron Bot
bf22f50aeb Update to Electron v1.4.16 2017-04-05 10:34:16 -07:00
Electron Bot
361dc1faff Update to Electron v1.6.5 2017-03-31 13:32:08 -07:00
Electron Bot
9eb00a462b Update to Electron v1.6.4 2017-03-22 16:06:04 -07:00
Kevin Sawicki
183a9d1441 Merge pull request #230 from electron-userland/no-dynamic-path-in-error
hardcode module path in installation error message
2017-03-16 10:11:05 -07:00
Kevin Sawicki
40bb9e71c5 Merge pull request #231 from vbez/electron_config_cache
Use process.env.electron_config_cache to get the released zip file from the local directory during installation of Electron.
2017-03-16 10:10:13 -07:00
Electron Bot
43cccff957 Update to Electron v1.3.14 2017-03-14 11:47:48 -07:00
Kevin Sawicki
1c9b0c57ff Update AppVeyor badge URL 2017-03-14 10:10:46 -07:00
Electron Bot
cc6c12b783 Update to Electron v1.6.3 2017-03-07 11:32:34 -08:00
Electron Bot
91c778d053 Update to Electron v1.6.2 2017-03-01 12:06:40 -08:00
Electron Bot
353920e1fa Update to Electron v1.6.1 2017-02-21 10:24:28 -08:00
Volodymyr Bezuglyy
ba39adde36 Use process.env.electron_config_cache to get prepared zip file. 2017-02-09 15:15:15 +02:00
Zeke Sikelianos
24ef8cc8ce hardcode module path in error message 2017-02-08 11:36:38 -08:00
renaesop
7f2705b2d9 Print enhancement: add webContents.printerList And a print option to select printer
Print enhancement: add webContents.printerList And a print option to select printer
2017-02-07 12:03:29 +08:00
Electron Bot
73e753ef9a Update to Electron v1.6.0 2017-02-06 18:23:20 -08:00
renaesop
26135b412b Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	atom/browser/api/atom_api_web_contents.cc
#	chromium_src/chrome/browser/printing/print_job_worker.cc
#	chromium_src/chrome/browser/printing/print_job_worker.h
#	chromium_src/chrome/browser/printing/print_view_manager_base.cc
#	chromium_src/chrome/browser/printing/print_view_manager_base.h
#	chromium_src/chrome/browser/printing/printer_query.cc
#	chromium_src/chrome/common/print_messages.cc
#	chromium_src/chrome/renderer/printing/print_web_view_helper.cc
2017-02-07 09:30:36 +08:00
Electron Bot
381f8ffae7 Update to Electron v1.5.1 2017-02-06 10:00:16 -08:00
renaesop
023a3fd547 Print enhancement: add webContents.printerList And a print option to select printer 2017-02-06 17:18:04 +08:00
Electron Bot
e534e8623e Update to Electron v1.5.0 2017-01-24 10:20:22 -08:00
Electron Bot
32039ef9a6 Update to Electron v1.4.15 2017-01-19 10:10:28 -08:00
Electron Bot
fe1cfa27fe Update to Electron v1.4.14 2017-01-10 12:45:08 -08:00
Zeke Sikelianos
17eb7f2cf4 Merge pull request #227 from pzrq/patch-1
Update README.md badge: Drop prebuilt
2017-01-09 10:07:09 -08:00
Peter Schmidt
f89157fff9 Update README.md badge: Drop prebuilt
As documented later in the README.md already, plus the download numbers look bigger too.
2017-01-04 18:15:01 +11:00
Kevin Sawicki
7e72581469 Merge pull request #224 from electron-userland/check-if-path-file-exists
Check that the path file exists before spawning
2016-12-28 10:24:07 -08:00
Kevin Sawicki
d9d47344c1 Remove semicolon 2016-12-28 09:29:37 -08:00
Kevin Sawicki
e3e05aa797 Add test for corrupt install error message 2016-12-28 09:28:51 -08:00
Samuel Attard
b85ec95975 Get package name from folder path 2016-12-28 09:19:18 -08:00
Samuel Attard
5c8ebb296c Update index.js 2016-12-28 09:19:18 -08:00
Kevin Sawicki
39caff88c9 Merge pull request #225 from electron-userland/write-file-after-uncompressing
Write path.txt file after uncompressing
2016-12-28 09:17:57 -08:00
Kevin Sawicki
e165294ff1 Check that exit code was non-zero 2016-12-27 13:20:51 -08:00
Kevin Sawicki
8d4660158a err -> ignored 2016-12-27 11:51:00 -08:00
Kevin Sawicki
ed8260e4d9 Inline platform variable 2016-12-27 11:51:00 -08:00
Kevin Sawicki
835c64b7b2 Add specs for error cases 2016-12-27 11:50:52 -08:00
Kevin Sawicki
af2ca221b4 Ignore npm-debug.log 2016-12-27 11:21:18 -08:00
Kevin Sawicki
d5bb1d87cc Add getPath helper 2016-12-27 11:13:15 -08:00
Kevin Sawicki
d2df641b0d Write path.txt after extraction 2016-12-27 11:03:51 -08:00
Electron Bot
f405b2e366 Update to Electron v1.4.13 2016-12-20 13:09:17 -08:00
Electron Bot
0f8ba64aa2 Update to Electron v1.4.12 2016-12-09 22:55:28 -08:00
Electron Bot
8c9c7f8fbe Update to Electron v1.4.12 2016-12-09 22:47:23 -08:00
Electron Bot
4ac270761f Update to Electron v1.4.11 2016-12-07 10:03:33 -08:00
Electron Bot
9d9266af66 Update to Electron v1.3.13 2016-12-06 15:53:10 -08:00
Electron Bot
bfcca60ac3 Update to Electron v1.4.10 2016-11-29 07:12:53 +09:00
Electron Bot
02f55b2d91 Update to Electron v1.3.12 2016-11-29 05:49:21 +09:00
Electron Bot
8ba43b4e5b Update to Electron v1.4.9 2016-11-24 08:50:47 +09:00
Electron Bot
2420a3497c Update to Electron v1.3.11 2016-11-24 07:07:19 +09:00
Zeke Sikelianos
d4fa23144d Merge pull request #216 from ivoputzer/master
fixes typo within readme
2016-11-23 11:10:55 -08:00
Ivo von Putzer Reibegg
9518b66d73 fixes typo within readme 2016-11-23 12:16:27 +01:00
Electron Bot
7938f2b50d Update to Electron v1.4.8 2016-11-23 08:46:12 +09:00
Electron Bot
fb7718d700 Update to Electron v1.3.10 2016-11-23 04:19:29 +09:00
Electron Bot
c94268a0fe Update to Electron v1.3.9 2016-11-17 05:57:00 +09:00
Electron Bot
fd56129bb5 Update to Electron v1.4.7 2016-11-17 03:46:52 +09:00
Zeke Sikelianos
dfcc044688 Merge pull request #211 from electron-userland/mafintosh-patch-1
log level is missing http
2016-11-15 12:37:56 -08:00
Mathias Buus
537203469e log level is missing http 2016-11-11 15:38:02 +09:00
Electron Bot
e3889e7035 Update to Electron v1.4.6 2016-11-10 06:26:29 +09:00
Zeke Sikelianos
47636343c9 Merge pull request #202 from nucleardreamer/log-level
Download progress should only show for appropriate log levels
2016-11-09 10:57:37 -08:00
Electron Bot
1846dfbbbb Update to Electron v1.4.5 2016-11-02 02:34:38 +09:00
Flynn Joffray
95cd9d718d print progress for proper loglevels 2016-10-20 12:20:25 +01:00
Electron Bot
92818eb30f Update to Electron v1.3.8 2016-10-20 16:11:47 +09:00
Electron Bot
f9f5854c5e Update to Electron v1.4.4 2016-10-20 11:23:41 +09:00
Electron Bot
5a5d972a69 Update to Electron v1.4.3 2016-10-06 03:07:56 -07:00
Electron Bot
bc6ebd87dd Update to Electron v1.4.2 2016-09-30 05:22:57 -07:00
Kevin Sawicki
f4962a5212 Merge pull request #195 from electron-userland/upgrade-electron-download
Upgrade electron download to fix Mac CI issue
2016-09-27 16:05:23 -07:00
Kevin Sawicki
429ceeec23 Use default install script 2016-09-27 15:18:03 -07:00
Kevin Sawicki
3ba3a84159 Remove unneeded silent option 2016-09-27 15:15:07 -07:00
Kevin Sawicki
2227631b44 Upgrade to electron-download@3.0.1 2016-09-27 15:14:42 -07:00
Electron Bot
5ea143b08f Update to Electron v1.3.7 2016-09-27 03:03:26 -07:00
Kevin Sawicki
83ffe03825 Merge pull request #162 from EmilyFranklin/correct-platform-path
Change platform path to match downloaded one
2016-09-22 08:51:31 -07:00
Electron Bot
e6c0036726 Update to Electron v1.4.1 2016-09-22 04:25:46 -07:00
Kevin Sawicki
bae1cee223 Merge pull request #189 from electron-userland/upgrade-electron-download
Upgrade electron-download for checksum support
2016-09-19 15:58:42 -07:00
Kevin Sawicki
1fd1474c9a Install silently on Travis 2016-09-19 15:01:05 -07:00
Kevin Sawicki
557d062b7f Remove trailing comma 2016-09-19 14:36:07 -07:00
Kevin Sawicki
fb2f4ae528 Set quiet to true when loglevel is silent 2016-09-19 14:32:11 -07:00
Kevin Sawicki
082c1da548 Add AppVeyor badge 2016-09-19 14:05:53 -07:00
Kevin Sawicki
fb1a5a4646 Only build master branch on Travis 2016-09-19 13:48:59 -07:00
Kevin Sawicki
d0a509a915 npm ignore more meta files and tests 2016-09-19 13:48:05 -07:00
Kevin Sawicki
9fd625fb9b Add initial AppVeyor config 2016-09-19 13:46:37 -07:00
Kevin Sawicki
5cbc2abf61 Build on node 0.10/0.12 2016-09-19 13:40:17 -07:00
Kevin Sawicki
119535525f ⬆️ electron-download@3.0.0 2016-09-19 13:38:48 -07:00
Electron Bot
6b715a16cb Update to Electron v1.4.0 2016-09-15 00:25:33 -07:00
Electron Bot
b8233eb8e6 Update to Electron v1.3.6 2016-09-14 18:30:41 -07:00
Electron Bot
db0b8b5374 Update to Electron v1.3.6 2016-09-14 00:18:42 -07:00
Mark Lee
94f05d350b Travis: test against Node >= 4 on Linux & OSX 2016-09-10 09:07:17 -07:00
Mark Lee
004d25d248 Upgrade electron-download for checksum support
Fixes #51.
2016-09-10 08:59:40 -07:00
Electron Bot
573332721a Update to Electron v1.3.5 2016-09-02 00:57:13 -07:00
Electron Bot
518e8cc2f7 Update to Electron v1.3.4 2016-08-23 03:50:37 -07:00
Electron Bot
2a8b97ce34 Update to Electron v1.3.3 2016-08-10 04:09:36 -07:00
Mark Lee
eef534259f Merge pull request #177 from electron-userland/readme-cleanup
Cleanup README
2016-08-09 11:56:58 -07:00
Mark Lee
60d8c732c1 Cleanup README 2016-08-07 13:22:46 -07:00
Kevin Sawicki
ff590850f9 Merge pull request #173 from electron-userland/platform-error
Mention builds not available when platform not found
2016-08-03 14:28:15 -07:00
Zeke Sikelianos
e241dd1079 Merge pull request #171 from electron-userland/update-readme-after-package-rename
Update readme after package rename
2016-08-03 14:22:45 -07:00
Electron Bot
6c7d426b2c Update to Electron v1.3.2 2016-08-02 16:27:38 -07:00
Zeke Sikelianos
5c0edc55a8 update issue template to help avoid misfiled issues 2016-07-29 10:25:18 -07:00
Zeke Sikelianos
9627ad923b update repo url in contributing.md 2016-07-29 10:25:03 -07:00
Kevin Sawicki
7dc95671cd Tweak unknown platform error message 2016-07-28 13:47:03 -07:00
Zeke Sikelianos
e2f3f6828c add a note about the name change 2016-07-28 10:52:05 -07:00
Zeke Sikelianos
0733ec9758 update links in readme intro 2016-07-28 10:51:46 -07:00
Zeke Sikelianos
11fc32b59b electron moved to the electron org 2016-07-28 10:44:20 -07:00
Zeke Sikelianos
0946859d1e update docs to use new electron package name 2016-07-28 10:44:20 -07:00
Zeke Sikelianos
675a47b42c Merge pull request #169 from electron-userland/clean-up-package-json
clean up package.json
2016-07-28 10:26:14 -07:00
Zeke Sikelianos
216714f27a clean up package.json 2016-07-28 10:12:50 -07:00
Zeke Sikelianos
e8f5d30bad Merge pull request #168 from electron-userland/rename-npm-package-to-electron
change npm package name to `electron`
2016-07-28 09:23:40 -07:00
Zeke Sikelianos
a14acd2134 change npm package name to electron 2016-07-28 09:06:23 -07:00
=^._.^=
b562ad9484 Update to Electron v1.3.1 2016-07-26 22:47:36 -07:00
=^._.^=
3168465759 Update to Electron v1.3.0 2016-07-24 22:08:44 -07:00
=^._.^=
1e3d131f46 Update to Electron v1.2.8 2016-07-21 00:16:30 -07:00
Emily
dfde9ea814 added or to handle undefined 2016-07-15 13:09:12 +09:00
Emily
4f20a15907 change platform path to match downloaded one 2016-07-15 11:17:54 +09:00
=^._.^=
5c36709ff2 Update to Electron v1.2.7 2016-07-12 22:19:41 -07:00
=^._.^=
07fefbcf40 Update to Electron v1.2.6 2016-07-05 23:43:56 -07:00
=^._.^=
ac3ced0287 Update to Electron v1.2.6 2016-07-05 23:20:58 -07:00
=^._.^=
e35a83b62a Update to Electron v1.2.5 2016-06-23 01:03:52 -07:00
=^._.^=
9e123b484a Update to Electron v1.2.4 2016-06-21 21:21:35 -07:00
=^._.^=
9881f3a2c4 Update to Electron v1.2.3 2016-06-15 23:02:50 -07:00
=^._.^=
c4e7d97205 Update to Electron v1.2.2 2016-06-08 03:22:05 -07:00
=^._.^=
1d7991f2db Update to Electron v1.2.1 2016-06-01 11:03:09 +02:00
=^._.^=
cac2f560c3 Update to Electron v1.2.0 2016-05-26 13:00:40 +02:00
=^._.^=
9f0229d768 Update to Electron v1.1.3 2016-05-25 07:03:55 +00:00
=^._.^=
4db88fa7e8 Update to Electron v1.1.2 2016-05-24 10:26:17 +00:00
=^._.^=
c28a0c313b Update to Electron v1.1.1 2016-05-20 01:42:29 +00:00
=^._.^=
7344bb81a4 Update to Electron v1.1.0 2016-05-14 01:46:45 +00:00
=^._.^=
70e2fa0312 Update to Electron v1.0.2 2016-05-13 04:32:12 +02:00
=^._.^=
f09443c70a Update to Electron v1.0.1 2016-05-11 14:54:14 +02:00
=^._.^=
481659a195 Update to Electron v1.0.0 2016-05-11 13:08:01 +02:00
=^._.^=
2e177ff567 Update to Electron v1.0.0 2016-05-11 08:04:42 +02:00
=^._.^=
562e751842 Update to Electron v0.37.8 2016-04-29 06:30:31 -07:00
=^._.^=
21c66e1aee Update to Electron v0.37.7 2016-04-22 04:10:55 -07:00
=^._.^=
3a001a30f1 Update to Electron v0.37.6 2016-04-15 03:31:16 -07:00
=^._.^=
05bf926f6b Update to Electron v0.37.5 2016-04-06 21:44:14 -07:00
=^._.^=
63b10afd28 Update to Electron v0.37.4 2016-04-03 04:04:39 -07:00
=^._.^=
5565c5825a Create issue_template.md 2016-04-01 12:51:12 -07:00
Nate Goldman
e644df65ef Merge pull request #112 from mitchhentges/master
Make npm badge link to package page
2016-03-29 11:41:54 -07:00
Mitchell Hentges
36969c8a1d Make npm badge link to package page 2016-03-29 09:41:39 +02:00
=^._.^=
0d16de7ef7 Update to Electron v0.37.3 2016-03-26 21:51:19 -07:00
=^._.^=
4ee1c49bf0 Update to Electron v0.36.12 2016-03-26 20:15:39 -07:00
=^._.^=
7683eec6d3 Update to Electron v0.37.2 2016-03-14 04:21:56 -07:00
=^._.^=
8327ee3f1d Update to Electron v0.37.1 2016-03-12 20:14:41 -08:00
=^._.^=
b82ef0b3da Update to Electron v0.37.1 2016-03-12 19:00:05 -08:00
=^._.^=
6b35f5200b Update to Electron v0.37.0 2016-03-11 21:35:41 -08:00
=^._.^=
dccd2cfbc5 Update to Electron v0.36.11 2016-03-11 04:39:31 -08:00
Max Ogden
03f53099b5 0.36.10 2016-03-05 10:19:20 -08:00
Max Ogden
079d8aa7b4 upgrade to electron-download 2 2016-03-03 18:09:02 -08:00
=^._.^=
2cdceb00a9 Merge pull request #97 from mramato/fix-npm-usage
Fix npm usage
2016-03-02 14:02:49 -08:00
Matthew Amato
9295aa6103 Fix strict-ssl detection.
When `strict-ssl` is set to a truthy value, npm always turns the
environment variable into the string `true`, when the value is falsy, npm
always sets it to a blank string.  This fixes strict-ssl detection by
always comparing the value of npm_config_strict_ssl to the string `"true"`
2016-03-02 16:45:48 -05:00
Max Ogden
79f552e69e rename mafintosh -> electron-userland 2016-02-27 12:52:39 -08:00
Max Ogden
86f9316ee0 update github urls 2016-02-27 12:29:07 -08:00
=^._.^=
2791c70c7d Update to Electron v0.36.9 2016-02-25 23:33:04 -08:00
=^._.^=
4659135fe6 Merge pull request #95 from RocketChat/master
Allow download builds for MAS
2016-02-22 20:41:21 -08:00
Rodrigo Nascimento
fc78d2d8f5 Allow download builds for MAS 2016-02-22 23:56:27 -03:00
=^._.^=
703ec1658c Update to Electron v0.36.8 2016-02-19 02:11:19 -08:00
=^._.^=
1989552be4 Update to Electron v0.36.7 2016-01-30 02:08:35 -05:00
=^._.^=
7b4c7a1624 Update to Electron v0.36.6 2016-01-29 01:32:36 -05:00
=^._.^=
c70e83da58 Update to Electron v0.36.5 2016-01-22 07:47:38 -08:00
=^._.^=
db2645c12e Update to Electron v0.36.4 2016-01-15 00:09:52 -08:00
=^._.^=
9f87866b41 Update to Electron v0.35.6 2016-01-10 22:38:06 -08:00
=^._.^=
c8962dc43a Update to Electron v0.35.6 2016-01-10 22:30:28 -08:00
=^._.^=
612848ae4d Update to Electron v0.36.3 2016-01-10 18:23:14 -08:00
=^._.^=
1876ae1912 Update to Electron v0.36.3 2016-01-07 23:39:28 -08:00
=^._.^=
cdafc6a3c6 Update to Electron v0.35.5 2015-12-30 21:02:21 -08:00
=^._.^=
c6e68a0dc3 Update to Electron v0.36.2 2015-12-24 23:19:37 -08:00
Mathias Buus
d4ca2ffae3 Merge pull request #84 from jcreekmore/strict-ssl
Allow specifying StrictSSL in the NPM config file
2015-12-21 18:36:25 +01:00
Jonathan Creekmore
7922082090 Allow specifying StrictSSL in the NPM config file
The standard way of specifying whether you want strict-ssl or not
is to add an entry into your npm config file for strict-ssl. Use
that entry (which is passed to the install.js as an environment
variable) to set the option for strictSSL in electron-download.
2015-12-21 11:28:03 -06:00
=^._.^=
67a80969f7 Update to Electron v0.36.1 2015-12-17 23:17:32 -08:00
Mathias Buus
037c347d0e Merge pull request #81 from teran-mckinney/master
Add FreeBSD path to install.js
2015-12-12 23:20:22 +01:00
Teran McKinney
23c928afc9 Add FreeBSD path to install.js 2015-12-12 22:14:09 +00:00
=^._.^=
c5394ecdc4 Update to Electron v0.36.0 2015-12-10 23:49:49 -08:00
Mathias Buus
49fa2314ae Merge pull request #80 from yoz/install-dirname-movable
Don't save __dirname into path.txt.
2015-12-11 00:21:19 +01:00
Yoyo Zhou
999a998469 Don't save __dirname into path.txt.
Allows install to work even if our directory is moved later.
2015-12-10 14:43:35 -08:00
Mathias Buus
b152f6d215 be standard 2015-12-09 16:30:46 +01:00
Mathias Buus
3ce46663b9 allow rebuilds. fixes #78 2015-12-09 16:16:56 +01:00
=^._.^=
90f113cd90 Update to Electron v0.35.4 2015-12-04 04:39:13 -08:00
=^._.^=
85c8b66944 Update to Electron v0.35.3 2015-12-04 01:50:12 -08:00
Max Ogden
b1416644d5 add standard 2015-11-30 12:00:54 -08:00
=^._.^=
1ce13f2764 Update to Electron v0.35.2 2015-11-27 07:02:58 -08:00
=^._.^=
466e4c20b4 Update to Electron v0.34.5 2015-11-26 00:07:47 -08:00
=^._.^=
b91a830cad Update to Electron v0.34.4 2015-11-24 06:24:13 -08:00
=^._.^=
3f95ecb2c7 Update to Electron v0.35.1 2015-11-19 23:01:42 -08:00
=^._.^=
23b0e7679a Update to Electron v0.35.0 2015-11-16 03:08:23 -08:00
=^._.^=
2b289bb758 Update to Electron v0.34.3 2015-11-06 07:56:36 -08:00
=^._.^=
ca2498ff25 Update to Electron v0.34.2 2015-10-30 00:33:56 -07:00
=^._.^=
7436910324 Update to Electron v0.34.1 2015-10-23 06:52:35 -07:00
=^._.^=
136ac2dae7 Update to Electron v0.34.0 2015-10-16 05:16:38 -07:00
=^._.^=
cad5d6c245 Update to Electron v0.33.9 2015-10-16 03:36:54 -07:00
=^._.^=
c3c5c65de3 Update to Electron v0.33.8 2015-10-13 22:23:50 -07:00
=^._.^=
b5d84cbd74 Update to Electron v0.33.7 2015-10-10 04:15:59 -07:00
Mathias Buus
1c38cf6fe5 Merge pull request #64 from itchio/exit-code
Relay electron exit code
2015-10-06 23:34:46 +02:00
Amos Wenger
02f5fabd6c Relay electron exit code 2015-10-06 22:45:12 +02:00
=^._.^=
0b267d3fa6 Update to Electron v0.33.6 2015-10-05 06:13:31 -07:00
=^._.^=
96263ea914 Update to Electron v0.33.5 2015-10-04 21:46:52 -07:00
=^._.^=
5613fd6088 Merge pull request #60 from airtimemedia/master
Add target arch support
2015-10-02 10:58:37 -07:00
=^._.^=
f0a0fe116d Update to Electron v0.33.4 2015-10-01 23:14:53 -07:00
=^._.^=
1631b9e231 Update to Electron v0.33.3 2015-09-26 07:39:23 -07:00
=^._.^=
3dff092a6e Update to Electron v0.30.8 2015-09-26 07:04:26 -07:00
=^._.^=
31bce2281b Update to Electron v0.33.2 2015-09-25 05:32:43 -07:00
=^._.^=
8b79453b50 Update to Electron v0.30.7 2015-09-24 00:23:47 -07:00
Tom Hughes
dd59736393 Clean up target arch support based on pull request #55 comments. 2015-09-22 10:34:52 -07:00
Attila Sukosd
f1f061e1e3 Added target arch support
Previously electron-prebuilt would download the prebuilt binaries
for the architecture native to the platform. However there are
cases where being able to download for another architecture is
favourable.
This patch adds support for setting the architecture through
npm's --arch= parameter. (Issue #53)
2015-09-22 10:17:36 -07:00
=^._.^=
b3af5a9475 Update to Electron v0.33.1 2015-09-22 01:03:54 -07:00
=^._.^=
0b06748d9b Update to Electron v0.33.0 2015-09-17 04:39:21 -07:00
=^._.^=
5d4dd00c41 Update to Electron v0.32.3 2015-09-15 01:27:32 -07:00
=^._.^=
7749e9a808 Update to Electron v0.32.2 2015-09-10 06:22:19 -07:00
=^._.^=
4c4b2f44e7 Update to Electron v0.32.1 2015-09-09 05:26:36 -07:00
=^._.^=
a3109ed011 Update to Electron v0.32.0 2015-09-08 22:06:20 -07:00
=^._.^=
b23b1eb0f0 Update to Electron v0.31.2 2015-09-01 23:12:43 -07:00
=^._.^=
1dcb609622 Update to Electron v0.31.1 2015-08-27 22:57:33 -07:00
=^._.^=
19109b2c51 Update to Electron v0.30.6 2015-08-26 02:29:27 -07:00
=^._.^=
c2a88b7996 Update to Electron v0.30.6 2015-08-26 01:39:58 -07:00
=^._.^=
06d41a5230 Update to Electron v0.31.0 2015-08-25 21:22:37 -07:00
Max Ogden
2e0c44a91f update docs and readme 2015-08-22 13:14:26 +02:00
=^._.^=
a3cdead9a8 Update to Electron v0.31.0 2015-08-21 15:07:45 +02:00
=^._.^=
d752ffeb06 Update to Electron v0.30.5 2015-08-21 07:51:02 +02:00
=^._.^=
0a281df10b Update to Electron v0.30.4 2015-08-10 17:36:15 +02:00
=^._.^=
57f7250a82 Update to Electron v0.30.3 2015-08-07 16:48:07 +02:00
=^._.^=
5252079b3b Update to Electron v0.30.2 2015-07-29 23:57:13 -07:00
Max Ogden
33d63ac712 update readme 2015-07-29 15:39:15 -07:00
=^._.^=
9daed39907 Update to Electron v0.30.1 2015-07-24 03:36:37 -07:00
=^._.^=
c2e552de02 Update to Electron v0.30.0 2015-07-16 10:56:17 -07:00
=^._.^=
bd94d8028d Update to Electron v0.29.2 2015-07-07 03:06:55 -07:00
=^._.^=
52c92032d2 Update to Electron v0.29.1 2015-07-03 09:21:10 -07:00
=^._.^=
5fb9c596b2 Update to Electron v0.29.0 2015-07-03 04:16:28 -07:00
=^._.^=
4e6381056a Update to Electron v0.28.3 2015-06-23 07:40:05 +00:00
=^._.^=
e43c524ca4 Update to Electron v0.28.2 2015-06-18 05:48:49 +00:00
=^._.^=
56270a505d document proxy env vars. closes #21 2015-06-17 20:52:37 -07:00
Max Ogden
5176c62287 Merge branch 'ralphtheninja-master' 2015-06-16 16:30:24 -07:00
Max Ogden
a09ae620d8 merge regex 2015-06-16 16:29:46 -07:00
Max Ogden
b9fa0fdbe2 0.28.1 2015-06-15 09:38:04 -07:00
Max Ogden
2706679589 0.28.1 2015-06-15 09:38:01 -07:00
Max Ogden
df8d88916b 0.28.0 2015-06-15 09:37:36 -07:00
Max Ogden
cf7b552625 0.28.0 2015-06-15 09:37:33 -07:00
=^._.^=
4c528355bf Merge pull request #41 from masom/masom-patch-1
Bump to version 0.28.1
2015-06-15 16:36:20 +00:00
Martin Samson
a58788822c Updated to 0.28.1 2015-06-12 12:04:59 -04:00
Lars-Magnus Skog
efd51295c9 use version from package.json 2015-06-09 20:59:04 +02:00
Max Ogden
0a93f3691c 0.27.3 2015-06-09 11:13:40 -07:00
=^._.^=
0367374f90 Merge pull request #38 from mattdesl/patch-1
bump to 0.27.3
2015-06-09 18:12:14 +00:00
Matt DesLauriers
811935b3b2 bump to 0.27.3 2015-06-09 10:42:26 -04:00
Max Ogden
df1ee48faa 0.27.2 2015-06-01 15:38:24 -07:00
Max Ogden
740849270c 0.27.2 2015-06-01 15:38:17 -07:00
Max Ogden
afc89ce2e9 0.27.1 2015-05-28 11:17:07 -07:00
Max Ogden
1d8a289ed2 0.27.1 2015-05-28 11:17:04 -07:00
Max Ogden
834e181a38 0.27.0 2015-05-28 11:16:46 -07:00
Max Ogden
2cd0ee5321 0.27.0 2015-05-28 11:16:44 -07:00
Max Ogden
38f0c02ea1 0.26.1 2015-05-21 20:15:58 -07:00
=^._.^=
38dda0639d Merge pull request #31 from ingorichter/ingo/update-electron-to-0.26.1
update electron shell to 0.26.1
2015-05-21 20:15:36 -07:00
Ingo Richter
458a4f95ff - update electron shell to 0.26.1 2015-05-21 18:21:22 -07:00
Max Ogden
d4d5e0f771 Merge pull request #30 from RnbWd/scripts2
updated scripts / .ignores
2015-05-12 17:27:55 -07:00
Max Ogden
bd2b0f2c2f 0.26.0 2015-05-12 17:22:08 -07:00
Max Ogden
19c6a6195d 0.26.0 2015-05-12 17:22:05 -07:00
RnbWd
eeb0d4439e updated scripts / .ignores 2015-05-12 16:10:22 -07:00
Max Ogden
baae0583c9 0.25.3-2 - add missing devDeps for tests 2015-05-10 13:55:44 -07:00
Max Ogden
009925d0fb 0.25.3-1 2015-05-10 13:54:36 -07:00
Max Ogden
e2fc1a0fb1 refactor to use electron-download 2015-05-10 13:54:06 -07:00
Mathias Buus
92a2eb2864 0.25.3 2015-05-09 00:19:09 +02:00
Misumi Rize
0ba1f030a3 version 0.25.3 2015-05-09 00:16:05 +02:00
Mathias Buus
2e4881ba68 0.25.2-1 2015-05-09 00:16:05 +02:00
Mathias Buus
0a8ac33911 reset version for #18 2015-05-09 00:16:05 +02:00
RnbWd
bbdec2be1a v0.25.3 2015-05-08 06:11:40 -07:00
RnbWd
ce8c95127e simplify cache paths 2015-05-07 14:21:51 -07:00
RnbWd
7864197291 added cache 2015-05-06 21:44:10 -07:00
RnbWd
8fdb5b42d8 update 2015-05-06 17:52:51 -07:00
RnbWd
9afad0a3d7 ignore path.txt 2015-05-06 17:52:20 -07:00
RnbWd
3c8af7564b fs.existsSync() is depreciated in io.js 2015-05-06 17:50:49 -07:00
Mathias Buus
a6ac7c98ec 0.25.2 2015-05-03 16:52:12 +02:00
Mathias Buus
5024fe0495 Merge pull request #18 from hemanth/patch-1
version 0.25.2
2015-05-03 16:50:32 +02:00
hemanth.hm
7b079a23b5 version 0.25.2
We must pick this up from the repo itself.
2015-05-01 15:10:01 +05:30
Mathias Buus
a76d0acb2e 0.25.1-1 2015-04-30 11:40:32 +02:00
Mathias Buus
3aa660c4cc Merge pull request #13 from JamesKyburz/issue-9
replaced run.bat with cli.js closes #9
2015-04-30 11:33:36 +02:00
Max Ogden
fad1fd6635 0.25.1 2015-04-25 12:50:23 -07:00
Max Ogden
cfddeef6ba upgrade 2015-04-25 12:50:21 -07:00
Max Ogden
f70969be0f 0.25.0 2015-04-25 12:49:56 -07:00
Max Ogden
230a17909c upgrade 2015-04-25 12:49:53 -07:00
James Kyburz
0b0472a999 replaced run.bat with cli.js closes #9 2015-04-23 21:38:02 +02:00
James Kyburz
c973ebc84a update electron version fixing windows issues 2015-04-23 21:38:02 +02:00
Max Ogden
d0e3084a4c Merge pull request #12 from steelbrain/patch-1
Fix a typo
2015-04-17 11:32:33 -07:00
Steel Brain
fa13ebf502 🎨 Fix a typo 2015-04-17 11:30:44 -07:00
Max Ogden
b365cdc283 0.24.0 2015-04-17 11:20:02 -07:00
Max Ogden
698d0c5e70 rename to electron-prebuilt 2015-04-17 11:19:50 -07:00
Mathias Buus
cb161234e5 v0.23.0 2015-04-12 01:36:42 -07:00
Max Ogden
008535029a 0.22.3 2015-03-31 11:59:15 -07:00
Max Ogden
7f925cb5f4 0.22.3 2015-03-31 11:59:11 -07:00
Max Ogden
a6f1089100 0.22.2 2015-03-31 11:58:38 -07:00
Max Ogden
8b6f0b42e7 0.22.2 2015-03-31 11:58:34 -07:00
Max Ogden
f04376455d add --save-dev instructions to readme 2015-03-25 17:56:46 -07:00
Max Ogden
7eb594d6b5 0.22.1 2015-03-18 15:40:27 -07:00
Max Ogden
6c43acbb8d 0.22.1 2015-03-18 15:40:25 -07:00
Max Ogden
98ced7f077 0.22.0 2015-03-18 15:40:13 -07:00
Max Ogden
f0492b803b 0.22.0 2015-03-18 15:40:10 -07:00
Max Ogden
9679e68f7a 0.21.3-1 (0.21.3 had a bug on our end, sorry) 2015-03-04 13:17:38 -08:00
Max Ogden
82d6782479 fix typo 2015-03-04 13:14:47 -08:00
Max Ogden
1809db5669 use standard js style 2015-03-04 13:08:16 -08:00
Max Ogden
2a048369fe 0.21.3 2015-03-04 13:04:51 -08:00
Max Ogden
fafb79c2e0 0.21.3 2015-03-04 13:04:36 -08:00
Max Ogden
023ed1c82f 0.21.2 2015-02-05 18:45:56 -08:00
Max Ogden
43897e8239 0.21.1 2015-02-05 18:45:24 -08:00
Max Ogden
d9c358c4d5 add contributing 2015-02-01 17:25:28 -08:00
Max Ogden
beb6cac8a2 0.21.0 2015-02-01 17:24:30 -08:00
Max Ogden
4060ebcc94 0.20.8 2015-02-01 17:24:10 -08:00
Max Ogden
45c0e7075b 0.20.7 2015-02-01 17:23:53 -08:00
Max Ogden
1e2d986430 0.20.6 2015-02-01 17:23:38 -08:00
Max Ogden
049e988137 0.20.5 2015-02-01 17:23:21 -08:00
Max Ogden
2b4e4622c5 0.20.4 2015-02-01 17:23:02 -08:00
Max Ogden
384266ce76 0.20.3 2015-02-01 17:22:44 -08:00
Max Ogden
4b784d03a6 0.20.2 2015-02-01 17:22:16 -08:00
Max Ogden
b9fced9f6b 0.20.1 2015-02-01 17:21:54 -08:00
Max Ogden
85ee9028bb 0.20.0 2015-02-01 17:21:23 -08:00
Max Ogden
5841a68f08 0.19.5 2015-02-01 17:19:38 -08:00
Mathias Buus
99eb5987ee 1.2.1 2014-12-12 14:19:54 -08:00
Mathias Buus
cfa1c2e15d Merge pull request #8 from eyeofhell/master
Fixed 64-bit windows install
2014-12-12 14:19:23 -08:00
Grigory
c09c7a2248 Fixed 64-bit windows install
64-bit version is not available under Windows, so install fails with 404 download error. Fixed by patching windows install.
2014-12-12 22:20:20 +03:00
Mathias Buus
c083acae97 1.2.0 2014-12-01 14:27:46 +01:00
Mathias Buus
6566b9a6a5 bump to 0.19.5 for #5 2014-12-01 14:16:31 +01:00
Mathias Buus
ff3019ace6 1.1.8 2014-11-22 20:31:37 +01:00
Mathias Buus
6af9dfc915 add shebang. fixes #4 2014-11-22 20:29:44 +01:00
Mathias Buus
cff6b91d46 1.1.7 2014-11-15 10:21:33 +01:00
Mathias Buus
99aa39b854 separate path file 2014-11-15 10:21:07 +01:00
Mathias Buus
8f5714396a 1.1.6 2014-11-15 10:14:52 +01:00
Mathias Buus
0980ba367a arg fwd should also work on windows 2014-11-15 10:13:23 +01:00
Mathias Buus
df42990770 forward arguments 2014-11-15 10:11:09 +01:00
Mathias Buus
3ac73f7e91 1.1.5 2014-10-21 14:43:02 +09:00
Mathias Buus
d0a0afdd71 set verbose mode 2014-10-21 14:42:55 +09:00
Mathias Buus
572220aa84 bump nugget 2014-10-21 14:41:57 +09:00
Mathias Buus
eb04836d51 add programmatic usage 2014-10-20 16:16:35 +09:00
Mathias Buus
4708eba69e 1.1.4 2014-10-20 14:57:00 +09:00
Mathias Buus
1bbd199e34 add tests 2014-10-20 14:56:57 +09:00
Mathias Buus
74c7a9455b make travis build 2014-10-20 14:52:02 +09:00
Mathias Buus
f23cdf8d18 1.1.3 2014-10-20 14:40:49 +09:00
Mathias Buus
d28d2d9c23 add travis 2014-10-20 14:40:41 +09:00
Mathias Buus
1f3c285ccf fix spaces in path issue 2014-10-20 14:40:06 +09:00
Max Ogden
93f5cc7d79 update readme 2014-10-20 14:39:27 +09:00
Mathias Buus
9cd9d09ef7 1.1.2 2014-10-20 14:16:46 +09:00
Mathias Buus
c074689930 better windows support 2014-10-20 14:16:38 +09:00
Mathias Buus
88f796c574 1.1.1 2014-10-20 14:04:37 +09:00
Mathias Buus
a8f6fc1005 bundle empty run.bat 2014-10-20 14:02:57 +09:00
Mathias Buus
a685e2d545 1.1.0 2014-10-20 14:00:19 +09:00
Mathias Buus
c1dc3e09a8 better cross platform support 2014-10-20 13:58:52 +09:00
Max Ogden
359504809b 1.0.1 2014-10-20 13:40:19 +09:00
Max Ogden
0d2b614506 update readme 2014-10-20 13:36:27 +09:00
Mathias Buus
7e2ce00b21 add missing fields 2014-10-20 13:26:56 +09:00
Mathias Buus
576add15cf 1.0.0 2014-10-20 13:17:49 +09:00
Mathias Buus
2a1e246e2a reset version 2014-10-20 13:17:47 +09:00
Mathias Buus
beb4696b23 first commit 2014-10-20 13:17:38 +09:00
1216 changed files with 35891 additions and 57363 deletions

762
.circleci/config.yml Normal file
View File

@@ -0,0 +1,762 @@
version: 2
jobs:
electron-linux-arm:
docker:
- image: electronbuilds/electron:0.0.7
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
- run:
name: Optionally finish release
shell: /bin/sh
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$AUTO_RELEASE" == "true" ]; then
echo 'Trying to finish release'
node script/release.js --validateRelease --automaticRelease
releaseExitCode=$?
if [ $releaseExitCode -eq 0 ]; then
echo 'Release is ready to go; releasing'
node script/release.js--automaticRelease
if [ $releaseExitCode -eq 0 ]; then
echo 'Release successful, now publishing to npm'
echo "//registry.npmjs.org/:_authToken=$ELECTRON_NPM_TOKEN" >> ~/.npmrc
npm run publish-to-npm
echo 'Release has been published to npm'
fi
else
echo 'Release is not complete, skipping publish for now'
fi
else
echo 'Skipping finishing release because build is not for release'
fi
- run:
name: Zip out directory
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
zip -r electron.zip out/D
fi
- persist_to_workspace:
root: /home/builduser
paths:
- project/out
- store_artifacts:
path: electron.zip
electron-linux-arm-test:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- run:
name: Test in ARM docker container
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker run -it \
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
--rm electronbuilds/electronarm7:0.0.5 > version.txt
cat version.txt
if grep -q `script/get-version.py` version.txt; then
echo "Versions match"
else
echo "Versions do not match"
exit 1
fi
else
echo "Skipping test for release build"
fi
electron-linux-arm64:
docker:
- image: electronbuilds/electron:0.0.7
environment:
TARGET_ARCH: arm64
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
- run:
name: Optionally finish release
shell: /bin/sh
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$AUTO_RELEASE" == "true" ]; then
echo 'Trying to finish release'
node script/release.js --validateRelease --automaticRelease
releaseExitCode=$?
if [ $releaseExitCode -eq 0 ]; then
echo 'Release is ready to go; releasing'
node script/release.js--automaticRelease
if [ $releaseExitCode -eq 0 ]; then
echo 'Release successful, now publishing to npm'
echo "//registry.npmjs.org/:_authToken=$ELECTRON_NPM_TOKEN" >> ~/.npmrc
npm run publish-to-npm
echo 'Release has been published to npm'
fi
else
echo 'Release is not complete, skipping publish for now'
fi
else
echo 'Skipping finishing release because build is not for release'
fi
- run:
name: Zip out directory
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
zip -r electron.zip out/D
fi
- persist_to_workspace:
root: /home/builduser
paths:
- project/out
- store_artifacts:
path: electron.zip
electron-linux-arm64-test:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- run:
name: Test in ARM64 docker container
command: |
if [ "$ELECTRON_RELEASE" != "1" ]; then
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker run -it \
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
--rm electronbuilds/electronarm64:0.0.6 > version.txt
cat version.txt
if grep -q `script/get-version.py` version.txt; then
echo "Versions match"
else
echo "Versions do not match"
exit 1
fi
else
echo "Skipping test for release build"
fi
electron-linux-ia32:
docker:
- image: electronbuilds/electron:0.0.7
environment:
TARGET_ARCH: ia32
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: Optionally finish release
shell: /bin/sh
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$AUTO_RELEASE" == "true" ]; then
echo 'Trying to finish release'
node script/release.js --validateRelease --automaticRelease
releaseExitCode=$?
if [ $releaseExitCode -eq 0 ]; then
echo 'Release is ready to go; releasing'
node script/release.js--automaticRelease
if [ $releaseExitCode -eq 0 ]; then
echo 'Release successful, now publishing to npm'
echo "//registry.npmjs.org/:_authToken=$ELECTRON_NPM_TOKEN" >> ~/.npmrc
npm run publish-to-npm
echo 'Release has been published to npm'
fi
else
echo 'Release is not complete, skipping publish for now'
fi
else
echo 'Skipping finishing release 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'
out/D/electron --version
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
electron-linux-mips64el:
docker:
- image: electronbuilds/electron:0.0.7
environment:
TARGET_ARCH: mips64el
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
- run:
name: Optionally finish release
shell: /bin/sh
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$AUTO_RELEASE" == "true" ]; then
echo 'Trying to finish release'
node script/release.js --validateRelease --automaticRelease
releaseExitCode=$?
if [ $releaseExitCode -eq 0 ]; then
echo 'Release is ready to go; releasing'
node script/release.js--automaticRelease
if [ $releaseExitCode -eq 0 ]; then
echo 'Release successful, now publishing to npm'
echo "//registry.npmjs.org/:_authToken=$ELECTRON_NPM_TOKEN" >> ~/.npmrc
npm run publish-to-npm
echo 'Release has been published to npm'
fi
else
echo 'Release is not complete, skipping publish for now'
fi
else
echo 'Skipping finishing release because build is not for release'
fi
electron-linux-x64:
docker:
- image: electronbuilds/electron:0.0.7
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: Optionally finish release
shell: /bin/sh
command: |
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$AUTO_RELEASE" == "true" ]; then
echo 'Trying to finish release'
node script/release.js --validateRelease --automaticRelease
releaseExitCode=$?
if [ $releaseExitCode -eq 0 ]; then
echo 'Release is ready to go; releasing'
node script/release.js--automaticRelease
if [ $releaseExitCode -eq 0 ]; then
echo 'Release successful, now publishing to npm'
echo "//registry.npmjs.org/:_authToken=$ELECTRON_NPM_TOKEN" >> ~/.npmrc
npm run publish-to-npm
echo 'Release has been published to npm'
fi
else
echo 'Release is not complete, skipping publish for now'
fi
else
echo 'Skipping finishing release 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
- run:
name: Generate Typescript Definitions
command: npm run create-typescript-definitions
- store_test_results:
path: junit
- store_artifacts:
path: junit
- store_artifacts:
path: out/electron.d.ts
- store_artifacts:
path: out/electron-api.json
electron-osx-x64:
environment:
TARGET_ARCH: x64
macos:
xcode: "9.0"
steps:
- checkout
- run:
name: Reclaim disk space
command: |
df -h
sudo rm -rf /Library/Developer/CoreSimulator
df -h
sysctl -n hw.ncpu
- 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
- run:
name: Generate Typescript Definitions
command: npm run create-typescript-definitions
- store_test_results:
path: junit
- store_artifacts:
path: junit
- store_artifacts:
path: out/electron.d.ts
- store_artifacts:
path: out/electron-api.json
electron-mas-x64:
environment:
TARGET_ARCH: x64
MAS_BUILD: 1
macos:
xcode: "9.0"
steps:
- checkout
- run:
name: Reclaim disk space
command: |
df -h
sudo rm -rf /Library/Developer/CoreSimulator
df -h
sysctl -n hw.ncpu
- 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
- run:
name: Generate Typescript Definitions
command: npm run create-typescript-definitions
- store_test_results:
path: junit
- store_artifacts:
path: junit
- store_artifacts:
path: out/electron.d.ts
- store_artifacts:
path: out/electron-api.json
workflows:
version: 2
build-arm:
jobs:
- electron-linux-arm
- electron-linux-arm-test:
requires:
- electron-linux-arm
build-arm64:
jobs:
- electron-linux-arm64
- electron-linux-arm64-test:
requires:
- electron-linux-arm64
build-ia32:
jobs:
- electron-linux-ia32
build-x64:
jobs:
- electron-linux-x64
build-osx-x64:
jobs:
- electron-osx-x64
build-mas-x64:
jobs:
- electron-mas-x64

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
*
!tools/xvfb-init.sh
!tools/run-electron.sh

7
.env.example Normal file
View File

@@ -0,0 +1,7 @@
# These env vars are only necessary for creating Electron releases.
# See docs/development/releasing.md
APPVEYOR_TOKEN=
CIRCLE_TOKEN=
ELECTRON_GITHUB_TOKEN=
VSTS_TOKEN=

21
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,21 @@
# Order is important. The LAST matching pattern has the MOST precedence.
# gitignore style patterns are used, not globs.
# https://help.github.com/articles/about-codeowners
# https://git-scm.com/docs/gitignore
# Everything that falls through the cracks:
* @electron/reviewers
# filename patterns
*browser_view* @electron/browserview
*notification* @electron/notifications
*pdf* @electron/printing
*printing* @electron/printing
*updater* @electron/updater
# directories
/.github/ @electron/hubbers
/default_app/ @electron/docs
/docs/ @electron/docs
/docs-translations/ @electron/i18n
/npm/ @electron/hubbers

8
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,8 @@
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTING.md
-->

31
.github/config.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: |
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the [contributing guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md#submitting-issues).
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: |
💖 Thanks for opening this pull request! 💖
![typing cat](https://user-images.githubusercontent.com/2289/36400158-2c7c589e-1584-11e8-81c7-bd34fd3c392b.gif)
Here is a list of things that will help get it across the finish line:
- Follow the JavaScript, C++, and Python [coding style](https://github.com/electron/electron/blob/master/docs/development/coding-style.md).
- Run `npm run lint` locally to catch formatting errors earlier.
- Document any user-facing changes you've made following the [documentation styleguide](https://github.com/electron/electron/blob/master/docs/styleguide.md).
- Include tests when adding/changing behavior.
- Include screenshots and animated GIFs whenever possible.
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congrats on merging your first pull request! 🎉🎉🎉
# It is recommend to include as many gifs and emojis as possible

25
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 45
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- fixme/bug
- fixme/crash
- fixme/regression
- fixme/security
- blocked
- blocking-stable
- needs-review
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity and is not currently prioritized. It will be closed
in a week if no further activity occurs :)
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
If you still think this issue is relevant, please ping a maintainer or
leave a comment!

62
.gitignore vendored
View File

@@ -1,36 +1,50 @@
.DS_Store
.env
.gclient_done
**/.npmrc
.tags*
.vs/
.vscode/
*.log
*.pyc
*.sln
*.swp
*.VC.db
*.VC.VC.opendb
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*.xcodeproj
/.idea/
/brightray/brightray.opensdf
/brightray/brightray.sdf
/brightray/brightray.sln
/brightray/brightray.suo
/brightray/brightray.v12.suo
/brightray/brightray.vcxproj*
/brightray/brightray.xcodeproj/
/build/
/dist/
/external_binaries/
/out/
/vendor/download/
/vendor/.gclient
/vendor/debian_jessie_amd64-sysroot/
/vendor/debian_jessie_arm-sysroot/
/vendor/debian_jessie_arm64-sysroot/
/vendor/debian_jessie_i386-sysroot/
/vendor/debian_jessie_mips64-sysroot/
/vendor/debian_wheezy_amd64-sysroot/
/vendor/debian_wheezy_arm-sysroot/
/vendor/debian_wheezy_i386-sysroot/
/vendor/python_26/
/vendor/npm/
/vendor/llvm/
/vendor/gcc-4.8.3-d197-n64-loongson/
/vendor/readme-gcc483-loongson.txt
/vendor/download/
/vendor/llvm-build/
/vendor/.gclient
/vendor/llvm/
/vendor/npm/
/vendor/python_26/
/vendor/native_mksnapshot
/vendor/LICENSES.chromium.html
node_modules/
*.xcodeproj
*.swp
*.pyc
*.VC.db
*.VC.VC.opendb
.vs/
.vscode/
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
*.sln
*.log
/brightray/brightray.opensdf
/brightray/brightray.sdf
/brightray/brightray.sln
/brightray/brightray.vcxproj*
/brightray/brightray.suo
/brightray/brightray.v12.suo
/brightray/brightray.xcodeproj/
SHASUMS256.txt
**/package-lock.json

View File

@@ -1 +1 @@
v7.4.0
v8.2.1

6
.remarkrc Normal file
View File

@@ -0,0 +1,6 @@
{
"plugins": [
["remark-lint-code-block-style", "fenced"],
["remark-lint-fenced-code-flag"]
]
}

View File

@@ -3,6 +3,9 @@ git:
notifications:
email: false
before_install:
- export BOTO_CONFIG=/dev/null
language: node_js
node_js:
- "4"
@@ -19,6 +22,8 @@ matrix:
env: TARGET_ARCH=arm
- os: linux
env: TARGET_ARCH=ia32
- os: linux
env: TARGET_ARCH=arm64
allow_failures:
- os: osx

View File

@@ -1,4 +1,4 @@
# Contributor Covenant Code of Conduct
# Contributor Covenant Code of Conduct:
## Our Pledge
@@ -34,13 +34,13 @@ This Code of Conduct applies both within project spaces and in public spaces whe
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [electron@github.com](mailto:electron@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [coc@electronjs.org](mailto:coc@electronjs.org). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor-Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/

View File

@@ -1,79 +1,56 @@
# 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).
By participating, you are expected to uphold this code. Please report unacceptable
behavior to atom@github.com.
behavior to coc@electronjs.org.
The following is a set of guidelines for contributing to Electron.
These are just guidelines, not rules, use your best judgment and feel free to
propose changes to this document in a pull request.
## Submitting Issues
## [Issues](https://electronjs.org/docs/development/issues)
* You can create an issue [here](https://github.com/electron/electron/issues/new),
but before doing that please read the notes below and include as many details as
possible with your report. If you can, please include:
* The version of Electron you are using
* The operating system you are using
* If applicable, what you were doing when the issue arose and what you
expected to happen
* Other things that will help resolve your issue:
* Screenshots and animated GIFs
* Error output that appears in your terminal, dev tools or as an alert
* Perform a [cursory search](https://github.com/electron/electron/issues?utf8=✓&q=is%3Aissue+)
to see if a similar issue has already been submitted
Issues are created [here](https://github.com/electron/electron/issues/new).
## Submitting Pull Requests
* [How to Contribute in Issues](https://electronjs.org/docs/development/issues#how-to-contribute-in-issues)
* [Asking for General Help](https://electronjs.org/docs/development/issues#asking-for-general-help)
* [Submitting a Bug Report](https://electronjs.org/docs/development/issues#submitting-a-bug-report)
* [Triaging a Bug Report](https://electronjs.org/docs/development/issues#triaging-a-bug-report)
* [Resolving a Bug Report](https://electronjs.org/docs/development/issues#resolving-a-bug-report)
* Include screenshots and animated GIFs in your pull request whenever possible.
* Follow the JavaScript, C++, and Python [coding style defined in docs](/docs/development/coding-style.md).
* Write documentation in [Markdown](https://daringfireball.net/projects/markdown).
See the [Documentation Styleguide](/docs/styleguide.md).
* Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages).
### Issue Maintenance and Closure
* If an issue is inactive for 45 days (no activity of any kind), it will be
marked for closure with `stale`.
* If after this label is applied, no further activity occurs in the next 7 days,
the issue will be closed.
* If an issue has been closed and you still feel it's relevant, feel free to
ping a maintainer or add a comment!
## Styleguides
## [Pull Requests](https://electronjs.org/docs/development/pull-requests)
### General Code
Pull Requests are the way concrete changes are made to the code, documentation,
dependencies, and tools contained in the `electron/electron` repository.
* End files with a newline.
* Place requires in the following order:
* Built in Node Modules (such as `path`)
* Built in Electron Modules (such as `ipc`, `app`)
* Local Modules (using relative paths)
* Place class properties in the following order:
* Class methods and properties (methods starting with a `@`)
* Instance methods and properties
* Avoid platform-dependent code:
* Use `path.join()` to concatenate filenames.
* Use `os.tmpdir()` rather than `/tmp` when you need to reference the
temporary directory.
* Using a plain `return` when returning explicitly at the end of a function.
* Not `return null`, `return undefined`, `null`, or `undefined`
* [Setting up your local environment](https://electronjs.org/docs/development/pull-requests#setting-up-your-local-environment)
* [Step 1: Fork](https://electronjs.org/docs/development/pull-requests#step-1-fork)
* [Step 2: Build](https://electronjs.org/docs/development/pull-requests#step-2-build)
* [Step 3: Branch](https://electronjs.org/docs/development/pull-requests#step-3-branch)
* [The Process of Making Changes](https://electronjs.org/docs/development/pull-requests#the-process-of-making-changes)
* [Step 4: Code](https://electronjs.org/docs/development/pull-requests#step-4-code)
* [Step 5: Commit](https://electronjs.org/docs/development/pull-requests#step-5-commit)
* [Commit message guidelines](https://electronjs.org/docs/development/pull-requests#commit-message-guidelines)
* [Step 6: Rebase](https://electronjs.org/docs/development/pull-requests#step-6-rebase)
* [Step 7: Test](https://electronjs.org/docs/development/pull-requests#step-7-test)
* [Step 8: Push](https://electronjs.org/docs/development/pull-requests#step-8-push)
* [Step 8: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-8-opening-the-pull-request)
* [Step 9: Discuss and Update](#step-9-discuss-and-update)
* [Approval and Request Changes Workflow](https://electronjs.org/docs/development/pull-requests#approval-and-request-changes-workflow)
* [Step 10: Landing](https://electronjs.org/docs/development/pull-requests#step-10-landing)
* [Continuous Integration Testing](https://electronjs.org/docs/development/pull-requests#continuous-integration-testing)
### Git Commit Messages
## Style Guides
See [Coding Style](https://electronjs.org/docs/development/coding-style) for information about which standards Electron adheres to in different parts of its codebase.
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally
* When only changing documentation, include `[ci skip]` in the commit description
* Consider starting the commit message with an applicable emoji:
* :art: `:art:` when improving the format/structure of the code
* :racehorse: `:racehorse:` when improving performance
* :non-potable_water: `:non-potable_water:` when plugging memory leaks
* :memo: `:memo:` when writing docs
* :penguin: `:penguin:` when fixing something on Linux
* :apple: `:apple:` when fixing something on macOS
* :checkered_flag: `:checkered_flag:` when fixing something on Windows
* :bug: `:bug:` when fixing a bug
* :fire: `:fire:` when removing code or files
* :green_heart: `:green_heart:` when fixing the CI build
* :white_check_mark: `:white_check_mark:` when adding tests
* :lock: `:lock:` when dealing with security
* :arrow_up: `:arrow_up:` when upgrading dependencies
* :arrow_down: `:arrow_down:` when downgrading dependencies
* :shirt: `:shirt:` when removing linter warnings

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM electronbuilds/libchromiumcontent:0.0.4
USER root
# Set up HOME directory
ENV HOME=/home
RUN chmod a+rwx /home
# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install wget used by crash reporter
RUN apt-get install -y wget
# Install python-dbusmock
RUN apt-get install -y python-dbusmock
# Install libnotify
RUN apt-get install -y libnotify-bin
# Add xvfb init script
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb

35
Dockerfile.arm64 Normal file
View File

@@ -0,0 +1,35 @@
FROM multiarch/debian-debootstrap:arm64-jessie
RUN apt-get update && apt-get install -y\
bison \
build-essential \
clang \
curl \
gperf \
libasound2 \
libasound2-dev \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
libgconf-2-4 \
libgconf2-dev \
libgnome-keyring-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-bin \
libnotify-dev \
libnss3 \
libnss3-dev \
libx11-xcb-dev \
libxss1 \
libxtst-dev \
libxtst6 \
python-dbusmock \
wget \
xvfb
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
ADD tools/run-electron.sh /run-electron.sh
RUN chmod a+x /run-electron.sh
CMD sh /run-electron.sh

63
Dockerfile.arm64v8 Normal file
View File

@@ -0,0 +1,63 @@
FROM arm64v8/ubuntu:16.04
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
RUN groupadd --gid 114 jenkins \
&& useradd --uid 110 --gid jenkins --shell /bin/bash --create-home jenkins
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
RUN apt-get update && apt-get install -y\
bison \
build-essential \
clang \
curl \
gperf \
git \
libasound2 \
libasound2-dev \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
libgconf-2-4 \
libgconf2-dev \
libgnome-keyring-dev \
libgtk2.0-0 \
libgtk2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-dev \
libnss3 \
libnss3-dev \
libx11-xcb-dev \
libxss1 \
libxtst-dev \
libxtst6 \
lsb-release \
locales \
ninja \
python-setuptools \
python-pip \
python-dbusmock \
wget \
xvfb
# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install crcmod
RUN pip install -U crcmod
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
# Install ninja in /usr/local
RUN cd /usr/local && git clone https://github.com/martine/ninja.git -b v1.5.3
RUN cd /usr/local/ninja && ./configure.py --bootstrap
USER builduser
WORKDIR /home/builduser

36
Dockerfile.armv7 Normal file
View File

@@ -0,0 +1,36 @@
FROM multiarch/debian-debootstrap:armhf-jessie
RUN apt-get update && apt-get install -y\
bison \
build-essential \
clang \
curl \
gperf \
libasound2 \
libasound2-dev \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
libgconf-2-4 \
libgconf2-dev \
libgnome-keyring-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-bin \
libnotify-dev \
libnss3 \
libnss3-dev \
libx11-xcb-dev \
libxss1 \
libxtst-dev \
libxtst6 \
python-dbusmock \
git \
wget \
xvfb
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
ADD tools/run-electron.sh /run-electron.sh
RUN chmod a+x /run-electron.sh
CMD sh /run-electron.sh

23
Dockerfile.circleci Normal file
View File

@@ -0,0 +1,23 @@
FROM electronbuilds/libchromiumcontent:0.0.4
USER root
# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install wget used by crash reporter
RUN apt-get install -y wget
# Install python-dbusmock
RUN apt-get install -y python-dbusmock
# Install libnotify
RUN apt-get install -y libnotify-bin
# Add xvfb init script
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
USER builduser
WORKDIR /home/builduser

48
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,48 @@
pipeline {
agent none
stages {
stage('Build') {
parallel {
stage('electron-osx-x64') {
agent {
label 'osx'
}
steps {
timeout(60) {
sh 'script/bootstrap.py --target_arch=x64 --dev'
sh 'npm run lint'
sh 'script/build.py -c D'
sh 'script/test.py --ci --rebuild_native_modules'
}
}
post {
always {
cleanWs()
}
}
}
stage('electron-mas-x64') {
agent {
label 'osx'
}
environment {
MAS_BUILD = '1'
}
steps {
timeout(60) {
sh 'script/bootstrap.py --target_arch=x64 --dev'
sh 'npm run lint'
sh 'script/build.py -c D'
sh 'script/test.py --ci --rebuild_native_modules'
}
}
post {
always {
cleanWs()
}
}
}
}
}
}
}

36
Jenkinsfile.arm64 Normal file
View File

@@ -0,0 +1,36 @@
pipeline {
agent {
docker {
image 'electronbuilds/arm64v8:0.0.2'
args '--privileged'
}
}
environment {
TARGET_ARCH='arm64'
DISPLAY=':99.0'
MOCHA_TIMEOUT='60000'
}
stages {
stage('Bootstrap') {
steps {
sh 'script/bootstrap.py -v --dev --target_arch=$TARGET_ARCH'
}
}
stage('Build') {
steps {
sh 'script/build.py -c D --ninja-path /usr/local/ninja/ninja'
}
}
stage('Test') {
steps {
sh '/etc/init.d/xvfb start'
sh 'script/test.py --ci'
}
}
}
post {
always {
cleanWs()
}
}
}

View File

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

123
README.md
View File

@@ -1,87 +1,96 @@
[![Electron Logo](https://electron.atom.io/images/electron-logo.svg)](https://electron.atom.io/)
[![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org)
[![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/bc56v83355fi3369/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron/branch/master)
[![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/master.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/master)
[![AppVeyor Build Status](https://windows-ci.electronjs.org/api/projects/status/nilyf07hcef14dvj/branch/master?svg=true)](https://windows-ci.electronjs.org/project/AppVeyor/electron/branch/master)
[![Jenkins Build Status](https://mac-ci.electronjs.org/buildStatus/icon?job=Electron%20org/electron/master)](https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Felectron/activity?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/)
[![Join the Electron Community on Slack](https://atom-slack.herokuapp.com/badge.svg)](https://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)
:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹.
View these docs in other languages at [electron/electron-i18n](https://github.com/electron/electron-i18n/tree/master/content/).
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](https://electron.atom.io/apps).
[Chromium](https://www.chromium.org) and is used by the [Atom
editor](https://github.com/atom/atom) and many other [apps](https://electronjs.org/apps).
Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
announcements.
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md).
This project adheres to the Contributor Covenant
[code of conduct](https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable
behavior to electron@github.com.
behavior to [coc@electronjs.org](mailto:coc@electronjs.org).
## Downloads
## Installation
To install prebuilt Electron binaries, use
[`npm`](https://docs.npmjs.com/):
To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/).
The preferred method is to install Electron as a development dependency in your
app:
```sh
# Install as a development dependency
npm install electron --save-dev
# Install the `electron` command globally in your $PATH
npm install electron -g
npm install electron --save-dev --save-exact
```
See the [releases page](https://github.com/electron/electron/releases) for
prebuilt binaries, debug symbols, and more.
The `--save-exact` flag is recommended as Electron does not follow semantic
versioning. For info on how to manage Electron versions in your apps, see
[Electron versioning](docs/tutorial/electron-versioning.md).
For more installation options and troubleshooting tips, see
[installation](docs/tutorial/installation.md).
## Quick start
Clone and run the
[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
repository to see a minimal Electron app in action:
```sh
git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install
npm start
```
## Resources for learning Electron
- [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation
- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app
- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - sample starter apps created by the community
- [electron/simple-samples](https://github.com/electron/simple-samples) - small applications with ideas for taking them further
- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - an Electron app that teaches you how to use Electron
- [hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps) - small demo apps for the various Electron APIs
## Programmatic usage
Most people use Electron from the command line, but if you require `electron` inside
your **Node app** (not your Electron app) it will return the file path to the
binary. Use this to spawn Electron from Node scripts:
```javascript
const electron = require('electron')
const proc = require('child_process')
// will print something similar to /Users/maf/.../Electron
console.log(electron)
// spawn Electron
const child = proc.spawn(electron)
```
### Mirrors
- [China](https://npm.taobao.org/mirrors/electron)
## Documentation
Guides and the API reference are located in the
[docs](https://github.com/electron/electron/tree/master/docs) directory. It also
contains documents describing how to build and contribute to Electron.
## Documentation Translations
- [Brazilian Portuguese](https://github.com/electron/electron/tree/master/docs-translations/pt-BR)
- [Korean](https://github.com/electron/electron/tree/master/docs-translations/ko-KR)
- [Japanese](https://github.com/electron/electron/tree/master/docs-translations/jp)
- [Spanish](https://github.com/electron/electron/tree/master/docs-translations/es)
- [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)
- [Indonesian](https://github.com/electron/electron/tree/master/docs-translations/id)
## Quick Start
Clone and run the [`electron/electron-quick-start`](https://github.com/electron/electron-quick-start)
repository to see a minimal Electron app in action.
Find documentation translations in [electron/electron-i18n](https://github.com/electron/electron-i18n).
## Community
You can ask questions and interact with the community in the following
locations:
- [`electron`](http://discuss.atom.io/c/electron) category on the Atom
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.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.
Info on reporting bugs, getting help, finding third-party tools and sample apps,
and more can be found in the [support document](docs/tutorial/support.md#finding-support).
## License

View File

@@ -2,8 +2,11 @@
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.
To report a security issue, email [security@electronjs.org](mailto:security@electronjs.org) 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).
## Learning More About Security
To learn more about securing an Electron application, please see the [security tutorial](docs/tutorial/security.md).

View File

@@ -1,25 +1,67 @@
# 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
build_cloud: electron-16
image: electron-16-vs2015
build_script:
- ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
} else {
Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64"
$env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path"
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'True') {
$env:RUN_RELEASE_BUILD = "1"
}
$Message = (git log --format=%B -n 1 HEAD) | Out-String
if ((Test-Path Env:\RUN_RELEASE_BUILD)) {
$env:ELECTRON_RELEASE = '1'
Write-Output "release build triggered from api"
}
if ((Test-Path Env:\ELECTRON_RELEASE)) {
Write-Output "Running release build"
python script\bootstrap.py --target_arch=$env:TARGET_ARCH
python script\build.py -c R
python script\create-dist.py
} else {
Write-Output "Running debug build"
python script\bootstrap.py --target_arch=$env:TARGET_ARCH --dev
python script\build.py -c D
}
if ($? -ne 'True') {
throw "Build failed with exit code $?"
} else {
"Build succeeded."
}
Push-AppveyorArtifact out
}
test_script:
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
Write-Output "Skipping tests for release build"
} else {
Write-Output "Running tests for debug build"
python script\test.py --ci --rebuild_native_modules
if ($LASTEXITCODE -ne '0') {
throw "Tests failed with exit code $LASTEXITCODE"
} else {
Write-Output "Tests succeeded."
}
python script\verify-ffmpeg.py
if ($LASTEXITCODE -ne '0') {
throw "Verify ffmpeg failed with exit code $LASTEXITCODE"
} else {
"Verify ffmpeg succeeded."
}
}
artifacts:
- path: test-results.xml
name: test-results.xml
deploy_script:
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\RUN_RELEASE_BUILD) {
Write-Output "Uploading Electron release distribution to s3"
& python script\upload.py --upload_to_s3
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python script\upload.py
}
}

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

@@ -0,0 +1,11 @@
#import <Cocoa/Cocoa.h>
int main(int argc, char* argv[]) {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSArray* pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
NSString* path = [NSString pathWithComponents:pathComponents];
[[NSWorkspace sharedWorkspace] launchApplication:path];
[pool drain];
return 0;
}

View File

@@ -4,19 +4,23 @@
#include "atom/app/atom_main.h"
#include <stdlib.h>
#include <cstdlib>
#include <vector>
#if defined(OS_WIN)
#include <windows.h> // windows.h must be included first
#include <atlbase.h> // ensures that ATL statics like `_AtlWinModule` are initialized (it's an issue in static debug build)
#include <shellapi.h>
#include <shellscalingapi.h>
#include <tchar.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"
@@ -34,7 +38,9 @@
namespace {
const char* kRunAsNode = "ELECTRON_RUN_AS_NODE";
#ifdef ENABLE_RUN_AS_NODE
const auto kRunAsNode = "ELECTRON_RUN_AS_NODE";
#endif
bool IsEnvSet(const char* name) {
#if defined(OS_WIN)
@@ -51,58 +57,91 @@ 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
#ifdef ENABLE_RUN_AS_NODE
bool run_as_node = IsEnvSet(kRunAsNode);
#else
bool run_as_node = false;
#endif
// Make sure the output is printed to console.
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);
}
}
#ifndef DEBUG
// Chromium has its own TLS subsystem which supports automatic destruction
// of thread-local data, and also depends on memory allocation routines
// provided by the CRT. The problem is that the auto-destruction mechanism
// uses a hidden feature of the OS loader which calls a callback on thread
// exit, but only after all loaded DLLs have been detached. Since the CRT is
// also a DLL, it happens that by the time Chromium's `OnThreadExit` function
// is called, the heap functions, though still in memory, no longer perform
// their duties, and when Chromium calls `free` on its buffer, it triggers
// an access violation error.
// We work around this problem by invoking Chromium's `OnThreadExit` in time
// from within the CRT's atexit facility, ensuring the heap functions are
// still active. The second invocation from the OS loader will be a no-op.
extern void NTAPI OnThreadExit(PVOID module, DWORD reason, PVOID reserved);
atexit([]() {
OnThreadExit(nullptr, DLL_THREAD_DETACH, nullptr);
});
#endif
#ifdef ENABLE_RUN_AS_NODE
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);
} else if (IsEnvSet("ELECTRON_INTERNAL_CRASH_SERVICE")) {
auto ret = atom::NodeMain(argv.size(), argv.data());
std::for_each(argv.begin(), argv.end(), free);
return ret;
}
#endif
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;
@@ -110,34 +149,37 @@ 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[]) {
#ifdef ENABLE_RUN_AS_NODE
if (IsEnvSet(kRunAsNode)) {
base::i18n::InitializeICU();
base::AtExitManager atexit_manager;
return atom::NodeMain(argc, const_cast<char**>(argv));
return atom::NodeMain(argc, argv);
}
#endif
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[]) {
#ifdef ENABLE_RUN_AS_NODE
if (IsEnvSet(kRunAsNode)) {
return AtomInitializeICUandStartNode(argc, const_cast<char**>(argv));
return AtomInitializeICUandStartNode(argc, argv);
}
#endif
return AtomMain(argc, argv);
}

View File

@@ -21,9 +21,18 @@
#include "base/logging.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_features.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
#define IPC_MESSAGE_MACROS_LOG_ENABLED
#include "content/public/common/content_ipc_logging.h"
#define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
content::RegisterIPCLogger(msg_id, logger)
#include "atom/common/common_message_generator.h"
#endif
namespace atom {
namespace {
@@ -86,9 +95,10 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
logging::SetLogItems(true, false, true, false);
// Enable convient stack printing.
bool enable_stack_dumping = env->HasVar("ELECTRON_ENABLE_STACK_DUMPING");
#if defined(DEBUG) && defined(OS_LINUX)
enable_stack_dumping = true;
bool enable_stack_dumping = true;
#else
bool enable_stack_dumping = env->HasVar("ELECTRON_ENABLE_STACK_DUMPING");
#endif
if (enable_stack_dumping)
base::debug::EnableInProcessStackDumping();
@@ -126,13 +136,15 @@ void AtomMainDelegate::PreSandboxStartup() {
if (!IsBrowserProcess(command_line))
return;
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);
if (!command_line->HasSwitch(switches::kEnableMixedSandbox)) {
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.
@@ -152,7 +164,9 @@ content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
content::ContentRendererClient*
AtomMainDelegate::CreateContentRendererClient() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSandbox)) {
switches::kEnableSandbox) ||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kNoSandbox)) {
renderer_client_.reset(new AtomSandboxedRendererClient);
} else {
renderer_client_.reset(new AtomRendererClient);

View File

@@ -44,7 +44,6 @@ class AtomMainDelegate : public brightray::MainDelegate {
void SetUpBundleOverrides();
#endif
brightray::ContentClient content_client_;
std::unique_ptr<content::ContentBrowserClient> browser_client_;
std::unique_ptr<content::ContentRendererClient> renderer_client_;
std::unique_ptr<content::ContentUtilityClient> utility_client_;

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

@@ -2,15 +2,19 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifdef ENABLE_RUN_AS_NODE
#include "atom/app/node_main.h"
#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/task_scheduler/task_scheduler.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
@@ -39,6 +43,11 @@ int NodeMain(int argc, char *argv[]) {
gin::V8Initializer::LoadV8Snapshot();
gin::V8Initializer::LoadV8Natives();
// V8 requires a task scheduler apparently
base::TaskScheduler::CreateAndStartWithDefaultParams("Electron");
// Initialize gin::IsolateHolder.
JavascriptEnvironment gin_env;
int exec_argc;
@@ -50,6 +59,10 @@ int NodeMain(int argc, char *argv[]) {
&isolate_data, gin_env.context(), argc, argv,
exec_argc, exec_argv);
// Enable support for v8 inspector.
NodeDebugger node_debugger(env);
node_debugger.Start(gin_env.platform());
mate::Dictionary process(gin_env.isolate(), env->process_object());
#if defined(OS_WIN)
process.SetMethod("log", &AtomBindings::Log);
@@ -83,9 +96,18 @@ int NodeMain(int argc, char *argv[]) {
node::FreeEnvironment(env);
}
// According to "src/gin/shell/gin_main.cc":
//
// gin::IsolateHolder waits for tasks running in TaskScheduler in its
// destructor and thus must be destroyed before TaskScheduler starts skipping
// CONTINUE_ON_SHUTDOWN tasks.
base::TaskScheduler::GetInstance()->Shutdown();
v8::V8::Dispose();
return exit_code;
}
} // namespace atom
#endif // ENABLE_RUN_AS_NODE

View File

@@ -5,10 +5,14 @@
#ifndef ATOM_APP_NODE_MAIN_H_
#define ATOM_APP_NODE_MAIN_H_
#ifdef ENABLE_RUN_AS_NODE
namespace atom {
int NodeMain(int argc, char *argv[]);
} // namespace atom
#endif // ENABLE_RUN_AS_NODE
#endif // ATOM_APP_NODE_MAIN_H_

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>${ATOM_BUNDLE_ID}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSBackgroundOnly</key>
<true/>
</dict>
</plist>

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include <utility>
#include "atom/app/uv_task_runner.h"
#include "base/stl_util.h"
@@ -19,25 +21,25 @@ UvTaskRunner::~UvTaskRunner() {
}
bool UvTaskRunner::PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::OnceClosure task,
base::TimeDelta delay) {
auto* timer = new uv_timer_t;
timer->data = this;
uv_timer_init(loop_, timer);
uv_timer_start(timer, UvTaskRunner::OnTimeout, delay.InMilliseconds(), 0);
tasks_[timer] = task;
tasks_[timer] = std::move(task);
return true;
}
bool UvTaskRunner::RunsTasksOnCurrentThread() const {
bool UvTaskRunner::RunsTasksInCurrentSequence() const {
return true;
}
bool UvTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::OnceClosure task,
base::TimeDelta delay) {
return PostDelayedTask(from_here, task, delay);
return PostDelayedTask(from_here, std::move(task), delay);
}
// static
@@ -46,7 +48,7 @@ void UvTaskRunner::OnTimeout(uv_timer_t* timer) {
if (!ContainsKey(self->tasks_, timer))
return;
self->tasks_[timer].Run();
std::move(self->tasks_[timer]).Run();
self->tasks_.erase(timer);
uv_timer_stop(timer);
uv_close(reinterpret_cast<uv_handle_t*>(timer), UvTaskRunner::OnClose);

View File

@@ -21,12 +21,12 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
// base::SingleThreadTaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::OnceClosure task,
base::TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
bool RunsTasksInCurrentSequence() const override;
bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::OnceClosure task,
base::TimeDelta delay) override;
private:
@@ -35,7 +35,7 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
uv_loop_t* loop_;
std::map<uv_timer_t*, base::Closure> tasks_;
std::map<uv_timer_t*, base::OnceClosure> tasks_;
DISALLOW_COPY_AND_ASSIGN(UvTaskRunner);
};

View File

@@ -29,18 +29,23 @@
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/sys_info.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/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/child_process_data.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 "media/audio/audio_manager.h"
#include "native_mate/object_template_builder.h"
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -50,6 +55,10 @@
#include "base/strings/utf_string_conversions.h"
#endif
#if defined(OS_MACOSX)
#include "atom/browser/ui/cocoa/atom_bundle_mover.h"
#endif
using atom::Browser;
namespace mate {
@@ -367,6 +376,8 @@ int GetPathConstant(const std::string& name) {
return brightray::DIR_CACHE;
else if (name == "userCache")
return brightray::DIR_USER_CACHE;
else if (name == "logs")
return brightray::DIR_APP_LOGS;
else if (name == "home")
return base::DIR_HOME;
else if (name == "temp")
@@ -410,19 +421,26 @@ bool NotificationCallbackWrapper(
return !Browser::Get()->is_shutting_down();
}
void GotPrivateKey(std::shared_ptr<content::ClientCertificateDelegate> delegate,
scoped_refptr<net::X509Certificate> cert,
scoped_refptr<net::SSLPrivateKey> private_key) {
delegate->ContinueWithCertificate(cert, private_key);
}
void OnClientCertificateSelected(
v8::Isolate* isolate,
std::shared_ptr<content::ClientCertificateDelegate> delegate,
std::shared_ptr<net::ClientCertIdentityList> identities,
mate::Arguments* args) {
if (args->Length() == 2) {
delegate->ContinueWithCertificate(nullptr);
delegate->ContinueWithCertificate(nullptr, nullptr);
return;
}
v8::Local<v8::Value> val;
args->GetNext(&val);
if (val->IsNull()) {
delegate->ContinueWithCertificate(nullptr);
delegate->ContinueWithCertificate(nullptr, nullptr);
return;
}
@@ -438,8 +456,17 @@ void OnClientCertificateSelected(
auto certs = net::X509Certificate::CreateCertificateListFromBytes(
data.c_str(), data.length(), net::X509Certificate::FORMAT_AUTO);
if (!certs.empty())
delegate->ContinueWithCertificate(certs[0].get());
if (!certs.empty()) {
scoped_refptr<net::X509Certificate> cert(certs[0].get());
for (size_t i = 0; i < identities->size(); ++i) {
if (cert->Equals((*identities)[i]->certificate())) {
net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
std::move((*identities)[i]),
base::Bind(&GotPrivateKey, delegate, std::move(cert)));
break;
}
}
}
}
void PassLoginInformation(scoped_refptr<LoginHandler> login_handler,
@@ -505,6 +532,13 @@ App::App(v8::Isolate* isolate) {
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->set_delegate(this);
Browser::Get()->AddObserver(this);
content::GpuDataManager::GetInstance()->AddObserver(this);
base::ProcessId pid = base::GetCurrentProcId();
std::unique_ptr<atom::ProcessMetric> process_metric(
new atom::ProcessMetric(
content::PROCESS_TYPE_BROWSER,
pid,
base::ProcessMetrics::CreateCurrentProcessMetrics()));
app_metrics_[pid] = std::move(process_metric);
Init(isolate);
}
@@ -513,6 +547,7 @@ App::~App() {
nullptr);
Browser::Get()->RemoveObserver(this);
content::GpuDataManager::GetInstance()->RemoveObserver(this);
content::BrowserChildProcessObserver::Remove(this);
}
void App::OnBeforeQuit(bool* prevent_default) {
@@ -562,57 +597,103 @@ void App::OnFinishLaunching(const base::DictionaryValue& launch_info) {
Emit("ready", launch_info);
}
void App::OnPreMainMessageLoopRun() {
content::BrowserChildProcessObserver::Add(this);
if (process_singleton_) {
process_singleton_->OnBrowserReady();
}
}
void App::OnAccessibilitySupportChanged() {
Emit("accessibility-support-changed", IsAccessibilitySupportEnabled());
}
#if defined(OS_MACOSX)
void App::OnWillContinueUserActivity(
bool* prevent_default,
const std::string& type) {
*prevent_default = Emit("will-continue-activity", type);
}
void App::OnDidFailToContinueUserActivity(
const std::string& type,
const std::string& error) {
Emit("continue-activity-error", type, error);
}
void App::OnContinueUserActivity(
bool* prevent_default,
const std::string& type,
const base::DictionaryValue& user_info) {
*prevent_default = Emit("continue-activity", type, user_info);
}
void App::OnUserActivityWasContinued(
const std::string& type,
const base::DictionaryValue& user_info) {
Emit("activity-was-continued", type, user_info);
}
void App::OnUpdateUserActivityState(
bool* prevent_default,
const std::string& type,
const base::DictionaryValue& user_info) {
*prevent_default = Emit("update-activity-state", type, user_info);
}
void App::OnNewWindowForTab() {
Emit("new-window-for-tab");
}
#endif
void App::OnLogin(LoginHandler* login_handler,
const base::DictionaryValue& request_details) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
bool prevent_default = Emit(
"login",
WebContents::CreateFrom(isolate(), login_handler->GetWebContents()),
request_details,
login_handler->auth_info(),
base::Bind(&PassLoginInformation, make_scoped_refptr(login_handler)));
bool prevent_default = false;
content::WebContents* web_contents = login_handler->GetWebContents();
if (web_contents) {
prevent_default =
Emit("login",
WebContents::CreateFrom(isolate(), web_contents),
request_details,
login_handler->auth_info(),
base::Bind(&PassLoginInformation,
make_scoped_refptr(login_handler)));
}
// Default behavior is to always cancel the auth.
if (!prevent_default)
login_handler->CancelAuth();
}
void App::OnCreateWindow(
bool App::CanCreateWindow(
content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
content::mojom::WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
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) {
const blink::mojom::WindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBody>& body,
bool user_gesture,
bool opener_suppressed,
bool* no_javascript_access) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
content::RenderFrameHost* rfh =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(rfh);
content::WebContents::FromRenderFrameHost(opener);
if (web_contents) {
auto api_web_contents = WebContents::CreateFrom(isolate(), web_contents);
api_web_contents->OnCreateWindow(target_url,
frame_name,
disposition,
features,
body);
api_web_contents->OnCreateWindow(target_url, frame_name, disposition,
additional_features, body);
}
return false;
}
void App::AllowCertificateError(
@@ -643,22 +724,35 @@ void App::AllowCertificateError(
void App::SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList identities,
std::unique_ptr<content::ClientCertificateDelegate> delegate) {
std::shared_ptr<content::ClientCertificateDelegate>
shared_delegate(delegate.release());
// Convert the ClientCertIdentityList to a CertificateList
// to avoid changes in the API.
auto client_certs = net::CertificateList();
for (const std::unique_ptr<net::ClientCertIdentity>& identity : identities)
client_certs.push_back(identity->certificate());
auto shared_identities =
std::make_shared<net::ClientCertIdentityList>(std::move(identities));
bool prevent_default =
Emit("select-client-certificate",
WebContents::CreateFrom(isolate(), web_contents),
cert_request_info->host_and_port.ToString(),
cert_request_info->client_certs,
base::Bind(&OnClientCertificateSelected,
isolate(),
shared_delegate));
cert_request_info->host_and_port.ToString(), std::move(client_certs),
base::Bind(&OnClientCertificateSelected, isolate(), shared_delegate,
shared_identities));
// Default to first certificate from the platform store.
if (!prevent_default)
shared_delegate->ContinueWithCertificate(
cert_request_info->client_certs[0].get());
if (!prevent_default) {
scoped_refptr<net::X509Certificate> cert =
(*shared_identities)[0]->certificate();
net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
std::move((*shared_identities)[0]),
base::Bind(&GotPrivateKey, shared_delegate, std::move(cert)));
}
}
void App::OnGpuProcessCrashed(base::TerminationStatus status) {
@@ -666,6 +760,54 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) {
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
}
void App::BrowserChildProcessLaunchedAndConnected(
const content::ChildProcessData& data) {
ChildProcessLaunched(data.process_type, data.handle);
}
void App::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
ChildProcessDisconnected(base::GetProcId(data.handle));
}
void App::BrowserChildProcessCrashed(const content::ChildProcessData& data,
int exit_code) {
ChildProcessDisconnected(base::GetProcId(data.handle));
}
void App::BrowserChildProcessKilled(const content::ChildProcessData& data,
int exit_code) {
ChildProcessDisconnected(base::GetProcId(data.handle));
}
void App::RenderProcessReady(content::RenderProcessHost* host) {
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER, host->GetHandle());
}
void App::RenderProcessDisconnected(base::ProcessId host_pid) {
ChildProcessDisconnected(host_pid);
}
void App::ChildProcessLaunched(int process_type, base::ProcessHandle handle) {
auto pid = base::GetProcId(handle);
#if defined(OS_MACOSX)
std::unique_ptr<base::ProcessMetrics> metrics(
base::ProcessMetrics::CreateProcessMetrics(
handle, content::BrowserChildProcessHost::GetPortProvider()));
#else
std::unique_ptr<base::ProcessMetrics> metrics(
base::ProcessMetrics::CreateProcessMetrics(handle));
#endif
std::unique_ptr<atom::ProcessMetric> process_metric(
new atom::ProcessMetric(process_type, pid, std::move(metrics)));
app_metrics_[pid] = std::move(process_metric);
}
void App::ChildProcessDisconnected(base::ProcessId pid) {
app_metrics_.erase(pid);
}
base::FilePath App::GetAppPath() const {
return app_path_;
}
@@ -709,7 +851,7 @@ void App::SetDesktopName(const std::string& desktop_name) {
}
std::string App::GetLocale() {
return l10n_util::GetApplicationLocale("");
return g_browser_process->GetApplicationLocale();
}
bool App::MakeSingleInstance(
@@ -725,9 +867,10 @@ bool App::MakeSingleInstance(
switch (process_singleton_->NotifyOtherProcessOrCreate()) {
case ProcessSingleton::NotifyResult::LOCK_ERROR:
case ProcessSingleton::NotifyResult::PROFILE_IN_USE:
case ProcessSingleton::NotifyResult::PROCESS_NOTIFIED:
case ProcessSingleton::NotifyResult::PROCESS_NOTIFIED: {
process_singleton_.reset();
return true;
}
case ProcessSingleton::NotifyResult::PROCESS_NONE:
default: // Shouldn't be needed, but VS warns if it is not there.
return false;
@@ -754,11 +897,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);
}
@@ -787,11 +926,32 @@ void App::DisableHardwareAcceleration(mate::Arguments* args) {
content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
}
void App::DisableDomainBlockingFor3DAPIs(mate::Arguments* args) {
if (Browser::Get()->is_ready()) {
args->ThrowError(
"app.disableDomainBlockingFor3DAPIs() can only be called "
"before app is ready");
return;
}
content::GpuDataManagerImpl::GetInstance()
->DisableDomainBlockingFor3DAPIsForTesting();
}
bool App::IsAccessibilitySupportEnabled() {
auto ax_state = content::BrowserAccessibilityState::GetInstance();
return ax_state->IsAccessibleBrowser();
}
void App::SetAccessibilitySupportEnabled(bool enabled) {
auto ax_state = content::BrowserAccessibilityState::GetInstance();
if (enabled) {
ax_state->OnScreenReaderDetected();
} else {
ax_state->DisableAccessibility();
}
Browser::Get()->OnAccessibilitySupportChanged();
}
Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
Browser::LoginItemSettings options;
args->GetNext(&options);
@@ -923,47 +1083,97 @@ void App::GetFileIcon(const base::FilePath& path,
}
}
std::vector<mate::Dictionary> App::GetAppMemoryInfo(v8::Isolate* isolate) {
AppIdProcessIterator process_iterator;
auto process_entry = process_iterator.NextProcessEntry();
std::vector<mate::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
std::vector<mate::Dictionary> result;
int processor_count = base::SysInfo::NumberOfProcessors();
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
for (const auto& process_metric : app_metrics_) {
mate::Dictionary pid_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary memory_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary cpu_dict = mate::Dictionary::CreateEmpty(isolate);
memory_dict.Set("workingSetSize",
static_cast<double>(metrics->GetWorkingSetSize() >> 10));
static_cast<double>(
process_metric.second->metrics->GetWorkingSetSize() >> 10));
memory_dict.Set("peakWorkingSetSize",
static_cast<double>(metrics->GetPeakWorkingSetSize() >> 10));
static_cast<double>(
process_metric.second->metrics->GetPeakWorkingSetSize() >> 10));
size_t private_bytes, shared_bytes;
if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) {
if (process_metric.second->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);
cpu_dict.Set("percentCPUUsage",
process_metric.second->metrics->GetPlatformIndependentCPUUsage()
/ processor_count);
#if !defined(OS_WIN)
cpu_dict.Set("idleWakeupsPerSecond",
process_metric.second->metrics->GetIdleWakeupsPerSecond());
#else
// Chrome's underlying process_metrics.cc will throw a non-fatal warning
// that this method isn't implemented on Windows, so set it to 0 instead
// of calling it
cpu_dict.Set("idleWakeupsPerSecond", 0);
#endif
pid_dict.Set("cpu", cpu_dict);
pid_dict.Set("pid", process_metric.second->pid);
pid_dict.Set("type",
content::GetProcessTypeNameInEnglish(process_metric.second->type));
result.push_back(pid_dict);
process_entry = process_iterator.NextProcessEntry();
}
return result;
}
v8::Local<v8::Value> App::GetGPUFeatureStatus(v8::Isolate* isolate) {
auto status = content::GetFeatureStatus();
return mate::ConvertToV8(isolate,
status ? *status : base::DictionaryValue());
}
void App::EnableMixedSandbox(mate::Arguments* args) {
if (Browser::Get()->is_ready()) {
args->ThrowError("app.enableMixedSandbox() can only be called "
"before app is ready");
return;
}
auto command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(::switches::kNoSandbox)) {
#if defined(OS_WIN)
const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
#else
const base::CommandLine::CharType* noSandboxArg = "--no-sandbox";
#endif
// Remove the --no-sandbox switch
base::CommandLine::StringVector modified_command_line;
for (auto& arg : command_line->argv()) {
if (arg.compare(noSandboxArg) != 0) {
modified_command_line.push_back(arg);
}
}
command_line->InitFromArgv(modified_command_line);
}
command_line->AppendSwitch(switches::kEnableMixedSandbox);
}
#if defined(OS_MACOSX)
bool App::MoveToApplicationsFolder(mate::Arguments* args) {
return ui::cocoa::AtomBundleMover::Move(args);
}
bool App::IsInApplicationsFolder() {
return ui::cocoa::AtomBundleMover::IsCurrentAppInApplicationsFolder();
}
#endif
// static
mate::Handle<App> App::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new App(isolate));
@@ -1007,6 +1217,10 @@ void App::BuildPrototype(
base::Bind(&Browser::SetUserActivity, browser))
.SetMethod("getCurrentActivityType",
base::Bind(&Browser::GetCurrentActivityType, browser))
.SetMethod("invalidateCurrentActivity",
base::Bind(&Browser::InvalidateCurrentActivity, browser))
.SetMethod("updateCurrentActivity",
base::Bind(&Browser::UpdateCurrentActivity, browser))
.SetMethod("setAboutPanelOptions",
base::Bind(&Browser::SetAboutPanelOptions, browser))
#endif
@@ -1033,10 +1247,25 @@ void App::BuildPrototype(
.SetMethod("relaunch", &App::Relaunch)
.SetMethod("isAccessibilitySupportEnabled",
&App::IsAccessibilitySupportEnabled)
.SetMethod("setAccessibilitySupportEnabled",
&App::SetAccessibilitySupportEnabled)
.SetMethod("disableHardwareAcceleration",
&App::DisableHardwareAcceleration)
.SetMethod("disableDomainBlockingFor3DAPIs",
&App::DisableDomainBlockingFor3DAPIs)
.SetMethod("getFileIcon", &App::GetFileIcon)
.SetMethod("getAppMemoryInfo", &App::GetAppMemoryInfo);
.SetMethod("getAppMetrics", &App::GetAppMetrics)
.SetMethod("getGPUFeatureStatus", &App::GetGPUFeatureStatus)
// TODO(juturu): Remove in 2.0, deprecate before then with warnings
#if defined(OS_MACOSX)
.SetMethod("moveToApplicationsFolder", &App::MoveToApplicationsFolder)
.SetMethod("isInApplicationsFolder", &App::IsInApplicationsFolder)
#endif
#if defined(MAS_BUILD)
.SetMethod("startAccessingSecurityScopedResource",
&App::StartAccessingSecurityScopedResource)
#endif
.SetMethod("enableMixedSandbox", &App::EnableMixedSandbox);
}
} // namespace api

View File

@@ -5,7 +5,9 @@
#ifndef ATOM_BROWSER_API_ATOM_API_APP_H_
#define ATOM_BROWSER_API_ATOM_API_APP_H_
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "atom/browser/api/event_emitter.h"
@@ -17,10 +19,13 @@
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/browser/process_singleton.h"
#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "content/public/browser/render_process_host.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
#include "net/ssl/client_cert_identity.h"
#if defined(USE_NSS_CERTS)
#include "chrome/browser/certificate_manager_model.h"
@@ -40,12 +45,27 @@ namespace atom {
enum class JumpListResult : int;
#endif
struct ProcessMetric {
int type;
base::ProcessId pid;
std::unique_ptr<base::ProcessMetrics> metrics;
ProcessMetric(int type,
base::ProcessId pid,
std::unique_ptr<base::ProcessMetrics> metrics) {
this->type = type;
this->pid = pid;
this->metrics = std::move(metrics);
}
};
namespace api {
class App : public AtomBrowserClient::Delegate,
public mate::EventEmitter<App>,
public BrowserObserver,
public content::GpuDataManagerObserver {
public content::GpuDataManagerObserver,
public content::BrowserChildProcessObserver {
public:
using FileIconCallback = base::Callback<void(v8::Local<v8::Value>,
const gfx::Image&)>;
@@ -55,16 +75,6 @@ class App : public AtomBrowserClient::Delegate,
static void BuildPrototype(v8::Isolate* isolate,
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,
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(
std::unique_ptr<base::DictionaryValue> options,
@@ -73,6 +83,9 @@ class App : public AtomBrowserClient::Delegate,
#endif
base::FilePath GetAppPath() const;
void RenderProcessReady(content::RenderProcessHost* host);
void RenderProcessDisconnected(base::ProcessId host_pid);
void PreMainMessageLoopRun();
protected:
explicit App(v8::Isolate* isolate);
@@ -91,11 +104,26 @@ class App : public AtomBrowserClient::Delegate,
void OnLogin(LoginHandler* login_handler,
const base::DictionaryValue& request_details) override;
void OnAccessibilitySupportChanged() override;
void OnPreMainMessageLoopRun() override;
#if defined(OS_MACOSX)
void OnWillContinueUserActivity(
bool* prevent_default,
const std::string& type) override;
void OnDidFailToContinueUserActivity(
const std::string& type,
const std::string& error) override;
void OnContinueUserActivity(
bool* prevent_default,
const std::string& type,
const base::DictionaryValue& user_info) override;
void OnUserActivityWasContinued(
const std::string& type,
const base::DictionaryValue& user_info) override;
void OnUpdateUserActivityState(
bool* prevent_default,
const std::string& type,
const base::DictionaryValue& user_info) override;
void OnNewWindowForTab() override;
#endif
// content::ContentBrowserClient:
@@ -113,13 +141,41 @@ class App : public AtomBrowserClient::Delegate,
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
bool CanCreateWindow(content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
content::mojom::WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBody>& body,
bool user_gesture,
bool opener_suppressed,
bool* no_javascript_access) override;
// content::GpuDataManagerObserver:
void OnGpuProcessCrashed(base::TerminationStatus status) override;
// content::BrowserChildProcessObserver:
void BrowserChildProcessLaunchedAndConnected(
const content::ChildProcessData& data) override;
void BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) override;
void BrowserChildProcessCrashed(
const content::ChildProcessData& data, int exit_code) override;
void BrowserChildProcessKilled(
const content::ChildProcessData& data, int exit_code) override;
private:
void SetAppPath(const base::FilePath& app_path);
void ChildProcessLaunched(int process_type, base::ProcessHandle handle);
void ChildProcessDisconnected(base::ProcessId pid);
// Get/Set the pre-defined path in PathService.
base::FilePath GetPath(mate::Arguments* args, const std::string& name);
@@ -134,7 +190,9 @@ class App : public AtomBrowserClient::Delegate,
void ReleaseSingleInstance();
bool Relaunch(mate::Arguments* args);
void DisableHardwareAcceleration(mate::Arguments* args);
void DisableDomainBlockingFor3DAPIs(mate::Arguments* args);
bool IsAccessibilitySupportEnabled();
void SetAccessibilitySupportEnabled(bool enabled);
Browser::LoginItemSettings GetLoginItemSettings(mate::Arguments* args);
#if defined(USE_NSS_CERTS)
void ImportCertificate(const base::DictionaryValue& options,
@@ -143,7 +201,18 @@ class App : public AtomBrowserClient::Delegate,
void GetFileIcon(const base::FilePath& path,
mate::Arguments* args);
std::vector<mate::Dictionary> GetAppMemoryInfo(v8::Isolate* isolate);
std::vector<mate::Dictionary> GetAppMetrics(v8::Isolate* isolate);
v8::Local<v8::Value> GetGPUFeatureStatus(v8::Isolate* isolate);
void EnableMixedSandbox(mate::Arguments* args);
#if defined(OS_MACOSX)
bool MoveToApplicationsFolder(mate::Arguments* args);
bool IsInApplicationsFolder();
#endif
#if defined(MAS_BUILD)
base::Callback<void()> StartAccessingSecurityScopedResource(
mate::Arguments* args);
#endif
#if defined(OS_WIN)
// Get the current Jump List settings.
@@ -164,6 +233,11 @@ class App : public AtomBrowserClient::Delegate,
base::FilePath app_path_;
using ProcessMetricMap =
std::unordered_map<base::ProcessId,
std::unique_ptr<atom::ProcessMetric>>;
ProcessMetricMap app_metrics_;
DISALLOW_COPY_AND_ASSIGN(App);
};

View File

@@ -0,0 +1,59 @@
// Copyright (c) 2013 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_app.h"
#import <Cocoa/Cocoa.h>
#include "base/strings/sys_string_conversions.h"
namespace atom {
namespace api {
// Callback passed to js which will stop accessing the given bookmark.
void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
[bookmarkUrl stopAccessingSecurityScopedResource];
[bookmarkUrl release];
}
// Get base64 encoded NSData, create a bookmark for it and start accessing it.
base::Callback<void ()> App::StartAccessingSecurityScopedResource(mate::Arguments* args) {
std::string data;
args->GetNext(&data);
NSString *base64str = base::SysUTF8ToNSString(data);
NSData *bookmarkData = [[NSData alloc] initWithBase64EncodedString: base64str options: 0];
// Create bookmarkUrl from NSData.
BOOL isStale = false;
NSError *error = nil;
NSURL *bookmarkUrl = [NSURL URLByResolvingBookmarkData: bookmarkData
options: NSURLBookmarkResolutionWithSecurityScope
relativeToURL: nil
bookmarkDataIsStale: &isStale
error: &error];
if (error != nil) {
NSString *err = [NSString stringWithFormat: @"NSError: %@ %@", error, [error userInfo]];
args->ThrowError(base::SysNSStringToUTF8(err));
}
if (isStale) {
args->ThrowError("bookmarkDataIsStale - try recreating the bookmark");
}
if (error == nil && isStale == false) {
[bookmarkUrl startAccessingSecurityScopedResource];
}
// Stop the NSURL from being GC'd.
[bookmarkUrl retain];
// Return a js callback which will close the bookmark.
return base::Bind(&OnStopAccessingSecurityScopedResource, bookmarkUrl);
}
} // namespace atom
} // namespace api

View File

@@ -57,6 +57,23 @@ void AutoUpdater::OnError(const std::string& message) {
message);
}
void AutoUpdater::OnError(const std::string& message,
const int code, const std::string& domain) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
auto error = v8::Exception::Error(mate::StringToV8(isolate(), message));
auto errorObject = error->ToObject(
isolate()->GetCurrentContext()).ToLocalChecked();
// add two new params for better error handling
errorObject->Set(mate::StringToV8(isolate(), "code"),
v8::Integer::New(isolate(), code));
errorObject->Set(mate::StringToV8(isolate(), "domain"),
mate::StringToV8(isolate(), domain));
mate::EmitEvent(isolate(), GetWrapper(), "error", errorObject, message);
}
void AutoUpdater::OnCheckingForUpdate() {
Emit("checking-for-update");
}
@@ -82,10 +99,8 @@ void AutoUpdater::OnWindowAllClosed() {
QuitAndInstall();
}
void AutoUpdater::SetFeedURL(const std::string& url, mate::Arguments* args) {
auto_updater::AutoUpdater::HeaderMap headers;
args->GetNext(&headers);
auto_updater::AutoUpdater::SetFeedURL(url, headers);
void AutoUpdater::SetFeedURL(mate::Arguments* args) {
auto_updater::AutoUpdater::SetFeedURL(args);
}
void AutoUpdater::QuitAndInstall() {

View File

@@ -32,6 +32,8 @@ class AutoUpdater : public mate::EventEmitter<AutoUpdater>,
// Delegate implementations.
void OnError(const std::string& error) override;
void OnError(const std::string& message, const int code,
const std::string& domain);
void OnCheckingForUpdate() override;
void OnUpdateAvailable() override;
void OnUpdateNotAvailable() override;
@@ -45,7 +47,7 @@ class AutoUpdater : public mate::EventEmitter<AutoUpdater>,
private:
std::string GetFeedURL();
void SetFeedURL(const std::string& url, mate::Arguments* args);
void SetFeedURL(mate::Arguments* args);
void QuitAndInstall();
DISALLOW_COPY_AND_ASSIGN(AutoUpdater);

View File

@@ -68,8 +68,8 @@ void BrowserView::Init(v8::Isolate* isolate,
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents.get();
view_.reset(NativeBrowserView::Create(
api_web_contents_->managed_web_contents()->GetView()));
view_.reset(
NativeBrowserView::Create(api_web_contents_->managed_web_contents()));
InitWith(isolate, wrapper);
}
@@ -114,7 +114,7 @@ void BrowserView::SetBackgroundColor(const std::string& color_name) {
view_->SetBackgroundColor(ParseHexColor(color_name));
}
v8::Local<v8::Value> BrowserView::WebContents() {
v8::Local<v8::Value> BrowserView::GetWebContents() {
if (web_contents_.IsEmpty()) {
return v8::Null(isolate());
}
@@ -131,7 +131,7 @@ void BrowserView::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setAutoResize", &BrowserView::SetAutoResize)
.SetMethod("setBounds", &BrowserView::SetBounds)
.SetMethod("setBackgroundColor", &BrowserView::SetBackgroundColor)
.SetProperty("webContents", &BrowserView::WebContents)
.SetProperty("webContents", &BrowserView::GetWebContents)
.SetProperty("id", &BrowserView::ID);
}
@@ -152,7 +152,10 @@ void Initialize(v8::Local<v8::Object> exports,
mate::Dictionary browser_view(
isolate, BrowserView::GetConstructor(isolate)->GetFunction());
browser_view.SetMethod("fromId",
&mate::TrackableObject<BrowserView>::FromWeakMapID);
browser_view.SetMethod("getAllViews",
&mate::TrackableObject<BrowserView>::GetAll);
mate::Dictionary dict(isolate, exports);
dict.Set("BrowserView", browser_view);
}

View File

@@ -36,6 +36,7 @@ class BrowserView : public mate::TrackableObject<BrowserView> {
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
WebContents* web_contents() const { return api_web_contents_; }
NativeBrowserView* view() const { return view_.get(); }
int32_t ID() const;
@@ -55,7 +56,7 @@ class BrowserView : public mate::TrackableObject<BrowserView> {
void SetBounds(const gfx::Rect& bounds);
void SetBackgroundColor(const std::string& color_name);
v8::Local<v8::Value> WebContents();
v8::Local<v8::Value> GetWebContents();
v8::Global<v8::Value> web_contents_;
class WebContents* api_web_contents_;

View File

@@ -9,7 +9,9 @@
#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 "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/memory/ptr_util.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/web_contents.h"
#include "native_mate/dictionary.h"
@@ -47,20 +49,11 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
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()) {
std::unique_ptr<base::Value> parsed_message = base::JSONReader::Read(message);
if (!parsed_message || !parsed_message->is_dict())
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;
@@ -143,7 +136,7 @@ void Debugger::SendCommand(mate::Arguments* args) {
request.SetInteger("id", request_id);
request.SetString("method", method);
if (!command_params.empty())
request.Set("params", command_params.DeepCopy());
request.Set("params", base::WrapUnique(command_params.DeepCopy()));
std::string json_args;
base::JSONWriter::Write(request, &json_args);

View File

@@ -10,6 +10,7 @@ using base::PlatformThreadRef;
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/media/desktop_media_list.h"
#include "content/public/browser/desktop_capture.h"
#include "native_mate/dictionary.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
@@ -50,17 +51,7 @@ void DesktopCapturer::StartHandling(bool capture_window,
bool capture_screen,
const gfx::Size& thumbnail_size) {
webrtc::DesktopCaptureOptions options =
webrtc::DesktopCaptureOptions::CreateDefault();
#if defined(OS_WIN)
// On windows, desktop effects (e.g. Aero) will be disabled when the Desktop
// capture API is active by default.
// We keep the desktop effects in most times. Howerver, the screen still
// fickers when the API is capturing the window due to limitation of current
// implemetation. This is a known and wontFix issue in webrtc (see:
// http://code.google.com/p/webrtc/issues/detail?id=3373)
options.set_disable_effects(false);
#endif
content::CreateDesktopCaptureOptions();
std::unique_ptr<webrtc::DesktopCapturer> screen_capturer(
capture_screen ? webrtc::DesktopCapturer::CreateScreenCapturer(options)

View File

@@ -54,6 +54,9 @@ struct Converter<file_dialog::DialogSettings> {
dict.Get("filters", &(out->filters));
dict.Get("properties", &(out->properties));
dict.Get("showsTagField", &(out->shows_tag_field));
#if defined(MAS_BUILD)
dict.Get("securityScopedBookmarks", &(out->security_scoped_bookmarks));
#endif
return true;
}
};

View File

@@ -0,0 +1,115 @@
// Copyright (c) 2017 Amaplex Software, 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_in_app_purchase.h"
#include <string>
#include <utility>
#include <vector>
#include "atom/common/native_mate_converters/callback.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace mate {
template <>
struct Converter<in_app_purchase::Payment> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const in_app_purchase::Payment& payment) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("productIdentifier", payment.productIdentifier);
dict.Set("quantity", payment.quantity);
return dict.GetHandle();
}
};
template <>
struct Converter<in_app_purchase::Transaction> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const in_app_purchase::Transaction& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("transactionIdentifier", val.transactionIdentifier);
dict.Set("transactionDate", val.transactionDate);
dict.Set("originalTransactionIdentifier",
val.originalTransactionIdentifier);
dict.Set("transactionState", val.transactionState);
dict.Set("errorCode", val.errorCode);
dict.Set("errorMessage", val.errorMessage);
dict.Set("payment", val.payment);
return dict.GetHandle();
}
};
} // namespace mate
namespace atom {
namespace api {
#if defined(OS_MACOSX)
// static
mate::Handle<InAppPurchase> InAppPurchase::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new InAppPurchase(isolate));
}
// static
void InAppPurchase::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "InAppPurchase"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("canMakePayments", &in_app_purchase::CanMakePayments)
.SetMethod("getReceiptURL", &in_app_purchase::GetReceiptURL)
.SetMethod("purchaseProduct", &InAppPurchase::PurchaseProduct);
}
InAppPurchase::InAppPurchase(v8::Isolate* isolate) {
Init(isolate);
}
InAppPurchase::~InAppPurchase() {
}
void InAppPurchase::PurchaseProduct(const std::string& product_id,
mate::Arguments* args) {
int quantity = 1;
in_app_purchase::InAppPurchaseCallback callback;
args->GetNext(&quantity);
args->GetNext(&callback);
in_app_purchase::PurchaseProduct(product_id, quantity, callback);
}
void InAppPurchase::OnTransactionsUpdated(
const std::vector<in_app_purchase::Transaction>& transactions) {
Emit("transactions-updated", transactions);
}
#endif
} // namespace api
} // namespace atom
namespace {
using atom::api::InAppPurchase;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
#if defined(OS_MACOSX)
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("inAppPurchase", InAppPurchase::Create(isolate));
dict.Set("InAppPurchase",
InAppPurchase::GetConstructor(isolate)->GetFunction());
#endif
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_in_app_purchase, Initialize)

View File

@@ -0,0 +1,46 @@
// Copyright (c) 2017 Amaplex Software, 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_IN_APP_PURCHASE_H_
#define ATOM_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
#include <string>
#include <vector>
#include "atom/browser/api/event_emitter.h"
#include "atom/browser/mac/in_app_purchase.h"
#include "atom/browser/mac/in_app_purchase_observer.h"
#include "native_mate/handle.h"
namespace atom {
namespace api {
class InAppPurchase: public mate::EventEmitter<InAppPurchase>,
public in_app_purchase::TransactionObserver {
public:
static mate::Handle<InAppPurchase> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit InAppPurchase(v8::Isolate* isolate);
~InAppPurchase() override;
void PurchaseProduct(const std::string& product_id, mate::Arguments* args);
// TransactionObserver:
void OnTransactionsUpdated(
const std::vector<in_app_purchase::Transaction>& transactions) override;
private:
DISALLOW_COPY_AND_ASSIGN(InAppPurchase);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_

View File

@@ -23,9 +23,13 @@ Menu::Menu(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: model_(new AtomMenuModel(this)),
parent_(nullptr) {
InitWith(isolate, wrapper);
model_->AddObserver(this);
}
Menu::~Menu() {
if (model_) {
model_->RemoveObserver(this);
}
}
void Menu::AfterInit(v8::Isolate* isolate) {
@@ -43,15 +47,21 @@ void Menu::AfterInit(v8::Isolate* isolate) {
}
bool Menu::IsCommandIdChecked(int command_id) const {
return is_checked_.Run(command_id);
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
return is_checked_.Run(GetWrapper(), command_id);
}
bool Menu::IsCommandIdEnabled(int command_id) const {
return is_enabled_.Run(command_id);
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
return is_enabled_.Run(GetWrapper(), command_id);
}
bool Menu::IsCommandIdVisible(int command_id) const {
return is_visible_.Run(command_id);
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
return is_visible_.Run(GetWrapper(), command_id);
}
bool Menu::GetAcceleratorForCommandIdWithParams(
@@ -61,18 +71,23 @@ bool Menu::GetAcceleratorForCommandIdWithParams(
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::Value> val = get_accelerator_.Run(
command_id, use_default_accelerator);
GetWrapper(), command_id, use_default_accelerator);
return mate::ConvertFromV8(isolate(), val, accelerator);
}
void Menu::ExecuteCommand(int command_id, int flags) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
execute_command_.Run(
GetWrapper(),
mate::internal::CreateEventFromFlags(isolate(), flags),
command_id);
}
void Menu::MenuWillShow(ui::SimpleMenuModel* source) {
menu_will_show_.Run();
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
menu_will_show_.Run(GetWrapper());
}
void Menu::InsertItemAt(
@@ -153,6 +168,14 @@ bool Menu::IsVisibleAt(int index) const {
return model_->IsVisibleAt(index);
}
void Menu::OnMenuWillClose() {
Emit("menu-will-close");
}
void Menu::OnMenuWillShow() {
Emit("menu-will-show");
}
// static
void Menu::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {

View File

@@ -18,7 +18,8 @@ namespace atom {
namespace api {
class Menu : public mate::TrackableObject<Menu>,
public AtomMenuModel::Delegate {
public AtomMenuModel::Delegate,
public AtomMenuModel::Observer {
public:
static mate::WrappableBase* New(mate::Arguments* args);
@@ -53,13 +54,17 @@ 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, int y, int positioning_item, bool async) = 0;
virtual void PopupAt(Window* window, int x, int y, int positioning_item,
const base::Closure& callback) = 0;
virtual void ClosePopupAt(int32_t window_id) = 0;
std::unique_ptr<AtomMenuModel> model_;
Menu* parent_;
// Observable:
void OnMenuWillClose() override;
void OnMenuWillShow() override;
private:
void InsertItemAt(int index, int command_id, const base::string16& label);
void InsertSeparatorAt(int index);
@@ -88,12 +93,14 @@ class Menu : public mate::TrackableObject<Menu>,
bool IsVisibleAt(int index) const;
// Stored delegate methods.
base::Callback<bool(int)> is_checked_;
base::Callback<bool(int)> is_enabled_;
base::Callback<bool(int)> is_visible_;
base::Callback<v8::Local<v8::Value>(int, bool)> get_accelerator_;
base::Callback<void(v8::Local<v8::Value>, int)> execute_command_;
base::Callback<void()> menu_will_show_;
base::Callback<bool(v8::Local<v8::Value>, int)> is_checked_;
base::Callback<bool(v8::Local<v8::Value>, int)> is_enabled_;
base::Callback<bool(v8::Local<v8::Value>, int)> is_visible_;
base::Callback<v8::Local<v8::Value>(v8::Local<v8::Value>, int, bool)>
get_accelerator_;
base::Callback<void(v8::Local<v8::Value>, v8::Local<v8::Value>, int)>
execute_command_;
base::Callback<void(v8::Local<v8::Value>)> menu_will_show_;
DISALLOW_COPY_AND_ASSIGN(Menu);
};

View File

@@ -22,17 +22,20 @@ class MenuMac : public Menu {
protected:
MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void PopupAt(Window* window, int x, int y, int positioning_item,
const base::Closure& callback) override;
void PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
int32_t window_id, int x, int y, int positioning_item,
bool async);
int32_t window_id,
int x,
int y,
int positioning_item,
base::Closure callback);
void ClosePopupAt(int32_t window_id) override;
private:
friend class Menu;
static void SendActionToFirstResponder(const std::string& action);
void OnClosed(int32_t window_id, base::Closure callback);
scoped_nsobject<AtomMenuController> menu_controller_;

View File

@@ -18,6 +18,12 @@
using content::BrowserThread;
namespace {
static scoped_nsobject<NSMenu> applicationMenu_;
} // namespace
namespace atom {
namespace api {
@@ -27,24 +33,24 @@ MenuMac::MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
weak_factory_(this) {
}
void MenuMac::PopupAt(
Window* window, int x, int y, int positioning_item, bool async) {
void MenuMac::PopupAt(Window* window, int x, int y, int positioning_item,
const base::Closure& callback) {
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();
positioning_item, callback);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, popup);
}
void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
int32_t window_id, int x, int y, int positioning_item,
bool async) {
int32_t window_id,
int x,
int y,
int positioning_item,
base::Closure callback) {
if (!native_window)
return;
brightray::InspectableWebContents* web_contents =
@@ -52,8 +58,8 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
if (!web_contents)
return;
auto close_callback = base::Bind(&MenuMac::ClosePopupAt,
weak_factory_.GetWeakPtr(), window_id);
auto close_callback = base::Bind(
&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback);
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>(
[[AtomMenuController alloc] initWithModel:model()
useDefaultAccelerator:NO]);
@@ -92,33 +98,41 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
if (rightmostMenuPoint > screenRight)
position.x = position.x - [menu size].width;
[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());
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;
// 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();
}
// Don't emit unresponsive event when showing menu.
atom::UnresponsiveSuppressor suppressor;
[menu popUpMenuPositioningItem:item atLocation:position inView:view];
}
void MenuMac::ClosePopupAt(int32_t window_id) {
auto controller = popup_controllers_.find(window_id);
if (controller != popup_controllers_.end()) {
// Close the controller for the window.
[controller->second cancel];
} else if (window_id == -1) {
// Or just close all opened controllers.
for (auto it = popup_controllers_.begin();
it != popup_controllers_.end();) {
// The iterator is invalidated after the call.
[(it++)->second cancel];
}
}
}
void MenuMac::OnClosed(int32_t window_id, base::Closure callback) {
popup_controllers_.erase(window_id);
callback.Run();
}
// static
@@ -127,7 +141,18 @@ void Menu::SetApplicationMenu(Menu* base_menu) {
base::scoped_nsobject<AtomMenuController> menu_controller(
[[AtomMenuController alloc] initWithModel:menu->model_.get()
useDefaultAccelerator:YES]);
[NSApp setMainMenu:[menu_controller menu]];
NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];
[currentRunLoop cancelPerformSelector:@selector(setMainMenu:)
target:NSApp
argument:applicationMenu_];
applicationMenu_.reset([[menu_controller menu] retain]);
[[NSRunLoop currentRunLoop]
performSelector:@selector(setMainMenu:)
target:NSApp
argument:applicationMenu_
order:0
modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
// Ensure the menu_controller_ is destroyed after main menu is set.
menu_controller.swap(menu->menu_controller_);

View File

@@ -6,7 +6,8 @@
#include "atom/browser/native_window_views.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "content/public/browser/render_widget_host_view.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "ui/display/screen.h"
using views::MenuRunner;
@@ -20,30 +21,22 @@ MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
weak_factory_(this) {
}
void MenuViews::PopupAt(
Window* window, int x, int y, int positioning_item, bool async) {
NativeWindow* native_window = static_cast<NativeWindow*>(window->window());
void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item,
const base::Closure& callback) {
auto* native_window = static_cast<NativeWindowViews*>(window->window());
if (!native_window)
return;
content::WebContents* web_contents = native_window->web_contents();
if (!web_contents)
return;
content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView();
if (!view)
return;
// (-1, -1) means showing on mouse location.
gfx::Point location;
if (x == -1 || y == -1) {
location = display::Screen::GetScreen()->GetCursorScreenPoint();
} else {
gfx::Point origin = view->GetViewBounds().origin();
gfx::Point origin = native_window->GetContentBounds().origin();
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;
@@ -51,19 +44,34 @@ void MenuViews::PopupAt(
// Show the menu.
int32_t window_id = window->ID();
auto close_callback = base::Bind(
&MenuViews::ClosePopupAt, weak_factory_.GetWeakPtr(), window_id);
&MenuViews::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback);
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(),
menu_runners_[window_id]->RunMenuAt(
native_window->widget(),
NULL,
gfx::Rect(location, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT,
ui::MENU_SOURCE_MOUSE));
ui::MENU_SOURCE_MOUSE);
}
void MenuViews::ClosePopupAt(int32_t window_id) {
auto runner = menu_runners_.find(window_id);
if (runner != menu_runners_.end()) {
// Close the runner for the window.
runner->second->Cancel();
} else if (window_id == -1) {
// Or just close all opened runners.
for (auto it = menu_runners_.begin(); it != menu_runners_.end();) {
// The iterator is invalidated after the call.
(it++)->second->Cancel();
}
}
}
void MenuViews::OnClosed(int32_t window_id, base::Closure callback) {
menu_runners_.erase(window_id);
callback.Run();
}
// static

View File

@@ -21,11 +21,13 @@ class MenuViews : public Menu {
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void PopupAt(Window* window, int x, int y, int positioning_item,
const base::Closure& callback) override;
void ClosePopupAt(int32_t window_id) override;
private:
void OnClosed(int32_t window_id, base::Closure callback);
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;

View File

@@ -0,0 +1,273 @@
// 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_notification.h"
#include "atom/browser/api/atom_api_menu.h"
#include "atom/browser/browser.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/strings/utf_string_conversions.h"
#include "brightray/browser/browser_client.h"
#include "native_mate/constructor.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "url/gurl.h"
// Must be the last in the includes list.
// See https://github.com/electron/electron/issues/10363
#include "atom/common/node_includes.h"
namespace mate {
template<>
struct Converter<brightray::NotificationAction> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
brightray::NotificationAction* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
return false;
if (!dict.Get("type", &(out->type))) {
return false;
}
dict.Get("text", &(out->text));
return true;
}
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
brightray::NotificationAction val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.Set("text", val.text);
dict.Set("type", val.type);
return dict.GetHandle();
}
};
} // namespace mate
namespace atom {
namespace api {
Notification::Notification(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
mate::Arguments* args) {
InitWith(isolate, wrapper);
presenter_ = brightray::BrowserClient::Get()->GetNotificationPresenter();
mate::Dictionary opts;
if (args->GetNext(&opts)) {
opts.Get("title", &title_);
opts.Get("subtitle", &subtitle_);
opts.Get("body", &body_);
has_icon_ = opts.Get("icon", &icon_);
if (has_icon_) {
opts.Get("icon", &icon_path_);
}
opts.Get("silent", &silent_);
opts.Get("replyPlaceholder", &reply_placeholder_);
opts.Get("hasReply", &has_reply_);
opts.Get("actions", &actions_);
opts.Get("sound", &sound_);
opts.Get("closeButtonText", &close_button_text_);
}
}
Notification::~Notification() {
if (notification_)
notification_->set_delegate(nullptr);
}
// static
mate::WrappableBase* Notification::New(mate::Arguments* args) {
if (!Browser::Get()->is_ready()) {
args->ThrowError("Cannot create Notification before app is ready");
return nullptr;
}
return new Notification(args->isolate(), args->GetThis(), args);
}
// Getters
base::string16 Notification::GetTitle() const {
return title_;
}
base::string16 Notification::GetSubtitle() const {
return subtitle_;
}
base::string16 Notification::GetBody() const {
return body_;
}
bool Notification::GetSilent() const {
return silent_;
}
bool Notification::GetHasReply() const {
return has_reply_;
}
base::string16 Notification::GetReplyPlaceholder() const {
return reply_placeholder_;
}
base::string16 Notification::GetSound() const {
return sound_;
}
std::vector<brightray::NotificationAction> Notification::GetActions() const {
return actions_;
}
base::string16 Notification::GetCloseButtonText() const {
return close_button_text_;
}
// Setters
void Notification::SetTitle(const base::string16& new_title) {
title_ = new_title;
}
void Notification::SetSubtitle(const base::string16& new_subtitle) {
subtitle_ = new_subtitle;
}
void Notification::SetBody(const base::string16& new_body) {
body_ = new_body;
}
void Notification::SetSilent(bool new_silent) {
silent_ = new_silent;
}
void Notification::SetHasReply(bool new_has_reply) {
has_reply_ = new_has_reply;
}
void Notification::SetReplyPlaceholder(const base::string16& new_placeholder) {
reply_placeholder_ = new_placeholder;
}
void Notification::SetSound(const base::string16& new_sound) {
sound_ = new_sound;
}
void Notification::SetActions(
const std::vector<brightray::NotificationAction>& actions) {
actions_ = actions;
}
void Notification::SetCloseButtonText(const base::string16& text) {
close_button_text_ = text;
}
void Notification::NotificationAction(int index) {
Emit("action", index);
}
void Notification::NotificationClick() {
Emit("click");
}
void Notification::NotificationReplied(const std::string& reply) {
Emit("reply", reply);
}
void Notification::NotificationDisplayed() {
Emit("show");
}
void Notification::NotificationDestroyed() {
}
void Notification::NotificationClosed() {
Emit("close");
}
void Notification::Close() {
if (notification_) {
notification_->Dismiss();
notification_.reset();
}
}
// Showing notifications
void Notification::Show() {
Close();
if (presenter_) {
notification_ = presenter_->CreateNotification(this);
if (notification_) {
brightray::NotificationOptions options;
options.title = title_;
options.subtitle = subtitle_;
options.msg = body_;
options.icon_url = GURL();
options.icon = icon_.AsBitmap();
options.silent = silent_;
options.has_reply = has_reply_;
options.reply_placeholder = reply_placeholder_;
options.actions = actions_;
options.sound = sound_;
options.close_button_text = close_button_text_;
notification_->Show(options);
}
}
}
bool Notification::IsSupported() {
return !!brightray::BrowserClient::Get()->GetNotificationPresenter();
}
// static
void Notification::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Notification"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
.SetMethod("show", &Notification::Show)
.SetMethod("close", &Notification::Close)
.SetProperty("title", &Notification::GetTitle, &Notification::SetTitle)
.SetProperty("subtitle", &Notification::GetSubtitle,
&Notification::SetSubtitle)
.SetProperty("body", &Notification::GetBody, &Notification::SetBody)
.SetProperty("silent", &Notification::GetSilent,
&Notification::SetSilent)
.SetProperty("hasReply", &Notification::GetHasReply,
&Notification::SetHasReply)
.SetProperty("replyPlaceholder", &Notification::GetReplyPlaceholder,
&Notification::SetReplyPlaceholder)
.SetProperty("sound", &Notification::GetSound,
&Notification::SetSound)
.SetProperty("actions", &Notification::GetActions,
&Notification::SetActions)
.SetProperty("closeButtonText", &Notification::GetCloseButtonText,
&Notification::SetCloseButtonText);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::Notification;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
Notification::SetConstructor(isolate, base::Bind(&Notification::New));
mate::Dictionary dict(isolate, exports);
dict.Set("Notification",
Notification::GetConstructor(isolate)->GetFunction());
dict.SetMethod("isSupported", &Notification::IsSupported);
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_common_notification, Initialize)

View File

@@ -0,0 +1,97 @@
// Copyright (c) 2014 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_NOTIFICATION_H_
#define ATOM_BROWSER_API_ATOM_API_NOTIFICATION_H_
#include <memory>
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
#include "base/strings/utf_string_conversions.h"
#include "brightray/browser/notification.h"
#include "brightray/browser/notification_delegate.h"
#include "brightray/browser/notification_presenter.h"
#include "native_mate/handle.h"
#include "ui/gfx/image/image.h"
namespace atom {
namespace api {
class Notification : public mate::TrackableObject<Notification>,
public brightray::NotificationDelegate {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static bool IsSupported();
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// NotificationDelegate:
void NotificationAction(int index) override;
void NotificationClick() override;
void NotificationReplied(const std::string& reply) override;
void NotificationDisplayed() override;
void NotificationDestroyed() override;
void NotificationClosed() override;
protected:
Notification(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
mate::Arguments* args);
~Notification() override;
void Show();
void Close();
// Prop Getters
base::string16 GetTitle() const;
base::string16 GetSubtitle() const;
base::string16 GetBody() const;
bool GetSilent() const;
bool GetHasReply() const;
base::string16 GetReplyPlaceholder() const;
base::string16 GetSound() const;
std::vector<brightray::NotificationAction> GetActions() const;
base::string16 GetCloseButtonText() const;
// Prop Setters
void SetTitle(const base::string16& new_title);
void SetSubtitle(const base::string16& new_subtitle);
void SetBody(const base::string16& new_body);
void SetSilent(bool new_silent);
void SetHasReply(bool new_has_reply);
void SetReplyPlaceholder(const base::string16& new_reply_placeholder);
void SetSound(const base::string16& sound);
void SetActions(const std::vector<brightray::NotificationAction>& actions);
void SetCloseButtonText(const base::string16& text);
private:
base::string16 title_;
base::string16 subtitle_;
base::string16 body_;
gfx::Image icon_;
base::string16 icon_path_;
bool has_icon_ = false;
bool silent_ = false;
bool has_reply_ = false;
base::string16 reply_placeholder_;
base::string16 sound_;
std::vector<brightray::NotificationAction> actions_;
base::string16 close_button_text_;
brightray::NotificationPresenter* presenter_;
base::WeakPtr<brightray::Notification> notification_;
DISALLOW_COPY_AND_ASSIGN(Notification);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_NOTIFICATION_H_

View File

@@ -16,6 +16,13 @@ namespace atom {
namespace api {
PowerMonitor::PowerMonitor(v8::Isolate* isolate) {
#if defined(OS_LINUX)
SetShutdownHandler(base::Bind(&PowerMonitor::ShouldShutdown,
base::Unretained(this)));
#elif defined(OS_MACOSX)
Browser::Get()->SetShutdownHandler(base::Bind(&PowerMonitor::ShouldShutdown,
base::Unretained(this)));
#endif
base::PowerMonitor::Get()->AddObserver(this);
Init(isolate);
}
@@ -24,6 +31,20 @@ PowerMonitor::~PowerMonitor() {
base::PowerMonitor::Get()->RemoveObserver(this);
}
bool PowerMonitor::ShouldShutdown() {
return !Emit("shutdown");
}
#if defined(OS_LINUX)
void PowerMonitor::BlockShutdown() {
PowerObserverLinux::BlockShutdown();
}
void PowerMonitor::UnblockShutdown() {
PowerObserverLinux::UnblockShutdown();
}
#endif
void PowerMonitor::OnPowerStateChange(bool on_battery_power) {
if (on_battery_power)
Emit("on-battery");
@@ -55,6 +76,11 @@ v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
void PowerMonitor::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "PowerMonitor"));
#if defined(OS_LINUX)
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("blockShutdown", &PowerMonitor::BlockShutdown)
.SetMethod("unblockShutdown", &PowerMonitor::UnblockShutdown);
#endif
}
} // namespace api
@@ -68,10 +94,6 @@ 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
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("powerMonitor", PowerMonitor::Create(isolate));

View File

@@ -6,8 +6,8 @@
#define ATOM_BROWSER_API_ATOM_API_POWER_MONITOR_H_
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/lib/power_observer.h"
#include "base/compiler_specific.h"
#include "base/power_monitor/power_observer.h"
#include "native_mate/handle.h"
namespace atom {
@@ -15,7 +15,7 @@ namespace atom {
namespace api {
class PowerMonitor : public mate::TrackableObject<PowerMonitor>,
public base::PowerObserver {
public PowerObserver {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
@@ -26,6 +26,15 @@ class PowerMonitor : public mate::TrackableObject<PowerMonitor>,
explicit PowerMonitor(v8::Isolate* isolate);
~PowerMonitor() override;
// Called by native calles.
bool ShouldShutdown();
#if defined(OS_LINUX)
// Private JS APIs.
void BlockShutdown();
void UnblockShutdown();
#endif
// base::PowerObserver implementations:
void OnPowerStateChange(bool on_battery_power) override;
void OnSuspend() override;

View File

@@ -9,8 +9,8 @@
#include <memory>
#include "atom/browser/api/trackable_object.h"
#include "device/power_save_blocker/power_save_blocker.h"
#include "native_mate/handle.h"
#include "services/device/wake_lock/power_save_blocker/power_save_blocker.h"
namespace mate {
class Dictionary;

View File

@@ -10,6 +10,7 @@
#include "atom/browser/net/url_request_async_asar_job.h"
#include "atom/browser/net/url_request_buffer_job.h"
#include "atom/browser/net/url_request_fetch_job.h"
#include "atom/browser/net/url_request_stream_job.h"
#include "atom/browser/net/url_request_string_job.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/value_converter.h"
@@ -208,6 +209,8 @@ void Protocol::BuildPrototype(
&Protocol::RegisterProtocol<URLRequestAsyncAsarJob>)
.SetMethod("registerHttpProtocol",
&Protocol::RegisterProtocol<URLRequestFetchJob>)
.SetMethod("registerStreamProtocol",
&Protocol::RegisterProtocol<URLRequestStreamJob>)
.SetMethod("unregisterProtocol", &Protocol::UnregisterProtocol)
.SetMethod("isProtocolHandled", &Protocol::IsProtocolHandled)
.SetMethod("interceptStringProtocol",
@@ -218,6 +221,8 @@ void Protocol::BuildPrototype(
&Protocol::InterceptProtocol<URLRequestAsyncAsarJob>)
.SetMethod("interceptHttpProtocol",
&Protocol::InterceptProtocol<URLRequestFetchJob>)
.SetMethod("interceptStreamProtocol",
&Protocol::InterceptProtocol<URLRequestStreamJob>)
.SetMethod("uninterceptProtocol", &Protocol::UninterceptProtocol);
}

View File

@@ -120,6 +120,9 @@ void Screen::BuildPrototype(
.SetMethod("getPrimaryDisplay", &Screen::GetPrimaryDisplay)
.SetMethod("getAllDisplays", &Screen::GetAllDisplays)
.SetMethod("getDisplayNearestPoint", &Screen::GetDisplayNearestPoint)
#if defined(OS_MACOSX)
.SetMethod("getMenuBarHeight", &Screen::getMenuBarHeight)
#endif
.SetMethod("getDisplayMatching", &Screen::GetDisplayMatching);
}

View File

@@ -40,6 +40,10 @@ class Screen : public mate::EventEmitter<Screen>,
display::Display GetDisplayNearestPoint(const gfx::Point& point);
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
#if defined(OS_MACOSX)
int getMenuBarHeight();
#endif
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplayRemoved(const display::Display& old_display) override;

View File

@@ -0,0 +1,19 @@
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import "atom/browser/api/atom_api_screen.h"
#import <Cocoa/Cocoa.h>
namespace atom {
namespace api {
//TODO(codebytere): deprecated; remove in 3.0
int Screen::getMenuBarHeight() {
return [[NSApp mainMenu] menuBarHeight];
}
}// namespace api
}// namespace atom

View File

@@ -17,6 +17,7 @@
#include "atom/browser/atom_permission_manager.h"
#include "atom/browser/browser.h"
#include "atom/browser/net/atom_cert_verifier.h"
#include "atom/browser/session_preferences.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/content_converter.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
@@ -28,10 +29,10 @@
#include "base/guid.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/browser/browser_process.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
@@ -45,7 +46,6 @@
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_auth_preferences.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"
@@ -212,6 +212,7 @@ struct Converter<atom::VerifyRequestParams> {
dict.Set("hostname", val.hostname);
dict.Set("certificate", val.certificate);
dict.Set("verificationResult", val.default_result);
dict.Set("errorCode", val.error_code);
return dict.GetHandle();
}
};
@@ -229,59 +230,6 @@ const char kPersistPrefix[] = "persist:";
// Referenced session objects.
std::map<uint32_t, v8::Global<v8::Object>> g_sessions;
class ResolveProxyHelper {
public:
ResolveProxyHelper(AtomBrowserContext* browser_context,
const GURL& url,
const Session::ResolveProxyCallback& callback)
: callback_(callback),
original_thread_(base::ThreadTaskRunnerHandle::Get()) {
scoped_refptr<net::URLRequestContextGetter> context_getter =
browser_context->url_request_context_getter();
context_getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&ResolveProxyHelper::ResolveProxy,
base::Unretained(this), context_getter, url));
}
void OnResolveProxyCompleted(int result) {
std::string proxy;
if (result == net::OK)
proxy = proxy_info_.ToPacString();
original_thread_->PostTask(FROM_HERE,
base::Bind(callback_, proxy));
delete this;
}
private:
void ResolveProxy(scoped_refptr<net::URLRequestContextGetter> context_getter,
const GURL& url) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
net::ProxyService* proxy_service =
context_getter->GetURLRequestContext()->proxy_service();
net::CompletionCallback completion_callback =
base::Bind(&ResolveProxyHelper::OnResolveProxyCompleted,
base::Unretained(this));
// Start the request.
int result = proxy_service->ResolveProxy(
url, "GET", &proxy_info_, completion_callback, &pac_req_, nullptr,
net::NetLogWithSource());
// Completed synchronously.
if (result != net::ERR_IO_PENDING)
completion_callback.Run(result);
}
Session::ResolveProxyCallback callback_;
net::ProxyInfo proxy_info_;
net::ProxyService::PacRequest* pac_req_;
scoped_refptr<base::SingleThreadTaskRunner> original_thread_;
DISALLOW_COPY_AND_ASSIGN(ResolveProxyHelper);
};
// Runs the callback in UI thread.
void RunCallbackInUI(const base::Callback<void()>& callback) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
@@ -433,9 +381,22 @@ void DownloadIdCallback(content::DownloadManager* download_manager,
content::DownloadItem::INTERRUPTED,
content::DownloadDangerType::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false,
base::Time(), false,
std::vector<content::DownloadItem::ReceivedSlice>());
}
void SetDevToolsNetworkEmulationClientIdInIO(
brightray::URLRequestContextGetter* url_request_context_getter,
const std::string& client_id) {
if (!url_request_context_getter)
return;
net::URLRequestContext* context =
url_request_context_getter->GetURLRequestContext();
AtomNetworkDelegate* network_delegate =
static_cast<AtomNetworkDelegate*>(context->network_delegate());
network_delegate->SetDevToolsNetworkEmulationClientId(client_id);
}
} // namespace
Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
@@ -445,6 +406,8 @@ Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
content::BrowserContext::GetDownloadManager(browser_context)->
AddObserver(this);
new SessionPreferences(browser_context);
Init(isolate);
AttachAsUserData(browser_context);
}
@@ -472,8 +435,10 @@ void Session::OnDownloadCreated(content::DownloadManager* manager,
}
}
void Session::ResolveProxy(const GURL& url, ResolveProxyCallback callback) {
new ResolveProxyHelper(browser_context(), url, callback);
void Session::ResolveProxy(
const GURL& url,
const ResolveProxyHelper::ResolveProxyCallback& callback) {
browser_context_->GetResolveProxyHelper()->ResolveProxy(url, callback);
}
template<Session::CacheAction action>
@@ -543,16 +508,24 @@ void Session::EnableNetworkEmulation(const mate::Dictionary& options) {
browser_context_->network_controller_handle()->SetNetworkState(
devtools_network_emulation_client_id_, std::move(conditions));
browser_context_->network_delegate()->SetDevToolsNetworkEmulationClientId(
devtools_network_emulation_client_id_);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(
&SetDevToolsNetworkEmulationClientIdInIO,
base::RetainedRef(browser_context_->url_request_context_getter()),
devtools_network_emulation_client_id_));
}
void Session::DisableNetworkEmulation() {
std::unique_ptr<brightray::DevToolsNetworkConditions> conditions;
browser_context_->network_controller_handle()->SetNetworkState(
devtools_network_emulation_client_id_, std::move(conditions));
browser_context_->network_delegate()->SetDevToolsNetworkEmulationClientId(
std::string());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(
&SetDevToolsNetworkEmulationClientIdInIO,
base::RetainedRef(browser_context_->url_request_context_getter()),
std::string()));
}
void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
@@ -618,10 +591,11 @@ void Session::SetUserAgent(const std::string& user_agent,
mate::Arguments* args) {
browser_context_->SetUserAgent(user_agent);
std::string accept_lang = l10n_util::GetApplicationLocale("");
std::string accept_lang = g_browser_process->GetApplicationLocale();
args->GetNext(&accept_lang);
auto getter = browser_context_->GetRequestContext();
scoped_refptr<brightray::URLRequestContextGetter> getter(
browser_context_->GetRequestContext());
getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&SetUserAgentInIO, getter, accept_lang, user_agent));
@@ -677,6 +651,19 @@ void Session::CreateInterruptedDownload(const mate::Dictionary& options) {
length, last_modified, etag, base::Time::FromDoubleT(start_time)));
}
void Session::SetPreloads(
const std::vector<base::FilePath::StringType>& preloads) {
auto* prefs = SessionPreferences::FromBrowserContext(browser_context());
DCHECK(prefs);
prefs->set_preloads(preloads);
}
std::vector<base::FilePath::StringType> Session::GetPreloads() const {
auto* prefs = SessionPreferences::FromBrowserContext(browser_context());
DCHECK(prefs);
return prefs->preloads();
}
v8::Local<v8::Value> Session::Cookies(v8::Isolate* isolate) {
if (cookies_.IsEmpty()) {
auto handle = Cookies::Create(isolate, browser_context());
@@ -763,6 +750,8 @@ void Session::BuildPrototype(v8::Isolate* isolate,
.SetMethod("getBlobData", &Session::GetBlobData)
.SetMethod("createInterruptedDownload",
&Session::CreateInterruptedDownload)
.SetMethod("setPreloads", &Session::SetPreloads)
.SetMethod("getPreloads", &Session::GetPreloads)
.SetProperty("cookies", &Session::Cookies)
.SetProperty("protocol", &Session::Protocol)
.SetProperty("webRequest", &Session::WebRequest);

View File

@@ -6,9 +6,11 @@
#define ATOM_BROWSER_API_ATOM_API_SESSION_H_
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_blob_reader.h"
#include "atom/browser/net/resolve_proxy_helper.h"
#include "base/values.h"
#include "content/public/browser/download_manager.h"
#include "native_mate/handle.h"
@@ -38,8 +40,6 @@ namespace api {
class Session: public mate::TrackableObject<Session>,
public content::DownloadManager::Observer {
public:
using ResolveProxyCallback = base::Callback<void(std::string)>;
enum class CacheAction {
CLEAR,
STATS,
@@ -61,7 +61,8 @@ class Session: public mate::TrackableObject<Session>,
v8::Local<v8::FunctionTemplate> prototype);
// Methods.
void ResolveProxy(const GURL& url, ResolveProxyCallback callback);
void ResolveProxy(const GURL& url,
const ResolveProxyHelper::ResolveProxyCallback& callback);
template<CacheAction action>
void DoCacheAction(const net::CompletionCallback& callback);
void ClearStorageData(mate::Arguments* args);
@@ -81,6 +82,8 @@ class Session: public mate::TrackableObject<Session>,
void GetBlobData(const std::string& uuid,
const AtomBlobReader::CompletionCallback& callback);
void CreateInterruptedDownload(const mate::Dictionary& options);
void SetPreloads(const std::vector<base::FilePath::StringType>& preloads);
std::vector<base::FilePath::StringType> GetPreloads() const;
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

@@ -65,8 +65,10 @@ void SystemPreferences::BuildPrototype(
&SystemPreferences::SubscribeLocalNotification)
.SetMethod("unsubscribeLocalNotification",
&SystemPreferences::UnsubscribeLocalNotification)
.SetMethod("registerDefaults", &SystemPreferences::RegisterDefaults)
.SetMethod("getUserDefault", &SystemPreferences::GetUserDefault)
.SetMethod("setUserDefault", &SystemPreferences::SetUserDefault)
.SetMethod("removeUserDefault", &SystemPreferences::RemoveUserDefault)
.SetMethod("isSwipeTrackingFromScrollEventsEnabled",
&SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled)
#endif

View File

@@ -73,9 +73,11 @@ 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 RegisterDefaults(mate::Arguments* args);
void SetUserDefault(const std::string& name,
const std::string& type,
mate::Arguments* args);
void RemoveUserDefault(const std::string& name);
bool IsSwipeTrackingFromScrollEventsEnabled();
#endif
bool IsDarkMode();

View File

@@ -144,6 +144,28 @@ v8::Local<v8::Value> SystemPreferences::GetUserDefault(
}
}
void SystemPreferences::RegisterDefaults(mate::Arguments* args) {
base::DictionaryValue value;
if(!args->GetNext(&value)) {
args->ThrowError("Invalid userDefault data provided");
} else {
@try {
NSDictionary* dict = DictionaryValueToNSDictionary(value);
for (id key in dict) {
id value = [dict objectForKey:key];
if ([value isKindOfClass:[NSNull class]] || value == nil) {
args->ThrowError("Invalid userDefault data provided");
return;
}
}
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
} @catch (NSException* exception) {
args->ThrowError("Invalid userDefault data provided");
}
}
}
void SystemPreferences::SetUserDefault(const std::string& name,
const std::string& type,
mate::Arguments* args) {
@@ -229,6 +251,11 @@ void SystemPreferences::SetUserDefault(const std::string& name,
}
}
void SystemPreferences::RemoveUserDefault(const std::string& name) {
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
[defaults removeObjectForKey:base::SysUTF8ToNSString(name)];
}
bool SystemPreferences::IsDarkMode() {
NSString* mode = [[NSUserDefaults standardUserDefaults]
stringForKey:@"AppleInterfaceStyle"];

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include <iomanip>
#include "atom/browser/api/atom_api_system_preferences.h"
#include "atom/common/color_util.h"
@@ -26,10 +28,10 @@ bool SystemPreferences::IsAeroGlassEnabled() {
}
std::string hexColorDWORDToRGBA(DWORD color) {
DWORD rgba = color << 8 | color >> 24;
std::ostringstream stream;
stream << std::hex << color;
std::string hexColor = stream.str();
return hexColor.substr(2) + hexColor.substr(0, 2);
stream << std::hex << std::setw(8) << std::setfill('0') << rgba;
return stream.str();
}
std::string SystemPreferences::GetAccentColor() {

View File

@@ -40,8 +40,6 @@ struct Converter<atom::TrayIcon::HighlightMode> {
}
}
// Support old boolean parameter
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
bool highlight;
if (ConvertFromV8(isolate, val, &highlight)) {
if (highlight)
@@ -86,8 +84,10 @@ mate::WrappableBase* Tray::New(mate::Handle<NativeImage> image,
return new Tray(args->isolate(), args->GetThis(), image);
}
void Tray::OnClicked(const gfx::Rect& bounds, int modifiers) {
EmitWithFlags("click", modifiers, bounds);
void Tray::OnClicked(const gfx::Rect& bounds,
const gfx::Point& location,
int modifiers) {
EmitWithFlags("click", modifiers, bounds, location);
}
void Tray::OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {
@@ -122,6 +122,18 @@ void Tray::OnDropText(const std::string& text) {
Emit("drop-text", text);
}
void Tray::OnMouseEntered(const gfx::Point& location, int modifiers) {
EmitWithFlags("mouse-enter", modifiers, location);
}
void Tray::OnMouseExited(const gfx::Point& location, int modifiers) {
EmitWithFlags("mouse-leave", modifiers, location);
}
void Tray::OnMouseMoved(const gfx::Point& location, int modifiers) {
EmitWithFlags("mouse-move", modifiers, location);
}
void Tray::OnDragEntered() {
Emit("drag-enter");
}

View File

@@ -47,7 +47,9 @@ class Tray : public mate::TrackableObject<Tray>,
~Tray() override;
// TrayIconObserver:
void OnClicked(const gfx::Rect& bounds, int modifiers) override;
void OnClicked(const gfx::Rect& bounds,
const gfx::Point& location,
int modifiers) override;
void OnDoubleClicked(const gfx::Rect& bounds, int modifiers) override;
void OnRightClicked(const gfx::Rect& bounds, int modifiers) override;
void OnBalloonShow() override;
@@ -59,6 +61,9 @@ class Tray : public mate::TrackableObject<Tray>,
void OnDragEntered() override;
void OnDragExited() override;
void OnDragEnded() override;
void OnMouseEntered(const gfx::Point& location, int modifiers) override;
void OnMouseExited(const gfx::Point& location, int modifiers) override;
void OnMouseMoved(const gfx::Point& location, int modifiers) override;
void SetImage(v8::Isolate* isolate, mate::Handle<NativeImage> image);
void SetPressedImage(v8::Isolate* isolate, mate::Handle<NativeImage> image);

File diff suppressed because it is too large Load Diff

View File

@@ -12,12 +12,14 @@
#include "atom/browser/api/save_page_handler.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/common_web_contents_delegate.h"
#include "atom/browser/ui/autofill_popup.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/keyboard_event_processing_result.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/favicon_url.h"
#include "native_mate/handle.h"
#include "printing/backend/print_backend.h"
#include "ui/gfx/image/image.h"
namespace blink {
@@ -29,7 +31,7 @@ class InspectableWebContents;
}
namespace content {
class ResourceRequestBodyImpl;
class ResourceRequestBody;
}
namespace mate {
@@ -49,8 +51,7 @@ namespace api {
class WebContents : public mate::TrackableObject<WebContents>,
public CommonWebContentsDelegate,
public content::WebContentsObserver,
public content::NotificationObserver {
public content::WebContentsObserver {
public:
enum Type {
BACKGROUND_PAGE, // A DevTools extension background page.
@@ -78,6 +79,8 @@ class WebContents : public mate::TrackableObject<WebContents>,
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
static int64_t GetIDForContents(content::WebContents* web_contents);
// Notifies to destroy any guest web contents before destroying self.
void DestroyWebContents(bool async);
@@ -116,12 +119,17 @@ class WebContents : public mate::TrackableObject<WebContents>,
void DisableDeviceEmulation();
void InspectElement(int x, int y);
void InspectServiceWorker();
void HasServiceWorker(const base::Callback<void(bool)>&);
void HasServiceWorker(
const base::Callback<void(bool)>&);
void UnregisterServiceWorker(const base::Callback<void(bool)>&);
void SetIgnoreMenuShortcuts(bool ignore);
void SetAudioMuted(bool muted);
bool IsAudioMuted();
void Print(mate::Arguments* args);
std::vector<printing::PrinterBasicInfo> GetPrinterList();
void SetEmbedder(const WebContents* embedder);
void SetDevToolsWebContents(const WebContents* devtools);
v8::Local<v8::Value> GetNativeView() const;
// Print current page as PDF.
void PrintToPDF(const base::DictionaryValue& setting,
@@ -185,6 +193,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetFrameRate(int frame_rate);
int GetFrameRate() const;
void Invalidate();
gfx::Size GetSizeForNewRenderView(content::WebContents*) const override;
// Methods for zoom handling.
void SetZoomLevel(double level);
@@ -203,14 +212,19 @@ class WebContents : public mate::TrackableObject<WebContents>,
const std::string& frame_name,
WindowOpenDisposition disposition,
const std::vector<std::string>& features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body);
const scoped_refptr<content::ResourceRequestBody>& body);
// Returns the web preferences of current WebContents.
v8::Local<v8::Value> GetWebPreferences(v8::Isolate* isolate);
v8::Local<v8::Value> GetLastWebPreferences(v8::Isolate* isolate);
// Returns the owner window.
v8::Local<v8::Value> GetOwnerBrowserWindow();
// Grants the child process the capability to access URLs with the origin of
// the specified URL.
void GrantOriginAccess(const GURL& url);
// Properties.
int32_t ID() const;
v8::Local<v8::Value> Session(v8::Isolate* isolate);
@@ -238,12 +252,14 @@ class WebContents : public mate::TrackableObject<WebContents>,
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 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,
@@ -265,9 +281,9 @@ 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;
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
void EnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin) override;
void ExitFullscreenModeForTab(content::WebContents* source) override;
@@ -321,11 +337,11 @@ class WebContents : public mate::TrackableObject<WebContents>,
const content::ResourceRequestDetails& details) override;
void DidGetRedirectForResourceRequest(
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;
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* frame_host) override;
void WebContentsDestroyed() override;
void NavigationEntryCommitted(
const content::LoadCommittedDetails& load_details) override;
@@ -340,12 +356,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
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;
@@ -354,14 +364,13 @@ class WebContents : public mate::TrackableObject<WebContents>,
void DevToolsOpened() override;
void DevToolsClosed() override;
void ShowAutofillPopup(content::RenderFrameHost* frame_host,
const gfx::RectF& bounds,
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels);
private:
struct LoadURLParams {
LoadURLParams() : params(GURL()), id(0) {}
content::NavigationController::LoadURLParams params;
int id;
};
struct FrameDispatchHelper;
AtomBrowserContext* GetBrowserContext() const;
uint32_t GetNextRequestId() {
@@ -372,21 +381,29 @@ class WebContents : public mate::TrackableObject<WebContents>,
void OnCursorChange(const content::WebCursor& cursor);
// Called when received a message from renderer.
void OnRendererMessage(const base::string16& channel,
void OnRendererMessage(content::RenderFrameHost* frame_host,
const base::string16& channel,
const base::ListValue& args);
// Called when received a synchronous message from renderer.
void OnRendererMessageSync(const base::string16& channel,
void OnRendererMessageSync(content::RenderFrameHost* frame_host,
const base::string16& channel,
const base::ListValue& args,
IPC::Message* message);
// Called when received a synchronous message from renderer to
// set temporary zoom level.
void OnSetTemporaryZoomLevel(double level, IPC::Message* reply_msg);
void OnSetTemporaryZoomLevel(content::RenderFrameHost* frame_host,
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);
void OnGetZoomLevel(content::RenderFrameHost* frame_host,
IPC::Message* reply_msg);
void InitZoomController(content::WebContents* web_contents,
const mate::Dictionary& options);
v8::Global<v8::Value> session_;
v8::Global<v8::Value> devtools_web_contents_;
@@ -413,11 +430,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
// 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

@@ -37,6 +37,26 @@ namespace atom {
namespace api {
namespace {
template<typename Method, typename Event, typename Listener>
void CallNetworkDelegateMethod(
brightray::URLRequestContextGetter* url_request_context_getter,
Method method,
Event type,
URLPatterns patterns,
Listener listener) {
// Force creating network delegate.
net::URLRequestContext* context =
url_request_context_getter->GetURLRequestContext();
// Then call the method.
AtomNetworkDelegate* network_delegate =
static_cast<AtomNetworkDelegate*>(context->network_delegate());
(network_delegate->*method)(type, std::move(patterns), std::move(listener));
}
} // namespace
WebRequest::WebRequest(v8::Isolate* isolate,
AtomBrowserContext* browser_context)
: browser_context_(browser_context) {
@@ -74,10 +94,15 @@ void WebRequest::SetListener(Method method, Event type, mate::Arguments* args) {
return;
}
auto delegate = browser_context_->network_delegate();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(method, base::Unretained(delegate), type,
patterns, listener));
brightray::URLRequestContextGetter* url_request_context_getter =
browser_context_->url_request_context_getter();
if (!url_request_context_getter)
return;
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&CallNetworkDelegateMethod<Method, Event, Listener>,
base::RetainedRef(url_request_context_getter),
method, type, std::move(patterns), std::move(listener)));
}
// static

View File

@@ -7,10 +7,12 @@
#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"
// Must be the last in the includes list.
// See https://github.com/electron/electron/issues/10363
#include "atom/common/node_includes.h"
using atom::WebContentsPreferences;

View File

@@ -3,19 +3,20 @@
// found in the LICENSE file.
#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/browser/web_contents_preferences.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/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -77,28 +78,43 @@ v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
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);
// Use options.webPreferences in WebContents.
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
v8::Local<v8::Value> transparent;
if (options.Get("transparent", &transparent))
web_preferences.Set("transparent", transparent);
// Copy the backgroundColor to webContents.
v8::Local<v8::Value> value;
if (options.Get(options::kBackgroundColor, &value))
web_preferences.Set(options::kBackgroundColor, value);
// 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);
v8::Local<v8::Value> transparent;
if (options.Get("transparent", &transparent))
web_preferences.Set("transparent", transparent);
#if defined(ENABLE_OSR)
// 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);
}
#endif
if (options.Get("webContents", &web_contents) && !web_contents.IsEmpty()) {
// Set webPreferences from options if using an existing webContents.
// These preferences will be used when the webContent launches new
// render processes.
auto* existing_preferences =
WebContentsPreferences::FromWebContents(web_contents->web_contents());
base::DictionaryValue web_preferences_dict;
if (mate::ConvertFromV8(isolate, web_preferences.GetHandle(),
&web_preferences_dict)) {
existing_preferences->web_preferences()->Clear();
existing_preferences->Merge(web_preferences_dict);
}
} else {
// Creates the WebContents used by BrowserWindow.
web_contents = WebContents::Create(isolate, web_preferences);
}
@@ -119,7 +135,7 @@ void Window::Init(v8::Isolate* isolate,
// The parent window.
mate::Handle<Window> parent;
if (options.Get("parent", &parent))
if (options.Get("parent", &parent) && !parent.IsEmpty())
parent_window_.Reset(isolate, parent.ToV8());
// Creates BrowserWindow.
@@ -128,11 +144,12 @@ void Window::Init(v8::Isolate* isolate,
options,
parent.IsEmpty() ? nullptr : parent->window_.get()));
web_contents->SetOwnerWindow(window_.get());
window_->set_is_offscreen_dummy(api_web_contents_->IsOffScreen());
#if defined(TOOLKIT_VIEWS)
// Sets the window icon.
mate::Handle<NativeImage> icon;
if (options.Get(options::kIcon, &icon))
if (options.Get(options::kIcon, &icon) && !icon.IsEmpty())
SetIcon(icon);
#endif
@@ -167,7 +184,7 @@ void Window::WillDestroyNativeObject() {
v8::HandleScope handle_scope(isolate());
for (v8::Local<v8::Value> value : child_windows_.Values(isolate())) {
mate::Handle<Window> child;
if (mate::ConvertFromV8(isolate(), value, &child))
if (mate::ConvertFromV8(isolate(), value, &child) && !child.IsEmpty())
child->window_->CloseImmediately();
}
}
@@ -186,6 +203,8 @@ void Window::OnWindowClosed() {
RemoveFromParentChildWindows();
ResetBrowserView();
// Destroy the native class when window is closed.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
@@ -300,6 +319,10 @@ void Window::OnTouchBarItemResult(const std::string& item_id,
Emit("-touch-bar-interaction", item_id, details);
}
void Window::OnNewWindowForTab() {
Emit("new-window-for-tab");
}
#if defined(OS_WIN)
void Window::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {
if (IsWindowMessageHooked(message)) {
@@ -370,6 +393,10 @@ bool Window::IsEnabled() {
return window_->IsEnabled();
}
void Window::SetEnabled(bool enable) {
window_->SetEnabled(enable);
}
void Window::Maximize() {
window_->Maximize();
}
@@ -581,6 +608,14 @@ void Window::SetSkipTaskbar(bool skip) {
window_->SetSkipTaskbar(skip);
}
void Window::SetSimpleFullScreen(bool simple_fullscreen) {
window_->SetSimpleFullScreen(simple_fullscreen);
}
bool Window::IsSimpleFullScreen() {
return window_->IsSimpleFullScreen();
}
void Window::SetKiosk(bool kiosk) {
window_->SetKiosk(kiosk);
}
@@ -601,6 +636,14 @@ bool Window::HasShadow() {
return window_->HasShadow();
}
void Window::SetOpacity(const double opacity) {
window_->SetOpacity(opacity);
}
double Window::GetOpacity() {
return window_->GetOpacity();
}
void Window::FocusOnWebView() {
window_->FocusOnWebView();
}
@@ -629,8 +672,11 @@ bool Window::IsDocumentEdited() {
return window_->IsDocumentEdited();
}
void Window::SetIgnoreMouseEvents(bool ignore) {
return window_->SetIgnoreMouseEvents(ignore);
void Window::SetIgnoreMouseEvents(bool ignore, mate::Arguments* args) {
mate::Dictionary options;
bool forward = false;
args->GetNext(&options) && options.Get("forward", &forward);
return window_->SetIgnoreMouseEvents(ignore, forward);
}
void Window::SetContentProtection(bool enable) {
@@ -685,7 +731,7 @@ void Window::SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> value) {
mate::Handle<Menu> menu;
if (value->IsObject() &&
mate::V8ToString(value->ToObject()->GetConstructorName()) == "Menu" &&
mate::ConvertFromV8(isolate, value, &menu)) {
mate::ConvertFromV8(isolate, value, &menu) && !menu.IsEmpty()) {
menu_.Reset(isolate, menu.ToV8());
window_->SetMenu(menu->model());
} else if (value->IsNull()) {
@@ -805,7 +851,7 @@ void Window::SetParentWindow(v8::Local<v8::Value> value,
}
mate::Handle<Window> parent;
if (value->IsNull()) {
if (value->IsNull() || value->IsUndefined()) {
RemoveFromParentChildWindows();
parent_window_.Reset();
window_->SetParentWindow(nullptr);
@@ -838,16 +884,34 @@ v8::Local<v8::Value> Window::GetBrowserView() const {
}
void Window::SetBrowserView(v8::Local<v8::Value> value) {
ResetBrowserView();
mate::Handle<BrowserView> browser_view;
if (value->IsNull()) {
if (value->IsNull() || value->IsUndefined()) {
window_->SetBrowserView(nullptr);
browser_view_.Reset();
} else if (mate::ConvertFromV8(isolate(), value, &browser_view)) {
window_->SetBrowserView(browser_view->view());
browser_view->web_contents()->SetOwnerWindow(window_.get());
browser_view_.Reset(isolate(), value);
window_->UpdateDraggableRegionViews();
}
}
void Window::ResetBrowserView() {
if (browser_view_.IsEmpty()) {
return;
}
mate::Handle<BrowserView> browser_view;
if (mate::ConvertFromV8(isolate(), GetBrowserView(), &browser_view)
&& !browser_view.IsEmpty()) {
browser_view->web_contents()->SetOwnerWindow(nullptr);
}
browser_view_.Reset();
}
bool Window::IsModal() const {
return window_->is_modal();
}
@@ -870,6 +934,33 @@ void Window::SetAutoHideCursor(bool auto_hide) {
window_->SetAutoHideCursor(auto_hide);
}
void Window::SelectPreviousTab() {
window_->SelectPreviousTab();
}
void Window::SelectNextTab() {
window_->SelectNextTab();
}
void Window::MergeAllWindows() {
window_->MergeAllWindows();
}
void Window::MoveTabToNewWindow() {
window_->MoveTabToNewWindow();
}
void Window::ToggleTabBar() {
window_->ToggleTabBar();
}
void Window::AddTabbedWindow(NativeWindow* window,
mate::Arguments* args) {
const bool windowAdded = window_->AddTabbedWindow(window);
if (!windowAdded)
args->ThrowError("AddTabbedWindow cannot be called by a window on itself.");
}
void Window::SetVibrancy(mate::Arguments* args) {
std::string type;
@@ -906,8 +997,10 @@ void Window::RemoveFromParentChildWindows() {
return;
mate::Handle<Window> parent;
if (!mate::ConvertFromV8(isolate(), GetParentWindow(), &parent))
if (!mate::ConvertFromV8(isolate(), GetParentWindow(), &parent)
|| parent.IsEmpty()) {
return;
}
parent->child_windows_.Remove(ID());
}
@@ -927,6 +1020,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("hide", &Window::Hide)
.SetMethod("isVisible", &Window::IsVisible)
.SetMethod("isEnabled", &Window::IsEnabled)
.SetMethod("setEnabled", & Window::SetEnabled)
.SetMethod("maximize", &Window::Maximize)
.SetMethod("unmaximize", &Window::Unmaximize)
.SetMethod("isMaximized", &Window::IsMaximized)
@@ -981,11 +1075,15 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("getTitle", &Window::GetTitle)
.SetMethod("flashFrame", &Window::FlashFrame)
.SetMethod("setSkipTaskbar", &Window::SetSkipTaskbar)
.SetMethod("setSimpleFullScreen", &Window::SetSimpleFullScreen)
.SetMethod("isSimpleFullScreen", &Window::IsSimpleFullScreen)
.SetMethod("setKiosk", &Window::SetKiosk)
.SetMethod("isKiosk", &Window::IsKiosk)
.SetMethod("setBackgroundColor", &Window::SetBackgroundColor)
.SetMethod("setHasShadow", &Window::SetHasShadow)
.SetMethod("hasShadow", &Window::HasShadow)
.SetMethod("setOpacity", &Window::SetOpacity)
.SetMethod("getOpacity", &Window::GetOpacity)
.SetMethod("setRepresentedFilename", &Window::SetRepresentedFilename)
.SetMethod("getRepresentedFilename", &Window::GetRepresentedFilename)
.SetMethod("setDocumentEdited", &Window::SetDocumentEdited)
@@ -1010,6 +1108,12 @@ void Window::BuildPrototype(v8::Isolate* isolate,
&Window::IsVisibleOnAllWorkspaces)
#if defined(OS_MACOSX)
.SetMethod("setAutoHideCursor", &Window::SetAutoHideCursor)
.SetMethod("mergeAllWindows", &Window::MergeAllWindows)
.SetMethod("selectPreviousTab", &Window::SelectPreviousTab)
.SetMethod("selectNextTab", &Window::SelectNextTab)
.SetMethod("moveTabToNewWindow", &Window::MoveTabToNewWindow)
.SetMethod("toggleTabBar", &Window::ToggleTabBar)
.SetMethod("addTabbedWindow", &Window::AddTabbedWindow)
#endif
.SetMethod("setVibrancy", &Window::SetVibrancy)
.SetMethod("_setTouchBarItems", &Window::SetTouchBar)

View File

@@ -91,6 +91,7 @@ class Window : public mate::TrackableObject<Window>,
void OnExecuteWindowsCommand(const std::string& command_name) override;
void OnTouchBarItemResult(const std::string& item_id,
const base::DictionaryValue& details) override;
void OnNewWindowForTab() override;
#if defined(OS_WIN)
void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) override;
@@ -111,6 +112,7 @@ class Window : public mate::TrackableObject<Window>,
void Hide();
bool IsVisible();
bool IsEnabled();
void SetEnabled(bool enable);
void Maximize();
void Unmaximize();
bool IsMaximized();
@@ -153,11 +155,15 @@ class Window : public mate::TrackableObject<Window>,
std::string GetTitle();
void FlashFrame(bool flash);
void SetSkipTaskbar(bool skip);
void SetSimpleFullScreen(bool simple_fullscreen);
bool IsSimpleFullScreen();
void SetKiosk(bool kiosk);
bool IsKiosk();
void SetBackgroundColor(const std::string& color_name);
void SetHasShadow(bool has_shadow);
bool HasShadow();
void SetOpacity(const double opacity);
double GetOpacity();
void FocusOnWebView();
void BlurWebView();
bool IsWebViewFocused();
@@ -165,7 +171,7 @@ class Window : public mate::TrackableObject<Window>,
std::string GetRepresentedFilename();
void SetDocumentEdited(bool edited);
bool IsDocumentEdited();
void SetIgnoreMouseEvents(bool ignore);
void SetIgnoreMouseEvents(bool ignore, mate::Arguments* args);
void SetContentProtection(bool enable);
void SetFocusable(bool focusable);
void SetProgressBar(double progress, mate::Arguments* args);
@@ -185,6 +191,7 @@ class Window : public mate::TrackableObject<Window>,
std::vector<v8::Local<v8::Object>> GetChildWindows() const;
v8::Local<v8::Value> GetBrowserView() const;
void SetBrowserView(v8::Local<v8::Value> value);
void ResetBrowserView();
bool IsModal() const;
v8::Local<v8::Value> GetNativeWindowHandle();
@@ -210,6 +217,13 @@ class Window : public mate::TrackableObject<Window>,
void SetAutoHideCursor(bool auto_hide);
void SelectPreviousTab();
void SelectNextTab();
void MergeAllWindows();
void MoveTabToNewWindow();
void ToggleTabBar();
void AddTabbedWindow(NativeWindow* window, mate::Arguments* args);
void SetVibrancy(mate::Arguments* args);
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
void RefreshTouchBarItem(const std::string& item_id);

View File

@@ -6,6 +6,7 @@
#include "atom/common/api/api_messages.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "native_mate/object_template_builder.h"
@@ -20,17 +21,32 @@ Event::Event(v8::Isolate* isolate)
Event::~Event() {
}
void Event::SetSenderAndMessage(content::WebContents* sender,
void Event::SetSenderAndMessage(content::RenderFrameHost* sender,
IPC::Message* message) {
DCHECK(!sender_);
DCHECK(!message_);
sender_ = sender;
message_ = message;
Observe(sender);
Observe(content::WebContents::FromRenderFrameHost(sender));
}
void Event::WebContentsDestroyed() {
void Event::RenderFrameDeleted(content::RenderFrameHost* rfh) {
if (sender_ != rfh)
return;
sender_ = nullptr;
message_ = nullptr;
}
void Event::RenderFrameHostChanged(content::RenderFrameHost* old_rfh,
content::RenderFrameHost* new_rfh) {
if (sender_ && sender_ == old_rfh)
sender_ = new_rfh;
}
void Event::FrameDeleted(content::RenderFrameHost* rfh) {
if (sender_ != rfh)
return;
sender_ = nullptr;
message_ = nullptr;
}
@@ -44,7 +60,7 @@ bool Event::SendReply(const base::string16& json) {
if (message_ == nullptr || sender_ == nullptr)
return false;
AtomViewHostMsg_Message_Sync::WriteReplyParams(message_, json);
AtomFrameHostMsg_Message_Sync::WriteReplyParams(message_, json);
bool success = sender_->Send(message_);
message_ = nullptr;
sender_ = nullptr;

View File

@@ -24,7 +24,8 @@ class Event : public Wrappable<Event>,
v8::Local<v8::FunctionTemplate> prototype);
// Pass the sender and message to be replied.
void SetSenderAndMessage(content::WebContents* sender, IPC::Message* message);
void SetSenderAndMessage(content::RenderFrameHost* sender,
IPC::Message* message);
// event.PreventDefault().
void PreventDefault(v8::Isolate* isolate);
@@ -37,11 +38,14 @@ class Event : public Wrappable<Event>,
~Event() override;
// content::WebContentsObserver implementations:
void WebContentsDestroyed() override;
void RenderFrameDeleted(content::RenderFrameHost* rfh) override;
void RenderFrameHostChanged(content::RenderFrameHost* old_rfh,
content::RenderFrameHost* new_rfh) override;
void FrameDeleted(content::RenderFrameHost* rfh) override;
private:
// Replyer for the synchronous messages.
content::WebContents* sender_;
content::RenderFrameHost* sender_;
IPC::Message* message_;
DISALLOW_COPY_AND_ASSIGN(Event);

View File

@@ -39,11 +39,10 @@ v8::Local<v8::Object> CreateEventObject(v8::Isolate* isolate) {
namespace internal {
v8::Local<v8::Object> CreateJSEvent(
v8::Isolate* isolate,
v8::Local<v8::Object> object,
content::WebContents* sender,
IPC::Message* message) {
v8::Local<v8::Object> CreateJSEvent(v8::Isolate* isolate,
v8::Local<v8::Object> object,
content::RenderFrameHost* sender,
IPC::Message* message) {
v8::Local<v8::Object> event;
bool use_native_event = sender && message;

View File

@@ -11,7 +11,7 @@
#include "native_mate/wrappable.h"
namespace content {
class WebContents;
class RenderFrameHost;
}
namespace IPC {
@@ -24,7 +24,7 @@ namespace internal {
v8::Local<v8::Object> CreateJSEvent(v8::Isolate* isolate,
v8::Local<v8::Object> object,
content::WebContents* sender,
content::RenderFrameHost* sender,
IPC::Message* message);
v8::Local<v8::Object> CreateCustomEvent(
v8::Isolate* isolate,
@@ -42,8 +42,10 @@ class EventEmitter : public Wrappable<T> {
// Make the convinient methods visible:
// https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-members
v8::Local<v8::Object> GetWrapper() { return Wrappable<T>::GetWrapper(); }
v8::Isolate* isolate() const { return Wrappable<T>::isolate(); }
v8::Local<v8::Object> GetWrapper() const {
return Wrappable<T>::GetWrapper();
}
// this.emit(name, event, args...);
template<typename... Args>
@@ -72,15 +74,19 @@ class EventEmitter : public Wrappable<T> {
}
// this.emit(name, new Event(sender, message), args...);
template<typename... Args>
template <typename... Args>
bool EmitWithSender(const base::StringPiece& name,
content::WebContents* sender,
content::RenderFrameHost* sender,
IPC::Message* message,
const Args&... args) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::Object> wrapper = GetWrapper();
if (wrapper.IsEmpty()) {
return false;
}
v8::Local<v8::Object> event = internal::CreateJSEvent(
isolate(), GetWrapper(), sender, message);
isolate(), wrapper, sender, message);
return EmitWithEvent(name, event, args...);
}

View File

@@ -0,0 +1,121 @@
// 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 <string>
#include "atom/browser/api/event_subscriber.h"
#include "atom/common/native_mate_converters/callback.h"
namespace {
// A FunctionTemplate lifetime is bound to the v8 context, so it can be safely
// stored as a global here since there's only one for the main process.
v8::Global<v8::FunctionTemplate> g_cached_template;
struct JSHandlerData {
JSHandlerData(v8::Isolate* isolate,
mate::internal::EventSubscriberBase* subscriber)
: handle_(isolate, v8::External::New(isolate, this)),
subscriber_(subscriber) {
handle_.SetWeak(this, GC, v8::WeakCallbackType::kFinalizer);
}
static void GC(const v8::WeakCallbackInfo<JSHandlerData>& data) {
delete data.GetParameter();
}
v8::Global<v8::External> handle_;
mate::internal::EventSubscriberBase* subscriber_;
};
void InvokeCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Locker locker(info.GetIsolate());
v8::HandleScope handle_scope(info.GetIsolate());
v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
v8::Context::Scope context_scope(context);
mate::Arguments args(info);
v8::Local<v8::Value> handler, event;
args.GetNext(&handler);
args.GetNext(&event);
DCHECK(handler->IsExternal());
DCHECK(event->IsString());
JSHandlerData* handler_data = static_cast<JSHandlerData*>(
v8::Local<v8::External>::Cast(handler)->Value());
handler_data->subscriber_->EventEmitted(mate::V8ToString(event), &args);
}
} // namespace
namespace mate {
namespace internal {
EventSubscriberBase::EventSubscriberBase(v8::Isolate* isolate,
v8::Local<v8::Object> emitter)
: isolate_(isolate), emitter_(isolate, emitter) {
if (g_cached_template.IsEmpty()) {
g_cached_template = v8::Global<v8::FunctionTemplate>(
isolate_, v8::FunctionTemplate::New(isolate_, InvokeCallback));
}
}
EventSubscriberBase::~EventSubscriberBase() {
if (!isolate_) {
return;
}
RemoveAllListeners();
emitter_.Reset();
DCHECK_EQ(js_handlers_.size(), 0u);
}
void EventSubscriberBase::On(const std::string& event_name) {
DCHECK(js_handlers_.find(event_name) == js_handlers_.end());
v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_);
auto fn_template = g_cached_template.Get(isolate_);
auto event = mate::StringToV8(isolate_, event_name);
auto js_handler_data = new JSHandlerData(isolate_, this);
v8::Local<v8::Value> fn = internal::BindFunctionWith(
isolate_, isolate_->GetCurrentContext(), fn_template->GetFunction(),
js_handler_data->handle_.Get(isolate_), event);
js_handlers_.insert(
std::make_pair(event_name, v8::Global<v8::Value>(isolate_, fn)));
internal::ValueVector converted_args = {event, fn};
internal::CallMethodWithArgs(isolate_, emitter_.Get(isolate_), "on",
&converted_args);
}
void EventSubscriberBase::Off(const std::string& event_name) {
v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_);
auto js_handler = js_handlers_.find(event_name);
DCHECK(js_handler != js_handlers_.end());
RemoveListener(js_handler);
}
void EventSubscriberBase::RemoveAllListeners() {
v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_);
while (!js_handlers_.empty()) {
RemoveListener(js_handlers_.begin());
}
}
std::map<std::string, v8::Global<v8::Value>>::iterator
EventSubscriberBase::RemoveListener(
std::map<std::string, v8::Global<v8::Value>>::iterator it) {
internal::ValueVector args = {StringToV8(isolate_, it->first),
it->second.Get(isolate_)};
internal::CallMethodWithArgs(
isolate_, v8::Local<v8::Object>::Cast(emitter_.Get(isolate_)),
"removeListener", &args);
it->second.Reset();
return js_handlers_.erase(it);
}
} // namespace internal
} // namespace mate

View File

@@ -0,0 +1,139 @@
// 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_EVENT_SUBSCRIBER_H_
#define ATOM_BROWSER_API_EVENT_SUBSCRIBER_H_
#include <map>
#include <string>
#include "atom/common/api/event_emitter_caller.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/browser_thread.h"
#include "native_mate/native_mate/arguments.h"
namespace mate {
namespace internal {
class EventSubscriberBase {
public:
EventSubscriberBase(v8::Isolate* isolate, v8::Local<v8::Object> emitter);
virtual ~EventSubscriberBase();
virtual void EventEmitted(const std::string& event_name,
mate::Arguments* args) = 0;
protected:
void On(const std::string& event_name);
void Off(const std::string& event_name);
void RemoveAllListeners();
private:
std::map<std::string, v8::Global<v8::Value>>::iterator RemoveListener(
std::map<std::string, v8::Global<v8::Value>>::iterator it);
v8::Isolate* isolate_;
v8::Global<v8::Object> emitter_;
std::map<std::string, v8::Global<v8::Value>> js_handlers_;
DISALLOW_COPY_AND_ASSIGN(EventSubscriberBase);
};
} // namespace internal
template <typename HandlerType>
class EventSubscriber : internal::EventSubscriberBase {
public:
using EventCallback = void (HandlerType::*)(mate::Arguments* args);
// Alias to unique_ptr with deleter.
using unique_ptr = std::unique_ptr<EventSubscriber<HandlerType>,
void (*)(EventSubscriber<HandlerType>*)>;
// EventSubscriber should only be created/deleted in the main thread since it
// communicates with the V8 engine. This smart pointer makes it simpler to
// bind the lifetime of EventSubscriber with a class whose lifetime is managed
// by a non-UI thread.
class SafePtr : public unique_ptr {
public:
SafePtr() : SafePtr(nullptr) {}
explicit SafePtr(EventSubscriber<HandlerType>* ptr)
: unique_ptr(ptr, Deleter) {}
private:
// Custom deleter that schedules destructor invocation to the main thread.
static void Deleter(EventSubscriber<HandlerType>* ptr) {
DCHECK(
!::content::BrowserThread::CurrentlyOn(::content::BrowserThread::UI));
DCHECK(ptr);
// Acquire handler lock and reset handler_ to ensure that any new events
// emitted will be ignored after this function returns
base::AutoLock auto_lock(ptr->handler_lock_);
ptr->handler_ = nullptr;
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(
[](EventSubscriber<HandlerType>* subscriber) {
{
// It is possible that this function will execute in the UI
// thread before the outer function has returned and destroyed
// its auto_lock. We need to acquire the lock before deleting
// or risk a crash.
base::AutoLock auto_lock(subscriber->handler_lock_);
}
delete subscriber;
},
ptr));
}
};
EventSubscriber(HandlerType* handler,
v8::Isolate* isolate,
v8::Local<v8::Object> emitter)
: EventSubscriberBase(isolate, emitter), handler_(handler) {
DCHECK_CURRENTLY_ON(::content::BrowserThread::UI);
}
void On(const std::string& event, EventCallback callback) {
DCHECK_CURRENTLY_ON(::content::BrowserThread::UI);
EventSubscriberBase::On(event);
callbacks_.insert(std::make_pair(event, callback));
}
void Off(const std::string& event) {
DCHECK_CURRENTLY_ON(::content::BrowserThread::UI);
EventSubscriberBase::Off(event);
DCHECK(callbacks_.find(event) != callbacks_.end());
callbacks_.erase(callbacks_.find(event));
}
void RemoveAllListeners() {
DCHECK_CURRENTLY_ON(::content::BrowserThread::UI);
EventSubscriberBase::RemoveAllListeners();
callbacks_.clear();
}
private:
void EventEmitted(const std::string& event_name,
mate::Arguments* args) override {
DCHECK_CURRENTLY_ON(::content::BrowserThread::UI);
base::AutoLock auto_lock(handler_lock_);
if (!handler_) {
// handler_ was probably destroyed by another thread and we should not
// access it.
return;
}
auto it = callbacks_.find(event_name);
if (it != callbacks_.end()) {
auto method = it->second;
(handler_->*method)(args);
}
}
HandlerType* handler_;
base::Lock handler_lock_;
std::map<std::string, EventCallback> callbacks_;
};
} // namespace mate
#endif // ATOM_BROWSER_API_EVENT_SUBSCRIBER_H_

View File

@@ -45,9 +45,9 @@ bool FrameSubscriber::ShouldCaptureFrame(
gfx::Size view_size = rect.size();
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view_->GetNativeView();
gfx::NativeView native_view = view_->GetNativeView();
const float scale =
display::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
display::Screen::GetScreen()->GetDisplayNearestView(native_view)
.device_scale_factor();
if (scale > 1.0f)
bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
@@ -78,20 +78,31 @@ void FrameSubscriber::OnFrameDelivered(const FrameCaptureCallback& callback,
v8::Locker locker(isolate_);
v8::HandleScope handle_scope(isolate_);
size_t rgb_arr_size = bitmap.width() * bitmap.height() *
bitmap.bytesPerPixel();
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate_, rgb_arr_size);
size_t rgb_row_size = bitmap.width() * bitmap.bytesPerPixel();
v8::MaybeLocal<v8::Object> buffer =
node::Buffer::New(isolate_, rgb_row_size * bitmap.height());
if (buffer.IsEmpty())
return;
bitmap.copyPixelsTo(
reinterpret_cast<uint8_t*>(node::Buffer::Data(buffer.ToLocalChecked())),
rgb_arr_size);
auto local_buffer = buffer.ToLocalChecked();
{
auto source = static_cast<const unsigned char*>(bitmap.getPixels());
auto target = node::Buffer::Data(local_buffer);
for (int y = 0; y < bitmap.height(); ++y) {
memcpy(target, source, rgb_row_size);
source += bitmap.rowBytes();
target += rgb_row_size;
}
}
v8::Local<v8::Value> damage =
mate::Converter<gfx::Rect>::ToV8(isolate_, damage_rect);
callback_.Run(buffer.ToLocalChecked(), damage);
callback_.Run(local_buffer, damage);
}
} // namespace api

View File

@@ -6,6 +6,7 @@
#include "atom/browser/atom_browser_main_parts.h"
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/supports_user_data.h"
namespace mate {
@@ -46,16 +47,19 @@ void TrackableObjectBase::Destroy() {
}
void TrackableObjectBase::AttachAsUserData(base::SupportsUserData* wrapped) {
wrapped->SetUserData(kTrackedObjectKey, new IDUserData(weak_map_id_));
wrapped->SetUserData(kTrackedObjectKey,
base::MakeUnique<IDUserData>(weak_map_id_));
}
// static
int32_t TrackableObjectBase::GetIDFromWrappedClass(base::SupportsUserData* w) {
auto id = static_cast<IDUserData*>(w->GetUserData(kTrackedObjectKey));
if (id)
return *id;
else
return 0;
int32_t TrackableObjectBase::GetIDFromWrappedClass(
base::SupportsUserData* wrapped) {
if (wrapped) {
auto id = static_cast<IDUserData*>(wrapped->GetUserData(kTrackedObjectKey));
if (id)
return *id;
}
return 0;
}
// static

View File

@@ -30,15 +30,15 @@ class TrackableObjectBase {
// Wrap TrackableObject into a class that SupportsUserData.
void AttachAsUserData(base::SupportsUserData* wrapped);
// Get the weak_map_id from SupportsUserData.
static int32_t GetIDFromWrappedClass(base::SupportsUserData* wrapped);
protected:
virtual ~TrackableObjectBase();
// Returns a closure that can destroy the native class.
base::Closure GetDestroyClosure();
// Get the weak_map_id from SupportsUserData.
static int32_t GetIDFromWrappedClass(base::SupportsUserData* wrapped);
// Register a callback that should be destroyed before JavaScript environment
// gets destroyed.
static base::Closure RegisterDestructionCallback(const base::Closure& c);
@@ -62,7 +62,10 @@ class TrackableObject : public TrackableObjectBase,
public:
// Mark the JS object as destroyed.
void MarkDestroyed() {
Wrappable<T>::GetWrapper()->SetAlignedPointerInInternalField(0, nullptr);
v8::Local<v8::Object> wrapper = Wrappable<T>::GetWrapper();
if (!wrapper.IsEmpty()) {
wrapper->SetAlignedPointerInInternalField(0, nullptr);
}
}
bool IsDestroyed() {

View File

@@ -29,8 +29,7 @@ class GeoURLRequestContextGetter : public net::URLRequestContextGetter {
net::URLRequestContextBuilder builder;
builder.set_proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)));
url_request_context_ = builder.Build();
}
return url_request_context_.get();
@@ -55,7 +54,6 @@ class GeoURLRequestContextGetter : public net::URLRequestContextGetter {
AtomAccessTokenStore::AtomAccessTokenStore()
: request_context_getter_(new internal::GeoURLRequestContextGetter) {
device::GeolocationProvider::GetInstance()->UserDidOptIntoLocationServices();
}
AtomAccessTokenStore::~AtomAccessTokenStore() {

View File

@@ -72,8 +72,7 @@ void AtomBlobReader::StartReading(
}
auto blob_reader = blob_data_handle->CreateReader(
file_system_context_.get(),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get());
file_system_context_.get());
BlobReadHelper* blob_read_helper =
new BlobReadHelper(std::move(blob_reader), callback);
blob_read_helper->Read();

View File

@@ -10,6 +10,7 @@
#include "atom/browser/api/atom_api_app.h"
#include "atom/browser/api/atom_api_protocol.h"
#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/atom_quota_permission_context.h"
@@ -17,6 +18,7 @@
#include "atom/browser/atom_speech_recognition_manager_delegate.h"
#include "atom/browser/child_web_contents_tracker.h"
#include "atom/browser/native_window.h"
#include "atom/browser/session_preferences.h"
#include "atom/browser/web_contents_permission_helper.h"
#include "atom/browser/web_contents_preferences.h"
#include "atom/browser/window_list.h"
@@ -30,7 +32,6 @@
#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"
@@ -38,6 +39,9 @@
#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/content_switches.h"
#include "content/public/common/resource_request_body.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "net/ssl/ssl_cert_request_info.h"
@@ -78,9 +82,10 @@ AtomBrowserClient::~AtomBrowserClient() {
content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
int process_id) {
// If the process is a pending process, we should use the old one.
// If the process is a pending process, we should use the web contents
// for the frame host passed into OverrideSiteInstanceForNavigation.
if (base::ContainsKey(pending_processes_, process_id))
process_id = pending_processes_[process_id];
return pending_processes_[process_id];
// Certain render process will be created with no associated render view,
// for example: ServiceWorker.
@@ -147,6 +152,12 @@ bool AtomBrowserClient::RendererUsesNativeWindowOpen(int process_id) {
return it != process_preferences_.end() && it->second.native_window_open;
}
bool AtomBrowserClient::RendererDisablesPopups(int process_id) {
base::AutoLock auto_lock(process_preferences_lock_);
auto it = process_preferences_.find(process_id);
return it != process_preferences_.end() && it->second.disable_popups;
}
void AtomBrowserClient::RenderProcessWillLaunch(
content::RenderProcessHost* host) {
int process_id = host->GetID();
@@ -157,9 +168,14 @@ void AtomBrowserClient::RenderProcessWillLaunch(
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
ProcessPreferences process_prefs;
process_prefs.sandbox = WebContentsPreferences::IsSandboxed(web_contents);
process_prefs.native_window_open
= WebContentsPreferences::UsesNativeWindowOpen(web_contents);
process_prefs.sandbox =
WebContentsPreferences::IsPreferenceEnabled("sandbox", web_contents);
process_prefs.native_window_open =
WebContentsPreferences::IsPreferenceEnabled("nativeWindowOpen",
web_contents);
process_prefs.disable_popups =
WebContentsPreferences::IsPreferenceEnabled("disablePopups",
web_contents);
AddProcessPreferences(host->GetID(), process_prefs);
// ensure the ProcessPreferences is removed later
host->AddObserver(this);
@@ -174,7 +190,6 @@ void AtomBrowserClient::OverrideWebkitPrefs(
content::RenderViewHost* host, content::WebPreferences* prefs) {
prefs->javascript_enabled = true;
prefs->web_security_enabled = true;
prefs->javascript_can_open_windows_automatically = true;
prefs->plugins_enabled = true;
prefs->dom_paste_enabled = true;
prefs->allow_scripts_to_close_windows = true;
@@ -192,12 +207,8 @@ void AtomBrowserClient::OverrideWebkitPrefs(
WebContentsPreferences::OverrideWebkitPrefs(web_contents, prefs);
}
std::string AtomBrowserClient::GetApplicationLocale() {
return l10n_util::GetApplicationLocale("");
}
void AtomBrowserClient::OverrideSiteInstanceForNavigation(
content::RenderFrameHost* render_frame_host,
content::RenderFrameHost* rfh,
content::BrowserContext* browser_context,
content::SiteInstance* current_instance,
const GURL& url,
@@ -207,34 +218,70 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
return;
}
if (!ShouldCreateNewSiteInstance(render_frame_host, browser_context,
current_instance, url))
if (!ShouldCreateNewSiteInstance(rfh, browser_context, current_instance, url))
return;
scoped_refptr<content::SiteInstance> site_instance =
content::SiteInstance::CreateForURL(browser_context, url);
bool is_new_instance = true;
scoped_refptr<content::SiteInstance> site_instance;
// Do we have an affinity site to manage ?
std::string affinity;
auto* web_contents = content::WebContents::FromRenderFrameHost(rfh);
auto* web_preferences = web_contents ?
WebContentsPreferences::FromWebContents(web_contents) : nullptr;
if (web_preferences &&
web_preferences->web_preferences()->GetString("affinity", &affinity) &&
!affinity.empty()) {
affinity = base::ToLowerASCII(affinity);
auto iter = site_per_affinities.find(affinity);
if (iter != site_per_affinities.end()) {
site_instance = iter->second;
is_new_instance = false;
} else {
// We must not provide the url.
// This site is "isolated" and must not be taken into account
// when Chromium looking at a candidate for an url.
site_instance = content::SiteInstance::Create(
browser_context);
site_per_affinities[affinity] = site_instance.get();
}
} else {
site_instance = content::SiteInstance::CreateForURL(
browser_context,
url);
}
*new_instance = site_instance.get();
// Make sure the |site_instance| is not freed when this function returns.
// FIXME(zcbenz): We should adjust OverrideSiteInstanceForNavigation's
// interface to solve this.
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&Noop, base::RetainedRef(site_instance)));
if (is_new_instance) {
// Make sure the |site_instance| is not freed
// when this function returns.
// FIXME(zcbenz): We should adjust
// OverrideSiteInstanceForNavigation's interface to solve this.
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&Noop, base::RetainedRef(site_instance)));
// Remember the original renderer process of the pending renderer process.
auto current_process = current_instance->GetProcess();
auto pending_process = (*new_instance)->GetProcess();
pending_processes_[pending_process->GetID()] = current_process->GetID();
// Clear the entry in map when process ends.
current_process->AddObserver(this);
// Remember the original web contents for the pending renderer process.
auto pending_process = site_instance->GetProcess();
pending_processes_[pending_process->GetID()] = web_contents;
}
}
void AtomBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int process_id) {
std::string process_type = command_line->GetSwitchValueASCII("type");
if (process_type != "renderer")
// Make sure we're about to launch a known executable
{
base::FilePath child_path;
PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
base::ThreadRestrictions::ScopedAllowIO allow_io;
CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);
}
std::string process_type =
command_line->GetSwitchValueASCII(::switches::kProcessType);
if (process_type != ::switches::kRendererProcess)
return;
// Copy following switches to child process.
@@ -267,11 +314,17 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
}
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
if (!web_contents)
return;
if (web_contents) {
WebContentsPreferences::AppendExtraCommandLineSwitches(
web_contents, command_line);
SessionPreferences::AppendExtraCommandLineSwitches(
web_contents->GetBrowserContext(), command_line);
WebContentsPreferences::AppendExtraCommandLineSwitches(
web_contents, command_line);
auto context_id = atom::api::WebContents::GetIDForContents(
web_contents);
command_line->AppendSwitchASCII(switches::kContextId,
base::IntToString(context_id));
}
}
void AtomBrowserClient::DidCreatePpapiPlugin(
@@ -307,10 +360,12 @@ void AtomBrowserClient::AllowCertificateError(
void AtomBrowserClient::SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) {
if (!cert_request_info->client_certs.empty() && delegate_) {
delegate_->SelectClientCertificate(
web_contents, cert_request_info, std::move(delegate));
if (!client_certs.empty() && delegate_) {
delegate_->SelectClientCertificate(web_contents, cert_request_info,
std::move(client_certs),
std::move(delegate));
}
}
@@ -322,8 +377,7 @@ void AtomBrowserClient::ResourceDispatcherHostCreated() {
}
bool AtomBrowserClient::CanCreateWindow(
int opener_render_process_id,
int opener_render_frame_id,
content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
@@ -334,30 +388,36 @@ bool AtomBrowserClient::CanCreateWindow(
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
const scoped_refptr<content::ResourceRequestBody>& body,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
bool* no_javascript_access) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (IsRendererSandboxed(opener_render_process_id)
|| RendererUsesNativeWindowOpen(opener_render_process_id)) {
int opener_render_process_id = opener->GetProcess()->GetID();
if (IsRendererSandboxed(opener_render_process_id)) {
*no_javascript_access = false;
return true;
}
if (RendererUsesNativeWindowOpen(opener_render_process_id)) {
if (RendererDisablesPopups(opener_render_process_id)) {
// <webview> without allowpopups attribute should return
// null from window.open calls
return false;
} else {
*no_javascript_access = false;
return true;
}
}
if (delegate_) {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(&api::App::OnCreateWindow,
base::Unretained(static_cast<api::App*>(delegate_)),
target_url,
frame_name,
disposition,
additional_features,
body,
opener_render_process_id,
opener_render_frame_id));
return delegate_->CanCreateWindow(
opener, opener_url, opener_top_level_frame_url, source_origin,
container_type, target_url, referrer, frame_name, disposition, features,
additional_features, body, user_gesture, opener_suppressed,
no_javascript_access);
}
return false;
@@ -373,9 +433,21 @@ void AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
additional_schemes->push_back(content::kChromeDevToolsScheme);
}
void AtomBrowserClient::SiteInstanceDeleting(
content::SiteInstance* site_instance) {
// We are storing weak_ptr, is it fundamental to maintain the map up-to-date
// when an instance is destroyed.
for (auto iter = site_per_affinities.begin();
iter != site_per_affinities.end(); ++iter) {
if (iter->second == site_instance) {
site_per_affinities.erase(iter);
break;
}
}
}
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
const content::MainFunctionParams&) {
v8::V8::Initialize(); // Init V8 before creating main parts.
return new AtomBrowserMainParts;
}
@@ -401,13 +473,28 @@ void AtomBrowserClient::WebNotificationAllowed(
void AtomBrowserClient::RenderProcessHostDestroyed(
content::RenderProcessHost* host) {
int process_id = host->GetID();
for (const auto& entry : pending_processes_) {
if (entry.first == process_id || entry.second == process_id) {
pending_processes_.erase(entry.first);
break;
}
}
pending_processes_.erase(process_id);
RemoveProcessPreferences(process_id);
}
void AtomBrowserClient::RenderProcessReady(content::RenderProcessHost* host) {
render_process_host_pids_[host->GetID()] = base::GetProcId(host->GetHandle());
if (delegate_) {
static_cast<api::App*>(delegate_)->RenderProcessReady(host);
}
}
void AtomBrowserClient::RenderProcessExited(content::RenderProcessHost* host,
base::TerminationStatus status,
int exit_code) {
auto host_pid = render_process_host_pids_.find(host->GetID());
if (host_pid != render_process_host_pids_.end()) {
if (delegate_) {
static_cast<api::App*>(delegate_)->RenderProcessDisconnected(
host_pid->second);
}
render_process_host_pids_.erase(host_pid);
}
}
} // namespace atom

View File

@@ -12,6 +12,7 @@
#include "brightray/browser/browser_client.h"
#include "content/public/browser/render_process_host_observer.h"
#include "net/ssl/client_cert_identity.h"
namespace content {
class QuotaPermissionContext;
@@ -52,7 +53,6 @@ class AtomBrowserClient : public brightray::BrowserClient,
CreateSpeechRecognitionManagerDelegate() 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,
@@ -77,11 +77,11 @@ class AtomBrowserClient : public brightray::BrowserClient,
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
void ResourceDispatcherHostCreated() override;
bool CanCreateWindow(
int opener_render_process_id,
int opener_render_frame_id,
content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
@@ -92,13 +92,13 @@ class AtomBrowserClient : public brightray::BrowserClient,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
const std::vector<std::string>& additional_features,
const scoped_refptr<content::ResourceRequestBodyImpl>& body,
const scoped_refptr<content::ResourceRequestBody>& body,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
bool* no_javascript_access) override;
void GetAdditionalAllowedSchemesForFileSystem(
std::vector<std::string>* schemes) override;
void SiteInstanceDeleting(content::SiteInstance* site_instance) override;
// brightray::BrowserClient:
brightray::BrowserMainParts* OverrideCreateBrowserMainParts(
@@ -109,6 +109,10 @@ class AtomBrowserClient : public brightray::BrowserClient,
// content::RenderProcessHostObserver:
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
void RenderProcessReady(content::RenderProcessHost* host) override;
void RenderProcessExited(content::RenderProcessHost* host,
base::TerminationStatus status,
int exit_code) override;
private:
bool ShouldCreateNewSiteInstance(content::RenderFrameHost* render_frame_host,
@@ -116,18 +120,25 @@ class AtomBrowserClient : public brightray::BrowserClient,
content::SiteInstance* current_instance,
const GURL& dest_url);
struct ProcessPreferences {
bool sandbox;
bool native_window_open;
bool sandbox = false;
bool native_window_open = false;
bool disable_popups = false;
};
void AddProcessPreferences(int process_id, ProcessPreferences prefs);
void RemoveProcessPreferences(int process_id);
bool IsRendererSandboxed(int process_id);
bool RendererUsesNativeWindowOpen(int process_id);
bool RendererDisablesPopups(int process_id);
// pending_render_process => current_render_process.
std::map<int, int> pending_processes_;
// pending_render_process => web contents.
std::map<int, content::WebContents*> pending_processes_;
std::map<int, ProcessPreferences> process_preferences_;
std::map<int, base::ProcessId> render_process_host_pids_;
// list of site per affinity. weak_ptr to prevent instance locking
std::map<std::string, content::SiteInstance*> site_per_affinities;
base::Lock process_preferences_lock_;
std::unique_ptr<AtomResourceDispatcherHostDelegate>

View File

@@ -13,10 +13,10 @@
#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/net/resolve_proxy_helper.h"
#include "atom/browser/web_view_manager.h"
#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
@@ -72,8 +72,6 @@ AtomBrowserContext::AtomBrowserContext(const std::string& partition,
bool in_memory,
const base::DictionaryValue& options)
: brightray::BrowserContext(partition, in_memory),
ct_delegate_(new AtomCTDelegate),
network_delegate_(new AtomNetworkDelegate),
cookie_delegate_(new AtomCookieDelegate) {
// Construct user agent string.
Browser* browser = Browser::Get();
@@ -106,8 +104,9 @@ void AtomBrowserContext::SetUserAgent(const std::string& user_agent) {
user_agent_ = user_agent;
}
net::NetworkDelegate* AtomBrowserContext::CreateNetworkDelegate() {
return network_delegate_;
std::unique_ptr<net::NetworkDelegate>
AtomBrowserContext::CreateNetworkDelegate() {
return base::MakeUnique<AtomNetworkDelegate>();
}
net::CookieMonsterDelegate* AtomBrowserContext::CreateCookieDelegate() {
@@ -192,8 +191,9 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
return permission_manager_.get();
}
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
return base::WrapUnique(new AtomCertVerifier(ct_delegate_.get()));
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier(
brightray::RequireCTDelegate* ct_delegate) {
return base::WrapUnique(new AtomCertVerifier(ct_delegate));
}
std::vector<std::string> AtomBrowserContext::GetCookieableSchemes() {
@@ -204,11 +204,6 @@ std::vector<std::string> AtomBrowserContext::GetCookieableSchemes() {
return default_schemes;
}
net::TransportSecurityState::RequireCTDelegate*
AtomBrowserContext::GetRequireCTDelegate() {
return ct_delegate_.get();
}
void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
base::FilePath());
@@ -232,6 +227,14 @@ AtomBlobReader* AtomBrowserContext::GetBlobReader() {
return blob_reader_.get();
}
ResolveProxyHelper* AtomBrowserContext::GetResolveProxyHelper() {
if (!resolve_proxy_helper_.get()) {
resolve_proxy_helper_ =
base::MakeRefCounted<ResolveProxyHelper>(url_request_context_getter());
}
return resolve_proxy_helper_.get();
}
// static
scoped_refptr<AtomBrowserContext> AtomBrowserContext::From(
const std::string& partition, bool in_memory,

View File

@@ -15,10 +15,10 @@
namespace atom {
class AtomBlobReader;
class AtomCTDelegate;
class AtomDownloadManagerDelegate;
class AtomNetworkDelegate;
class AtomPermissionManager;
class ResolveProxyHelper;
class WebViewManager;
class AtomBrowserContext : public brightray::BrowserContext {
@@ -33,17 +33,16 @@ class AtomBrowserContext : public brightray::BrowserContext {
void SetUserAgent(const std::string& user_agent);
// brightray::URLRequestContextGetter::Delegate:
net::NetworkDelegate* CreateNetworkDelegate() override;
std::unique_ptr<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;
std::unique_ptr<net::CertVerifier> CreateCertVerifier(
brightray::RequireCTDelegate* ct_delegate) override;
std::vector<std::string> GetCookieableSchemes() override;
net::TransportSecurityState::RequireCTDelegate* GetRequireCTDelegate()
override;
// content::BrowserContext:
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
@@ -53,8 +52,9 @@ class AtomBrowserContext : public brightray::BrowserContext {
// brightray::BrowserContext:
void RegisterPrefs(PrefRegistrySimple* pref_registry) override;
ResolveProxyHelper* GetResolveProxyHelper();
AtomBlobReader* GetBlobReader();
AtomNetworkDelegate* network_delegate() const { return network_delegate_; }
AtomCookieDelegate* cookie_delegate() const {
return cookie_delegate_.get();
}
@@ -65,16 +65,14 @@ class AtomBrowserContext : public brightray::BrowserContext {
~AtomBrowserContext() override;
private:
scoped_refptr<ResolveProxyHelper> resolve_proxy_helper_;
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

@@ -4,6 +4,7 @@
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/api/atom_api_app.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/atom_browser_client.h"
@@ -12,6 +13,7 @@
#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"
@@ -22,6 +24,7 @@
#include "content/public/browser/child_process_security_policy.h"
#include "device/geolocation/geolocation_delegate.h"
#include "device/geolocation/geolocation_provider.h"
#include "ui/base/l10n/l10n_util.h"
#include "v8/include/v8-debug.h"
#if defined(USE_X11)
@@ -36,7 +39,10 @@ namespace {
// A provider of Geolocation services to override AccessTokenStore.
class AtomGeolocationDelegate : public device::GeolocationDelegate {
public:
AtomGeolocationDelegate() = default;
AtomGeolocationDelegate() {
device::GeolocationProvider::GetInstance()
->UserDidOptIntoLocationServices();
}
scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final {
return new AtomAccessTokenStore();
@@ -133,6 +139,10 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
node_bindings_->CreateEnvironment(js_env_->context());
node_env_.reset(new NodeEnvironment(env));
// Enable support for v8 inspector
node_debugger_.reset(new NodeDebugger(env));
node_debugger_->Start(js_env_->platform());
// Add Electron extended APIs.
atom_bindings_->BindTo(js_env_->isolate(), env->process_object());
@@ -141,6 +151,23 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
// Wrap the uv loop with global env.
node_bindings_->set_uv_env(env);
// We already initialized the feature list in
// brightray::BrowserMainParts::PreEarlyInitialization(), but
// the user JS script would not have had a chance to alter the command-line
// switches at that point. Lets reinitialize it here to pick up the
// command-line changes.
base::FeatureList::ClearInstanceForTesting();
brightray::BrowserMainParts::InitializeFeatureList();
}
int AtomBrowserMainParts::PreCreateThreads() {
const int result = brightray::BrowserMainParts::PreCreateThreads();
if (!result) {
fake_browser_process_->SetApplicationLocale(
brightray::BrowserClient::Get()->GetApplicationLocale());
}
return result;
}
void AtomBrowserMainParts::PreMainMessageLoopRun() {
@@ -178,6 +205,9 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() {
std::unique_ptr<base::DictionaryValue> empty_info(new base::DictionaryValue);
Browser::Get()->DidFinishLaunching(*empty_info);
#endif
// Notify observers that main thread message loop was initialized.
Browser::Get()->PreMainMessageLoopRun();
}
bool AtomBrowserMainParts::MainMessageLoopRun(int* result_code) {

View File

@@ -21,6 +21,7 @@ class AtomBindings;
class Browser;
class JavascriptEnvironment;
class NodeBindings;
class NodeDebugger;
class NodeEnvironment;
class BridgeTaskRunner;
@@ -48,6 +49,7 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts {
// content::BrowserMainParts:
void PreEarlyInitialization() override;
void PostEarlyInitialization() override;
int PreCreateThreads() override;
void PreMainMessageLoopRun() override;
bool MainMessageLoopRun(int* result_code) override;
void PostMainMessageLoopStart() override;
@@ -82,6 +84,7 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts {
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

@@ -119,9 +119,8 @@ void ShutdownDetector::ThreadMain() {
int signal;
size_t bytes_read = 0;
ssize_t ret;
do {
ret = HANDLE_EINTR(
ssize_t ret = HANDLE_EINTR(
read(shutdown_fd_,
reinterpret_cast<char*>(&signal) + bytes_read,
sizeof(signal) - bytes_read));

View File

@@ -21,6 +21,32 @@
namespace atom {
namespace {
// Generate default file path to save the download.
void CreateDownloadPath(
const GURL& url,
const std::string& content_disposition,
const std::string& suggested_filename,
const std::string& mime_type,
const base::FilePath& default_download_path,
const AtomDownloadManagerDelegate::CreateDownloadPathCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
auto generated_name =
net::GenerateFileName(url, content_disposition, std::string(),
suggested_filename, mime_type, "download");
if (!base::PathExists(default_download_path))
base::CreateDirectory(default_download_path);
base::FilePath path(default_download_path.Append(generated_name));
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(callback, path));
}
} // namespace
AtomDownloadManagerDelegate::AtomDownloadManagerDelegate(
content::DownloadManager* manager)
: download_manager_(manager),
@@ -46,30 +72,6 @@ void AtomDownloadManagerDelegate::GetItemSavePath(content::DownloadItem* item,
*path = download->GetSavePath();
}
void AtomDownloadManagerDelegate::CreateDownloadPath(
const GURL& url,
const std::string& content_disposition,
const std::string& suggested_filename,
const std::string& mime_type,
const base::FilePath& default_download_path,
const CreateDownloadPathCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
auto generated_name = net::GenerateFileName(url,
content_disposition,
std::string(),
suggested_filename,
mime_type,
"download");
if (!base::PathExists(default_download_path))
base::CreateDirectory(default_download_path);
base::FilePath path(default_download_path.Append(generated_name));
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(callback, path));
}
void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
uint32_t download_id,
const content::DownloadTargetCallback& callback,
@@ -92,6 +94,7 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
// Show save dialog if save path was not set already on item
file_dialog::DialogSettings settings;
settings.parent_window = window;
settings.force_detached = window->is_offscreen_dummy();
settings.title = item->GetURL().spec();
settings.default_path = default_path;
if (path.empty() && file_dialog::ShowSaveDialog(settings, &path)) {
@@ -115,7 +118,10 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
// If user cancels the file save dialog, run the callback with empty FilePath.
callback.Run(path,
content::DownloadItem::TARGET_DISPOSITION_PROMPT,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path);
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path,
path.empty() ?
content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED :
content::DOWNLOAD_INTERRUPT_REASON_NONE);
}
void AtomDownloadManagerDelegate::Shutdown() {
@@ -132,7 +138,8 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget(
callback.Run(download->GetForcedFilePath(),
content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download->GetForcedFilePath());
download->GetForcedFilePath(),
content::DOWNLOAD_INTERRUPT_REASON_NONE);
return true;
}
@@ -143,7 +150,7 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget(
callback.Run(save_path,
content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
save_path);
save_path, content::DOWNLOAD_INTERRUPT_REASON_NONE);
return true;
}
@@ -159,14 +166,10 @@ bool AtomDownloadManagerDelegate::DetermineDownloadTarget(
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
base::Bind(&AtomDownloadManagerDelegate::CreateDownloadPath,
weak_ptr_factory_.GetWeakPtr(),
download->GetURL(),
base::Bind(&CreateDownloadPath, download->GetURL(),
download->GetContentDisposition(),
download->GetSuggestedFilename(),
download->GetMimeType(),
default_download_path,
download_path_callback));
download->GetSuggestedFilename(), download->GetMimeType(),
default_download_path, download_path_callback));
return true;
}

View File

@@ -24,13 +24,6 @@ class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate {
explicit AtomDownloadManagerDelegate(content::DownloadManager* manager);
virtual ~AtomDownloadManagerDelegate();
// Generate default file path to save the download.
void CreateDownloadPath(const GURL& url,
const std::string& suggested_filename,
const std::string& content_disposition,
const std::string& mime_type,
const base::FilePath& path,
const CreateDownloadPathCallback& callback);
void OnDownloadPathGenerated(uint32_t download_id,
const content::DownloadTargetCallback& callback,
const base::FilePath& default_path);

View File

@@ -97,11 +97,28 @@ int AtomPermissionManager::RequestPermission(
const GURL& requesting_origin,
bool user_gesture,
const StatusCallback& response_callback) {
return RequestPermissions(
return RequestPermissionWithDetails(
permission,
render_frame_host,
requesting_origin,
user_gesture,
nullptr,
response_callback);
}
int AtomPermissionManager::RequestPermissionWithDetails(
content::PermissionType permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
bool user_gesture,
const base::DictionaryValue* details,
const StatusCallback& response_callback) {
return RequestPermissionsWithDetails(
std::vector<content::PermissionType>(1, permission),
render_frame_host,
requesting_origin,
user_gesture,
details,
base::Bind(&PermissionRequestResponseCallbackWrapper, response_callback));
}
@@ -111,6 +128,18 @@ int AtomPermissionManager::RequestPermissions(
const GURL& requesting_origin,
bool user_gesture,
const StatusesCallback& response_callback) {
return RequestPermissionsWithDetails(
permissions, render_frame_host, requesting_origin,
user_gesture, nullptr, response_callback);
}
int AtomPermissionManager::RequestPermissionsWithDetails(
const std::vector<content::PermissionType>& permissions,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
bool user_gesture,
const base::DictionaryValue* details,
const StatusesCallback& response_callback) {
if (permissions.empty()) {
response_callback.Run(std::vector<blink::mojom::PermissionStatus>());
return kNoPendingOperation;
@@ -143,7 +172,12 @@ int AtomPermissionManager::RequestPermissions(
const auto callback =
base::Bind(&AtomPermissionManager::OnPermissionResponse,
base::Unretained(this), request_id, i);
request_handler_.Run(web_contents, permission, callback);
if (details == nullptr) {
request_handler_.Run(web_contents, permission, callback,
base::DictionaryValue());
} else {
request_handler_.Run(web_contents, permission, callback, *details);
}
}
return request_id;

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