Compare commits

...

4109 Commits

Author SHA1 Message Date
Electron Bot
6c085cda74 Bump v3.0.3 2018-10-06 16:31:11 -07:00
trop[bot]
73935bc5dd fix: support ASAR in fs.copyFile (#14953) 2018-10-04 09:23:19 +10:00
Cheng Zhao
bf928ee443 fix: use white background for non-OSR renderer by default (#14934) 2018-10-03 13:41:37 +09:00
trop[bot]
ee6de82c08 fix: check guest view's devtools window size (#14928) 2018-10-03 09:31:34 +09:00
trop[bot]
8d362150e0 fix: Disable new fade animation for BrowserViews (#14913) 2018-10-02 13:17:36 +10:00
Shelley Vohr
385b08881e fix: roll node deps for fs event patch (#14864) 2018-09-29 09:17:33 +10:00
trop[bot]
5cd24a4e81 fix: enable key accelerator flags for Windows and Linux (backport: 3-0-x) (#14859)
* Fix Accelerator Flags for Windows and Linux

* Lint fix

* Lint whitespace
2018-09-28 10:01:28 -07:00
Electron Bot
9ab77adc94 Bump v3.0.2 2018-09-27 13:32:27 -07:00
trop[bot]
d808423975 docs: correct key code reqs for accel doc (#14824) 2018-09-27 12:50:14 +10:00
Electron Bot
3979315517 Bump v3.0.1 2018-09-26 17:07:12 -07:00
Shelley Vohr
35cb671529 fix: get background color from GtkMenuBar#menubar (#14812) 2018-09-26 10:03:33 -07:00
Roller Bot
0f291f9d63 chore: bump libcc (3-0-x) (#14809)
* chore: bump libcc submodule to ecc87483bace2bce628bf5d02a73514ffa95f4bf

* chore: bump libcc in DEPS to ecc87483bace2bce628bf5d02a73514ffa95f4bf
2018-09-26 10:02:41 -07:00
trop[bot]
8574a55bd8 fix: inconsistent titleBarStyle on transparent fullscreen (#14790) 2018-09-25 12:03:54 -07:00
trop[bot]
05a429075e docs: clarify allowable background colors for BrowserWindow transparency (backport: 3-0-x) (#14781)
* docs: clarify allowable colors for transparency

* fix alpha value specification
2018-09-24 09:40:00 -07:00
Alexey Kuzmin
7eb1c3fb1b fix: initialize tracing controller before starting platform (3-0-x) (#14503)
* fix: initialize tracing controller before starting platform

* chore: roll node
2018-09-21 10:23:57 -05:00
Samuel Attard
db0384116e fix: actually return appmetrics (#14750)
Fixes #14710
2018-09-21 10:10:37 -05:00
trop[bot]
0f8fb86e1b fix: do not set layer explicitly for frameless window (#14736) 2018-09-20 22:24:44 -07:00
trop[bot]
0c3cfc50a7 Fix second-instance handler signature (#14748) 2018-09-20 21:28:45 -07:00
trop[bot]
8d87dffe01 docs: specify BrowserWindow features passable to window.open (#14702) 2018-09-20 10:47:35 -07:00
John Kleinschmidt
9bb6c9dc99 Merge pull request #14696 from trop-bot/3-0-x-bp-chore--fix-await-in-cleanup-script-1537375163163
chore: fix await in cleanup script (backport: 3-0-x)
2018-09-19 14:26:17 -04:00
Shelley Vohr
e405103880 chore: fix await in cleanup script 2018-09-19 16:39:24 +00:00
Electron Bot
34c202518d Bump v3.0.0 2018-09-18 11:23:25 -07:00
trop[bot]
e5d84e84c2 chore: AFP info for general public (backport: 3-0-x) (#14673)
* migrate AFP info from maintainers

* wording changes

* capitalize headers

* move to docs and delete details

* review changes
2018-09-18 13:16:35 -05:00
Shelley Vohr
18857f494d fix: define ENABLE_PEPPER_FLASH (#14659) 2018-09-18 12:36:25 -05:00
John Kleinschmidt
d417759885 Merge pull request #14652 from electron/no-slack-notify-on-release
ci: Skip VSTS builds on older branches
2018-09-18 10:02:53 -04:00
trop[bot]
46c467a1f6 chore: dont pass --stable through to bump-version.py (#14666)
I want to clean up this "stable" and "beta" code smell eventually but
for now this will unblock the 2.0.x releases.
2018-09-18 23:41:23 +10:00
John Kleinschmidt
0b3b508eca ci: Skip VSTS testing builds on older branches
Also, don't send slack notifications for actual releases
2018-09-17 15:58:14 -04:00
Electron Bot
e3195413aa Bump v3.0.0-beta.13 2018-09-17 10:27:13 -07:00
trop[bot]
96c47ef537 fix: quit properly in simpleFullScreen mode (#14646) 2018-09-17 08:09:26 -07:00
Shelley Vohr
89148bcf8d refactor: deprecation handling apis (#14615) 2018-09-13 21:39:00 -07:00
trop[bot]
7e5815c180 fix: Windows Background color issue (#14592)
Call InvalidateRect for windows after setting the bg color
2018-09-12 17:06:10 -05:00
John Kleinschmidt
f924a16055 ci: don't run gn debug build on older branches (#14584)
* ci: don't run gn debug build on older branches

Older branches that build using gyp do not run both a debug and testing build.

* Actually skip the build if debug
2018-09-12 13:54:23 -07:00
Electron Bot
2a113e512b Bump v3.0.0-beta.12 2018-09-12 13:36:12 -07:00
trop[bot]
02b1069fd8 fix: Invalidate weak ptrs before window Javascript object is destroyed (backport: 3-0-x) (#14591)
* fix: Invalidate weak ptrs before window Javascript object is destroyed

* chore: add regression test for #14513

This test is similar to the original gist at https://gist.github.com/bpasero/a02a645e11f4946dcca1331d0299149d -- the key is to open multiple windows and add an `app.on('browser-window-focus') listener that accesses window.id.

* fix: last commit didn't test the right thing.

The test needs to run in the main process to reproduce the
conditions reported in #14513
2018-09-12 15:22:05 -05:00
Robo
3348e5162f fix: don't terminate existing sessions when opening devtools (#14566) 2018-09-13 00:17:15 +10:00
Electron Bot
64c8c27575 Bump v3.0.0-beta.11 2018-09-12 01:08:37 -07:00
trop[bot]
e76a976347 chore: make large beta numbers work when publishing (#14572) 2018-09-12 18:00:08 +10:00
Robo
8d27657fa5 fix: use render client id to track deleted render process hosts (backport: 3-0-x) (#14557)
* fix: use render client id to track deleted render process hosts

* fix: use webContentsId with contextId together (#13749)
2018-09-11 19:56:20 -07:00
John Kleinschmidt
5e81d8dad9 Merge pull request #14558 from electron/rename-appveyor-3-0-x
ci: Rename appveyor-override.yml to appveyor.yml (3-0-x)
2018-09-11 19:52:47 -04:00
John Kleinschmidt
b23acab456 Rename appveyor-override.yml to appveyor.yml 2018-09-11 19:17:50 -04:00
Cheng Zhao
8950caaa85 fix: read ignoreMenuShortcuts per WebContents (#14538) 2018-09-11 17:52:04 +10:00
Alexey Kuzmin
1b920c25af chore: Revert "fix: re-enable power monitor test (#14496)" (#14508)
This reverts commit d36b14a322.
2018-09-10 23:49:25 +10:00
Shelley Vohr
8fd31a3e07 build: [gn] widevine cdm support behind flag (3-0-x) (#14497) 2018-09-07 22:43:39 -07:00
Electron Bot
893f866c05 Bump v3.0.0-beta.10 2018-09-07 21:36:19 -07:00
Shelley Vohr
d36b14a322 fix: re-enable power monitor test (#14496) 2018-09-07 16:24:52 -07:00
John Kleinschmidt
27a33cc1cf Merge pull request #14494 from electron/fix-focus-3-0-x
fix: notify focus change right away rather not on next tick (3-0-x)
2018-09-07 15:31:26 -04:00
John Kleinschmidt
7835bceabd Update to latest libcc for 3-0-x 2018-09-07 14:37:28 -04:00
Nitish Sakhawalkar
af4f08e030 fix: notify focus change right away rather not on next tick (#14453)
* fix: Notify focus change right away, not on next tick

* fix: emit the JS blur/focus events on next tick to avoid race condition

* address feedback from review

* fix: bind deferred Emit() calls to a WeakPtr

This is so that the deferred Emit() calls will be canceled
if the TopLevelWindow is destroyed.

* chore: remove wip/test code cruft

* fix: make linter happy

* Enable disabled tests

* refactor: cleaner impl of EmitEventSoon()

* Revert "Merge branch 'fix-win-focus' of github.com:electron/electron into fix-win-focus"

This reverts commit 90576806eb, reversing
changes made to 9c13e47779.

* Restore 704722c1, which was removed in error.

We apologise again for the fault in the subtitles. Those responsible for sacking the people who have just been sacked have been sacked.
2018-09-07 14:30:41 -04:00
John Kleinschmidt
03dac078d7 Merge pull request #14488 from electron/manage-webview-webcontents-3-0-x
fix: manually manage WebContents of webview when it is detached (3-0-x)
2018-09-07 12:54:06 -04:00
Cheng Zhao
d3d44bdbc6 fix: manually manage WebContents of webview when it is detached 2018-09-07 15:42:58 +09:00
trop[bot]
a370b6982d Macos Window Title And Accessibility Focus Fix - Override accessibility method in atom_ns_window - Add title attribute in accessibilityAttributeValue (#14486) 2018-09-06 18:55:46 -07:00
trop[bot]
03ef5c25f7 fix: don't use deprecated fstatNoException API (#14484) 2018-09-06 13:09:03 -07:00
Roller Bot
3bc6652833 chore: bump libcc (3-0-x) (#14482)
* chore: bump libcc submodule to 61d71f3f150c3ff5025560dee254a53313bfbaf6

* chore: bump libcc in DEPS to 61d71f3f150c3ff5025560dee254a53313bfbaf6
2018-09-06 11:48:45 -07:00
Shelley Vohr
664371245a backport debugger fix (#14481)
* chore: enable debugger api specs (#14475)

* backport base::Value converters
2018-09-06 10:57:41 -07:00
John Kleinschmidt
08270e6817 docs: Specify VS 15.4.5 for 3-0-x (#14476)
Resolves #12898
2018-09-07 00:45:16 +10:00
Electron Bot
8f74a77a64 Bump v3.0.0-beta.9 2018-09-05 17:46:59 -07:00
Shelley Vohr
85c8ada99a deps: roll node to deprecate statsyncnoexception and lstatsyncnoexception (#14467) 2018-09-05 12:06:06 -07:00
Electron Bot
b15a3ee2be Bump v3.0.0-nightly.20180904 2018-09-04 17:16:17 -07:00
Shelley Vohr
7b043ac554 chore: add release-artifact-cleanup script (#14447) 2018-09-04 11:36:48 -07:00
trop[bot]
89a6f1efbb feat: add getUploadProgress API to the net API (#14446) 2018-09-04 12:26:50 -05:00
trop[bot]
ce592a5705 feat: allow setting window shape (backport: 3-0-x) (#14445)
* feat: allow setting window shape

This binds Widget::SetShape, an API that already exists in Chromium (for
Windows and Linux). It's a more reliable method of having some parts of
your window be "click-through" than the current `setIgnoreMouseEvents`
API, which messes around with the `WS_EX_LAYERED` window style on
Windows, causing strange bugs and incompatibility with hardware
acceleration.

* update docs
2018-09-04 09:22:11 -07:00
trop[bot]
12087b74e8 feat: allow some features during beta (backport: 3-0-x) (#14449)
* feat: allow all nonbreaking changes during beta

Changes the version policy: currently only nonbreaking bug/security
fixes are allowed during beta. This change would allow all nonbreaking
changes, e.g. new features, during beta.

* refactor: clarify criteria for changes during beta

* Update electron-versioning.md
2018-09-04 11:12:30 -05:00
trop[bot]
d365078022 fix: webview.focus() should move page focus to webview (#14428) 2018-09-03 13:26:41 +10:00
trop[bot]
3dbd84c224 docs: add notes on OOPIF webview's behaviors (#14409) 2018-08-31 14:48:38 -07:00
trop[bot]
2e479ff799 fix: use flexbox to style webview (backport: 3-0-x) (#14408)
* fix: use flexbox to style webview

* docs: remove notes on browserplugin based webview
2018-08-31 14:48:08 -07:00
trop[bot]
a341ae450a fix: allow Tray with title only (without icon) on Mac (#14384) 2018-09-01 08:49:56 +12:00
Roller Bot
0aec308681 chore: bump libcc (3-0-x) (#14391)
* chore: bump libcc submodule to dc2e7ebd2867d4329ebe7b6849e89cf3dc0afa8e

* chore: bump libcc in DEPS to dc2e7ebd2867d4329ebe7b6849e89cf3dc0afa8e
2018-08-31 10:38:56 -07:00
Samuel Attard
8e9c5b8338 chore: fix bootstrap script on 3-0-x (#14361) 2018-08-29 09:55:54 -07:00
trop[bot]
6bc1e37156 docs: keyboard listeners no longer work on webview (#14372) 2018-08-29 19:26:33 +09:00
Electron Bot
7da7dd85e3 Bump v3.0.0-beta.8 2018-08-28 23:04:31 -07:00
trop[bot]
ccf8a797dc fix: use OS process handle to clear object registry (#14364)
RenderProcessHost switch can happen between ipc calls when
speculative process are invvolved, which will lead to deletion
of entries on current context. Use OS process handles to
uniquely associate a destruction handler for a render process.
2018-08-28 22:55:42 -07:00
Milan Burda
3301e05f33 fix: don't expose desktopCapturer in sandboxed renderers if the feature is disabled (#14345) 2018-08-28 19:51:07 -05:00
trop[bot]
b1c22ba531 fix: emit focus/blur events for webview (backport: 3-0-x) (#14359)
* fix: emit focus/blur events for webview

* test: webview can emit focus event
2018-08-28 13:38:11 -05:00
trop[bot]
873f39b159 fix: crash when tray is destroyed (#14357)
Release the view of status item before destroying it,
gives chance to perform cleanup on the view.
2018-08-28 13:37:38 -05:00
trop[bot]
11864e9e08 fix: create persistent channel ID store when cookie store is persistent (#14358) 2018-08-28 13:37:09 -05:00
trop[bot]
c8a21dbb92 fix: don't crash on tray.setContextMenu(null) (#14331) 2018-08-27 13:27:41 -07:00
trop[bot]
97058837e7 fix: dont parse arguments after a -- in the inspector (#14333) 2018-08-27 14:44:53 -05:00
trop[bot]
ff539c1d61 fix: don't expose view APIs when not enabled (#14321) 2018-08-27 13:00:19 +09:00
trop[bot]
9237d40e09 fix: issue 10962, crash when open devtool (backport: 3-0-x) (#14303)
* fix: crash when opening devtool (#10962)

* fix: fixed linting issues
2018-08-25 12:23:06 -07:00
Shelley Vohr
4721dc0856 fix: opt into location services once device service has been started (backport: 3-0-x) (#14289)
* fix: opt into location services once device service has been started (#14253)

* fix: opt into location services once device service has been started

* refactor: provide fake location provider to mock geolocation reponses

* chore: add spec for navigator.geolocation api using fake location provider

* fix conflict
2018-08-24 08:23:15 -07:00
Electron Bot
1f7fd985dd Bump v3.0.0-nightly.20180823 2018-08-23 21:23:48 -07:00
Roller Bot
d432e420ae chore: bump libcc (3-0-x) (#14280)
* chore: bump libcc submodule to 7165af0ca9863529f28e493568ae3d105eddcdef

* chore: bump libcc in DEPS to 7165af0ca9863529f28e493568ae3d105eddcdef
2018-08-23 21:12:09 -07:00
trop[bot]
635c3f53d8 fix: add method and referrer properties to app login event (backport: 3-0-x) (#14277)
* refactor: remove brightray/network_delegate.{cc|h}

* refactor: respond to http requests through network delegate
2018-08-23 20:47:16 +09:00
trop[bot]
ba703deee2 Print error when removed webview attribute is used (backport: 3-0-x) (#14274)
* chore: print error when removed webview attribute is used

* docs: document removed webview features
2018-08-23 15:42:08 +09:00
Electron Bot
b03178105d Bump v3.0.0-beta.7 2018-08-22 11:13:36 -07:00
Samuel Attard
ef0a6d9a1c fix: inheritance of webPreferences sub properties 2018-08-22 12:19:11 -05:00
trop[bot]
4c7af6a429 fix: notify request context shutdown on IO before cleanup (#14092) 2018-08-22 08:24:56 -07:00
trop[bot]
d1886c5d22 ci: add better logging around request failures for releasing (#14245) 2018-08-21 13:31:44 -07:00
trop[bot]
c558dc2d7d chore: retry for the meta dumper a few times (#14243) 2018-08-21 13:31:13 -07:00
Electron Bot
be68cfd4ea Bump v3.0.0-nightly.20180821 2018-08-21 12:07:19 -07:00
Samuel Attard
115a15c356 Revert "Bump v3.0.0-nightly.20180821"
This reverts commit d4fb904450.
2018-08-21 11:45:21 -07:00
Electron Bot
d4fb904450 Bump v3.0.0-nightly.20180821 2018-08-21 11:16:44 -07:00
Electron Bot
c7f7bdab8a Bump v3.0.0-beta.6 2018-08-20 11:01:41 -07:00
trop[bot]
de7cb9524a chore: remove autorelease check logic (#14222) 2018-08-20 10:57:01 -07:00
trop[bot]
5d17e48490 fix: enable osr (backport: 3-0-x) (#14219)
* fix: re-enable osr

* fix: add changes from CEF to add MouseWheelPhaseHandler

* fix: re-enable surface synchronization by applying fix from cef

* update method call and enable AsyncWheelEvents var

* fix: make BrowserCompositorMacGetGutterColor behave like chromium

* fix: HANDLE only exists on windows

* fix: pass correct params to mouse_wheel_phase_handler_

* fix variable accessing

* revert: revert the workaround for disableHardwareAcceleration crash

* fix: remove GuestViewCrossProcessFrames from the disabled features list

* revert: remove check from BrowserChildProcessLaunchedAndConnected
2018-08-20 10:45:53 -07:00
trop[bot]
058c03fdab chore: add option to return next version from prepare-release (backport: 3-0-x) (#14217)
* chore: add option to return next version from prepare-release

* shuffle logic
2018-08-20 08:35:34 -07:00
trop[bot]
bd0d6b1a02 chore: match the bump commit exactly, reverts should not count (#14209) 2018-08-19 14:46:17 -07:00
trop[bot]
0783eb9881 fix: #14160 (#14205) 2018-08-19 14:14:05 -07:00
trop[bot]
4e3aa2e061 fix: electron path for postinstall (backport: 3-0-x) (#14197)
* fix #14127 issue caused by #12426

* add ELECTRON_OVERRIDE_DIST_PATH check for install.js
2018-08-19 12:54:39 -07:00
Samuel Attard
92f3d47ab3 Revert "Bump v3.0.0-nightly.20180819"
This reverts commit bf465dc233.
2018-08-18 19:12:01 -07:00
Shelley Vohr
2a7ec7e051 fix: update_electron_gyp regex for nightlies 2018-08-18 19:11:24 -07:00
Electron Bot
bf465dc233 Bump v3.0.0-nightly.20180819 2018-08-19 01:58:59 +00:00
trop[bot]
00cf45609f chore: only prepare release if last commit not a bump (#14193) 2018-08-18 18:37:47 -07:00
Roller Bot
26f4190102 chore: bump libcc (3-0-x) (#14175)
* chore: bump libcc submodule to 92dc0accfae5cd133fa2a6758ae6b3ff4ff7e569

* chore: bump libcc in DEPS to 92dc0accfae5cd133fa2a6758ae6b3ff4ff7e569
2018-08-18 09:36:18 -07:00
Electron Bot
5d6382270a Bump v3.0.0-nightly.20180818 2018-08-18 07:05:22 +00:00
Samuel Attard
2162c996eb Revert "Bump v3.0.0-nightly.20180818"
This reverts commit 2945be4b9b.
2018-08-17 23:54:57 -07:00
Electron Bot
2945be4b9b Bump v3.0.0-nightly.20180818 2018-08-18 06:37:26 +00:00
Samuel Attard
c066a51bfe chore: always target master for nightly release commitish 2018-08-17 23:35:34 -07:00
Samuel Attard
ff7dfe4a11 chore: add logging to prepare-release 2018-08-17 23:25:09 -07:00
Shelley Vohr
6d17663a0b fix: add dist tags for release branches (#14186) (#14187)
* fix: add dist tags for release branches
2018-08-17 19:47:19 -07:00
Samuel Attard
bd4334e2b4 chore: apply patches from master to 3.0 (#14184) 2018-08-17 17:42:46 -07:00
Samuel Attard
0f937c2300 chore: fix beta bumping in 3.0 (#14173) 2018-08-17 13:00:04 -07:00
Shelley Vohr
2ecdf4a0eb chore: update release scripts to support sudowoodo (#14170)
Backports the totality of our release script changes to support sudowoodo. Also backports changes that have been made to a few other release script files in master after 3-0-x was cut with the purpose of keeping them in sync.
2018-08-17 12:01:10 -07:00
Cheng Zhao
44b0245ac4 fix: use OOPIF for webview tag (#13869) (#14156)
* fix: use OOIF for webview tag

* fix: do not call GetNativeView for webview

* fix: OOIPF webview's WebContents is managed by embedder frame

* fix: guest view can not be focused

* fix: clear zoom controller when guest is destroyed

* fix: implement the webview resize event

The webview is no longer a browser plugin with the resize event, use
ResizeObserver instead.

* test: disable failed tests due to OOPIF webview

* fix: embedder can be destroyed earlier than guest

This happens when embedder is manually destroyed.

* fix: don't double attach

* fix: recreate iframe when webview is reattached

* fix: resize event may happen very early

* test: some tests are working after OOPIF webview

* chore: remove unused browser plugin webview code

* fix: get embedder via closure

When the "destroyed" event is emitted, the entry in guestInstances would be
cleared.

* chore: rename browserPluginNode to internalElement

* test: make the visibilityState test more robust

* chore: guestinstance can not work with OOPIF webview

* fix: element could be detached before got response from browser
2018-08-17 08:21:36 -07:00
trop[bot]
c4d6484264 docs: fix electron.d.ts typings (#14138) 2018-08-16 11:11:38 -07:00
Shelley Vohr
ef2ad40bd9 fix: roll node to fix fs.readSync bug (#14118) 2018-08-15 11:42:31 -07:00
trop[bot]
2642e064a2 fix: add a hidden option to disable remote dereferencing (#14113) 2018-08-15 08:44:23 -07:00
trop[bot]
daf23288bc fix: override fs.realpathSync.native and fs.realpath.native (backport: 3-0-x) (#14051)
* fix: override fs.realpathSync.native and fs.realpath.native

* spec: test new native functions
2018-08-13 23:53:34 -07:00
trop[bot]
8eec8e150d Fix flaky sandbox tests (#14056)
Windows apparently has issues running opening two windows at once which is causing flakiness on the mixed sandbox tests.
2018-08-13 15:14:32 -07:00
trop[bot]
2af61cbe95 fix: lint js and docs alongside clang-format (backport: 3-0-x) (#14053)
* fix: lint js and docs alongside clang-format

* chore: change lint scripts to colon format
2018-08-13 14:25:34 -07:00
Shelley Vohr
32ffb0ba17 Bump v3.0.0-beta.5 2018-08-13 08:30:14 -07:00
trop[bot]
69caea38c1 fix: make asarStatsToFsStats nherit from fs.stats (#14041) 2018-08-12 21:13:38 -07:00
Milan Burda
b5bfd9867b Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031) (#14026) 2018-08-11 12:53:33 -05:00
John Kleinschmidt
fb2afe8656 Merge pull request #14022 from electron/3-0-x-vs2017-15-4-5
ci: Use vs2017-15.4.5 for 3-0-x on AppVeyor
2018-08-10 17:18:21 -04:00
John Kleinschmidt
c926f3f6dc Use vs2017-15.4.5 for AppVeyor
Update to libcc with VS2017 15.4.5
2018-08-10 14:16:23 -04:00
trop[bot]
5aa247a627 feat: add location url to "Node.js Integration with Remote Content" warning (backport: 3-0-x) (#13976)
* docs: fix typo

* feat: add location url to Node+Remote warning
2018-08-09 20:48:36 -05:00
trop[bot]
67d202eaf6 Fix typos (#14001) 2018-08-09 10:06:10 -05:00
Milan Burda
98033e4f45 Fix process.execPath returning parent process path instead of the helper in sandboxed renderer (#13959) 2018-08-09 09:58:44 -05:00
trop[bot]
3d89185396 fix: ipcRemote.sendSync regression after moving away from JSON for return values (#13997) 2018-08-09 09:24:10 -05:00
John Kleinschmidt
1f430259ce Merge pull request #13975 from electron/roll-libcc-3-0-x
chore: roll libcc
2018-08-08 09:30:46 -04:00
Jeremy Apthorp
ff86cf5f6a chore: roll libcc
Picks up electron/libchromiumcontent#633
2018-08-07 16:21:17 -07:00
John Kleinschmidt
274a53654c Merge pull request #13898 from electron/release-notes-generator
chore: Merge PR #13359 from electron/release-notes-generator
2018-08-06 12:44:39 -04:00
trop[bot]
8f5fafb636 fix: dipToScreenRect / screenToDipRect - window can be null (#13924) 2018-08-03 13:14:52 +10:00
trop[bot]
bfbd4a2540 fix: Improve --enable-features/--disable-features handling (#13923)
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.
2018-08-03 13:08:27 +10:00
Charles Kerr
1926eab172 Bump v3.0.0-beta.4 2018-08-01 15:13:06 -05:00
trop[bot]
9818378e2d fix: some APIs modified for ASAR support cannot be util.promisify'ed (#13902) 2018-08-01 16:38:50 +10:00
trop[bot]
ad2d35c7cf memo: Update security docs: will-navigate, new-window (#13887) 2018-08-01 13:25:24 +10:00
trop[bot]
13d3a055fa fix: handle SIGINT and SIGTERM from the Electron CLI helper (#13889)
Fixes #12840
2018-08-01 13:25:04 +10:00
Charles Kerr
07b93d475d simplify package-lock.json diffs from last commit 2018-07-31 17:36:33 -05:00
John Kleinschmidt
c9da2d7669 Merge pull request #13359 from electron/release-notes-generator
build: New release notes generator
2018-07-31 16:07:40 -05:00
trop[bot]
a9a5766804 chore(tests): allow usage of deprecated APIs in tests (#13862) 2018-07-30 15:02:59 +10:00
trop[bot]
a62cb1e84c fix: util.promisify(setTimeout) (#13860) 2018-07-30 15:02:52 +10:00
trop[bot]
2bdb7a5047 fix: window.setVibrancy parameter passing (backport: 3-0-x) (#13863)
* fix: setVibrancy parameter passing

* fix: uses correct parameter types for setVibrancy
2018-07-30 13:02:32 +10:00
trop[bot]
29f70d7e35 memo: First draft: Here be dragons (#13861) 2018-07-30 11:44:43 +10:00
trop[bot]
91af624cb1 docs: fix electron.d.ts typings (#13857) 2018-07-30 11:20:19 +10:00
trop[bot]
b08df88b7c fix: Use --enable-features and --disable-features (#13805)
Unlike Chrome, we were not using the --enable-features and
--disable-features command-line arguments to initialize
`base::FeatureList`.
2018-07-26 08:29:08 -07:00
Birunthan Mohanathas
b659ff2de3 build: Bump libcc to latest (3.0.x) (#13822)
This picks up electron/libchromiumcontent#618.
2018-07-26 08:25:28 -07:00
trop[bot]
3ad6abc5cc fix: check string encoding before creating value (#13818) 2018-07-26 19:35:18 +09:00
Cheng Zhao
a880e0222f fix: pass scrollBounce by command line flag (#13813)
Implement the scrollBounce option by reading the command line flag in
`RenderThreadImpl::IsElasticOverscrollEnabled`, there is no more need
to set NSScrollViewRubberbanding.
2018-07-26 18:38:48 +09:00
Birunthan Mohanathas
95c69e660c build: Bump libcc to latest (3.0.x)
This picks up electron/libchromiumcontent#611 and
electron/libchromiumcontent#599.
2018-07-25 09:54:00 -07:00
trop[bot]
4333020157 fix: create WebContents for webview on request (#13761) 2018-07-21 16:51:31 +09:00
John Kleinschmidt
f4ff97038c Merge pull request #13755 from trop-bot/3-0-x-bp-fix--update-rebuild-test-modules.py-for-node-10-1532100223562
fix: update rebuild-test-modules.py for node 10 (backport: 3-0-x)
2018-07-20 14:45:00 -04:00
John Kleinschmidt
967577c335 fix: update for node 10 2018-07-20 15:23:49 +00:00
John Kleinschmidt
8bd5c1f858 Merge pull request #13734 from electron/backport-13727-3-0-x
fix: use context counter as contextId (backport 3-0-x)
2018-07-20 10:17:18 -04:00
trop[bot]
2955b0168c fix: ensure DirectX capturer is supported. (backport: 3-0-x) (#13738)
* Ensure DirectX capturer is supported.

* Actually try building on Windows.
2018-07-20 14:25:29 +10:00
Cheng Zhao
04b7c77951 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:02 +09:00
Cheng Zhao
136cf389e8 fix: use context counter as contextId (backport 3-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:27:41 -07:00
Zeke Sikelianos
8d9775b0b1 Bump v3.0.0-beta.3 2018-07-17 09:38:50 -07:00
John Kleinschmidt
9237d46dba make sure tests don't run for GitHub releases. (#13701)
Also fix VSTS slack integration and
Update to latest libchromiumcontent

(cherry picked from commit 1c70a1cccd)
2018-07-17 10:57:59 -05:00
John Kleinschmidt
8f8d198c5a Merge pull request #13539 from trop-bot/3-0-x-bp-enable-webview-in-sandbox-renderer-1530547750986
Backport (3-0-x) - Enable webview in sandbox renderer
2018-07-17 10:01:40 -04:00
trop[bot]
fcdbb8c4a7 fix: create a window capturer correctly (backport: 3-0-x) (#13693)
* fix: create a window capturer correctly

We were incorrectly creating two screen capturers instead of a window
capturer

* spec: ensure dc tests pass

* spec: enable all tests after verifying dc tests work
2018-07-17 15:30:33 +10:00
trop[bot]
b49b071a1f fix: remove race condition for executeJavaScript (#13692)
Replaces 'did-finish-load' with 'did-stop-loading' which semantically
maps to the events inside Chromium.  Before I think we were relying
on a natural 99% winnable race condition.

Fixes #13504
2018-07-16 21:22:27 -07:00
trop[bot]
1feb45da29 docs: update second-instance event docs (#13682) 2018-07-16 13:57:58 -07:00
John Kleinschmidt
2c43dbdb25 Merge pull request #13680 from trop-bot/3-0-x-bp-fix-crash-when-opening-devtools-for-frameless-window-1531748442042
Fix crash when opening devtools for frameless window (backport: 3-0-x)
2018-07-16 10:48:37 -04:00
Cheng Zhao
7eff91dde1 spec: openDevTools should not crash for frameless window 2018-07-16 13:40:48 +00:00
Cheng Zhao
780483ff35 fix: use InspectableWebContentsView as content view 2018-07-16 13:40:48 +00:00
trop[bot]
c2f770df02 Update Windows VS2017 requirement (#13665) 2018-07-13 18:17:53 -05:00
John Kleinschmidt
74e6e063d4 Merge pull request #13658 from trop-bot/3-0-x-bp-fix--don't-invoke-callback-after-framesubscriber-is-destroyed-1531475760693
fix: don't invoke callback after FrameSubscriber is destroyed (backport: 3-0-x)
2018-07-13 11:51:07 -04:00
Cheng Zhao
7702cc1090 fix: don't invoke callback after FrameSubscriber is destroyed 2018-07-13 09:56:07 +00:00
trop[bot]
97319e5a3a fix: remember the render_process_id when permission requests occur on the IO thread (#13651)
Fixes #13620
2018-07-13 12:50:57 +10:00
Jeremy Apthorp
041c952574 fix: enable spell checking, which broke in upgrade to ch66
Chromium commit [03563dd163][1] changed the way that the
spellcheck-enabled status was checked, defaulting to false.

Added the first (!) test for spellchecking, too.

Fixes #13608.

[1]: 03563dd163
2018-07-12 13:28:15 -07:00
John Kleinschmidt
6c9b6f9cac Merge pull request #13642 from trop-bot/3-0-x-bp-chore--updates-for-release-process-1531400155960
chore: Updates for release process (backport: 3-0-x)
2018-07-12 09:37:12 -04:00
John Kleinschmidt
c4884da601 Update docs to reflect current process
Also added troubleshooting steps.
2018-07-12 12:56:02 +00:00
John Kleinschmidt
59b05ed661 Fix Appveyor URL 2018-07-12 12:56:02 +00:00
Cheng Zhao
e3204a5ec1 Merge pull request #13637 from electron/fix-remote-3-0-x
fix: guard against double-freeing remote references (3-0-x)
2018-07-12 16:01:52 +09:00
Cheng Zhao
adf49daaac 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 11:17:26 +09:00
Cheng Zhao
9431677e79 add API to return an unique ID for page 2018-07-12 11:16:13 +09:00
John Kleinschmidt
0141c083d0 Bump v3.0.0-beta.2 2018-07-10 14:12:05 -04:00
John Kleinschmidt
96b2c08293 Merge pull request #13612 from trop-bot/3-0-x-bp-build--updates-to-the-release-process-1531237367452
Backport (3-0-x) - build: Updates to the release process
2018-07-10 13:26:24 -04:00
John Kleinschmidt
d6f2c26b0f Move github release checking to node.js
Our upload script was relying on an old python script to find the GitHub release for uploading.
2018-07-10 15:42:53 +00:00
John Kleinschmidt
d478906f9c Update to run new AppVeyor jobs
AppVeyor builds got split into two jobs, `electron-x64` and `electron-ia32`
2018-07-10 15:42:53 +00:00
trop[bot]
85526c7f21 fix: fallback to FullSizeContentView for frameless window on mac (#13600)
When using `views::Widget` to create window, Chromium will automatically
use a `BridgedContentView` as content view, which however does not
support draggable regions inside it.

By fallback to `FullSizeContentView` we can work around this problem,
with the price of losing the ability to use `views::View` APIs. Since
we don't expect users to use the new `View` APIs in `BrowserWindow`
anyway, it should not be a problem.

This change does not affect users of `TopLevelWindow`, and for users of
`BrowserWindow` there is nothing to lose.

In the long term we should look into how to make draggable regions work
with `BridgedContentView`. The related Chromium code is still being
changed rapidly, we can wait until Chromium migrated its
`NativeAppWindowCocoa` class to use `views::Widget`.
2018-07-10 13:09:46 +09:00
John Kleinschmidt
f6ae438005 Merge pull request #13591 from trop-bot/3-0-x-bp-fix-failed-devtools-tests-due-to-fs.statsyncnoexception-not-working--1531147212282
Backport (3-0-x) - Fix failed devtools tests due to fs.statSyncNoException not working
2018-07-09 14:30:42 -04:00
John Kleinschmidt
5e51e608db Merge pull request #13593 from electron/update-libcc-3-0-x
build: Update to latest libchromiumcontent for 3-0-x
2018-07-09 14:30:08 -04:00
John Kleinschmidt
97248a7a56 Update to latest libchromiumcontent
Use the latest libchromiumcontent for 3-0-x which is built with Visual Studio 2017 15.7.4
2018-07-09 13:20:41 -04:00
Cheng Zhao
8639466c75 update node to fix fs.statSyncNoException 2018-07-09 14:40:18 +00:00
Cheng Zhao
31e2166cea Revert "spec: disable the i18nString test"
This reverts commit 86c79653de.
2018-07-09 14:40:18 +00:00
trop[bot]
c2f4144996 Backport (3-0-x) - Fix devtools not functioning well (#13571)
* implement devtools showItemInFolder message

* add stubs for new devtools messages

* fix: update devtools url

* spec: enable back devtools tests

* spec: disable the i18nString test

It is failed because of fs.statSyncNoException, I'll fix it in another
PR.
2018-07-06 13:19:21 +10:00
Hari Juturu
f63e5ffa65 cache lastwebprefs 2018-07-02 16:09:17 +00:00
Hari Juturu
32e40cb4c3 Enable webview in sandbox renderer Security: Inherit embedder prefs onto webview 2018-07-02 16:09:17 +00:00
John Kleinschmidt
8585372e11 Merge pull request #13517 from trop-bot/3-0-x-bp-fix--tray-setcontextmenu-crash-1530309092727
Backport (3-0-x) - fix: tray setContextMenu crash
2018-07-02 09:13:58 -04:00
John Kleinschmidt
2e2289d701 Merge pull request #13530 from electron/fix-mas-build-3-0-x
Update libcc to fix private APIs in MAS build (3-0-x)
2018-07-02 08:05:56 -04:00
Cheng Zhao
f6229d9489 fix: update libcc to fix private APIs in mas build 2018-07-02 15:21:18 +09:00
Maxine Whitely
bace4890c8 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:51:38 +00:00
Cheng Zhao
0a3211c387 fix the crash when loading site with jquery (#13476) 2018-06-29 09:42:26 +09:00
John Kleinschmidt
7d27c91400 Remove no longer used files from asset validation (#13372)
Also removed temporary sha value needed for initial 3.0.0-beta.1
2018-06-27 11:12:11 -07:00
trop[bot]
93edf2edd3 Backport (3-0-x) - fix: deprecate properties in app.getAppMetrics() (#13453)
* fix: deprecate properties in app.getAppMetrics()

* address feedback from review

* fix deprecated property location

* simplify test
2018-06-27 19:07:39 +10:00
trop[bot]
ec993214a2 docs: add native_mate to source code directory structure doc (#13457) 2018-06-27 18:28:13 +10:00
Samuel Attard
509120acde Merge pull request #13456 from electron/native-mate-in-electron-3
Native mate in electron 3
2018-06-27 17:45:04 +10:00
Samuel Attard
b472a69279 Revert "Native mate in electron 3 (#13450)" (#13455)
This reverts commit 7f3620bee3.
2018-06-27 17:43:01 +10:00
Samuel Attard
7f3620bee3 Native mate in electron 3 (#13450)
* Initial commit.

* Do not rely on latest base/template_util.

* Enable modifying existing ObjectTemplate.

* Fix compilation error of function_template.

* Add initial Constructor type.

* Fix passing the wrong parameter.

* Make the Constructor accept arbitrary callback.

* Cleanup.

* Constructor should wrap the this pointer.

* Simplify Wrappable API.

* Remove helper typedefs.

* Support function with 7 parameters.

* Enable converting void*.

* Enable setting method in Dictionary.

* Add v8::Handle<v8::String> to converter.

* Make ScopedPersistent do type conversion.

* Add Arguments.Length method.

* Do not wrap an object when it's already wrapped.

* No need to reset wrapper_ when we would run destructor.

* Call object._init if we have one.

* Add object() accessor for Dictionary.

* Add converter for const char*.

* Enable creating empty Dictionary directly.

* Mark Dictionary.Get as const.

* Strictly check for boolean type.

* Add .gitignore.

* Add APIs to match new V8 APIs.

* Bring back ScopedPersistent.SetWeak.

* Some more APIs fixes.

* Reset handle in weak callback.

This doesn't seem to be neccesary, but we had better follow what upstream does.

* Enable converting ScopedPersistent.

* Fix compilation error with node 0.10.

* Fix compilation error of Constructor and ScopedPersistent in node 0.10.

* Use pump to generate source files.

* Add callback converter.

* Make ScopedPersistent's interface consistent with V8.

* Remove unused constructor of Dictionary.

* Add PersistentDictionary.

* Make throwing exception when parsing args easier

* Use NODE_VERSION_AT_LEAST to determine node version

* Don't throw error in Constructor

* Guard against non-constructor call in Constructor::New

* Fix throwing error in constructor

* Fix ignored exception thrown from constructor.

* OVERRIDE => override

* Avoid unnecessary copy in ConvertToV8

* Check internal field before converting

* Remove unneeded helper

* Add AfterInit method for Wrappable

* Add converter for unsigned long

* usigned long is uint64 on Linux

* Don't reset handle before Wrappable is destroyed

It is possible that the user wants to use the V8 object in the destructor.

Fixes atom/atom-shell#1112.

* added std::set converter

* Use Local instead of Handle

* Pass Handle to upper HandleScope when returning a V8 Handle

* Enter context before calling callback

* Allow converting Array

* Remember isolate in Wrappable

* Make isolate() public

* Check for null when converting Wrappable

* Add IsDestroyed method for Wrappable

* Allow specify methods that can be called after object is destroyed

* Use C++11 version of CreateFunctionTemplate

* Remove callback.h

* Remove locker.h

* Add Dictionary::CreateEmpty

* GetNext should have no side effect when failed

* Don't convert Function to Dictionary

* Don't pass callback as const reference

* Add SetHidden for Dictionary

* Use the new SetWeak in Wrappable

* Check whether key exists in Dictionary::Get

* Don't return v8::Maybe for std::vector

* Add Dictionary::Delete

* Do not manually destroy native resources

* isDestroy => isDestroyed

* Fix converter for std::set

* Improve error message for type error

Close atom/electron#4307.

* Clear internal field when Wrapper is destroyed

* basic_types.h => macros.h

* use v8::private symbols as identifiers for object properties

* Make Wrappable a template class

* Leak Wrappable's template

Since it is declared as static variable it will be released
automatically when process exits, which causes crashes in
renderer process because the template will then be released
later than V8 is closed.

This commit simply leaks the template so the crash won't happen,
this leak should be fine since leaking resource on exit is not
a bad thing.

* Handle.ToV8 should return Object

* Add converter for std::map

* Setup v8::MicrotasksScope for callbacks

* Update to API changes of V8 5.2

* CHECK is not needed

* Call the user call Init in Constructor

* Make InitWith virtual

* Turn Wrappable into using FunctionTemplate

* Create objects from InstanceTemplate

* NewOperatorFactory is not used

* Remove the Constructor class

* GetConstructor should init default constructor

* Pass FunctionTemplate in BuildPrototype

* Do not set constructor name in SetConstructor

* Use ToDetailString for processing error message

* Add back empty handle string

* Add README

* create empty handle for null or undefined value

* Support setting read-only property value

* Add Converter<std::map<std::string, T>>::ToV8

* Add CI build through Electron

* Support 5 argument member function

* Use std functions instead of template_util

* Make Wrappable thread safe

* Use gin to manage FunctionTemplate

Sadly there is no way for us to know when V8 is closing, thus it is
impossible for us to clean the FunctionTemplate on exit at the right
time, which is critcal for multi-thread environment.

* add ability to set high memory usage, skipping the second round of GC callbacks

* Fix broken link

* Add a converter for `nullptr_t`

* Upstream Muon changes to avoid crashing

* only mark handle as independent when it's a high memory user

* Remove WrappableBase::GetWrapper() DCHECK

* virtual members need a virtual destructor

* GetWrapper should be const

* Add support for FreeBSD

* Remove usage of MarkIndependent api

https://bugs.chromium.org/p/chromium/issues/detail?id=780749
Use Active/Not Active as indicator whether the Scavenger can drop wrappers

* Address breaking API

* Fix Value::ToDetailString() call

See https://chromium-review.googlesource.com/848782

* Revert "Address breaking API"

This reverts commit e20cf8687e.

* Add mate::Promise

* Update travis settings

Use Node.js 9.7.0 and Xcode 9.3.

* Update appveyor settings

Use Visual Studio 2017.

* Remove mate::TryCatch (#26)

It's not used anywhere. We use v8::TryCatch instead.

* Address breaking API

* Don't copy things on Dictionary::Set

* Remove native_mate/compat.h

* prepare for merging to electron

* remove native_mate submodule

* update paths for native_mate

* move native_mate script to the electron scripts dir

* rename back to expected values

* fix linting
2018-06-27 17:42:20 +10:00
trop[bot]
21d4ef5eab fix: do not expose Node's external strings (#13452) 2018-06-27 11:40:44 +09:00
Samuel Attard
4f6b6b044f fix linting 2018-06-27 10:05:22 +10:00
Samuel Attard
02026279be rename back to expected values 2018-06-27 10:05:15 +10:00
Samuel Attard
6fd1f7ecb1 move native_mate script to the electron scripts dir 2018-06-27 10:05:07 +10:00
Samuel Attard
922cf08ab4 update paths for native_mate 2018-06-27 10:04:58 +10:00
Samuel Attard
7f8cd51f63 remove native_mate submodule 2018-06-27 10:04:51 +10:00
Samuel Attard
31e5b046a4 Merge 'native_mate' into 'electron' 2018-06-27 10:04:04 +10:00
trop[bot]
957f008726 fix: repair fs.statSyncNoException throwing exceptions (#13397) 2018-06-23 17:27:38 +10:00
Samuel Attard
4cada5e845 prepare for merging to electron 2018-06-22 11:29:57 +10:00
trop[bot]
2069eb1972 Fix links to webview.md (#13370) 2018-06-22 03:06:54 +10:00
Samuel Attard
e15ffd96eb Merge pull request #30 from electron/chromium-66-upgrade
Chromium 66 Updates
2018-06-21 22:35:49 +10:00
trop[bot]
e57f7edd37 Revert "Drop support of Mac OS 10.9" (#13350)
This reverts commit efa0ec0263.
2018-06-21 09:37:18 +10:00
John Kleinschmidt
df62fb7788 Skip tests for release build 2018-06-20 18:20:04 -04:00
John Kleinschmidt
9b09d103fd Update appveyor for release. 2018-06-20 16:55:16 -04:00
John Kleinschmidt
453edb42b4 Fix linting error 2018-06-20 14:17:17 -04:00
John Kleinschmidt
1b2a85436c Bump v3.0.0-beta.1 2018-06-20 12:52:49 -04:00
John Kleinschmidt
c7d4d2d18f Set to last version released
Need to properly bump version
2018-06-20 12:52:33 -04:00
John Kleinschmidt
d1a0eb3d11 Merge pull request #13339 from trop-bot/3-0-x-bp-fix-linking-error-for-mas-build-1529503586342
Backport (3-0-x) - Fix linking error for MAS build
2018-06-20 11:00:35 -04:00
trop[bot]
a0e37d1383 Backport (3-0-x) - test: Upgrade spec dependencies (#13328)
* package: Update mocha, mocha-junit-reporter

* package: Update graceful-fs, multiparty, q, walkdir

* package: Update basic-auth

* package: Update ws

* package: Update dbus-native

* package: Upgrade yargs

* lock: Run `npm audit fix`

* wrench: Fix websocket API change
2018-06-20 09:24:27 -05:00
trop[bot]
128a03450a Backport (3-0-x) - fix: tls check shouldnt rely on an external service (#13338)
* fix: tls check shouldnt rely on an external service

* fix linting in the tls script'
2018-06-21 00:12:58 +10:00
Cheng Zhao
d34c7396ef fix: link with crashpad_client for MAS build 2018-06-20 14:06:32 +00:00
John Kleinschmidt
cdbd4792e3 Merge pull request #13336 from trop-bot/3-0-x-bp-revert-"fix--drop-support-for-os-x-mavericks-(version-10.9)"-1529497748886
Backport (3-0-x) - Revert "fix: Drop support for OS X Mavericks (version 10.9)"
2018-06-20 09:07:46 -04:00
Samuel Attard
b0f6c3ab65 Revert "fix: Drop support for OS X Mavericks (version 10.9)" 2018-06-20 12:29:14 +00:00
trop[bot]
d2508faea8 Disable node options in node config (#13323) 2018-06-20 17:10:37 +10:00
trop[bot]
9bda7d0b73 set mac protocol to none (#13326) 2018-06-20 17:10:23 +10:00
John Kleinschmidt
fc12b5cab3 Merge pull request #13283 from jack-teng1/fix-asar-pack-cant-find-module
fix: can't load module error when app is packaged
2018-06-19 14:58:37 -04:00
John Kleinschmidt
04a7a34c42 Merge pull request #13301 from electron/revert-frame-sub-deprecation
fix: revert frame subscriber deprecation and re-enable tests
2018-06-19 14:26:14 -04:00
Heilig Benedek
f643ce4f66 revert: frame subscriber deprecation and re-enable tests 2018-06-19 19:49:44 +02:00
Jack Teng
3044607746 spec: fix asar spec due to change in node.js
node.js rename the internalModuleReadFile to internalModuleReadJSON
change spec to reflect this change
2018-06-19 10:42:21 -07:00
Jack Teng
10df019075 fix: can't load module error when app is packaged
due to change in node.js(https://github.com/nodejs/node/issues/17076)
internalModuleReadFile has been renamed to internalModuleReadJSON, and
in vendor/node/lib/internal/modules/cjs/loader.js it will call
internalModuleReadJSON and result in can't read the package.json file.
2018-06-19 10:42:21 -07:00
John Kleinschmidt
295c823a1b Merge pull request #13298 from electron/update-libcc-ref
Update vendor/libchromiumcontent ref
2018-06-19 13:24:05 -04:00
John Kleinschmidt
d367b75680 Merge pull request #13296 from electron/miniak/drop-macos-10.9
fix: Drop support for OS X Mavericks (version 10.9)
2018-06-19 13:19:24 -04:00
Aleksei Kuzmin
e683af1eb6 Update vendor/libchromiumcontent ref 2018-06-19 18:12:41 +02:00
Milan Burda
794fe741e9 fix: Drop support for OS X Mavericks (version 10.9) 2018-06-19 17:49:27 +02:00
Jeremy Apthorp
c598272891 refactor: [gn] compile node with boringssl (#13285) 2018-06-19 10:39:43 -05:00
Justin Guze
137aaf2429 fix: pass down the bool value of enableAutoSize to setSize (#13282)
* 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.

* creating new bool for autosize
2018-06-19 10:38:55 -05:00
popod
13f97b4cae Add Sentry.io to 3rd party hosted solution list for crash reports (#13281)
* Add Sentry.io to 3rd party hosted solution list for crash reports

* Single link to sentry doc
2018-06-19 10:32:37 -05:00
Jeremy Apthorp
9e8f83e25c refactor: fix chromium-style in url_request_asar_job (#13284) 2018-06-19 10:31:55 -05:00
Jeremy Apthorp
e177117fa5 chore: [gn] add desktop capturer sources to GN build (#13286) 2018-06-19 10:29:36 -05:00
Danny Brown
dd6c776a19 docs: add note about how to remove a previously set aspect ratio (#13293) 2018-06-19 10:24:42 -05:00
John Kleinschmidt
36c1e4cd75 Merge pull request #13267 from electron/expect-debugger-spec
spec: convert debugger spec to expect
2018-06-19 11:22:47 -04:00
John Kleinschmidt
faef453df5 Merge branch 'master' into expect-debugger-spec 2018-06-19 11:22:25 -04:00
Shelley Vohr
cba3a9fcce spec: convert deprecations to expect (#13268)
* spec: convert deprecations to expect

* address feedback from review
2018-06-19 10:22:08 -05:00
Shelley Vohr
9a79889692 spec: convert ipc specs to expect (#13273)
* spec: convert ipc specs to expect

* fix buffer value comparison
2018-06-19 10:21:50 -05:00
John Kleinschmidt
0219ef0feb Merge pull request #13269 from electron/expect-desktop-capturer-spec
spec: convert desktop capturer to expect
2018-06-19 11:21:13 -04:00
John Kleinschmidt
be29a1973b Merge pull request #13291 from electron/slightly-rewrite-webview-tests
spec: slightly rewrite webview tests
2018-06-19 11:20:45 -04:00
John Kleinschmidt
0fdcc5d485 Merge pull request #13294 from electron/MarshallOfSound-patch-1
Mark browser window affinity as experimental
2018-06-19 11:20:22 -04:00
John Kleinschmidt
a3bc989426 Merge pull request #13292 from electron/fix-release-tests
build:Fix VSTS config for release builds
2018-06-19 11:00:07 -04:00
Samuel Attard
c58fa02e58 Mark browser window affinity as experimental 2018-06-20 00:33:24 +10:00
John Kleinschmidt
d2a950e054 Fix VSTS config for release builds 2018-06-19 10:19:51 -04:00
Aleksei Kuzmin
5151a04613 spec: slightly rewrite webview tests 2018-06-19 13:27:49 +02:00
Aleksei Kuzmin
bbc8d50799 spec: add helper functions for async/await tests 2018-06-19 13:27:43 +02:00
Samuel Attard
bcbcb4c643 Merge pull request #12477 from electron/upgrade-to-chromium-66
Chromium 66
2018-06-19 19:10:37 +10:00
Milan Burda
d5d5386017 use std::make_unique<T> 2018-06-19 10:20:39 +02:00
Samuel Attard
f0e2da7089 Link to the desktop_capture libs 2018-06-19 17:41:43 +10:00
Samuel Attard
906ef3da6a Fix windows desktop_capturer build 2018-06-19 17:41:43 +10:00
Samuel Attard
2720fa751b Fix windows desktop_capturer build 2018-06-19 15:29:16 +10:00
Samuel Attard
42c37cc26d Bump libcc for desktop capturer fix 2018-06-19 15:16:13 +10:00
John Kleinschmidt
56ae882bb8 Update libcc 2018-06-18 23:20:31 -04:00
Samuel Attard
9d18be8fde Remove removed variable popup_bounds_in_view_ 2018-06-19 11:58:26 +10:00
Samuel Attard
ed1f8d3646 Add missing network:: for net log switches 2018-06-19 11:52:17 +10:00
Samuel Attard
efdf4f44c8 Remove stray .only 2018-06-19 11:49:46 +10:00
Samuel Attard
650631421f re-enable desktop capturer 2018-06-19 11:49:46 +10:00
Samuel Attard
518f0005ad mark worker thread taskrunner as WithBaseSyncPrimitives 2018-06-19 11:49:46 +10:00
Samuel Attard
5a28759fea post all desktop capturer apis to worker threads 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
6c604e1eb3 Update vendor/libchromiumcontent ref 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
25e5c174f5 Disable a test 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
b70ca6309c Disable a test 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
8f4d6a1995 Rewrite and enable one of the webview tests 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
ad74fb9210 Enable a test 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
da7cfba357 Enable Desktop Capturer tests 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
10c5141da0 Enable a few tests 2018-06-19 11:49:46 +10:00
Samuel Attard
10160b369b FIXME: getAppMetrics fails on windows CI 2018-06-19 11:49:46 +10:00
Samuel Attard
76f26341bf powerMontor crashes linux ia32, re-disable 2018-06-19 11:49:46 +10:00
Samuel Attard
8200a132be Re-enable cookie specs and add custom cookie name/url validation 2018-06-19 11:49:46 +10:00
Samuel Attard
c4f80a6d89 Enable power monitor test for linux 2018-06-19 11:49:46 +10:00
Samuel Attard
10e0d9b198 Enable process resource test 2018-06-19 11:49:46 +10:00
Samuel Attard
e70b93ad91 Enable childprocess.fork asar specs, fixed during run_as_node fixes 2018-06-19 11:49:46 +10:00
Samuel Attard
bc8525d2f3 re-enable native module tests 2018-06-19 11:49:46 +10:00
Samuel Attard
c882b37a40 Bump node to fix native module rebuilding 2018-06-19 11:49:46 +10:00
Samuel Attard
d9ec885dbc Fixed the spawn tests with the RUN_AS_NODE tests 2018-06-19 11:49:46 +10:00
Samuel Attard
f43eafb94e Fixed the fork tests, remove comment 2018-06-19 11:49:46 +10:00
Samuel Attard
de5bdc8be4 Fix inspector tests, you can now have multiple inspector sessions
Refs: https://github.com/nodejs/node/pull/20137
2018-06-19 11:49:46 +10:00
Samuel Attard
b7d00e26bf Default LoadV8Snapshot changed in C66
CR Ref: https://chromium-review.googlesource.com/c/chromium/src/+/859577
2018-06-19 11:49:46 +10:00
Samuel Attard
9b37e7d988 Re-enable node fork specs 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
0b12e425bd FIXME: Disable powerMonitor tests 2018-06-19 11:49:46 +10:00
Samuel Attard
a64def5745 Bump node vendor to remove openssl compile warning 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
0c69b0e224 FIXME: Disable Desktop Capturer 2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
03a63a485f FIXME: Disable some of the focus related tests
They all pass localy, so it must be a CI issue.
2018-06-19 11:49:46 +10:00
Aleksei Kuzmin
e96d8b664d Skip one of the "chromium feature" tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
1fae6a321c Skip crashReported tests on linux 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
f4a9575193 Drop support of Mac OS 10.9
- set minimum deployment target to 10.10
- set minimum system version to 10.10
2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
792bb9b4a8 Update vendor/libchromiumcontent ref 2018-06-19 11:49:45 +10:00
John Kleinschmidt
67558d65a6 Use Node.js 10 for CI builds 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
caed1c37e0 Update vendor/libchromiumcontent ref 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
de6a5de914 Disable all failing tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
cd428a047f Update vendor/libchromiumcontent ref 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
417fe29dc0 Fix the media events test
Playing a media now requires a user gesture.
See https://goo.gl/xX8pDD.
2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
a7d2f7531c Update vendor/node ref 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
c786abf1e9 Add gfx:PointF support to mate::Converter
It's needed by atom_api_screen, BuildPrototype function on Windows.
2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
622544a902 Check embedder_message_dispatcher_ before sending a message
HandleMessageFromDevToolsFrontend() might be called
after the WebContentsDestroyed() is.
2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
6481161ef2 Update vendor/libchromiumcontent ref 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
6e11494d0b Update vendor/node ref 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
7886cfe408 FIXME: Disable "node feature child_process.fork" tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
368734b8ab FIXME: Disable "node feature inspector" tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
e240a16a20 FIXME: Disable "ses.cookies calls back with an error when setting a cookie with missing required fields" test 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
4a08779bc8 FIXME: Disable a couple of "debugger module debugger.sendCommand" tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
3ca288aba4 FIXME: Disable "BrowserWindow module extensions and dev tools extensions works when used with partitions" test 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
6c0b5cd76c FIXME: Disable "BrowserWindow module beginFrameSubscription method" tests 2018-06-19 11:49:45 +10:00
Aleksei Kuzmin
c3ccd42a23 Update the vendor/libchromiumcontent ref 2018-06-19 11:49:45 +10:00
Tomas Rycl
f9278e518c Fix linker error on Windows
base_jumbo_7.obj, unresolved external symbol __imp_InitPropVariantFromCLSID
2018-06-19 11:49:44 +10:00
Tomas Rycl
40bf582c81 Use /guard:cf during both compile and link parts of the build on Windows
Thanks jack-teng1 for info.
2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
81398c1fde Use Chromium 66.0.3359.181 and Node.js 10.2.0 2018-06-19 11:49:44 +10:00
John Kleinschmidt
08ee965270 Fix pr builds 2018-06-19 11:49:44 +10:00
Heilig Benedek
65b8dd48d8 Update OSR code 2018-06-19 11:49:44 +10:00
Heilig Benedek
91d16c9b3a FIXME: comment out ppapi code that blocks compilation 2018-06-19 11:49:44 +10:00
Heilig Benedek
60ba2013c4 Re-add dirtyOnly to FrameSubscriber and document API change 2018-06-19 11:49:44 +10:00
Heilig Benedek
b9413fe59d Update FrameSubscriber implementation 2018-06-19 11:49:44 +10:00
Nitish Sakhawalkar
ca8843102a Fix duplicate RTCDispatcher console error for debug build.
The solution was to call CreateScreenCapturer from content, and not link the static library in.
2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
9b9a818c43 FIXME: Disable one of the <webview> tag tests. 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
7e4c0b304b Enable a few tests 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
90c3d87e21 Rename LocalSurfaceIdAllocator
https://chromium-review.googlesource.com/809886
2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
dd444fd429 Update vendor/libchromiumcontent ref 2018-06-19 11:49:44 +10:00
Nitish Sakhawalkar
58b9203b9b Update link lib in brightray 2018-06-19 11:49:44 +10:00
John Kleinschmidt
ddaf2cfdc5 Fix appveyor config 2018-06-19 11:49:44 +10:00
John Kleinschmidt
1321e8a6df Use vs2017 only vm for CI 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
6d7e281dc8 Update vendor/node ref 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
32ff2ff8fb FIXME: Disable some of <webview> tag tests 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
a45b1a9205 FIXME: Disable a couple of webContents module tests 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
123b35a7f1 FIXME: Disable "asar package child_process.fork" tests 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
77ae8b65f7 FIXME: Disable desktopCapturer tests 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
5656cb34b8 Use libpdfium_skia_shared.a 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
7616cb38a7 Update vendor/libchromiumcontent ref 2018-06-19 11:49:44 +10:00
Tomas Rycl
a9eb267f92 Update vendor/node ref 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
496dbb6b7e Set llvm_version to "7.0" 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
3e6e01eb94 Update vendor/libchromiumcontent ref 2018-06-19 11:49:44 +10:00
Aleksei Kuzmin
42d84bbd70 Use Node 10.0.0 2018-06-19 11:49:44 +10:00
Tomas Rycl
650f7a920a Correct windows header order 2018-06-19 11:49:44 +10:00
Tomas Rycl
7b17f15703 Fixing pdf print errors on Windows build 2018-06-19 11:49:43 +10:00
deepak1556
8f00240c73 chrome style plugin: remove check-auto-raw-pointer option
This is always enabled now, so the corresponding flag can be removed.
https://chromium-review.googlesource.com/734132
2018-06-19 11:49:43 +10:00
Nitish Sakhawalkar
3ac4c1f03f Update libcc and replace snapshot_blob.bin by v8_context_snapshot.bin 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
a45862c93f Link against device_service and viz_service libs 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
623ed84b23 Update vendor/libchromiumcontent ref 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
000bbd45b8 Add ForceFeedback to the frameworks list on Mac 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
016ac8ff6e Set CHROME_VERSION_STRING to 66.0.3359.117 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
aaef07e637 Update vendor/libchromiumcontent ref 2018-06-19 11:49:43 +10:00
Tomas Rycl
101cd90d37 More pdf printing fixes for Windows 2018-06-19 11:49:43 +10:00
Tomas Rycl
32ebd9e221 Proper dpi parameter type for PdfRenderSettings 2018-06-19 11:49:43 +10:00
Tomas Rycl
bbd6b478ac Add missing header
For ThreadRestrictions class.
2018-06-19 11:49:43 +10:00
Tomas Rycl
7ca1b0704d Rename ScopedWindowsThreadEnvironment::succeeded() to Succeeded()
https://chromium-review.googlesource.com/742447
2018-06-19 11:49:43 +10:00
Tomas Rycl
1ac0ab2b71 Include missing "windows.h" and fix headers ordering
For PCWSTR on line 198.
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
d6ffbc0148 Use an int for wm::ShadowElevation. Pick semantic constants.
https://chromium-review.googlesource.com/899886
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
4a38c2d800 Remove deprecated View::SetLayoutManager
https://chromium-review.googlesource.com/844760
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
f6648a0d4d Remove ScopedComPtr and scoped_comptr.h
https://chromium-review.googlesource.com/726461
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
82d204e932 Wrap X11 headers in ui/gfx/x/x11.h
https://chromium-review.googlesource.com/756711
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
97414cc931 Update vendor/libchromiumcontent ref 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
5451635df0 Update vendor/node ref 2018-06-19 11:49:43 +10:00
Heilig Benedek
1de1ca906a Reimplement FrameSubscriber with mojo VideoCapture APIs 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
28f6e10e5a Add "-fno-exceptions" to "cflags_cc" on linux 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
ac33694028 Update chrome_version.h 2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
9e3011dbcd Update libcc ref 2018-06-19 11:49:43 +10:00
deepak1556
c97706de50 Remove deps on libcommon.a and libjavascript.a 2018-06-19 11:49:43 +10:00
deepak1556
844ef4291c PepperFlashRendererHost to use SkFontStyle.
https://chromium-review.googlesource.com/c/chromium/src/+/602469
2018-06-19 11:49:43 +10:00
deepak1556
43ca4d5bfd Move HTTPBad flags into SSLStatus user data
https://chromium-review.googlesource.com/c/chromium/src/+/709458
2018-06-19 11:49:43 +10:00
deepak1556
3f7bb61b7f Convert base::UInt64ToString to base::NumberToString
https://chromium-review.googlesource.com/813101
2018-06-19 11:49:43 +10:00
deepak1556
39b30b76ea Printing: Remove PrintedPage on non-Windows
https://chromium-review.googlesource.com/c/chromium/src/+/804178
https://chromium-review.googlesource.com/c/chromium/src/+/770492
https://chromium-review.googlesource.com/c/chromium/src/+/704262
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
37d64e6a00 Update vendor/node ref
To get changes from
a635a8aa8f
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
4236c17654 Use native-mate from the Ch66 branch 2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
24db18f34e Update libcc ref 2018-06-19 11:49:42 +10:00
deepak1556
405adb938b Permissions: Remove CONTENT_SETTINGS_TYPE_PUSH_MESSAGING
https://chromium-review.googlesource.com/c/chromium/src/+/758456
2018-06-19 11:49:42 +10:00
deepak1556
4068a62fa6 Define gfx::AcceleratedWidget to be uint64_t instead of NSView*
https://chromium-review.googlesource.com/c/chromium/src/+/792295
2018-06-19 11:49:42 +10:00
deepak1556
c4b8e106c0 Create network_converter for services/network/* types 2018-06-19 11:49:42 +10:00
deepak1556
f1e2304585 Remove OSCertHandle typedefs, use smart pointers for CRYPTO_BUFFER ownership.
https://chromium-review.googlesource.com/c/chromium/src/+/775540
2018-06-19 11:49:42 +10:00
deepak1556
77f427acc8 Check for key system support using new mojo service KeySystemSupport
https://chromium-review.googlesource.com/c/chromium/src/+/834764
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
e1f25253db REVIEW: Don't use removed and deprecated Value::To* APIs
See https://chromium-review.googlesource.com/848782 for removed APIs.
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
a218c9696c Fix error: no matching constructor for initialization of 'v8::TryCatch'
The deprecated constructor has been removed
in https://chromium-review.googlesource.com/848782
2018-06-19 11:49:42 +10:00
deepak1556
5df0362361 Remove obsolete ShouldHandleSystemCommands function.
https://chromium-review.googlesource.com/c/chromium/src/+/924315
2018-06-19 11:49:42 +10:00
deepak1556
2f7c413199 v8: set fatal error handler per isolate 2018-06-19 11:49:42 +10:00
deepak1556
66058c8cfe REVIEW: Use RenderWidgetHost api for event routing
https://chromium-review.googlesource.com/c/chromium/src/+/836267
2018-06-19 11:49:42 +10:00
deepak1556
d386ec0a2b Remove unused elements from RWHV::CopyFromSurface() API and dead code.
https://chromium-review.googlesource.com/c/chromium/src/+/929874
2018-06-19 11:49:42 +10:00
deepak1556
3ad0639b2e Surface synchronization: Implement auto-resize for OOPIF/BrowserPlugin
https://chromium-review.googlesource.com/c/chromium/src/+/753801
2018-06-19 11:49:42 +10:00
deepak1556
ea7e273a06 gin: Make gin/ remember external reference table
https://chromium-review.googlesource.com/c/chromium/src/+/778741
2018-06-19 11:49:42 +10:00
deepak1556
383b21e20a Change calls to GeolocationProvider::UserDidOptIntoLocationServices() to occur via Mojo.
https://chromium-review.googlesource.com/c/chromium/src/+/760239
2018-06-19 11:49:42 +10:00
deepak1556
a5bdb8103b Remove invalid include headers 2018-06-19 11:49:42 +10:00
deepak1556
0cbffb15cc NetworkService: Implement URLLoader::OnAuthRequired
https://chromium-review.googlesource.com/c/chromium/src/+/938960
2018-06-19 11:49:42 +10:00
deepak1556
27cb84eee0 NetworkService: Implement URLLoader::OnCertificateRequested
https://chromium-review.googlesource.com/c/chromium/src/+/848303
2018-06-19 11:49:42 +10:00
deepak1556
b268e37663 Simplify ShouldInterceptResourceAsStream to remove unneeded code path.
https://chromium-review.googlesource.com/c/chromium/src/+/939857
2018-06-19 11:49:42 +10:00
deepak1556
c9f20516ac Make reading blobs work through Blob mojo interface.
https://chromium-review.googlesource.com/c/chromium/src/+/773199
2018-06-19 11:49:42 +10:00
deepak1556
a1683eb4e8 Give the JS dialog manager the alerting frame.
https://chromium-review.googlesource.com/c/chromium/src/+/928828
https://chromium-review.googlesource.com/c/chromium/src/+/791517
2018-06-19 11:49:42 +10:00
deepak1556
eab4227cbf Make Origin(const GURL&) constructor private.
https://chromium-review.googlesource.com/c/chromium/src/+/729284
2018-06-19 11:49:42 +10:00
deepak1556
11fc8374c0 Move DownloadUrlParameters from content/public to components/download
https://chromium-review.googlesource.com/c/chromium/src/+/914232
2018-06-19 11:49:42 +10:00
deepak1556
8968c447f4 Include missing header 2018-06-19 11:49:41 +10:00
deepak1556
7b47d69efe Remove did-get-response-details and did-get-redirect-request events
https://chromium-review.googlesource.com/c/chromium/src/+/805008
https://chromium-review.googlesource.com/c/chromium/src/+/786320
2018-06-19 11:49:41 +10:00
Samuel Attard
3da6450b0c Bump libcc to get builds 2018-06-19 11:49:41 +10:00
deepak1556
2ea26cd4d7 Add MediaStoppedReason to WCO
https://chromium-review.googlesource.com/c/chromium/src/+/758583
2018-06-19 11:49:41 +10:00
deepak1556
100291ec42 OOPIF-ize hung renderers
https://chromium-review.googlesource.com/c/chromium/src/+/896343
2018-06-19 11:49:41 +10:00
deepak1556
2047929cb5 Convert ax_enums.idl to mojom.
https://chromium-review.googlesource.com/c/chromium/src/+/877417
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
7732da41ba Revert "Revert "Add support for OOPIF printing in renderer""
https://chromium-review.googlesource.com/924566
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
93fc60720a Feature Policy Onion Soup (1)
https://chromium-review.googlesource.com/726343
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
bb150185ac Fix includes in AtomQuotaPermissionContext 2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
c75f6f408e DevTools: remove the 'forced' attribute from the AgentHostClosed in DevToolsAgentHost.
https://chromium-review.googlesource.com/745301
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
4bb3e0da15 Rename buildflag_header targets in base for consistency
https://chromium-review.googlesource.com/930033
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
576bf8f6c0 Move resource_response.h to //services/network/public/cpp.
https://chromium-review.googlesource.com/865664
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
1a11bb936b ui::Display cleanup: some enums --> enum classes
https://chromium-review.googlesource.com/915211
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
4602d940cf Add missing header 2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
38f18d9aa2 FIXME: Disable OSR 2018-06-19 11:49:41 +10:00
deepak1556
b7bc3ec20d Update AtomBrowserClient::RenderProcessWillLaunch api
https://chromium-review.googlesource.com/c/chromium/src/+/742344
2018-06-19 11:49:41 +10:00
deepak1556
409ff41c03 Remove SetCookieWithDetailsAsync API in favor of SetCanonicalCookieAsync.
https://chromium-review.googlesource.com/c/chromium/src/+/777954
2018-06-19 11:49:41 +10:00
deepak1556
23f7ccbdda Remove old cookie enum values
https://chromium-review.googlesource.com/c/chromium/src/+/877515
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
2c4bbacec1 Remove base::Value::GetType()
https://chromium-review.googlesource.com/718458
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
343c42e4ef Remove redundant device::PowerSaveBlocker enums.
https://chromium-review.googlesource.com/754169

services/device: Fix enum naming in wake_lock.mojom.
https://chromium-review.googlesource.com/755884
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
37168c0a95 Move ResourceRequestBody to services/network in preparation of moving content/network.
https://chromium-review.googlesource.com/864422
2018-06-19 11:49:41 +10:00
deepak1556
d3c6aa12d1 Remove AtomAccessTokenStore
Its a dummy class since chromium 63,
https://chromium-review.googlesource.com/c/chromium/src/+/708494
2018-06-19 11:49:41 +10:00
deepak1556
bb36a26950 update native-mate ref 2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
6b77fa5b3b [desktop capture] remove dependencies on webrtc/desktop_capture from /chrome
https://chromium-review.googlesource.com/876723
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
5e320994f4 Remove content/linux_sandbox dependence on content_switches.h
https://chromium-review.googlesource.com/734265
2018-06-19 11:49:41 +10:00
Aleksei Kuzmin
160b165358 move DownloadInterruptReasons from content/ to components/download
https://chromium-review.googlesource.com/897967
2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
7fc8814d13 move some files from content/public/browser to components/download/public/core
https://chromium-review.googlesource.com/891686
2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
4e580d5b39 Move download_item.h from content/public to components/download
https://chromium-review.googlesource.com/907687
2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
a315d6330c Remove base::Value::IsType
https://chromium-review.googlesource.com/659798
2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
48c3340d95 Update the vendor/node reference 2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
341f698ace Use latest libcc with Ch66 2018-06-19 11:49:40 +10:00
deepak1556
e3c580e905 Move away from BrowserThread::FILE
* Migrate TtsPlatformImplLinux away from using BrowserThread::FILE.
  https://chromium-review.googlesource.com/c/chromium/src/+/570022
* Move PdfConverter off the FILE thread.
  https://chromium-review.googlesource.com/c/chromium/src/+/592393
* https://chromium.googlesource.com/chromium/src/+/master/docs/task_scheduler_migration.md
2018-06-19 11:49:40 +10:00
deepak1556
6d241e972b Clean up net::HttpAuthPreferences.
https://chromium-review.googlesource.com/c/chromium/src/+/727399
2018-06-19 11:49:40 +10:00
deepak1556
83632f15a9 Fix session restore with network service.
https://chromium-review.googlesource.com/c/chromium/src/+/818486
2018-06-19 11:49:40 +10:00
deepak1556
bbb2393031 Remove base::SizeTToString
https://chromium-review.googlesource.com/c/chromium/src/+/799550
2018-06-19 11:49:40 +10:00
deepak1556
c31d7ef70a Implement SpecialStoragePolicy::ShouldDeleteCookieOnExit
https://chromium-review.googlesource.com/c/chromium/src/+/926369
2018-06-19 11:49:40 +10:00
deepak1556
3666935c06 [DevTools] Make Inspect Element work for OOPIF
https://chromium-review.googlesource.com/c/chromium/src/+/881522
2018-06-19 11:49:40 +10:00
deepak1556
8e125b2953 REVIEW: Remove the notification close-closure in favour of an explicit method
https://chromium-review.googlesource.com/c/chromium/src/+/744205
2018-06-19 11:49:40 +10:00
deepak1556
026e7bff40 Update NetworkDelegate
* Remove Deprecated OnResponseStarted.
  https://chromium-review.googlesource.com/c/chromium/src/+/763193
* Replace cookie lines with CanonicalCookie in CanSetCookie delegates.
  https://chromium-review.googlesource.com/c/chromium/src/+/775606
* Reporting: Check upload permissions asynchronously
  https://chromium-review.googlesource.com/c/chromium/src/+/937566
2018-06-19 11:49:40 +10:00
deepak1556
bf55d856d2 Cookie Store: Extract change notifications to separate classes.
https://chromium-review.googlesource.com/c/chromium/src/+/919159
2018-06-19 11:49:40 +10:00
deepak1556
806acbdf12 Move content/network to services/network.
https://chromium-review.googlesource.com/891646
2018-06-19 11:49:40 +10:00
Aleksei Kuzmin
fba2ab0996 Move throttling to network service
https://chromium-review.googlesource.com/703674
2018-06-19 11:46:59 +10:00
deepak1556
529ced80f2 Remove CancelRequest for PermissionManager
https://chromium-review.googlesource.com/c/chromium/src/+/876746
2018-06-19 11:46:59 +10:00
deepak1556
01fdfc4574 Remove Permission manager from brightray
Electron manages its own implementation, this was
missed out when merging the brightray/ component.
2018-06-19 11:46:59 +10:00
deepak1556
f6665edc73 Convert ColorChooser from ipc to mojo.
https://chromium-review.googlesource.com/c/chromium/src/+/800350
https://chromium-review.googlesource.com/c/chromium/src/+/821954
2018-06-19 11:46:59 +10:00
deepak1556
c29f08c53e DevTools: remove the 'forced' attribute from the AgentHostClosed in DevToolsAgentHost.
https://chromium-review.googlesource.com/c/chromium/src/+/745301
2018-06-19 11:46:59 +10:00
deepak1556
bf620363b9 Devtools: Remove session_id in browser
https://chromium-review.googlesource.com/c/chromium/src/+/866213
2018-06-19 11:46:59 +10:00
deepak1556
f32e59d4b2 Update devtools_file_system_indexer
* Switch DevToolsFileSystemIndexer to use SequencedTaskRunner
  https://chromium-review.googlesource.com/c/chromium/src/+/545200
* Remove dead code from devtools_file_system_indexer.cc
  https://codereview.chromium.org/2508443002
* Fix DCHECKs and a crash in DevToolsFileSystemIndexer
  https://chromium-review.googlesource.com/c/chromium/src/+/553958
* reset trigram cache when devtools window closes
  https://chromium-review.googlesource.com/c/chromium/src/+/969969
* Directly use base::File instead of FileProxy in DevToolsFileSystemIndexer
  https://chromium-review.googlesource.com/c/chromium/src/+/544793
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
deb8cd458d Use latest libcc with Ch66 2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
7c95100180 Rename ProxyService class to ProxyResolutionService
https://chromium-review.googlesource.com/857421
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
079e5df740 Adds ability for BrowserMainParts::PreEarlyInitialization() to fail
https://chromium-review.googlesource.com/862964
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
2f11870970 Update Chrome version 2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
11b96c214d Use latest libcc with Ch66 2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
cb604026d6 DevTools: move remote debugging hosted URL to single location.
https://chromium-review.googlesource.com/905983
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
8020cd9994 Use the same GOOGLE_PROTOBUF_* defines for "brightray" as for Electron 2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
70cc5d87af ResourceBundle → ui::ResourceBundle
Fixes "error: use of undeclared identifier 'ResourceBundle';
did you mean 'ui::ResourceBundle'?".
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
408b62bcc2 Move net/proxy to net/proxy_resolution
https://chromium-review.googlesource.com/868176

Also includes changes from:
Rename files relating to PAC (proxy auto config).
https://chromium-review.googlesource.com/836927
2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
5a2de2108e Add ".../third_party/protobuf/src" to the include_dirs list
Fixes "fatal error: 'google/protobuf/stubs/common.h' file not found".
2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
c7691d8a40 Use latest libcc with Ch66 2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
f5b68b8950 Update crashpad ref 2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
260908cb06 Update Clang revision for Chromium 66
https://chromium.googlesource.com/chromium/src.git/+/66.0.3359.66/tools/clang/scripts/update.py#30
2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
79010b9e06 Set CHROME_VERSION_STRING to 66.0.3359.66 2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
06410202d0 Use latest libcc with Chromium 66.0.3359.66 2018-06-19 11:46:58 +10:00
Aleksei Kuzmin
0c0d31e13a Use the same Crashpad as Chromium 66.0.3359.66 2018-06-19 11:46:58 +10:00
Samuel Attard
17b5870ca1 Change node ref 2018-06-19 11:46:58 +10:00
Samuel Attard
72c7fe5e56 Bump chromium version 2018-06-19 11:46:58 +10:00
Samuel Attard
a9db673cdf Bump libcc 2018-06-19 11:46:58 +10:00
Zhuo Lu
ab24a1e36d feat: netLog API for dynamic logging control (#13068)
* Introduce `net.{start|stop}Logging()`

- Slight regression right now as Electron won't automatically start logging net-logs at launch, will soon be fixed
- To implement callback for async controls

* Add `net.isLogging` & optional callback param for `net.stopLogging()`

* Fix small regression on --log-net-log

--log-net-log should work again

* Error on empty file path

* Only start with valid file path

* Remove unused var

* Allow setting log file path before URLRequestContextGetter starts logging

* Add net log tests

* Remove redundant checks

* Use brightray::NetLog

* Clean up code

* Should automatically stop listening

* 🎨 Attempt to fix styles

* Only run non-null callback

* Dump file to tmpdir

* Simplify net log spec

Spawned Electron process on Linux CI can fail to launch

* Separate netLog module

* Remove net logging test from net spec

* Add tests for netLog

* Fix header guard

* Clean up code

* Add netLog.currentlyLoggingPath

* Callback with filepath

* Add test for case when only .stopLogging() is called

* Add docs

* Reintroduce error on invalid arg

* Update copyright

* Update error message

* Juggle file path string types
2018-06-19 11:45:58 +10:00
Shelley Vohr
adea26bd8f docs: update pr template with checklist (#13270)
This PR updates the Pull Request template so that contributors see a clearer checklist of items they need to complete in order to have a given PR reviewed and landed.
2018-06-18 13:58:30 -07:00
Shelley Vohr
b4cce8e240 spec: convert IAP and GC specs to expect (#13272)
* spec: convert IAP and GC specs to expect

* address review
2018-06-18 09:50:37 -07:00
Shelley Vohr
c65844a7d0 address review feedback 2018-06-18 08:56:24 -07:00
Zeke Sikelianos
994f613450 Merge pull request #13099 from electron/breaking-changes
docs: improve breaking API changes docs
2018-06-18 08:52:53 -07:00
Heilig Benedek
90911a423a Fix autofill popup position when the popup is spawned from a webview (#13184) 2018-06-18 10:15:37 -05:00
Shelley Vohr
314071d79f feedback from review 2018-06-18 08:12:54 -07:00
Shelley Vohr
fe94bf7c1d spec: convert dialog spec to expect (#13271) 2018-06-18 07:56:03 -07:00
John Kleinschmidt
78e199b5d7 Merge pull request #13187 from LostPlayer99/patch-1
docs: update bluetooth example
2018-06-18 09:16:54 -04:00
Cheng Zhao
a564744cd0 Merge pull request #13110 from electron/entry-and-button
feat: add TextField and Button APIs
2018-06-18 18:29:35 +09:00
Cheng Zhao
18dde0a0bd load all pak files on macOS 2018-06-18 16:51:36 +09:00
Cheng Zhao
a11182ca84 feat: add SetText for TextField 2018-06-18 16:51:36 +09:00
Cheng Zhao
70e17b5f8f feat: add LabelButton API 2018-06-18 16:51:36 +09:00
Cheng Zhao
c8e8cb86ce feat: add Button API 2018-06-18 16:51:36 +09:00
Cheng Zhao
ba3700141f feat: add TextField API 2018-06-18 16:51:36 +09:00
Milan Burda
2eb5b751f3 exit HTML fullscreen when window leaves fullscreen (#13090) 2018-06-18 16:48:20 +09:00
Milan Burda
28fd571d0c refactoring: use std::make_unique<T> (#13245) 2018-06-18 16:32:55 +09:00
Shelley Vohr
2c2e8317de spec: convert desktop capturer to expect 2018-06-17 16:00:28 -07:00
Shelley Vohr
4dec5ec5f9 spec: update browser-view spec to expect (#13238)
* spec: update browser-view spec to expect
2018-06-17 15:56:04 -07:00
Shelley Vohr
79c2d22c25 remove assert require 2018-06-17 15:37:16 -07:00
Shelley Vohr
8d5fc61c12 spec: update browser-window-affinity spec to expect (#13239)
* spec: update browser-window-affinity spec to expect

* final cleanup
2018-06-17 15:36:30 -07:00
Shelley Vohr
e023035393 spec: convert debugger spec to expect 2018-06-17 15:35:24 -07:00
Shelley Vohr
c5c571f8ec spec: update callback registry spec to expect (#13263)
* spec: update callback-reg-spec to sexpect

* remove stray only

* remove redundant assertions
2018-06-17 15:08:17 -07:00
Shelley Vohr
0ef0e69f03 spec: convert clipboard spec to use expect (#13266) 2018-06-17 14:47:51 -07:00
Shelley Vohr
a0d252870c spec: update auto-updater spec to expect (#13237)
* spec: update auto-updater to expect
2018-06-16 00:28:28 -07:00
Michael Khalil
ef1e2d6fe0 fix: tray title not inverting when highlighted (#13085) 2018-06-16 16:24:26 +10:00
az-chris
83dc8cc13b docs: update remote.md (#13229)
* Update remote.md

Addressing Issue #9421

* Minor copyediting
2018-06-16 16:21:07 +10:00
Vlad Hashimoto
a67c992c36 docs: fix broken link to commit message guidelines (#13233)
* docs: fix broken link  to commit message guidelines

* Fix another broken links
2018-06-15 19:43:03 -05:00
Felix Rieseberg
1647c12c73 📝 Make appUserModelId requirement clearer (#13259) 2018-06-15 19:32:19 -05:00
Milan Burda
c4942d931c Add FILE_DIALOG_TREAT_PACKAGE_APP_AS_DIRECTORY to web open file dialog (#13220) 2018-06-15 15:51:38 -05:00
Charles Kerr
2d15b8fe78 change c++ std from gnu++14 to c++14 (#13248) 2018-06-15 11:12:49 -05:00
John Kleinschmidt
fa79b40946 Merge pull request #13241 from electron/test-releases
spec: run tests on release builds
2018-06-14 15:14:02 -04:00
Shelley Vohr
91559191c9 spec: update app spec to assert (#13155)
* convert app spec from assert to expect and add dirty-chai
2018-06-14 09:44:27 -07:00
John Kleinschmidt
832b5a36fa Add slack notifications 2018-06-14 11:12:35 -04:00
John Kleinschmidt
38ebf5ac9f Run tests on release builds
Also, added ability to call VSTS release builds via API.
2018-06-14 09:42:55 -04:00
Alexey Kuzmin
6a59b37bea spec: better texts for the Crash Reporter tests (#13227)
* Better failure messages for a Crash Reporter test

* Add a TODO
2018-06-14 19:24:28 +10:00
Alexey Kuzmin
dee9aef975 Add "enable_desktop_capturer" build flag (#13133)
* Make it possible to disable a module for a renderer

* Put DesktopCapturer API under a build flag

The name is "enable_desktop_capturer".
Enabled by default.
2018-06-13 11:15:34 -05:00
Thiago de Arruda
6ff111a141 perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953)
* Don't use JSON to send the result of `ipcRenderer.sendSync`.

- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
  to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
  to wrap/unwrap return values to/from array, instead of
  serializing/deserializing JSON.

This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).

A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory.  This difference
tends increases with larger buffers.

* Don't base64 encode Buffers

* Don't allocate V8ValueConverter on the heap

* Replace hidden global.sandbox with NodeBindings::IsInitialized()

* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter

* Refactor problematic test to make it more reliable

* Add tests for NaN and Infinity
2018-06-13 17:38:31 +10:00
Mateus Silva
1b3cd01851 Doc: Delete unnecessary require and update flag name 2018-06-12 20:17:16 +01:00
John Kleinschmidt
fa1a5f2a42 Merge pull request #13215 from electron/add-space
chore: add space in TLS version check log
2018-06-11 09:35:20 -04:00
Samuel Attard
fc1469175b chore: add space in log 2018-06-11 18:23:59 +10:00
Milan Burda
6ad0a22602 Add process.getHeapStatistics() (#13183) 2018-06-10 22:00:36 +10:00
Mateus Silva
370d790776 Doc: Update bluetooth example
Update event select-bluetooth-device example documentation.
2018-06-07 20:29:20 +01:00
mdpetuum
1b8790aeb2 fix: tray icon bounds didn't allow negative macOS (#13162) 2018-06-07 18:48:39 +02:00
Charles Kerr
828545c128 Merge pull request #13142 from pravdomil/patch-1
docs: clarify docs
2018-06-03 09:58:05 +02:00
pravdomil
fd6eeed5c4 clarify docs 2018-06-02 20:41:19 +02:00
Charles Kerr
6301582e77 Merge pull request #13124 from nornagon/node-configure
refactor: [gn] Build node by calling ./configure
2018-06-01 20:39:23 +02:00
Alexey Kuzmin
0d5e98a201 Slightly rewrite <webview> tag tests (#13122) 2018-06-01 10:56:48 +02:00
Jeremy Apthorp
4321db401c Build node by calling ./configure 2018-05-31 11:18:26 -07:00
Charles Kerr
c7d1f95240 Merge branch 'master' into breaking-changes 2018-05-31 12:12:02 +02:00
John Kleinschmidt
1eddb5cf98 Merge pull request #13052 from electron/fix-vs2017-release
build: update copy_vcruntime_binaries for VS2017
2018-05-30 10:46:40 -04:00
Charles Kerr
b89fe86fa1 Merge pull request #13050 from electron/3.0.0-deprecations
chore: removal of 3.0.0 deprecations
2018-05-30 09:25:36 +02:00
Zeke Sikelianos
cb9ab213bb Merge pull request #13005 from nornagon/gn-docs
docs: dev instructions for GN build
2018-05-29 15:17:16 -07:00
Zeke Sikelianos
326e379154 Merge pull request #13103 from dsandler/patch-1
fix: link to macOS notifications HIG
2018-05-29 15:14:19 -07:00
John Kleinschmidt
8a15231475 Update copy_vcruntime_binaries for VS2017 2018-05-29 17:25:47 -04:00
Jeremy Apthorp
886230f64f Roll libchromiumcontent (#13105) 2018-05-29 13:07:14 -07:00
Charles Kerr
d907f43e6e Merge pull request #13101 from electron/deprecate-property
feat: add deprecate.property()
2018-05-29 12:09:32 -05:00
Shelley Vohr
d40cce92bf remove deprecated signature tests 2018-05-29 11:42:03 -04:00
Dan Sandler
442ec7113e Fix link to macOS notifications HIG 2018-05-29 11:16:26 -04:00
Shelley Vohr
2660859434 update signature for setCertificateVerifyProc in session spec 2018-05-29 10:54:27 -04:00
Charles Kerr
6935addd38 fix: remove unused variable 2018-05-29 16:14:21 +02:00
Charles Kerr
2275625e1a feat: warn if deprecated property is already set 2018-05-29 15:58:02 +02:00
Charles Kerr
61fac1bbc1 test: add tests for deprecate.property() 2018-05-29 15:40:48 +02:00
Charles Kerr
0a614217ce feat: re-add deprecate.property() 2018-05-29 15:40:19 +02:00
Charles Kerr
57cda797f3 docs: copyediting of breaking-changes.md
Tweak the phrasing of sections' introductions
2018-05-29 11:42:20 +02:00
Charles Kerr
b0f1b5f65b Modify 2.0 section's phrasing to use past tense 2018-05-29 11:37:42 +02:00
Charles Kerr
b621321ea0 Re-add missing section 2018-05-29 11:24:39 +02:00
Charles Kerr
066b92c7cd docs: re-document the 2.0 breaking API changes 2018-05-29 11:23:28 +02:00
Charles Kerr
57ad506cde Reorder the version sections newest-to-oldest
This puts 4.0 before 3.0, making room to re-add
the 2.0 changes back in at the end of the file.
2018-05-29 11:17:26 +02:00
Charles Kerr
7f64dbc1ba Make FIXME and API Contract their own H1 sections
Previously they were inside the 3.0 section,
which doesn't really make sense
2018-05-29 11:15:30 +02:00
Charles Kerr
e943cce125 docs: tweak phrasing 2018-05-29 11:10:23 +02:00
Charles Kerr
ac03b81624 docs: add breaking-changes to README 2018-05-29 11:08:49 +02:00
Charles Kerr
bb4979a82e docs: move breaking-changes to api 2018-05-29 11:06:56 +02:00
hkhere
0f1fcc3f4b docs: fix a typo in remote.md (#13084) 2018-05-29 03:14:06 -05:00
Maksym Dogadailo
562831ec1a fix tls script path in documentation (#13089) 2018-05-29 03:12:27 -05:00
Milan Burda
45e78728bd chore: move more constants to options_switches.h/cc (#13093)
* Add options::kNativeWindowOpen

* Add options::kSandbox

* Add options::kPlugins

* Add options::kWebSecurity

* Add options::kAllowRunningInsecureContent

* Add options::kOffscreen
2018-05-29 03:09:51 -05:00
Sven Hüster
ec44fb79d8 updated path to widevine libraries on windows (#13063) 2018-05-28 16:11:51 +09:00
Mikael Finstad
86fcdd0bae docs: Simplify loading of html in example (#13013)
* Simplify loading of html

See new api: https://github.com/electron/electron/pull/11565

* Update first-app.md

* Update first-app.md
2018-05-25 13:05:15 -07:00
Shelley Vohr
104fa96d4d fix options switch for kBlinkFeatures 2018-05-25 11:13:15 -07:00
Shelley Vohr
8bb7525fe0 fix missing instance of kBlinkFeatures => kEnableBlinkFeatures 2018-05-25 11:12:40 -07:00
Shelley Vohr
b7e245aba1 remove atom_api_screen_mac from filenames.gypi 2018-05-25 11:01:05 -07:00
Shelley Vohr
265aa3da29 docs: deprecate UploadFileSystem (#13064)
Deprecate UploadFileSystem in preparation for its being phased out completely in Chromium 66 and correspondingly Electron 4.0.0.
2018-05-25 10:50:27 -07:00
Shelley Vohr
5beadd90ee update electron-typescript-definitions to 1.3.5 2018-05-25 10:41:26 -07:00
Zhuo Lu
fd25f594cd Do not capture cookies and credentials (#13065) 2018-05-24 14:46:54 -07:00
John Kleinschmidt
01a9b32637 Merge pull request #13066 from barinali/fix/dock-link
fix: Update broken dock link in app doc
2018-05-24 16:06:38 -04:00
John Kleinschmidt
46ed623dad Merge pull request #13067 from electron/docs--fix-wrapping-of-welcome-comment
fix wrapping of welcome comment
2018-05-24 16:05:43 -04:00
Zeke Sikelianos
de30defb62 docs: fix wrapping of welcome comment 2018-05-24 12:25:46 -07:00
Ali BARIN
b0b31e67da fix: Update broken dock link in app doc 2018-05-24 21:21:08 +02:00
Jeremy Apthorp
8ea864d6eb docs: dev instructions for GN build 2018-05-24 11:46:35 -07:00
John Kleinschmidt
8bf7ec0c21 Merge pull request #13058 from electron/symserver-posix
Update upload symbols script for posix
2018-05-24 14:10:08 -04:00
Milan Burda
4cfe5ecaa4 add proper support for typed arrays in remote (#13055) 2018-05-24 21:05:46 +09:00
Cheng Zhao
a798a40026 Merge pull request #13044 from electron/more-view-apis
Add layout support for View API
2018-05-24 16:34:03 +09:00
Cheng Zhao
0f7c25fc63 Put View APIs under a build flag 2018-05-24 15:44:07 +09:00
Cheng Zhao
2c8dc9e0bd Add View.addChildView API 2018-05-24 15:36:29 +09:00
Cheng Zhao
322bde526c Add LayoutManager/BoxLayout APIs 2018-05-24 15:36:29 +09:00
Nitish Sakhawalkar
55c8aa7f1c Update upload symbols script for posix 2018-05-23 23:16:03 -07:00
Shelley Vohr
322a303683 address changes from review 2018-05-23 15:57:58 -07:00
Shelley Vohr
5f5322c64e rename blinkFeatures to enableBlinkFeatures 2018-05-23 14:01:34 -07:00
Shelley Vohr
bc10be3de6 rename exposed session method to setCertificateVerifyProc 2018-05-23 13:51:28 -07:00
Shelley Vohr
fb4a8e9cb9 remove ses.setCertificateVerifyProc() deprecation 2018-05-23 09:47:14 -07:00
Shelley Vohr
22fed0c798 remove nativeImage.createFromBuffer() deprecation 2018-05-23 09:43:58 -07:00
Shelley Vohr
94e825378c remove webFrame.registerURLSchemeAsSecure() deprecation 2018-05-23 09:33:57 -07:00
Shelley Vohr
4a90056462 remove webContents.openDevTools() deprecation 2018-05-23 09:30:15 -07:00
Shelley Vohr
3deffa859d remove appcommand media-play_pause option deprecation 2018-05-23 09:24:32 -07:00
Shelley Vohr
003a5a0160 remove tray.setHighlightMode() deprecation 2018-05-23 09:20:39 -07:00
Shelley Vohr
72c63a10ee remove screen.getMenuBarHeight() deprecation 2018-05-23 09:11:48 -07:00
Shelley Vohr
cc30f4c4fd remove crashReporter deprecation 2018-05-23 09:07:14 -07:00
Shelley Vohr
438ac61ff7 remove clipboard deprecations 2018-05-23 09:04:39 -07:00
John Kleinschmidt
b3edfd7d89 Merge pull request #13042 from electron/nightly-release-builds
Updated CI configs for nightly release builds
2018-05-23 10:49:23 -04:00
John Kleinschmidt
6dff60b899 Updated CI configs for nightly builds
Add timestamp to s3 uploads
2018-05-23 10:23:28 -04:00
Aleš Pergl
93bee69266 Remove command line argument black-list (#13039)
* Remove command line argument black-list

Instead block all arguments following a URL.

* Updated tests
2018-05-22 11:51:03 -05:00
John Kleinschmidt
c320da5ec8 Merge pull request #13030 from electron/miniak/member-init
Refactoring: use C++11 class member variable initialization
2018-05-22 10:34:12 -04:00
Shelley Vohr
560c0e72e6 Fix vulnerabilities both top-level and in spec (#13029)
* fix dependency vulnerabilities

* fix vulnerabilities in spec
2018-05-21 21:15:18 -07:00
Milan Burda
2337237d58 Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
John Kleinschmidt
ee57c95aa6 Merge pull request #12999 from electron/miniak/native-mate
Bump vendor/native_mate
2018-05-21 14:16:53 -04:00
John Kleinschmidt
42ec7b317f Add a tag to libchromiumcontent when a release is created. (#12977) 2018-05-21 13:03:23 -05:00
Thiago de Arruda
6f076f7433 Refactor sandbox preload initialization. (#12877)
Use a single synchronous IPC call to retrieve data required by early
sandbox scripts. This has two purposes:

- Optimize preload script initialization by:
  - Using one synchronous IPC call to retrieve preload script,
  webContentsId (more on that later), process.{platform,execPath,env}
  - Lazy loading as many modules as possible.
- Fix #12316 for sandbox. @MarshallOfSound addressed the issue in
  #12342, but it was still present in sandbox mode. By loading
  webContentsId very early and skipping remote module at early
  startup, we fix it for sandbox.
2018-05-21 22:56:05 +10:00
Cheng Zhao
ef7947d176 Merge pull request #12995 from electron/web-contents-view-tests
Fix crashes and add tests for View API
2018-05-21 14:36:53 +09:00
Cheng Zhao
595b0663b2 WebContents may be managed by multiple owners 2018-05-21 10:53:09 +09:00
Cheng Zhao
300c7a4b04 add tests for View and WebContentsView 2018-05-21 10:53:09 +09:00
Cheng Zhao
3b81312cf7 clear pointer when WebContents is closed 2018-05-21 10:53:09 +09:00
Cheng Zhao
51db1efb8a prevent double-adding a WebContents to view 2018-05-21 10:53:09 +09:00
Cheng Zhao
aeeb2a259f destruct objects in stack order 2018-05-21 10:53:09 +09:00
Cheng Zhao
fd4a0626c5 destroy WebContents when view is destroyed 2018-05-21 10:53:08 +09:00
htk3
7c2303c758 Correct app-command name of APPCOMMAND_MEDIA_PLAY_PAUSE (#12408)
* correct app-command name

* add compatibility with old app-command name

* add temporary compatibility with old app-command name

* add a comment saying that media-play_pause is deprecated

* fix lint
2018-05-21 10:52:04 +09:00
Nitish Sakhawalkar
b842a4b133 update mac symbol dump (#12982)
* Update mac symbol dump

Update posix generate_breakpad_symbols.py file to use argparse instead of deprecated optparse.
Also, make changes to the posix generate_breakpad_symbols.py file to accept multiple binaries.
And update dump-symbols.py to get symbols for the mac helper app as well.

* Changes to appease the linter
2018-05-21 10:01:17 +09:00
Milan Burda
7c19ae302e replace isEventEmitter with instanceof EventEmitter (rpc-server) (#12998) 2018-05-21 10:00:56 +09:00
Heilig Benedek
8b2bffcf9e Only expand maximum size constraint if there was a constraint originally (#13003) 2018-05-21 10:56:45 +10:00
Jeremy Apthorp
156a97b80d fix: Menu.setApplicationMenu(null) crash on Linux (#12983) 2018-05-18 10:29:28 -07:00
Milan Burda
a0a5e4abb2 Bump vendor/native_mate 2018-05-18 16:30:20 +02:00
John Kleinschmidt
91173320e6 Merge pull request #12987 from electron/fix-arm-release-build
Fix ARM Release build
2018-05-18 08:17:06 -04:00
Felix Rieseberg
f087f8e205 docs: Document missing quit events during shutdown (#12986)
* docs: Document missing events during shutdown
2018-05-18 07:27:44 -04:00
John Kleinschmidt
7177e941eb Merge pull request #12993 from electron/electron-download-4.x
feat: upgrade electron-download to 4.x
2018-05-18 07:20:42 -04:00
John Kleinschmidt
3fbc3869dc Merge pull request #12991 from electron/drop-arm-alias-builds
build: don't upload aliased arm builds anymore
2018-05-18 07:19:17 -04:00
Mark Lee
cda13e5e79 feat: upgrade electron-download to 4.x
This is a breaking change, as it causes the `electron` module to require
Node 4.x (which has been EOL'd anyway).

Upgrading adds features such as a customizable cache location (via the
`ELECTRON_CACHE` environment variable).

Originally merged in https://github.com/electron/electron/pull/10922 but
was reverted because it was going into a version of Electron that did
not allow breaking changes.
2018-05-17 23:16:27 -07:00
Mark Lee
022ffe69e0 Don't upload aliased arm builds anymore
They are literally a copy/paste of the armv7l builds, and have been
deprecated ever since they were renamed 2 years ago.
2018-05-17 22:22:46 -07:00
Milan Burda
5a5eb43359 detect EventEmitter in removeRemoteListenersAndLogWarning (#12975) 2018-05-18 11:09:25 +09:00
Cheng Zhao
5f461cd5cd fix release build on arm 2018-05-18 10:50:31 +09:00
Milan Burda
850051463b don't use native_mate/compat.h macros (#12984) 2018-05-18 09:08:28 +09:00
Cheng Zhao
ddec87224c Merge pull request #34 from electron/remove-compat
Remove native_mate/compat.h
2018-05-18 09:07:24 +09:00
Milan Burda
d7b8cce162 Remove native_mate/compat.h 2018-05-17 23:39:40 +02:00
Shelley Vohr
83993fede8 update locale documentation (#12967) 2018-05-17 10:34:54 -07:00
Zhuo Lu
d2653e8192 Fix: Prevent menu update while it's open (#12809)
* Update application menu on default runloop

Menu change should be prevented while the menu is open

* Fix code style

* Memory safety
2018-05-17 11:19:28 +10:00
Shelley Vohr
f068ed9ee7 fix docs formatting for ts defs (#12968) 2018-05-16 14:59:44 -07:00
Felix Rieseberg
e8735cc005 docs: Document Python TLS requirements (#12276)
* 🔧 Add simple test script

* 📝 Add documentation

* 🔧 It works, use it

* 🔧 Make the linter happy

* 🔧 Check on bootstrap

* Trivial copyediting

s/operation system/operating system/
2018-05-16 14:19:49 -07:00
Jeremy Apthorp
b160093b91 refactor: GN builds on linux (#12957) 2018-05-16 12:51:11 -07:00
Jeremy Apthorp
da0fd10423 refactor: chromium-style warnings in linux code (#12949) 2018-05-16 14:12:45 -05:00
Mod John
2a161e1725 Fix broken link (#12387)
* Fix broken link

Link was producing a 404 error as the file no longer exists. Wasn't sure where this intended link used to go so took a guess at a appropriate target.

* Update quick-start.md
2018-05-16 10:23:46 -07:00
John Kleinschmidt
04855bc499 Merge pull request #12921 from electron/commit-package-lock
Add package-lock.json
2018-05-16 11:47:21 -04:00
John Kleinschmidt
2b26206ea2 Merge pull request #12844 from didrocks/fix-communitheme-session
fix: support multiple inherited ubuntu session for indicators
2018-05-16 11:44:04 -04:00
John Kleinschmidt
9488ef4867 Merge pull request #12496 from mikeykhalil/8952-ignore-tray-double-click-events
8952 option to ignore tray double click events
2018-05-16 10:17:36 -04:00
John Kleinschmidt
e1c374de6e Merge pull request #12954 from electron/web-dialog-helper
Fix empty description when only one extension is given (GetFileTypesFromAcceptType)
2018-05-16 10:15:54 -04:00
Didier Roche
6feec2e2a5 Fix linting error
Thx @MarshallOfSound
2018-05-16 14:34:13 +02:00
Milan Burda
211d7825d3 feat: DIP <-> screen coordinate conversions (#12879) 2018-05-16 18:34:09 +09:00
Milan Burda
9d9d6ca20b Fix empty description when only one extension is given 2018-05-16 01:58:58 +02:00
Jeremy Apthorp
73eb5af2cc refactor: remove unnecessary std::moves in linux code (#12951)
The compiler was complaining that the move was preventing copy elision.
2018-05-15 14:33:47 -07:00
Jeremy Apthorp
8fa48d1c04 fix: unused variable warnings in linux code (#12950) 2018-05-15 13:49:27 -05:00
Jeremy Apthorp
c4134c3516 refactor: breakpad #includes to work with GN and GYP (#12953) 2018-05-15 11:33:19 -07:00
Jeremy Apthorp
136105e353 fix: wrong list index type in file_dialog_gtk.cc (#12952) 2018-05-15 13:22:52 -05:00
Jeremy Apthorp
0fb6dc79d8 Merge pull request #12948 from nornagon/node-config
[gn] Include node/common.gypi when building node
2018-05-15 10:42:29 -07:00
Jeremy Apthorp
7a36322432 [gn] Include node/common.gypi when building node
Not sure how this ever worked, but the GN build certainly doesn't work
on Linux without this.
2018-05-15 09:53:24 -07:00
Milan Burda
6a4d9309b2 Remove unnecessary heap allocations of atom::V8ValueConverter instances (#12924) 2018-05-15 09:21:23 -05:00
Cheng Zhao
9fc6b9dda2 Merge pull request #12858 from electron/api-view
Refactor NativeWindow (Part 13): Add View and WebContentsView APIs
2018-05-15 22:05:27 +09:00
Cheng Zhao
2f3fcb9dbe give window a default content view
Certain APIs are expecting the window to have a content view, having a
default one simplifies our design.
2018-05-15 14:12:47 +09:00
Cheng Zhao
ea97f43145 check content view in SetMenuBarVisibility 2018-05-15 14:12:47 +09:00
Cheng Zhao
bb2715e7a5 feat: add TopLevelWindow.setContentView API 2018-05-15 14:12:47 +09:00
Cheng Zhao
2b24b26e59 refactor: do not pass WebContents to NativeWindow 2018-05-15 14:03:21 +09:00
Cheng Zhao
640877ebf8 attach native view after widget is created 2018-05-15 14:03:21 +09:00
Cheng Zhao
5a320222e2 feat: add WebContentsView API 2018-05-15 14:03:21 +09:00
Cheng Zhao
e058d11657 feat: add View API 2018-05-15 14:03:21 +09:00
Cheng Zhao
874af5c982 Merge pull request #12837 from nornagon/build-gn
GN build
2018-05-15 14:02:51 +09:00
Milan Burda
56cdf94f95 Fix contents.setSize(options) documentation in web-contents.md (#12922) 2018-05-15 10:17:04 +10:00
Alexey Kuzmin
fc34076c2b Refactor <webview> tag tests (#12886) 2018-05-14 17:00:49 -05:00
John Kleinschmidt
cc2cd95ec5 Release updates in prep for 3-0-x releases (#12916)
* Add autorelease logic

* Fix UnboundLocalError when using s3 upload
2018-05-14 16:21:51 -05:00
Thiago de Arruda
54a506c8eb Add package-lock.json
In order to have 100% reproducible builds, Electron needs
package-lock.json. This is necessary because some dependencies affect
the build output (browserify for example, is used to generate the common
js environment for sandboxed renderers).
2018-05-14 15:23:52 -03:00
Alexey Kuzmin
d5dfb19508 Update some tests (#12917)
* Use Chai for webview tests

* Slightly rewrite one of the <webview> tests

"dom-ready event" > "throws a custom error..."

* Use Chai for BrowserWindow tests

* Rewrite BrowserWindow.addDevToolsExtension tests
2018-05-14 13:17:31 -05:00
John Kleinschmidt
fe7947da90 Merge pull request #12805 from electron/update-blacklist-switches
update command-line backlist switches
2018-05-14 13:31:26 -04:00
John Kleinschmidt
14f4108e55 Merge pull request #12912 from chicoxyzzy/patch-1
Update installation instructions
2018-05-14 13:30:49 -04:00
John Kleinschmidt
6248aaf8dd Merge pull request #12913 from electron/update-libcc-ref
Update vendor/libchromiumcontent ref
2018-05-14 10:50:27 -04:00
John Kleinschmidt
0fd8513c80 Merge pull request #12904 from electron/fix-12875
Allow frameless transparent windows to be sized smaller than 64x64 on Windows
2018-05-14 10:46:40 -04:00
Aleksei Kuzmin
aec3c3fb66 Update vendor/libchromiumcontent ref 2018-05-14 14:18:58 +02:00
Sergey Rubanov
5d3692c16f Update installation instructions 2018-05-14 14:06:22 +03:00
Didier Roche
5df0fd9dc8 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-14 11:00:41 +02:00
Heilig Benedek
ce8af7d499 #else instead of #elif 2018-05-12 22:05:25 +02:00
Heilig Benedek
c6bf39b283 Only include windows headers on windows 2018-05-12 21:33:47 +02:00
Heilig Benedek
f1fd457411 Format code with clang-format 2018-05-12 19:51:19 +02:00
Heilig Benedek
eae0674f61 Match chromium's workaround when setting size of unresizable windows 2018-05-12 17:37:31 +02:00
Samuel Attard
0bb29e092d fix: update docs for the ts parser (#12902) 2018-05-12 18:12:28 +10:00
John Kleinschmidt
bbba9ff906 Merge pull request #12900 from electron/make-httpReferrer-docs-consistent
fix broken doc errors
2018-05-11 14:57:22 -04:00
Charles Kerr
c2282ce4bd remove accidentally-commited changes 2018-05-11 13:33:27 -05:00
Charles Kerr
5354e804d0 Fix oops: remove duplicate doc from last commit 2018-05-11 13:27:35 -05:00
Charles Kerr
bdae243552 Reinstate docs for app.makeSingleInstance()
Since this method is mentioned in breaking-changes.md, we need
the docs to prevent create-typescript-definitions from failing with
"error TS2339: Property 'makeSingleInstance' does not exist on type 'App'."

The reinstated docs are marked with deprecation warnings
that refer the reader to the new API calls.
2018-05-11 13:17:11 -05:00
John Kleinschmidt
8a69a09868 Merge pull request #12896 from electron/remove-chai-as-promised-from-top-level-package-json
Remove chai-as-promised from the top-level package.json
2018-05-11 14:13:03 -04:00
Charles Kerr
13877ce2c8 Fix routingId type
Previous phrasing confused electron-typescript-definitions,
thinking that routingId was of type `unique` 😃
2018-05-11 13:05:05 -05:00
Charles Kerr
8acbfca06b Make Referrer.policy types parseable by e-t-d 2018-05-11 12:40:46 -05:00
Charles Kerr
cf6d36cb72 Consistent docs for LoadURLOptions.httpReferrer 2018-05-11 12:18:38 -05:00
John Kleinschmidt
e79751c8d4 Merge pull request #12892 from electron/skip_pdf_resource
build: don't ship pdf_viewer_resources.pak when feature flag is disabled
2018-05-11 11:46:45 -04:00
Charles Kerr
2c87dfef8a add fs-extra devDependency to spec 2018-05-11 10:36:25 -05:00
Aleksei Kuzmin
8f7a0ca90c Remove chai-as-promised from the top-level package.json
It's a tests dependency and its already present in spec/package.json.
2018-05-11 18:11:46 +03:00
deepak1556
3c76cc21ec build: don't ship pdf_viewer_resources.pak when feature flag is disabled 2018-05-11 16:00:43 +05:30
Jeremy Apthorp
9aa18d29a5 Merge pull request #12885 from nornagon/is-desktop-unity
Don't declare IsDesktopEnvironmentUnity on non-Linux
2018-05-10 14:41:29 -07:00
Jeremy Apthorp
cc386f2345 Merge pull request #12884 from nornagon/views-defines
Require !OS_MACOSX as well as TOOLKIT_VIEWS for views code
2018-05-10 14:13:19 -07:00
Jeremy Apthorp
72057bf7ef clang-format atom_api_web_contents.cc 2018-05-10 14:11:19 -07:00
Jeremy Apthorp
87d0175c76 Require !OS_MACOSX as well as TOOLKIT_VIEWS for views code 2018-05-10 14:11:19 -07:00
Jeremy Apthorp
3090550e53 Merge pull request #12882 from nornagon/gn-includes
Fix up #includes to work with both GYP and GN
2018-05-10 14:10:12 -07:00
Jeremy Apthorp
f2b1b3f6b8 Add GN build 2018-05-10 14:03:02 -07:00
Jeremy Apthorp
26f5390ac0 Don't declare IsDesktopEnvironmentUnity on non-Linux 2018-05-10 13:59:48 -07:00
Jeremy Apthorp
73ac019882 Fix up #includes to work with both GYP and GN 2018-05-10 13:38:40 -07:00
Zeke Sikelianos
1cc5492784 Merge pull request #12870 from electron/remove-macci-refs
Remove references to no longer used https://mac-ci.electronjs.org
2018-05-09 22:25:57 -07:00
John Kleinschmidt
fd8e330760 Remove references to no longer used https://mac-ci.electronjs.org 2018-05-09 16:41:24 -04:00
Shelley Vohr
daf75dd375 add app.isPackaged (#12656)
* add isPackaged method

* add false test case for app.isPackaged()

* document add.isPackaged()

* check isPackaged() without fs call

* convert to non-method property

* document app.isPackaged as a property

* update tests for app.isPackaged

* remove unused fs require

* clarify docs for isPackaged()
2018-05-07 23:15:31 -07:00
Charles Kerr
4d078fdb03 Remove more words (#12852)
* remove 'basically' from docs

* remove 'simply' from docs

* remove most uses of 'just' from docs
2018-05-08 00:16:09 -05:00
biuuu
86d023b02f fix: listeners out of limit warning (#12841)
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 14:10:11 +09:00
John Kleinschmidt
c13d1e8ae6 Merge pull request #12847 from electron/friendly-docs
Remove judgmental docs terms
2018-05-07 12:41:17 -04:00
Shelley Vohr
82dd5fee12 Update issue templates (#12848)
Move to prescribed templates for bugs and features
2018-05-07 09:30:44 -07:00
John Kleinschmidt
428f10f9ee Merge pull request #12532 from electron/native-arm-mksnapshot
Add native arm/arm64 mksnapshot
2018-05-07 11:48:53 -04:00
Shelley Vohr
52e3d5e4f0 remove some beginner-unfriendly terms from docs 2018-05-07 08:46:14 -07:00
Samuel Attard
5b5c161601 feat: new makeSingleInstance API (#12782)
* Refactor app.makeSingleInstance
* new API `app.isPrimaryInstance()`
* new API `app.isSingleInstance()`
* new event `app.on('second-instance')`
* deprecated old syntax `app.makeSingleInstance(cb)`
* deprecated old syntax of `app.makeSingleInstance() --> bool` in favor
of `app.isPrimaryInstance()`
* Fix spec, we don't need process.nextTick hacks any more
* Make deprecation TODO for the return value of makeSingleInstance
* Refactor makeSingleInstance to requestSingleInstanceLock and add appropriate deprecation comments
* I swear this isn't tricking the linter
* Make const
* Add deprecation warnings for release, and add to planned-breaking-changes

BREAKING CHANGE
2018-05-08 01:29:18 +10:00
Didier Roche
811ae1a936 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-07 11:49:37 +02:00
Shelley Vohr
9c8952aef0 Add menu item order control (#12362)
Add four new optional properties to menus in Electron. The four properties are:
'before'
'after'
'beforeGroupContaining'
'afterGroupContaining'

'before/after' - provides a means for a single context menu item to declare its placement relative to another context menu item. These also imply that menu item in question should be placed in the same “group” as the item.

'beforeGroupContaining/afterGroupContaining - provides a means for a single menu item to declare the placement of its containing group, relative to the containing group of the specified item.
2018-05-05 09:37:29 -07:00
Jeremy Apthorp
118da36b52 Send document-start/end to the right context when contextIsolation=true (#12738) 2018-05-04 23:39:54 -07:00
John Kleinschmidt
022b6973b2 Merge pull request #12836 from electron/revert-12833-update-templates
Revert "Update issue templates"
2018-05-04 17:17:40 -04:00
Shelley Vohr
7aa101ba8b Revert "Update issue templates (#12833)"
This reverts commit dac584f7d6.
2018-05-04 13:54:07 -07:00
Shelley Vohr
dac584f7d6 Update issue templates (#12833)
Move to prescribed templates for bugs and features
2018-05-04 13:51:12 -07:00
Milan Burda
48fe013549 Expose events (EventEmitter) to sandboxed renderer (#12828) 2018-05-04 09:51:32 -07:00
Shelley Vohr
f67c625e6a don't filter out invisible menu separators (#12825) 2018-05-04 07:59:40 -07:00
Jeremy Apthorp
b280ea5579 chromium-style fixes (#12826) 2018-05-03 23:45:12 -07:00
Cheng Zhao
7be30bb249 Merge pull request #12787 from electron/mac-content-view
Refactor NativeWindow (Part 12): Do not use custom content view on macOS
2018-05-04 12:48:15 +09:00
Milan Burda
9b56ca3961 Fix optimizeSimpleObject for arrays of objects (#12815) 2018-05-03 22:34:30 -05:00
Cheng Zhao
a2c3db666e viewDidMoveToSuperview may not be implemented 2018-05-04 09:55:09 +09:00
Cheng Zhao
5547df6073 report correct content size in AtomNSWindow
The views framework relies on NSWindow to return content size of window,
since we don't use the borderless window, the original result would
include titlebar. We have to override the function to return correct
result for frameless window.
2018-05-04 09:55:09 +09:00
Cheng Zhao
28fc58067b remove usage of FullSizeContentView 2018-05-04 09:55:09 +09:00
Cheng Zhao
a9709a635c display WebContents as views::View on macOS 2018-05-04 09:55:09 +09:00
Cheng Zhao
ada884a129 refactor: setup contentView on initialization 2018-05-04 09:55:09 +09:00
mikeykhalil
3aba515bbc update docs for getIgnoreDoubleClickEvents method 2018-05-03 13:49:33 -07:00
mikeykhalil
94ffd4bfc0 add getter for ignoreDoubleClickEvents field 2018-05-03 13:49:33 -07:00
mikeykhalil
208374afa4 clean up ignore double click event implementation 2018-05-03 13:49:33 -07:00
mikeykhalil
664e14b91f fixed typo found in code review 2018-05-03 13:49:32 -07:00
mikeykhalil
e1dcd79e48 updated Tray API docs to include new setIgnoreDoubleClickEvents method 2018-05-03 13:49:32 -07:00
mikeykhalil
1f29124d11 updated Tray API to ignore double click events on macOS (#8952) 2018-05-03 13:49:32 -07:00
Zeke Sikelianos
a08b4f780c Merge pull request #12822 from stephanwlee/stephanwlee-patch-1
Fix the type information in in-app-purchase.md
2018-05-03 10:05:00 -07:00
Stephan Lee
6646ef71da docs: fix the type information in in-app-purchase
Method returns Boolean, Manually confirmed the
correctness by running `npm run create-api-json`.
2018-05-03 09:34:21 -07:00
Alexey Kuzmin
3fd0ec99ae Better OSR tests (#12817)
* Add features.isOffscreenRenderingEnabled()

* Use .isOffscreenRenderingEnabled() to determine if OSR is available

* Add a helper closeTheWindow() function

* Skip OSR tests if they are disabled
2018-05-03 11:10:25 -05:00
Charles Kerr
0a2dc1efb0 fix: lint is a devDependency, not a dependency (#12818) 2018-05-03 08:43:40 -07:00
Jeremy Apthorp
cdc5022305 Fix chromium-style errors (#12802) 2018-05-03 09:04:22 -05:00
Rahat Ahmed
5ba9f6a966 docs: Fix typo in transaction.md (#12804) 2018-05-03 00:01:49 -05:00
David Chawei Hsu
091ddb3c34 Fixed several broken links to the sections (#12797) 2018-05-02 21:51:37 -05:00
Charles Kerr
1b8b73ce71 update command-line backlist switches
part of the diff comes from the fact that we've bumped
to a new version of libcc.

another part comes from adding network_switch_list.h, whose
switch definitions follow a slightly different format.
2018-05-02 20:58:22 -05:00
Tim Fish
82329124ff Fixes #12710 (#12786) 2018-05-02 12:19:52 -04:00
Zeke Sikelianos
36c4519d7e Merge pull request #12781 from electron/more-code-signing
More code signing docs
2018-05-02 08:39:03 -07:00
Charles Kerr
c81dac774a Fix some broken documentation links (#12794) 2018-05-02 10:33:07 -05:00
Zeke Sikelianos
1957eb9429 summarize semantic commit requirements (#12665)
* summarize semantic commit requirements

* move semantic commit details into contributing docs

* keep those messages short
2018-05-02 09:47:26 -05:00
Samuel Attard
63d670c286 explain platform differences in code signing 2018-05-02 11:52:52 +10:00
Samuel Attard
94e6be6cae more code signing docs 2018-05-02 11:12:15 +10:00
Zeke Sikelianos
f1c7df8c28 add code signing tutorial (#12767)
* docs: add code signing tutorial

* docs: link to code signing tutorial from readme

* docs: remove unneeded use of "application" from docs readme
2018-05-01 19:56:44 -05:00
Jeremy Apthorp
78ab97ab04 Fix crash when releasing a script context that never had node injected (#12741) 2018-05-01 20:00:46 -04:00
John Kleinschmidt
d355bf0267 Merge pull request #12756 from electron/support-policy
Support policy
2018-05-01 15:40:55 -04:00
Charles Kerr
2cecc6ec2c Remove text about ia32 emulator 2018-05-01 14:31:01 -05:00
Charles Kerr
49cab41fdf Tweak ARM support with suggestion from jkleinsc 2018-05-01 14:25:18 -05:00
Charles Kerr
b0a8d825b3 Clarify the text on Windows for ARM support 2018-05-01 13:40:21 -05:00
Charles Kerr
af60a2fdf6 Add placeholder for supported-platforms.md 2018-05-01 13:32:11 -05:00
Charles Kerr
b602714e06 Use correct Slack channel name 2018-05-01 13:31:48 -05:00
Zeke Sikelianos
013a28a527 Merge pull request #12736 from electron/update-updates-tutorial
document update.electronjs.org in updates tutorial
2018-05-01 09:17:37 -07:00
Cheng Zhao
d46aa92f0b make security-warnings tests more robust (#12757) 2018-05-01 14:28:55 +09:00
bughit
55a7f6f0ce add did-frame-navigate event to WebContents (#12723)
* add did-frame-navigate event to WebContents, pass http response code to it and did-navigate

* docs for frame routing id related api changes on WebFrame and WebContents
2018-05-01 13:34:41 +09:00
Cheng Zhao
c67d1b62e3 refactor: NativeWindowViews should not be a View (#12750) 2018-05-01 13:28:22 +09:00
Cheng Zhao
e00b128a50 fix flaky security-warnings test (#12749) 2018-05-01 09:49:45 +09:00
Charles Kerr
400fb79dc2 Fix tyop 2018-04-30 18:36:17 -05:00
Charles Kerr
7c5b70d304 Fix broken link 2018-04-30 18:33:40 -05:00
Charles Kerr
221b103721 Finish consolidating the finding-support section 2018-04-30 18:26:08 -05:00
Charles Kerr
c0dc2d0238 Copyedit the 'finding support' section 2018-04-30 18:11:10 -05:00
Charles Kerr
37a68aebcf Link issues.md back to support.md 2018-04-30 18:06:29 -05:00
Charles Kerr
a332930cdf add 'finding support' section 2018-04-30 17:58:19 -05:00
Charles Kerr
e44b62d5a3 copyediting 2018-04-30 17:17:42 -05:00
Charles Kerr
d76b0223d9 add end-of-support policy 2018-04-30 17:16:15 -05:00
Samuel Attard
338a816ffd Screen Lock / Unlock events (#12714)
* initial lock-screen and unlock-screen event implementation for macOS

* Implementation of lock-screen and unlock-screen on windows
2018-05-01 02:04:27 +10:00
Samuel Attard
c1381ac598 Add sccache option to bootstrap (#12582)
* 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:03:43 +10:00
Cheng Zhao
51b7322a0f Merge pull request #12716 from electron/share-more-window-code
Refactor NativeWindow (Part 10): Share more code between NativeWindow implementations
2018-04-30 15:24:38 +09:00
Samuel Attard
b90ff86f8c Add missing chai-as-promised dep (#12746) 2018-04-29 22:46:29 -04:00
Cheng Zhao
089428857c remove unnecessary defines 2018-04-30 10:56:54 +09:00
Cheng Zhao
e07ea24610 remove unnecessary static_cast 2018-04-30 10:56:54 +09:00
Cheng Zhao
2225cc9608 refactor: manage widget_ in NativeWindow 2018-04-30 10:56:54 +09:00
Cheng Zhao
727cd68cee refactor: Use widget() instead of window_ 2018-04-30 10:56:54 +09:00
Cheng Zhao
6d18bd0633 refactor: Make NativeWindow inherit WidgetDelegate 2018-04-30 10:56:54 +09:00
Shelley Vohr
ee2c3607ad fix patch output filename (#12742) 2018-04-27 21:43:04 -04:00
Zeke Sikelianos
21ffcbddad document update.electronjs.org in updates tutorial 2018-04-27 10:49:42 -07:00
Shelley Vohr
21e5a2e071 Add clang-format script and precommit hook (#12651)
* add second arg to hook

* fix clang-format script

* remove format script

* help

* first pass at only checking formatting for changed files

* ensure clang-format only runs against changes

* add quiet option for print output

* fix script outputs for clang-format

* wrap conditional for exit error

* remove cpplint include ordering from brightray

* fix python style errors

* add clang-format to linting

* fix var error and add mm extension

* fix diff checking for commit hook

* show incorrectly formatted lines when linting fails

* don't try to check formatting for deleted files
2018-04-27 13:01:12 -04:00
Cheng Zhao
4cd7d11391 Merge pull request #33 from nornagon/build-gn
Don't copy things in Dictionary::Set
2018-04-27 08:41:09 +09:00
Zeke Sikelianos
cc98bd6b6d Merge pull request #12662 from electron/prevent-default
Stop overwriting prevent_default if default wasn't prevented
2018-04-26 12:12:18 -07:00
Jeremy Apthorp
dd7e0f80fe Turn off visual zoom by default (#12679) 2018-04-26 10:27:35 -05:00
Jeremy Apthorp
1a64b9f0c2 Disable navigating on drag/drop (#12655)
* Disable navigating on drag/drop

* Add a WebPreferences option to re-enable navigate on drag/drop
2018-04-26 10:23:27 -05:00
bughit
4fcd178c36 expose WebFrame#routingId (#12614)
* expose WebFrame#routingId and pass it to WebContents frame specific events along with frameProcessId; add WebContets.did-start-navigation event
* fix compilation error on ia32 Windows
2018-04-26 19:17:55 +09:00
Cheng Zhao
152422af81 Merge pull request #12696 from electron/mac-use-widget
Refactor NativeWindow (Part 9): Use views::Widget on macOS
2018-04-26 15:49:49 +09:00
Cheng Zhao
cf70267871 remove unnecessary overrides 2018-04-26 09:48:12 +09:00
Jeremy Apthorp
7733b87431 Don't copy things on Dictionary::Set 2018-04-25 15:18:27 -07:00
Cheng Zhao
5e48dd9d45 be aware of views::Widget's layer 2018-04-25 15:10:29 +09:00
Cheng Zhao
39242c978f fix failed BrowserWindow tests 2018-04-25 15:10:29 +09:00
Cheng Zhao
75a624434c refactor: use views::Widget on macOS 2018-04-25 15:10:29 +09:00
Shelley Vohr
7c4964fae6 revert to more graceful template structure check (#12699) 2018-04-24 11:21:26 -04:00
Tatsuya Hiroishi
9c65abd746 handle remote exception (#12694)
* add cause property to exception in callFunction

* update exceptionToMeta function

* add sender argument
* and cause property to return value

* update exception convert in metaToValue function

* add from and cause properties to the exception error

* unit test for remote exception
2018-04-24 08:40:19 -04:00
Nitish Sakhawalkar
2579071b98 Deprecate did-get-response-details and did-get-redirect-request (#12615)
* Deprecate webContents events did-get-response-details and did-get-redirect-request.

* Update guest view files

* Update webview tag docs and update specs

* Update deprecate.event function

* Update comment

* Update more

* Update documentation for other deprecated event
2018-04-23 14:46:12 -05:00
Leo MG Nesfield (LMGN)
975964f9f0 Not required. (#12682)
VS Code automatically executes from the `windows` object on win32.
2018-04-23 11:13:46 -05:00
James Wheare
bf2b4814e0 [docs] app.isDefaultProtocolClient is available on Linux now (#12674) 2018-04-23 01:16:43 +10:00
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
Paul Frazee
94236bf4eb Create automated-testing-with-a-custom-driver.md (#12446)
* Create automated-testing-with-a-custom-driver.md

* Update automated-testing-with-a-custom-driver.md

* Add 'Automated Testing with Custom Driver' to ToC

* Update automated-testing-with-a-custom-driver.md
2018-04-20 12:39:13 -04:00
Shelley Vohr
f9ee24f8f0 Merge pull request #12627 from vijaypushkin/patch-1
Corrected the name of Capitalization Styles
2018-04-20 09:49:28 -04:00
Cheng Zhao
28b85762fd Merge pull request #12660 from electron/mac-views
Refactor NativeWindow (Part 8): Prepare work for using views::Widget on macOS
2018-04-20 21:31:28 +09:00
Robo
ff571f3b5d Part I: Move from base::Bind to base::BindOnce and remove unneeded base::Passed (#12661) 2018-04-20 19:55:05 +09:00
Cheng Zhao
aa5c80f8a6 Fix new clang warnings 2018-04-20 19:26:20 +09:00
Cheng Zhao
c44279bb10 Move AtomNSWindow to a new file 2018-04-20 19:26:20 +09:00
Cheng Zhao
569967ac21 Move QLPreviewPanelDataSource to AtomNSWindowDelegate 2018-04-20 19:17:08 +09:00
Cheng Zhao
f6a7e5ea23 Move NSTouchBarDelegate to AtomNSWindowDelegate 2018-04-20 19:15:45 +09:00
Cheng Zhao
8e9667d86c Manage AtomTouchBar in NativeWindow instead of AtomNSWindow 2018-04-20 19:15:01 +09:00
Cheng Zhao
ce54fd334d Move AtomNSWindowDelegate to a new file 2018-04-20 19:12:17 +09:00
Cheng Zhao
1c6c75da4f Merge the logic of managing ViewsDelegate 2018-04-20 19:10:37 +09:00
Cheng Zhao
9bc79f840e mac: Override NativeWidgetMac 2018-04-20 19:10:37 +09:00
Cheng Zhao
37a7df49d6 mac: Provide ViewsDelegate 2018-04-20 19:10:37 +09:00
Alexey Kuzmin
fcc82ebd35 Add "app.whenReady()" (#12652)
* Make "chai-as-promised" avaialble in tests

* Add "app.whenReady()"

Closes #9561.
2018-04-20 17:09:23 +10:00
Shelley Vohr
c7a0b419a9 Merge pull request #12669 from electron/MarshallOfSound-patch-1
Add last known working electron version
2018-04-20 00:25:36 -04:00
Samuel Attard
032b7c68d8 Add last known working electron version 2018-04-20 14:23:01 +10:00
Cheng Zhao
55e2dbdbc8 Merge pull request #12647 from nornagon/chromium-style
Fix a bunch of chromium-style errors
2018-04-20 08:15:51 +09:00
deepak1556
6d0ac6593c [chromium-style] Complex class/struct needs an explicit out-of-line copy constructor. 2018-04-19 11:12:58 -07:00
deepak1556
30f1d0991b enable chromium style checker plugin for electron and brightray targets 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
7c5fcecbec Build mac code with -Wunguarded-availability -Wobjc-missing-property-sythesis 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
eb7ccf8afa Bring mac code into conformance with -Wobjc-missing-property-synthesis 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f3c00e96aa Bring mac code into conformance with -Wunguarded-availability 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
27cee90e5e [chromium-style] move methods out of headers 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f1587da480 [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
6c26bb1cf8 [chromium-style] destructors of ref-counted objects should be private 2018-04-19 11:12:10 -07:00
Jeremy Apthorp
e6695cf2ec [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
Jeremy Apthorp
a635f078c6 [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
Shelley Vohr
667c43398c Merge pull request #12650 from electron/clang-format-chromium-src
clang-format chromium_src
2018-04-19 08:37:02 -04:00
Birunthan Mohanathas
cd407d1c3f Stop overwriting prevent_default if default wasn't prevented
This didn't actually cause any issues because there is only one listener
for the affected methods right now. Should we have added more, the last
called observer would have overwritten `prevent_default`. Lets only set
it when necessary to avoid this footgun in the future.
2018-04-19 12:45:21 +02:00
Cheng Zhao
6c9f3066fd Merge pull request #12637 from electron/expose-toplevel-window
Refactor NativeWindow (Part 7): Expose TopLevelWindow in JavaScript
2018-04-19 14:52:04 +09:00
Cheng Zhao
7473b612c5 Make Menu API accept TopLevelWindow 2018-04-19 13:08:37 +09:00
Cheng Zhao
1340b17424 Do not return TopLevelWindow in BrowserWindow.getAllWindows 2018-04-19 13:08:37 +09:00
Cheng Zhao
e38f511737 Make BrowserWindow inheirt TopLevelWindow in JS 2018-04-19 13:08:37 +09:00
Cheng Zhao
71ebd99dfa Expose TopLevelWindow to JavaScript 2018-04-19 13:08:36 +09:00
Cheng Zhao
cfed9fa4b9 Make sure we append parent->child_windows after InitWith 2018-04-19 12:45:48 +09:00
Shelley Vohr
e7bb7dd78b force windows above other includes 2018-04-18 23:33:15 -04:00
Shelley Vohr
f7d4437b3f format previously missed chromium_src .cc files 2018-04-18 22:59:34 -04:00
Shelley Vohr
8cc81509d7 clang-format chromium_src 2018-04-18 22:59:33 -04:00
Shelley Vohr
c090dd2f81 Merge pull request #12649 from electron/clang-format-brightray
clang-format brightray
2018-04-18 22:59:04 -04:00
Cheng Zhao
47826a1262 Merge pull request #12648 from electron/clang-format-atom
clang-format atom files
2018-04-19 11:49:35 +09:00
Cheng Zhao
89d909ab43 Only include UIAutomationCoreApi.h where necessary 2018-04-19 11:14:55 +09:00
Shelley Vohr
35a4a07320 fix include definition errors 2018-04-18 20:48:46 -04:00
Shelley Vohr
ec35966715 remove unused macro 2018-04-18 20:48:45 -04:00
Shelley Vohr
9f7a8832a1 remove include ordering filter 2018-04-18 20:48:45 -04:00
Shelley Vohr
c6f4bbd143 also format missing .cc files 2018-04-18 20:48:45 -04:00
Shelley Vohr
53bdf22c85 clang-format atom files 2018-04-18 20:48:45 -04:00
John Kleinschmidt
717f55b012 Merge pull request #11328 from electron/add-env-to-release-docs
expanded release docs
2018-04-18 11:28:16 -04:00
Shelley Vohr
f8e523b277 Merge pull request #12646 from electron/new-base-bind-converters
add converters for base::BindOnce and base::BindRepeating
2018-04-17 22:18:54 -04:00
Shelley Vohr
49c8c31220 format previously misses .cc files 2018-04-17 21:56:12 -04:00
Shelley Vohr
284aca68c0 clang-format brightray 2018-04-17 21:46:27 -04:00
Shelley Vohr
ca406637af add converters for base::BindOnce and base::BindRepeating 2018-04-17 18:47:12 -04:00
Alexey Kuzmin
a254f3d02c Update trop whitelist (#12642)
* Sort authorizedUsers alphabetically

* Add alexeykuzmin to the authorizedUsers list

* Add deepak1556 to the authorizedUsers list

* Add nornagon to the authorizedUsers list

* Add nitsakh to the authorizedUsers list

* Add zcbenz to the authorizedUsers list

* Add jkleinsc to the authorizedUsers list
2018-04-18 01:23:03 +10:00
Shelley Vohr
7a8a0f6b4b Merge pull request #12616 from electron/fix-copy-to
switch to sk_tool_utils::copy_to()
2018-04-16 22:18:23 -04:00
Zeke Sikelianos
40ff17c9f9 Merge pull request #12619 from electron/add-before-update-event
add new event to auto-updater
2018-04-16 12:43:15 -07:00
Shelley Vohr
354f872919 run clang-format 2018-04-16 15:08:17 -04:00
Shelley Vohr
a19ddfc578 fix copy_to conditional 2018-04-16 12:14:35 -04:00
Nitish Sakhawalkar
875706f660 Address breaking API 2018-04-16 15:40:50 +02:00
Shelley Vohr
59527165ec Merge pull request #31 from electron/fix-ci
Fix failing CI
2018-04-16 09:35:12 -04:00
Samuel Attard
d06c79f5d3 Correct the default of allowRunningInsecureContent as per docs (#12556)
* Correct the default of allowRunningInsecureContent as per docs

* fix linting

* Update calls to match native_mate API change
2018-04-16 08:28:54 -05:00
Alexey Kuzmin
d0c80b5b55 Remove mate::TryCatch (#26)
It's not used anywhere. We use v8::TryCatch instead.
2018-04-16 22:16:48 +09:00
Shelley Vohr
90a7b5ebce switch to simplified version of copy_to 2018-04-16 08:47:34 -04:00
Shelley Vohr
91f97ca02f Update appveyor settings
Use Visual Studio 2017.
2018-04-16 14:38:35 +02:00
Shelley Vohr
1e2828b80e Update travis settings
Use Node.js 9.7.0 and Xcode 9.3.
2018-04-16 14:37:44 +02:00
Shelley Vohr
4cb41ac425 clarify usage around before-quit-for-update event 2018-04-16 08:13:04 -04:00
Samuel Attard
8a94d4fcf9 Merge pull request #23 from electron/promise
Add mate::Promise
2018-04-16 20:18:33 +10:00
Samuel Attard
b180f18b7e Add mate::Promise 2018-04-16 20:08:04 +10:00
Vijay Pushkin
82cbd4327f Corrected the name of Capitalization Styles
Corrected CamelCase to PascalCase and 
mixedCase to camelCase
2018-04-16 13:14:11 +05:30
Shelley Vohr
bb2fb93355 Merge pull request #29 from electron/revert-c66-change
Revert "Address breaking API"
2018-04-15 13:48:22 -04:00
Shelley Vohr
a10564c3b1 Revert "Address breaking API"
This reverts commit e20cf8687e.
2018-04-15 13:26:35 -04:00
Samuel Attard
7cc3b877dc Fix event leak on reuse of touchbar item (#12527)
* fix event leak on reuse of touchbar item

* Clean up child touch bar item event listeners and escape item listeners
2018-04-15 10:24:47 -05:00
Birunthan Mohanathas
cd8278dceb Add missing event parameter to console-message (#12617) 2018-04-15 10:13:02 -05:00
Shelley Vohr
06892775d4 add new event to auto-updater 2018-04-14 21:29:36 -04:00
Shelley Vohr
43a9092c16 remove accidental file change 2018-04-14 21:24:19 -04:00
Shelley Vohr
1727a9eca9 pull up definition and remove include 2018-04-14 21:23:05 -04:00
Shelley Vohr
8b4a89c445 .deepCopyTo() => sk_tool_utils::copy_to() 2018-04-14 12:50:55 -04:00
Zeke Sikelianos
e606a74de3 Merge pull request #12595 from Zhangdroid/fix-broken-url
[doc] Fix broken url
2018-04-13 19:08:20 -07:00
Cheng Zhao
858828d343 Refactor NativeWindow (Part 6): Move NativeWindow bindings to api::TopLevelWindow (#12596)
* Add atom::api::TopLevelWindow

* Make BrowserWindow inherit TopLevelWindow

* Fix reading from wrong weak map

* Read options after setting content view

* OnWindowClosed is not guarenteed to run now

* Fix the offscreen hack in BrowserWindow

* Fix building on Linux

* Fix tests on Linux

* Fix building on Windows
2018-04-14 11:04:23 +09:00
Zhuo Zhang
de1eae288c doc: rename 'blink-feature-string' as 'runtime-enabled-features'
make it more meaningful :)
2018-04-14 08:49:30 +08:00
Charles Kerr
03d119d539 Address @jkleinsc's 2018-03-21 comments 2018-04-13 16:10:53 -05:00
John Kleinschmidt
7acbbf2ef3 Add logic to bundle native mksnapshot for arm/arm64 2018-04-13 15:52:08 -04:00
Zeke Sikelianos
23bb3bd963 Merge pull request #12577 from TiagoDanin-Forks/DeadURLs
[Docs] Fix dead urls
2018-04-13 11:04:11 -07:00
Zhuo Lu
a0cac05555 Clear cache storage data (#12546) 2018-04-13 13:03:16 -04:00
Charles Kerr
3edb1eed8d Merge pull request #27 from electron/fix-to-details-string-call
Fix Value::ToDetailString() call
2018-04-13 11:19:17 -05:00
Robo
ad2baccefa tools: pass custom template for js2c (#12593)
* Update node v9.7.0 ref

* tools: pass custom template to node/tools/js2c.py
2018-04-13 08:20:04 -04:00
Shelley Vohr
9e5c264012 Merge pull request #12601 from electron/makeunique-replace
Replace base::MakeUnique with std::make_unique
2018-04-13 08:19:26 -04:00
Shelley Vohr
d722008367 remove unnecessary ptr_util.h include 2018-04-12 22:34:26 -04:00
Aleksei Kuzmin
3dce1dd240 Fix Value::ToDetailString() call
See https://chromium-review.googlesource.com/848782
2018-04-12 15:36:44 +02:00
Shelley Vohr
b05932310b replace base::MakeUnique with std::make_unique 2018-04-12 08:48:32 -04:00
Jeremy Apthorp
97fb15ac49 Enable WebFrame method forwarding in sandboxed renderers (#12538)
* Enable WebFrame method forwarding in sandboxed renderers

Fixes #9073

* Non-change to kick CI
2018-04-12 11:57:40 +10:00
Zhuo Zhang
dd45473356 fix broken url for 'blink-feature-string' 2018-04-11 15:02:54 +08:00
Cheng Zhao
558d36c1f3 Merge pull request #12584 from electron/no-webcontents-in-constructor
Refactor NativeWindow (Part 5): Add NativeWindow::SetContentView
2018-04-11 15:34:29 +09:00
Cheng Zhao
311d730bce Merge pull request #25 from nitsakh/fix-update-ch
Address breaking API
2018-04-11 15:14:06 +09:00
Cheng Zhao
d706a30849 Fix crash when releasing window 2018-04-11 15:12:53 +09:00
Cheng Zhao
2b5bde4071 InstallView is no longer needed 2018-04-11 15:12:53 +09:00
Cheng Zhao
5a95aaaa54 kVibrancyType should be read in InitFromOptions 2018-04-11 15:12:53 +09:00
Cheng Zhao
cfd8ea8eb0 mac: Correctly unload previous content view 2018-04-11 15:12:53 +09:00
Cheng Zhao
56735d4ff5 Add NativeWindow::SetContentView 2018-04-11 15:12:53 +09:00
Cheng Zhao
13473ee138 web_view_ => content_view_ 2018-04-11 15:12:53 +09:00
Cheng Zhao
97e8800677 Remove web_contents from NativeWindow's constructor 2018-04-11 15:12:53 +09:00
Nitish Sakhawalkar
e20cf8687e Address breaking API 2018-04-10 16:17:20 -07:00
Nitish Sakhawalkar
6fc819dae1 Fix transparency in capturePage (#12561)
* 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-10 19:07:15 +09:00
TiagoDanin
d7a003b0bc 📝 Fix dead urls 2018-04-09 17:58:10 -03:00
John Kleinschmidt
eca0436f58 Use CircleCI for Mac builds (#12572) 2018-04-09 14:19:54 -05:00
Andreas
6b5e09478c Mouse forward on macOS (#12281)
* Accept mouse events according to the forward parameter on macOS.

* Update BrowserWindow docs: mouse forward is available on macOS
2018-04-09 19:35:05 +09:00
Cheng Zhao
0e5aaab0b5 Merge pull request #11959 from yuya-oc/filter-for-mac-dialog
show file filter name for accessory view of file dialog
2018-04-09 19:32:29 +09:00
Cheng Zhao
41134f52d9 Fix memory leaks in file_dialog_mac.mm 2018-04-09 16:51:25 +09:00
Yuya Ochiai
2131dc839a 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)
2018-04-09 16:50:21 +09:00
OJ Kwon
4c51c03779 feat(performspellcheck): queue spell check request asynchronously (#12112)
* feat(spellcheckrequest): implement spellcheckrequest

* feat(performspellcheck): queue spell check request asynchronously
2018-04-09 15:18:50 +09:00
OJ Kwon
dabd61bf80 chore(build): support generating compilation db (#12104) 2018-04-09 14:54:14 +09:00
Andrew MacDonald
6bfb122cd1 Add a display_id parameter to the desktopCapturer API. (#12417)
* Add a screen_api_id parameter to the desktopCapturer API.

When using the DirectX capturer on Windows, there was previously no way
to associate desktopCapturer/getUserMedia and electron.screen API
screens. This new parameter provides the association.

* Fix non-Windows build.

* Fix Mac.

* Fix Mac harder.

* JS lint

* clang-format C++ code.

* IWYU

* display_id, Linux comment, better test

* lint

* Fix tests on Linux.

* Add display_id documentation.
2018-04-09 14:43:35 +09:00
Robo
89f2eb1023 asar: remove patch to support graceful-fs (#12562) 2018-04-07 10:13:32 -05:00
Nitish Sakhawalkar
970f79e32f Check for devtools in BrowserWindow.getFocusedWindow() (#12526) 2018-04-06 09:21:32 -04:00
loc
82f8914f9e remove defines from build-libchromiumcontent (#11927) 2018-04-06 08:22:15 -04:00
Robo
65e8199a93 Enable plznavigate aka browser side navigation (#12535)
* enable plznavigate code path

* AtomBrowserClient::GetGeolocationApiKey returns the right default

* use IsLoadingToDifferentDocument to identify top level navigation in mainFrame

* use candidate site instance when available

* spec: don't test httpReferrer option for file origin

* update libcc ref

* affinity: only group same site in this mode

* plznavigate: don't emit did-get-response-details event for blob scheme
2018-04-06 16:22:52 +09:00
Charles Kerr
f8b8dc1494 Simplify views/menu_bar focus management (#12536)
* Simplify views/menu_bar focus management

* Make the linter happy

* Remove NativeWindowView focus manager listener API

* remove unnecessary change

* MenuBar ctor now takes a views::View
2018-04-05 21:53:08 -05:00
Charles Kerr
cad8eed6e4 Use ui:view's Activate() on Linux (#12539)
In NativeWindowViews, we started rolling our own _NET_ACTIVE_WINDOW
event in June 2016 to raise windows because Chromium's implementation
wasn't working as expected. (See commit 32b692b6)

I'm not seeing this behavior in our current version of libcc,
so I wonder if this workaround is still needed?
2018-04-05 22:39:53 -04:00
Jeremy Apthorp
f0d08f4da1 Propagate referrer to new windows (#12397)
* Propagate referrer to new windows

Fixes #9205

* Rearrange -new-window event arguments for backwards-compatibility

* Plumb referrer policy through guest-window-manager

* Document the Referrer structure and its uses

* Add tests for referrer in new windows

* Docs nits
2018-04-05 18:13:24 -05:00
Vanessa Yuen
4316949a1d Merge pull request #12542 from natsuozawa/patch-1
Minor grammatical issue in first-app.md
2018-04-05 13:06:06 +02:00
Natsu
7a01ff11cd Fixed one minor grammatical issue
Line 93: "principals and methods" -> "principles and methods"
2018-04-05 19:26:26 +09:00
Kristof Mattei
c1439bb02b Use Visual Studio's vswhere to find Visual Studio, and use proper version numbers to locate (#12537) 2018-04-05 16:13:30 +09:00
Heilig Benedek
a14ebc80d2 Disable chromium's redraw locking on Windows when DWM is disabled (#12501)
* disable redraw locking on windows

* update libcc ref
2018-04-05 15:55:26 +09:00
Adrien Fery
5486a65702 Improve in-app purchase for MacOS (#12464)
* Add methods to finish transactions

* Add a method to get the product descriptions from the App Store

* Improve the documentation of a transaction structure

* Add a tutorial for In App Purchase

* Fix typo in In-App Purchase tutorial

* Fix style of In-App Purchase files

* Fix In-App-Purchase product structure conversion in amr64

* Fix code style in In-App Purchase tutorial documentation

* Fix typos in In-App Purchase documentation

* Fix typo in In-App Purchase spec

* Slight style fixes
2018-04-05 15:33:13 +09:00
Heilig Benedek
52b1065b3b Focus webview directly in offscreen mode (#12507) 2018-04-05 15:14:42 +09:00
Robo
c1404ff2c1 vendor: Update native mate to fix v8 DCHECK crash (#12534)
* update native_mate ref

* Remove MarkHighMemoryUsage api
2018-04-05 00:47:18 -05:00
Cheng Zhao
c75dd93b92 Move AutofillPopup from NativeWindow to WebContents (#12514) 2018-04-05 09:53:51 +09:00
Aleš Pergl
3a45d541f3 Expose IsOffScreen method always to JS. (#12530) 2018-04-04 12:19:08 -05:00
MadfishDT
200388ff96 add moveTop API to move window z-oder to top for win32, mac (#12485)
* add moveTop API to move window z-oder to top for win32, mac

* BrowserWindow::MoveTop SetMethod bug fix
2018-04-03 08:04:32 -05:00
Zeke Sikelianos
9d570dc645 add IDL and Mojo to glossary (#12504) 2018-04-03 07:58:25 -05:00
Cheng Zhao
8fc5c6c862 Refactor NativeWindow (Part 3): Remove is_offscreen_dummy from NativeWindow (#12503)
* Don't use is_offscreen_dummy in MessageBox

* Don't use is_offscreen_dummy in DownloadManagerDelegate

* Don't use is_offscreen_dummy in CommonWebContentsDelegate

* Remove is_offscreen_dummy from NativeWindow
2018-04-03 12:19:35 +09:00
Charles Kerr
1a649a6ac3 Handle in-app-purchase less fatally on non-Darwin (#12511)
Fixes #12311

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 18:55:44 -05:00
Jeremy Apthorp
a7352e57d5 WebFrame.setVisualZoomLevelLimits sets user-agent scale constraints (#12488)
Fixes #11216.
2018-04-02 18:20:13 -04:00
Nitish Sakhawalkar
fbff355742 Support for navigator.languages (#12419) 2018-04-02 12:47:00 +09:00
Cheng Zhao
02693839ca Merge pull request #24 from electron/remove_independent_lifetime
Remove usage of MarkIndependent api
2018-03-31 21:42:13 +09:00
deepak1556
894c96f39f Remove usage of MarkIndependent api
https://bugs.chromium.org/p/chromium/issues/detail?id=780749
Use Active/Not Active as indicator whether the Scavenger can drop wrappers
2018-03-31 15:08:17 +05:30
Robo
171230e45d Cleanup destruction of URLRequestContextGetter (#12305)
- Add Leak detector
 - Indicate shutdown of request context from Browser Context
 - Change stored references to URLRequestContextGetter to use BrowserContext
 - Destroy session properties explicitly
2018-03-30 08:24:55 -05:00
Alexey Kuzmin
fc00a2ba32 Use latest libcc (#12476) 2018-03-29 16:35:07 -05:00
Shelley Vohr
a677c22e1f re-enable null check against menu item accelerators (#12449) 2018-03-27 20:32:55 -04:00
Sean
5f7c6ccfe4 update doc for setProgressBar (#12428)
* 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 10:29:31 +11:00
Jeremy Apthorp
22da843efa s/now/not/ in allowRunningInsecureContent documentation (#12452) 2018-03-28 10:15:29 +11:00
Samuel Attard
2e5cb930de Provide an easy way to use a local build of Electron (#12426)
* Provide an easy way to use a local build of Electron

For instance from ~/projects/electron/out/D

* document ELECTRON_OVERRIDE_DIST_PATH

* Make the linter happy

* Tweak ELECTRON_OVERRIDE_DIST_PATH docs
2018-03-25 00:03:17 -04:00
Charles Kerr
cfd91a3b56 Fix documentation tyop (#12422) 2018-03-23 18:35:14 -04:00
Cheng Zhao
6a3d238b7e Merge pull request #21 from yzgyyang/master
Add support for FreeBSD
2018-03-23 09:19:00 +09:00
Guangyuan Yang
31206cfa0a Add support for FreeBSD 2018-03-22 14:14:26 -04:00
Jeremy Apthorp
95cbd69e48 Update testing docs to reflect --grep syntax (#12400)
* Update testing docs to reflect --grep syntax

* Use @zeke's suggestion to s/suites/tests/
2018-03-22 13:19:53 -04:00
Cheng Zhao
f41cce96a3 Increase timeout for inAppPurchase test (#12403) 2018-03-22 08:47:29 -05:00
Zhuo Lu
c50a460ce6 Do not block main process for async dialog (#12404) 2018-03-22 08:57:33 -04:00
Clément Beffa
642f5a84d4 Workspace notifications support on macOS (#12093) 2018-03-22 18:41:03 +09:00
Nitish Sakhawalkar
9d1527b1df Fix context menu for sandbox devtools (#11933) 2018-03-22 16:15:57 +09:00
Cheng Zhao
67f052a6e1 Merge pull request #12168 from electron/easier-web-contents-preferences
Cleanup the static methods of WebContentsPreferences
2018-03-22 15:58:04 +09:00
Cheng Zhao
05fcec829e Use Clone explicitly instead of MergeDictionary 2018-03-22 15:29:20 +09:00
Cheng Zhao
0abbedcdae Fix error caused by refactor 2018-03-22 15:21:56 +09:00
Cheng Zhao
6df2326a30 Cleanup the static methods of WebContentsPreferences
The static methods are totally unnecessary, and it makes code harder to
understand since we are using different ways to do the same things.
2018-03-22 15:21:56 +09:00
Cheng Zhao
001275339b Hide WebContentPreferences::GetWebContentsFromProcessID from public 2018-03-22 15:20:03 +09:00
Cheng Zhao
3d47a8a2fd Remove the static getter methods from WebContentsPreferences 2018-03-22 15:20:03 +09:00
Cheng Zhao
887bc12350 Add WebContentsPreferences::From that checks parameter 2018-03-22 15:16:26 +09:00
Cheng Zhao
9772777919 web_prefrences() => dict()
Having property name being the same with class name is making code
harder to understand, and dict is much shorter.
2018-03-22 15:15:30 +09:00
Zeke Sikelianos
d323ce2c42 Merge pull request #12399 from electron/now-we-call-ourselves-electrocats
now we call ourselves electrocats
2018-03-21 17:06:59 -07:00
Zeke Sikelianos
7c0c798c90 now we call ourselves electrocats 2018-03-21 16:50:52 -07:00
Shelley Vohr
05dc04dacc don't check darkmode for drawStatusBarBackgroundInRect (#12395) 2018-03-21 19:03:57 -04:00
Charles Kerr
0d7becff87 Use the appname as the tray icon's default tooltip (#12388)
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 12:15:30 -05:00
htk3
6fa4ec22c5 fix broken fragment link in ipc-main.md (#12389) 2018-03-21 12:05:27 -05:00
bughit
37eccbcd33 Update 3 (of Visual Studio 2017) is leftover from 2015 (#12372)
does not apply to 2017
it's not clear to me that it's possible to download a non current version of vs2017
but if a specific version is required the directions should explain how to get it
2018-03-20 16:15:59 -05:00
Zeke Sikelianos
e3dfffb77b add docs/development/README.md (#12373) 2018-03-20 15:36:48 -04:00
John Kleinschmidt
060b592fc8 Merge pull request #12348 from electron/fix-browser-view-draggable-region
Update draggable regions when changing BrowserView
2018-03-20 10:40:27 -04:00
Cheng Zhao
cd30a4e2d4 Merge pull request #11459 from electron/upgrade-to-chromium-63
Upgrade to Chromium 63
2018-03-20 17:25:34 +09:00
Cheng Zhao
c70150847d Ignore warning LNK4199
We are now sharing the /DELAYLOAD settings between configurations.
2018-03-20 10:13:17 +03:00
Cheng Zhao
2e94a730cc Isolate the code using content::WebContentsImpl 2018-03-20 10:13:17 +03:00
Gellert Hegyi
a9cdd6614a fixes class name 2018-03-20 10:13:17 +03:00
Gellert Hegyi
0ad8815bbc fixes offscreen rendering issues 2018-03-20 10:13:17 +03:00
Cheng Zhao
d4969783d7 Avoid including web_contents_impl.h
This can fix the build error caused by duplicate typedefs.
2018-03-20 10:13:17 +03:00
deepak1556
f5e1ee010b FIXME: disable pdf viewer feature 2018-03-20 10:13:17 +03:00
deepak1556
e24c0dda5d add features module to detect availability of build time features at runtime 2018-03-20 10:13:17 +03:00
deepak1556
4b39d17e5f move pdf viewer behind feature flag 2018-03-20 10:13:17 +03:00
deepak1556
c1908147a9 Fix windows build 2018-03-20 10:13:17 +03:00
John Kleinschmidt
6aebae5a98 Remove custom appveyor config 2018-03-20 10:13:17 +03:00
Aleksei Kuzmin
714a793a0e Update to the latest libcc with Ch63 2018-03-20 10:13:17 +03:00
Cheng Zhao
94fce43ed9 Emit document-start for the correct env
This fixes the crash in RunScriptsAtDocumentStart when "affinity" option
is specified. Previously we were assuming only one main frame exists in
the renderer process, but the "affinity" option breaks this option.

There is also a bug that "node::Environment::GetCurrent" does not return
nullptr for context without a env in it, I'm not sure whether it is a
bug of Node or V8.
2018-03-20 10:13:17 +03:00
deepak1556
c3f8f6bc42 re-use request context from IOThread 2018-03-20 10:13:17 +03:00
Cheng Zhao
97fcf7079b Update chrome_version.h 2018-03-20 10:13:17 +03:00
Cheng Zhao
cb4c54eec1 Use 60 as module version for V8 6.3 2018-03-20 10:13:17 +03:00
deepak1556
9702898dcd AccessTokenStore is only needed to initialize network location service 2018-03-20 10:13:17 +03:00
deepak1556
97eb7f2c98 REVIEW: ContentBrowserClient now provides geolocation api key and request context 2018-03-20 10:13:16 +03:00
deepak1556
f9de29ed8c Enable node crypto spec 2018-03-20 10:13:16 +03:00
Cheng Zhao
246f6318e4 Fix release build on Windows 2018-03-20 10:13:16 +03:00
Aleksei Kuzmin
d5ecbfc539 spec: Do not assume en-US locale to be the current 2018-03-20 10:13:16 +03:00
John Kleinschmidt
750c3d05aa debug build issues 2018-03-20 10:13:16 +03:00
John Kleinschmidt
dfc4dbdbd3 Drop clone folder 2018-03-20 10:13:16 +03:00
John Kleinschmidt
d58b366123 Add whole appveyor config 2018-03-20 10:13:16 +03:00
John Kleinschmidt
d90b600bc1 Use visual studio 17 image 2018-03-20 10:13:16 +03:00
Aleksei Kuzmin
d3afb595dc Tab Capture in VIZ: CopyOutputRequest/Result API changes.
https://chromium-review.googlesource.com/637003
2018-03-20 10:13:16 +03:00
Aleksei Kuzmin
639be7f7bc Simplify transparent backgrounds
https://chromium-review.googlesource.com/669646
2018-03-20 10:13:16 +03:00
Cheng Zhao
b6b7707dc3 Fix Windows linking error 2018-03-20 10:13:16 +03:00
Cheng Zhao
624e09533c Avoid using deprecated skia size methods 2018-03-20 10:13:16 +03:00
Cheng Zhao
42938de973 Build with Visual Studio 2017 2018-03-20 10:13:16 +03:00
deepak1556
e6d38cb64e update node ref to fix --typed_array_max_size_in_heap error 2018-03-20 10:13:16 +03:00
Nitish Sakhawalkar
524f56354c Fix webview resize test 2018-03-20 10:13:16 +03:00
deepak1556
5e9da04ab7 update libcc ref to disable ScriptForbuddenScope check 2018-03-20 10:13:16 +03:00
deepak1556
f4ee48eaf4 v8-platform header is not required explicitly 2018-03-20 10:13:16 +03:00
Cheng Zhao
d141d2445d Fix build error caused by base::Passed changes 2018-03-20 10:13:16 +03:00
deepak1556
b08d086b0f fix stale rebase 2018-03-20 10:13:16 +03:00
Shelley Vohr
7e7634d344 Chromium 63 - upgrade to Node v9.7.0 (#12219)
* OPENSSL_PRODUCT => openssl_product

* node => node_lib and V8_BASE => v8_base

* build node target for <(node_lib_target_name)

* update node ref

* update node::Environment::TickInfo calls

* update node ref

* Use InternalCallbackScope for ticking event loop

* enter context scope before InternalCallbackScope

* don't lint v8 platform header
2018-03-20 10:13:16 +03:00
Cheng Zhao
ecefe41728 Linker behaves differently on arm 2018-03-20 10:13:16 +03:00
Cheng Zhao
34cb9cf1fe Use lld for linking on both Debug/Release builds
This follows Chromium's config, otherwise we get linking error:
/usr/bin/ld: shared_library/libmirclient.so.9: __cxa_finalize: invalid needed version 2
shared_library/libmirclient.so.9: error adding symbols: Bad value
2018-03-20 10:13:16 +03:00
Cheng Zhao
76ef6e3ecc CertificateList => ScopedCERTCertificateList 2018-03-20 10:13:16 +03:00
Cheng Zhao
0f9f04e4ec Fix cpplint warning 2018-03-20 10:13:16 +03:00
Cheng Zhao
aa25381651 Fix warning when building openssl-cli 2018-03-20 10:13:16 +03:00
Cheng Zhao
5f71fbc6b3 Fix warnings when building node 2018-03-20 10:13:16 +03:00
Nitish Sakhawalkar
ecd0f9d0e7 Fix build by adding define in node_includes.h 2018-03-20 10:13:15 +03:00
Tomas Rycl
f2116c50c0 Unity detection now works in all OSes - returns false. 2018-03-20 10:13:15 +03:00
Tomas Rycl
c15e09b71e rtc_base_approved renamed to generic 2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
f68cba0c71 Update Chrome version 2018-03-20 10:13:15 +03:00
deepak1556
80772c2419 FIXME: Disable node crypto spec 2018-03-20 10:13:15 +03:00
deepak1556
b9bb4dfc06 FIXME: re-enable guest webcontents based on OOPIF feature 2018-03-20 10:13:15 +03:00
deepak1556
719980a948 REVIEW: remove device emulation ipc dependecny on rvh 2018-03-20 10:13:15 +03:00
deepak1556
5684f8886f REVIEW: move ipc use from rvh to rfh 2018-03-20 10:13:15 +03:00
deepak1556
b552ad7065 add taskpriority when creating sequences task runners 2018-03-20 10:13:15 +03:00
deepak1556
1f2d229862 re-use title information from NavigationEntry 2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
fa3d9d32ae Use XDG_CURRENT_DESKTOP to determine if the desktop environment is Unity
https://chromium-review.googlesource.com/682615
2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
e35b128fa3 Update crashpad to match Chromium 63.0.3239.108 2018-03-20 10:13:15 +03:00
deepak1556
6de49f515e FIXME: Disbale browser side navigation aka PlzNavigate 2018-03-20 10:13:15 +03:00
deepak1556
007ea500d0 REVIEW: Re-use devtools network throttling from content layer
https://chromium-review.googlesource.com/c/chromium/src/+/664356
2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
490b1e2532 FIXME: Disable some tests to avoid crashes 2018-03-20 10:13:15 +03:00
Samuel Attard
8269a6dc37 Temporarily disable OnCursorChange
ScopedProfile is removed
https://chromium-review.googlesource.com/c/chromium/src/+/655147
2018-03-20 10:13:15 +03:00
Samuel Attard
78266db427 Fix webrtc linking issues 2018-03-20 10:13:15 +03:00
Samuel Attard
b0fe23072d Update chrome version 2018-03-20 10:13:15 +03:00
Samuel Attard
a21e0c652c Fix WorkerPool and IPC send inside print job/manager 2018-03-20 10:13:15 +03:00
Samuel Attard
0b6293e2f5 Pickle write methods now return void and use GE_CHECK instead 2018-03-20 10:13:15 +03:00
Samuel Attard
9181db1304 Disable tautological check for chromium code 2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
dcece31519 FIXME: Disable OSR by default 2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
aab6f27503 Move DrawQuads to components/viz/
https://chromium-review.googlesource.com/667539
2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
74cedd3255 Move ReleaseCallbacks and CopyOutputRequests out of quads/
https://chromium-review.googlesource.com/682760
2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
d1061692d5 Move CompositorFrame{Metadata} to viz/common/quads.
https://chromium-review.googlesource.com/676726
2018-03-20 10:13:14 +03:00
Aleksei Kuzmin
481c70311a Move SoftwareOutputDevice to the viz service display compositor.
https://chromium-review.googlesource.com/677463
2018-03-20 10:13:14 +03:00
Aleksei Kuzmin
4d234e3abc Update Node.js submodule to fix a compilation error 2018-03-20 10:13:14 +03:00
Samuel Attard
37a321a601 Fix super fast hash and blocking pool 2018-03-20 10:13:14 +03:00
Samuel Attard
7c8be94a6e IPC fixes for WebContents 2018-03-20 10:13:14 +03:00
Samuel Attard
1c648f9714 Add new includes for leveldb and webrtc 2018-03-20 10:13:14 +03:00
Samuel Attard
fdc7c183e8 Update libcc 2018-03-20 10:13:14 +03:00
Samuel Attard
f80b328937 WebExceptionCode has been removed 2018-03-20 10:13:14 +03:00
Samuel Attard
5a2f85600d Add support for size 64 skbitmap operations 2018-03-20 10:13:14 +03:00
Samuel Attard
7356be0164 Convert optional webpoint 2018-03-20 10:13:14 +03:00
Samuel Attard
a8e013dcb6 GetRenderProcessHost() has been removed for OOPI support, should use #include GetMainFrame()->GetProcess() 2018-03-20 10:13:14 +03:00
Samuel Attard
c3dec709ab PrintedPageSource has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
6402b23041 tracked_objects::Location --> base::Location 2018-03-20 10:08:58 +03:00
Samuel Attard
1158d35021 experimental_webgl_enabled is not supported, now use webgl1/2_enabled 2018-03-20 10:08:58 +03:00
Samuel Attard
e65815e34c Implement GetBackgroundFetchDelegate in brightray::BrowserContext 2018-03-20 10:08:58 +03:00
Samuel Attard
021e383418 GetBlockingPool has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
0291dc8214 Calling non-const callbacks requires some tricks 2018-03-20 10:08:58 +03:00
Samuel Attard
ce755483ba DialogClosedCallback are not const references anymore 2018-03-20 10:08:58 +03:00
Samuel Attard
de2981a767 Move proxy constructor to ProxyService namespace 2018-03-20 10:08:58 +03:00
Samuel Attard
41b9825f00 WebContents are no longer IPC Sender's 2018-03-20 10:08:58 +03:00
Samuel Attard
6f695b93d5 Fix system proxy config resolver constructor 2018-03-20 10:08:58 +03:00
Samuel Attard
f2edd5d068 v8 proxy service has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
f0ef11b856 BlockingPool has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
12066a60f3 make_scoped_refptr --> WrapRefCounted 2018-03-20 10:08:58 +03:00
Samuel Attard
4666879f94 WebContentsObserver no longer provides explicit_set, we can calculate it 2018-03-20 10:08:57 +03:00
Samuel Attard
fb55db665c AllowCertificateError no longer sends overridable 2018-03-20 10:08:57 +03:00
Samuel Attard
7f50c3d08e TracingController -> Coordinator -- content tracing now uses 'endpoints' instead of 'sinks' 2018-03-20 10:08:57 +03:00
Samuel Attard
461e33104e HandleCommand now takes session_id and returns success boolean. It is assumed a nullptr from the handler means failure 2018-03-20 10:08:57 +03:00
Samuel Attard
ed992ae6a1 trackable_object has moved to base namespace 2018-03-20 10:08:57 +03:00
Aleksei Kuzmin
b608152c41 Update Chrome version to 63.0.3239.84 2018-03-20 10:08:57 +03:00
Aleksei Kuzmin
5cf1ef7be0 Update clang revision to match Chromium 63.0.3239.70 2018-03-20 10:08:57 +03:00
Aleksei Kuzmin
6649a82776 Use libcc with Chromium 63 2018-03-20 10:08:57 +03:00
Samuel Attard
0ac883c6d4 Remove the race condition between new process creation and context release (#12342)
* 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 15:54:47 +11:00
Birunthan Mohanathas
20a0508a16 Update draggable regions when changing BrowserView
Fixes #12150.
2018-03-19 20:45:42 +02:00
Birunthan Mohanathas
42934a1006 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)
2018-03-19 20:45:40 +02:00
Birunthan Mohanathas
3b8ddd0997 Use NSView convertRect:toView: for BrowserView DragRegionView positioning 2018-03-19 20:44:05 +02:00
Birunthan Mohanathas
377e6c3210 Rename system_drag_exclude_areas => drag_exclude_rects 2018-03-19 20:44:05 +02:00
Birunthan Mohanathas
61160ff9e5 Store InspectableWebContents instead of InspectableWebContentsView in NativeBrowserView 2018-03-19 20:44:05 +02:00
Shelley Vohr
9599615b23 Fix nil tray title crash (#12352)
* Add check for title_ being nil

* remove print stub
2018-03-19 10:49:39 -05:00
John Kleinschmidt
6b80865bfe Merge pull request #12351 from electron/update-to-node8
Update CI to use Node.js 8
2018-03-19 11:04:52 -04:00
John Kleinschmidt
ed1c84445c Update CI to use Node 8 2018-03-19 10:19:32 -04:00
Cheng Zhao
f993888424 Merge pull request #12328 from electron/delay_load
Use same delay-load settings in both debug and release
2018-03-17 11:32:30 +09:00
Birunthan Mohanathas
6f6f388f38 Fix non-draggable regions on macOS (#12327)
This was a regression in 503b0ba1.
2018-03-17 06:49:11 +09:00
Charles Kerr
558ef7352d Better GTK+ Menu color support (#12300)
* 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 06:37:36 +09:00
Shelley Vohr
31d688ad3d Check menu.popup options are an object (#12325)
* check menu.popup options are an object

* Add a spec for menu.popup options check

* remove stray .only
2018-03-17 06:31:10 +09:00
Ales Pergl
84ce3a9ea1 Use same delay-load settings in both debug and release 2018-03-16 17:10:38 +01:00
Robo
792837bd71 net: change mime type deduction in Change URLRequestAsarJob (#12319) 2018-03-16 16:48:26 +09:00
Samuel Attard
e93c587b8e Delete .node-version (#12304)
This removes the .node-version file, it is a source of confusion and not incredibly useful.

It doesn't actually indicate the version of node that Electron uses, it's like a development helper that sets the version of node you should be using locally when devving on Electron.  Not many major tools use it so too remove confusion I think we should remove it
2018-03-16 10:12:12 +09:00
zhao-lin-li
bb73a0e2cb Update example code (#12315)
path and url needed to be require'd
2018-03-16 07:20:51 +09:00
Felix Rieseberg
243ab45111 🔧 Fix security warning (#12309) 2018-03-16 06:21:38 +09:00
John Kleinschmidt
71c3483f55 Fix AttributeError: 'dict' object has no attribute 'required' 2018-03-15 13:20:41 -04:00
Samuel Attard
4b476f13bb Revert "Fixes electron/electron#12147" (#12293)
* Revert "Set appropriate defaults for webview options (#12271)"

This reverts commit c2673aa970.

* Revert "Fixes electron/electron#12147 (#12193)"

This reverts commit f54c94d6c9.
2018-03-15 16:18:36 +09:00
Birunthan Mohanathas
2681e769a6 Document BrowserView.{destroy,isDestroyed} (#12274) 2018-03-15 16:15:56 +09:00
Charles Kerr
c2673aa970 Set appropriate defaults for webview options (#12271)
* 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 13:56:46 +09:00
nous-
f54c94d6c9 Fixes electron/electron#12147 (#12193) 2018-03-15 13:29:32 +09:00
Shelley Vohr
9aeb61181a Fix require on network share path (#12282)
* first pass at server/network require fix

* refactor for clarity
2018-03-15 11:45:13 +09:00
Jacob Groundwater
1f8de33e75 Change Contact Emails (#12278) 2018-03-15 04:37:40 +09:00
Samuel Attard
9ed9885c8d fix remote setInterval flake (#12263) 2018-03-14 14:51:47 +09:00
OJ Kwon
e7181eb89c feat(powerMonitor): expose interface to query system idle state (#11807)
* feat(BrowserWindow): expose interface to query system idle state

* test(BrowserWindow): update test cases for querySystemIdle interface

* docs(BrowserWindow): add querySystemIdle interface documentation

* refactor(powerMonitor): move querySystemIdle into powerMonitor

* test(powerMonitor): split test cases for all platform
2018-03-14 14:42:08 +09:00
Samuel Attard
90dc897f71 add missing report.length > 1 assertion (#12257) 2018-03-14 13:14:29 +09:00
Samuel Attard
8993a2c6ed Enable easy rebuild of native modules for unreleased electron (#12217)
* 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 12:59:18 +09:00
Hari Juturu
704af29543 Exposing process.env status (#12166) 2018-03-14 12:01:40 +09:00
Cheng Zhao
134872e9c1 Merge pull request #12198 from electron/fix_crash_handler
Fixed passing of exception to the system crash handler
2018-03-14 11:40:11 +09:00
Robo
e741bc0577 fix crash when using getWebPreferences api with devtools webContents (#12254) 2018-03-14 11:19:22 +09:00
Samuel Attard
e62349cffb Merge pull request #12253 from felixrieseberg/fix-last-crash-report
fix: Ensure that `getLastCrashReport()` is actually the last crash report
2018-03-14 10:36:27 +09:00
Samuel Attard
8664dd2139 Merge pull request #12190 from electron/fix-double-preload-master
Ensure that a document has been created before sending IPC messages
2018-03-14 10:34:05 +09:00
Felix Rieseberg
ee67211035 🔧 Linter's gotta lint 2018-03-13 17:41:02 -07:00
Felix Rieseberg
582ef30b4a 👷 Tests, how do they work 2018-03-13 17:35:55 -07:00
Felix Rieseberg
1b3568e66e 👷 Fancy test 2018-03-13 17:28:15 -07:00
Felix Rieseberg
3575dae75c 🔪 Cut typo 2018-03-13 16:58:40 -07:00
Felix Rieseberg
673335de4b 🔧 Actually test the method 2018-03-13 16:51:20 -07:00
Vanessa Yuen
48dd8f96b7 Fix broken links (#12232)
* Update system-preferences.md

* Fix broken documentation links.
2018-03-14 08:07:36 +09:00
Felix Rieseberg
72579f9bab 🔧 Sort crashes 2018-03-13 13:57:12 -07:00
John Kleinschmidt
5a81cfbbc6 Merge pull request #12241 from electron/sw-file-scheme-flaky-patch
spec: isolate sw file scheme spec storage with temp partition
2018-03-13 13:30:43 -04:00
deepak1556
c3bcb606a9 spec: isolate sw file scheme spec storage with temp partition 2018-03-14 02:03:55 +09:00
Samuel Attard
8e07e7483f Merge pull request #12228 from electron/fix-window-open-not-showing
Parent's visibility trumps inherited 'show' option
2018-03-13 17:41:00 +09:00
Charles Kerr
e400585a0e Apply further ES6 bikeshedding 2018-03-13 17:09:47 +09:00
Shelley Vohr
e648662cfd Add config for trop (backporting bot) (#12238)
* add config for trop

* backportWhitelist => authorizedUsers
2018-03-13 16:39:50 +09:00
Charles Kerr
2d90e763ad Use idiomatic ES6 when merging options 2018-03-13 16:23:39 +09:00
Charles Kerr
379bd79de4 Remove unnecessary work when merging options 2018-03-13 16:18:50 +09:00
Charles Kerr
e4d5ae53fc Add tests 2018-03-13 15:55:48 +09:00
Felix Rieseberg
71795ecc62 fix: Incorrect warnings in webviews (#12234)
* 🔧 Get correct webContents

* 🔧 Err, webPreferences
2018-03-13 10:55:32 +09:00
Charles Kerr
685948bcaa Parent's visibility trumps inherited 'show' option 2018-03-13 00:28:34 +09:00
Charles Kerr
dd2c2660b9 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
2018-03-12 16:02:47 +09:00
Charles Kerr
86af20ded0 Linux named notifications (#12192)
* Set name & desktop-entry on Linux notifications

* DBusMock now honors verbose mode flag

* Disable DBus Notification tests on ia32
2018-03-12 09:33:06 +09:00
Phil Freo
9d090e00f2 Make link to related guide/tutorial more obvious (#12204)
It's generally not a good practice to just link the word "here"
2018-03-10 23:04:07 +09:00
John Kleinschmidt
e085c01a2e Merge pull request #12202 from electron/readme-heading
Add heading for README
2018-03-09 14:29:42 -05:00
Vanessa Yuen
9c0e579bd3 Add heading for README 2018-03-09 20:16:56 +01:00
Robo
06bf72da67 remove process preference lock from AtomBrowserClient (#12194) 2018-03-09 12:37:26 -05:00
Ales Pergl
4673c67835 Fixed passing of exception to the system crash handler 2018-03-09 15:46:27 +01:00
John Kleinschmidt
f685e389d3 Merge pull request #12196 from electron/fix_run_as_node
Fixed Mac build when enable_run_as_node==false
2018-03-09 09:22:42 -05:00
Ales Pergl
94299f6cd8 Fixed Mac build when enable_run_as_node==false 2018-03-09 13:33:04 +01:00
deepak1556
2bf1131dab add NOLINT rule for include order in renderer_client_base 2018-03-09 15:19:07 +05:30
deepak1556
3cfe66e4c3 move ipc use from rvh to rfh 2018-03-09 15:01:09 +05:30
Charles Kerr
0d12fc3033 Make the linter happy 2018-03-09 17:03:00 +09:00
Cheng Zhao
30405a3441 Merge pull request #12101 from electron/upgrade-node-v9.7.0
Update to node v9.7.0
2018-03-09 16:41:23 +09:00
Cheng Zhao
e79b18762e Enter context scope before InternalCallbackScope 2018-03-09 16:14:24 +09:00
Cheng Zhao
83f01096c0 When a render process is crashed, it might be reused 2018-03-09 16:13:51 +09:00
Cheng Zhao
5d2452608d Use InternalCallbackScope for ticking event loop 2018-03-09 15:23:40 +09:00
deepak1556
50a5a69c46 update node ref fixing crash with buffer allocation 2018-03-09 15:23:40 +09:00
Shelley Vohr
1882b88c78 clean node ref and remove short circuit 2018-03-09 15:23:39 +09:00
deepak1556
3fea581ec8 build node target for <(node_lib_target_name) 2018-03-09 15:23:39 +09:00
Shelley Vohr
c8ef15cf40 update node::Environment::TickInfo calls 2018-03-09 15:23:39 +09:00
Shelley Vohr
e3bb3c3906 node => node_lib and V8_BASE => v8_base 2018-03-09 15:23:38 +09:00
Shelley Vohr
d88fa8b787 OPENSSL_PRODUCT => openssl_product 2018-03-09 15:23:38 +09:00
Shelley Vohr
068f0cce96 update node ref to electron-node-v9.7.0 2018-03-09 15:23:38 +09:00
Cheng Zhao
cf36fdecbf Skip client-certificate test for Linux (#12189) 2018-03-09 14:43:49 +09:00
Samuel Attard
a9dcce82ed Ensure that a document has been created before sending IPC messages
* Reverts 370476c4af in favor of moving the previous logic to the new RenderFrameObserver instead of RenderViewObserver

Fixes #12045
2018-03-09 14:24:56 +11:00
Charles Kerr
5f48f91d94 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
2018-03-08 22:07:50 -05:00
Cheng Zhao
15503a3b9e Merge pull request #12187 from electron/ia32-more-debug
Enable more debug info for electron-linux-ia32
2018-03-09 12:00:10 +09:00
Cheng Zhao
5c15d263e0 Enable more debug info for electron-linux-ia32 2018-03-09 11:06:42 +09:00
Cheng Zhao
cde0c1d418 Print detailed error for serviceWorker test (#12186) 2018-03-08 21:06:29 -05:00
Cheng Zhao
44c66fc284 Merge pull request #12167 from lyallh/menubar-autohide-fix
Fix menubar toggle alt key detection on focus
2018-03-09 10:13:32 +09:00
Cheng Zhao
3885674877 Merge pull request #12080 from electron/build-on-arm64-hw
Allow CI testing on arm64 hardware
2018-03-09 08:54:32 +09:00
Aleš Pergl
0937b84b01 Use content origin in screen coordinates for calculating popup menu position (#12180) 2018-03-09 05:48:35 +09:00
Cheng Zhao
51f89048d6 Use bundled freetype from Chromium 2018-03-08 10:47:19 -05:00
John Kleinschmidt
134d3f98c9 Allow CI building on arm64 hardware 2018-03-08 09:53:47 -05:00
Lyall Hamilton
ba24920fec Fix menubar toggle alt key detection on focus
Reset alt keypress flag on window blur so switching window via
Alt+* window manager keybindings can't incedentally trigger
annoying menubar toggles
2018-03-08 21:48:43 +13:00
Jake
569b87ff83 Added session-created event documentation (#12123)
* Added session-created event documentation 

Emitted at 1c0ea0286e/lib/browser/api/session.js (L21)

* Removed trailing spaces
2018-03-08 11:32:52 +09:00
Samuel Attard
8c138e74be More vibrancy fixes (#12157)
* 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
2018-03-07 11:40:36 -05:00
Hari Juturu
2f4fd3324b Preload doesn't load in sandboxed render if preload path contains special chars (#12037)
* Adding missing headers

* adding ut

* Removing the file path exists check

* fixing test

* exposing window.require in UT
2018-03-07 11:40:00 -05:00
Andreas
69e7afee26 fix dev tools window interfering with mouse forward (#12132) 2018-03-07 07:44:55 -05:00
Samuel Attard
fdab98aa59 Merge pull request #12155 from electron/modify-deprecation-guarantee
Deprecations come >=1 major release before removal
2018-03-07 23:28:05 +11:00
Charles Kerr
35a512310a Merge branch 'master' into add-env-to-release-docs 2018-03-07 16:38:14 +09:00
Charles Kerr
3b2a494033 Update to master. 2018-03-07 16:32:36 +09:00
Charles Kerr
b0820e4886 Fix broken link 2018-03-07 16:18:47 +09:00
Charles Kerr
4ab7b2d2b1 Deprecations come >=1 major release before removal 2018-03-07 16:12:28 +09:00
Shelley Vohr
c31bf8474c clean planned breaking changes for 3.0 (#12145) 2018-03-07 16:06:33 +09:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
Charles Kerr
65ee977a86 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-06 22:01:17 -05:00
br0nstein
f170914def Fix getFocusedWindow return type (#12149) 2018-03-07 10:23:02 +09:00
Cheng Zhao
ea9d33374f Merge pull request #12140 from electron/native-window-no-web-contents
Refactor NativeWindow (Part 2):  NativeWindow is no longer WebContentsObserver
2018-03-07 10:12:37 +09:00
Vanessa Yuen
7f664aa18c Merge pull request #12105 from electron/update-references-to-renamed-i18n-repo
update references to renamed i18n repo
2018-03-06 19:08:20 +00:00
shelley vohr
1413f22095 Merge pull request #12103 from electron/fix-broken-links
[docs] switch footnote links to regular links syntax
2018-03-06 07:52:08 -08:00
shelley vohr
a3e33a313a Merge pull request #12131 from nitsakh/xcode-debugging
Add XCode debugging doc
2018-03-06 07:34:05 -08:00
Cheng Zhao
411da169ac Repect old logic in windowWillUseStandardFrame 2018-03-06 16:54:20 +09:00
Cheng Zhao
78468098c5 Don't store WebContents in NativeWindow 2018-03-06 16:21:18 +09:00
Cheng Zhao
9000bd6679 views: Explicitly set initially focused view 2018-03-06 16:21:18 +09:00
Cheng Zhao
413fdc6f0d views: Show menu on window's content view 2018-03-06 16:21:18 +09:00
Cheng Zhao
9c7854aef6 NativeWindow is no longer WebContentsObserver 2018-03-06 16:21:18 +09:00
Cheng Zhao
bf862d1d07 views: Focus webContents in BrowserWindow 2018-03-06 16:21:17 +09:00
Cheng Zhao
8bbe28e998 No need to get BrowserContext from NativeWindow 2018-03-06 16:21:17 +09:00
Cheng Zhao
702f1631a3 Remove NativeWindow::FromWebContents 2018-03-06 16:21:17 +09:00
Cheng Zhao
eea4e60b73 Remove NativeWindow's webview APIs 2018-03-06 16:20:37 +09:00
Cheng Zhao
5a4c2fb61d mac: Pass the view to install 2018-03-06 16:20:37 +09:00
Cheng Zhao
498f5d65fd mac: UninstallView is not used 2018-03-06 16:20:37 +09:00
Cheng Zhao
3b3e69f8b2 Save browser_view_ in the NativeWindow
No need to store it separately in subclasses.
2018-03-06 16:20:37 +09:00
Cheng Zhao
503b0ba1b1 mac: Move draggable region code to BrowserWindow
On macOS current draggable region implementation highly relies on
WebContents, the code is only meaningful for BrowserWindow.
2018-03-06 16:20:37 +09:00
Cheng Zhao
bc34ca9e25 mac: Call setMouseDownCanMoveWindow in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
7d4ff3b061 mac: Call SetBackgroundOpaque in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
8a1884c407 mac: AcceleratedWidget should be window's content view 2018-03-06 16:20:37 +09:00
Cheng Zhao
e7f175d578 Only mac needs to call SetActive 2018-03-06 16:20:37 +09:00
Cheng Zhao
4c7b48e596 mac: Window's native view should be its content view 2018-03-06 16:20:37 +09:00
Cheng Zhao
1681ee35db Set WebContents background color in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
7b8890a4c9 web_contents can't be null 2018-03-06 16:20:37 +09:00
Cheng Zhao
2eaa6d0874 Move StoreFocus/RestoreFocus to BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
cad3d694ab mac: Remove access to webContents in windowWillUseStandardFrame 2018-03-06 16:20:37 +09:00
Cheng Zhao
e73326a324 Merge pull request #11613 from electron/safe-dialogs
Implement dialog (alert/confirm) blocking as a user switch after the first dialog
2018-03-06 14:28:53 +09:00
Cheng Zhao
90bd1fd7e9 Native confirm/alert throws differently 2018-03-06 14:06:29 +09:00
Cheng Zhao
ca42325ade Make OnMessageBoxCallback a method since it is accessing members 2018-03-06 11:35:53 +09:00
Cheng Zhao
7516b059fe Code style fixes 2018-03-06 11:31:56 +09:00
Cheng Zhao
d8f16f4116 docs: Default message is not localized 2018-03-06 11:24:42 +09:00
Cheng Zhao
26a071ea00 docs: Defaults of safeDialogs 2018-03-06 11:21:40 +09:00
Samuel Attard
7dec3c9320 Fixup cpplint 2018-03-06 11:19:15 +09:00
Samuel Attard
731240e0e9 Use USER_WANTS_NO_MORE_DIALOGS constant for -1 magic number 2018-03-06 11:19:15 +09:00
Charles Kerr
a5a068b2ee fix cpplint errors
atom/browser/atom_javascript_dialog_manager.cc:39:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
atom/browser/atom_javascript_dialog_manager.cc:39:  If/else bodies with multiple statements require braces  [readability/braces] [4]
atom/browser/atom_javascript_dialog_manager.cc:62:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
atom/browser/atom_javascript_dialog_manager.cc:89:  If/else bodies with multiple statements require braces  [readability/braces] [4]
2018-03-06 11:19:15 +09:00
Charles Kerr
2435ffaf09 fix cpplint error
atom/browser/atom_javascript_dialog_manager.h:9:  Include "map" not in alphabetical order  [build/include_alpha] [4]
2018-03-06 11:19:15 +09:00
Samuel Attard
795447f61a Implement dialog (alert/confirm) blocking as a user switch after the first dialog
* This is to enable more browser-like behavior so that users who run third-party code
  will not be DOS'ed with alerts and confirms.  This is already handled like this
  in most major browsers so this will greatly help these developers
2018-03-06 11:19:15 +09:00
shelley vohr
a3d4d461a3 Merge pull request #12135 from electron/deprecate-getMenuBarHeight
deprecate screen.getMenuBarHeight
2018-03-05 17:56:51 -08:00
Shelley Vohr
3635872f37 remove screen.getMenuBarHeight spec 2018-03-05 20:10:34 -05:00
Shelley Vohr
199cf31b9e deprecate screen.getMenuBarHeight 2018-03-05 19:45:51 -05:00
Nitish Sakhawalkar
dc29b3add1 Add XCode debugging doc 2018-03-06 00:03:14 +05:30
Charles Kerr
642dc96956 Add optional verbose switch '-v' to build script. (#12118)
* Add optional verbose switch '-v' to build script.

* Remove tracer comment.

* Add --ninja-path switch.

For compatiblity with https://github.com/electron/electron/pull/12120
2018-03-06 03:27:58 +09:00
Charles Kerr
e9808d138f Better error logging in api-app-spec.js. (#12122)
In the 'exits gracefully on macos' test for app.exit(exitCode),
print the relevant error information if the test fails.
2018-03-06 03:13:47 +09:00
Samuel Attard
b530d70a7b Merge pull request #12058 from philfreo/patch-1
Include backtrace i/o as a crash reporter backend option
2018-03-06 05:13:18 +11:00
John Kleinschmidt
1005a63130 Merge pull request #12127 from electron/set-dev-version-everywhere
Use version 0.0.0-dev everywhere
2018-03-05 12:28:55 -05:00
Aleksei Kuzmin
52c0864cb8 Use version 0.0.0-dev everywhere 2018-03-05 16:24:48 +01:00
John Kleinschmidt
3a55e5b384 Merge pull request #12113 from electron/FranzDeCopenhague-patch-1
Fix typo found during the Spanish translation
2018-03-05 10:08:17 -05:00
Franz de Copenhague
847cf17b77 Fix typo found during the Spanish translation 2018-03-04 10:07:46 -08:00
Zeke Sikelianos
e9de194b89 update references to renamed i18n repo 2018-03-02 12:05:49 -08:00
Sofia Nguy
e76d5bc7cf switch links to regular syntax 2018-03-02 10:41:55 -08:00
Adrien Fery
6d82966ebe Update inAppPurchase API doc (#12072)
* Update inAppPurchase API doc

`addTransactionsListener` is no longer supported. Users have to listen for the `transactions-updated` event instead.

* Tweak `transactions-updated` timing description

Make the documentation edit suggested by @felixrieseberg and thumbs-upped by @AdrienFery
2018-03-02 07:25:37 -06:00
Tiago Danin
efeabfe3ef 📝 Fix url to unity-launcher and tiny correction (#12084) 2018-02-28 18:28:40 -06:00
Phil Freo
738b10adea Include backtrace i/o as a crash reporter backend option
Note: I have no affiliation with this company - just thought this would be helpful for people
2018-02-28 14:21:14 -05:00
shelley vohr
dfa1dc43df Merge pull request #12059 from electron/add-tabbedwindow-warning
add warning when addTabbedWindow is called on self
2018-02-28 01:18:10 -08:00
Shelley Vohr
bf491de9fe fix styling and add spec 2018-02-28 00:22:42 -08:00
Shelley Vohr
2abc69780e move native-mate back into the api layer 2018-02-27 13:00:42 -08:00
Zeke Sikelianos
1db05a2655 Merge pull request #12067 from electron/fix-typo-in-inAppPurchase-API-doc
fix typo in inAppPurchase API doc
2018-02-27 11:07:45 -08:00
Zeke Sikelianos
b05d818f45 fix typo in inAppPurchase API doc 2018-02-27 10:22:29 -08:00
Shelley Vohr
837a2d4bbd appease the linter 2018-02-26 22:25:09 -08:00
Cheng Zhao
35cbe9d140 Fix dockMenu not being referenced in JavaScript (#12062)
* Fix dockMenu not being referenced in JavaScript

* spec: Test garbage collecting dock menu
2018-02-26 22:15:06 -08:00
Samuel Attard
b722150d87 Don't cast manually for NativeWindow* 2018-02-27 16:13:17 +11:00
Samuel Attard
5336b4a89c Pass arguments instance through the chain in order to throw error 2018-02-27 16:11:58 +11:00
Shelley Vohr
e84d7c0cda add warning when addTabbedWindow is called on self 2018-02-26 14:47:36 -08:00
Cheng Zhao
53229e3d6c Fix network delegate race condition (#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
2018-02-26 06:23:59 -08:00
Cheng Zhao
fdd66bd76d Merge pull request #11607 from bughit/frame_navigation_api
frame navigation API
2018-02-26 15:50:11 +09:00
Cheng Zhao
ccf30e0934 Coding style fixes 2018-02-26 15:19:44 +09:00
Cheng Zhao
25f04d5b03 Fix descriptions to make docs parser happy 2018-02-26 15:05:46 +09:00
Cheng Zhao
f7786a9e48 Merge pull request #11230 from electron/upgrade-to-chromium-62
Upgrade to Chromium 62
2018-02-26 14:20:21 +09:00
shelley vohr
cc608a3fb0 Merge pull request #12043 from kaylieEB/fix-menu-item
Fix context menu click callback
2018-02-25 17:33:32 -08:00
kaylie
da9f12d1e2 restore old cb 2018-02-25 14:19:40 -08:00
Samuel Attard
35cc197d0b Quick typo (#12040) 2018-02-25 09:11:18 -06:00
shelley vohr
18362eb948 improve Menu and MenuItem testing (#12015)
* split menu/menuitem and add some tests

* fix ipc send issue

* feedback: make tests less brittle

* clean up MenuItem accelerator and label tests
2018-02-23 07:53:59 -06:00
Cheng Zhao
3948323a8c Update libcc to latest chrome62 2018-02-23 10:23:53 +09:00
Aleksei Kuzmin
7e3b690257 Update libcc revision 2018-02-23 10:22:00 +09:00
Cheng Zhao
b9ab2fe0fb Disable stack dumping for 32bit ARM 2018-02-23 10:22:00 +09:00
Cheng Zhao
81c23b84e7 Fix error when cross compilation 2018-02-23 10:22:00 +09:00
Cheng Zhao
b25175a19a Fix assertion when get X11 error in new thread 2018-02-23 10:22:00 +09:00
Cheng Zhao
39e0433570 Fix build error after rebasing 2018-02-23 10:22:00 +09:00
Cheng Zhao
9d05c59600 node.so should link with libc++.so 2018-02-23 10:22:00 +09:00
Cheng Zhao
2fcf2c81bf Make sure --sysroot is appended at last 2018-02-23 10:22:00 +09:00
Cheng Zhao
9fec1a3cb4 Link with libcc's libc++ on Linux 2018-02-23 10:22:00 +09:00
Cheng Zhao
b7b40d9c3a Fix linking error with atomic 2018-02-23 10:22:00 +09:00
shelley vohr
653ceb9860 update update submodule ref for updated node 9.3.0 (#11708) 2018-02-23 10:22:00 +09:00
shelley vohr
0e5b6f9300 Upgrade to node v9.3.0 (#11507)
* update submodule refs for node v9.3.0

* Define "llvm_version" for Node.js build

* NODE_MODULE_CONTEXT_AWARE_BUILTIN -> NODE_BUILTIN_MODULE_CONTEXT_AWARE

* update NodePlatform to MultiIsolatePlatform

* fix linting error

* update node ref

* REVIEW: Explicitly register builtin modules

https://github.com/nodejs/node/pull/16565

* update libcc ref

* switch libcc to c62

* REVIEW: Address node api changes

- Always start the inspector agent for https://github.com/nodejs/node/pull/17085
- Set the tracing controller for node https://github.com/nodejs/node/pull/15538
- Isolate data creation now requires plaform https://github.com/nodejs/node/pull/16700
2018-02-23 10:22:00 +09:00
Aleksei Kuzmin
31eb5e26e3 Update libcc reference 2018-02-23 10:21:24 +09:00
Cheng Zhao
12b37c7386 Update node: Fix crash when doing crypto operation 2018-02-23 10:21:24 +09:00
deepak1556
7cad5d0cd2 update libcc for loading service worker under file scheme 2018-02-23 10:21:24 +09:00
Cheng Zhao
e6bad6e183 Update sysroot images to fix linking error 2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
f5d207f8f0 Improve process launch handle sharing API.
https://codereview.chromium.org/2950153002
2018-02-23 10:21:24 +09:00
Cheng Zhao
da7fc54e37 Update sysroot to Debian Stretch 2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
0ec2eba2a3 Add init_webrtc lib to the list of static libraries 2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
dcb369ee46 Fail "navigator.serviceWorker" tests if WebContents crashes 2018-02-23 10:21:24 +09:00
deepak1556
041b32b01f remove invalid cookie_details.h filename from brightray 2018-02-23 10:21:24 +09:00
deepak1556
cdab073614 FIX: add chrome-devtools:// to list of WebUI schemes
https://chromium-review.googlesource.com/c/chromium/src/+/617598
2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
fbd5e4c2b3 Disable the "ffi" module test 2018-02-23 10:21:24 +09:00
deepak1556
5eb0a89579 REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
9fa08fdbc0 Merge views::CustomButton into views::Button.
https://chromium-review.googlesource.com/617407
2018-02-23 10:21:24 +09:00
Aleksei Kuzmin
6f00e4a014 REVIEW: Implements core logic for Pixel Canvas
https://codereview.chromium.org/2877483003
2018-02-23 10:21:24 +09:00
deepak1556
f52f752acd fxedit is removed and pdfwindow renamed to pwl
https://pdfium-review.googlesource.com/c/pdfium/+/8552
https://pdfium-review.googlesource.com/c/pdfium/+/8791
2018-02-23 10:21:24 +09:00
deepak1556
d846c9006e Replace somemore uses of SetStringWithoutPathExpansion 2018-02-23 10:21:24 +09:00
deepak1556
69ca6ccdc1 Remove chrome_utility_messages.h, it's unused 2018-02-23 10:21:23 +09:00
deepak1556
25d966110e FIXME: PDF component IPC should be converted to Mojo.
https://codereview.chromium.org/2455543002
2018-02-23 10:21:23 +09:00
deepak1556
e03f7baa60 gfx::Image::SwapRepresentations is removed in favor of std::move
https://chromium-review.googlesource.com/c/chromium/src/+/588033
2018-02-23 10:21:23 +09:00
deepak1556
62635f43f4 base::LaunchOptions fds_to_remap is no longer a pointer
https://codereview.chromium.org/2950153002
2018-02-23 10:21:23 +09:00
deepak1556
248d572077 REVIEW: Subscribe to cookie store for changes in place of CookieMonsterDelegate 2018-02-23 10:21:23 +09:00
Tomas Rycl
60f69ad77b Removed QuitWhenIdle 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
b02edd014a Rename CompositionUnderline to ImeTextSpan
https://chromium-review.googlesource.com/609524
2018-02-23 10:21:23 +09:00
Tomas Rycl
024f84f1be chromium_src print_job updated to match current chromium implementation in Quit method 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
5d870837cf Remove WebCString from Blink
https://chromium-review.googlesource.com/594673
2018-02-23 10:21:23 +09:00
Shelley Vohr
de576fa82e Refactor Skia document type into an enum class
https://chromium-review.googlesource.com/619502
2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
412b9e9ad8 Move IDMap to base namespace.
https://chromium-review.googlesource.com/618801
2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
8f78bd3307 Remove was_ignored_by_handler from frame_messages.h
https://chromium-review.googlesource.com/587701
2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
91a339b625 viz: Move BeginFrame(Args|Ack) to components/viz/common/frame_sinks 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
1a9b056e93 Move CompositorFrameSink and FrameSinkManager mojom from cc to viz 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
abc6003640 viz: Move BeginFrameSource to components/viz/common/frame_sinks 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
76683c0af5 viz: Move CopyOutput(Request|Result)=> components/viz/common/quads 2018-02-23 10:21:23 +09:00
Shelley Vohr
128cb7f5b2 updates to build flags and comp errors 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
8c0c1e4ded media: Replace ENABLE_PEPPER_CDMS buildflag with ENABLE_LIBRARY_CDMS
https://chromium-review.googlesource.com/582309
2018-02-23 10:21:23 +09:00
Shelley Vohr
e59f788c43 Update submodule ref for node 2018-02-23 10:21:23 +09:00
Tomas Rycl
8d6c7955ad Add path to skia gpu 2018-02-23 10:21:23 +09:00
Shelley Vohr
233679865b fix some more compilation errors 2018-02-23 10:21:23 +09:00
Tomas Rycl
6a61ec7763 Add path to khrplatform.h file 2018-02-23 10:21:23 +09:00
Tomas Rycl
1b866e20c6 REVIEW: Disable warning 4275 on Windows
It prevents Brightray classes to be inherited from other classes
from V8, Chromium, etc...
2018-02-23 10:21:23 +09:00
deepak1556
75c17cf846 Use generic base::Value::SetKey
Remove base::Value::SetDoubleWithoutPathExpansion
https://chromium-review.googlesource.com/591654

Remove base::Value::SetStringWithoutPathExpansion
https://chromium-review.googlesource.com/592368

Remove base::Value::SetIntegerWithoutPathExpansion
https://chromium-review.googlesource.com/591655
2018-02-23 10:21:23 +09:00
Tomas Rycl
8250dbd172 Removing some function parameters 2018-02-23 10:21:23 +09:00
Tomas Rycl
0d83b69fe2 FIXME: Fix brightray::DevToolsNetworkTransaction compilation
See
https://chromium-review.googlesource.com/631119
https://chromium-review.googlesource.com/611089
2018-02-23 10:21:23 +09:00
Shelley Vohr
a6412d0690 Update submodule ref for crashpad 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
dda64bd652 Use c++14
https://chromium-review.googlesource.com/c/chromium/src/+/583635
2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
9d6db65c7c Set minimum Mac SDK version to 10.12 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
5783ce0b3c Update chrome_version.h 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
8ef705ad10 Update clang revision to match Chromium 62.0.3202.89 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
381cf55434 Use libcc revision based on Chromium 62 2018-02-23 10:21:23 +09:00
Cheng Zhao
15ce235eed Merge pull request #12008 from electron/window-refactor-1
Refactor NativeWindow (Part 1): Remove WebContentsObserver methods
2018-02-23 10:06:34 +09:00
Cheng Zhao
3be92f550c Better clarity and fix typo 2018-02-23 09:15:13 +09:00
John Kleinschmidt
366638b1b9 Merge pull request #12013 from electron/release-fix
Fixes from running 2.0.0-beta.1 release
2018-02-22 10:43:29 -05:00
John Kleinschmidt
fa6510a90c 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.
2018-02-22 08:53:32 -05:00
Cheng Zhao
816a96c2cc Update font settings in api::WebContents 2018-02-22 19:01:45 +09:00
Cheng Zhao
c87fc2426d Handle transparent WebContents in api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
c611eb061d Move InputEventObserver to api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
aa3eafcea1 Move closing logic to api::BrowserWindow
Closing a BrowserWindow is essentially closing a WebContents, the logic
should not be in NativeWindow.
2018-02-22 19:01:45 +09:00
Cheng Zhao
66fab65a1a Add NativeWindowObserver::OnCloseButtonClicked 2018-02-22 19:01:45 +09:00
Cheng Zhao
a25b49a127 Add ExtendedWebContentsObserver 2018-02-22 19:01:45 +09:00
Cheng Zhao
a3124e8873 Use observer to provide OnRendererUnresponsive 2018-02-22 19:01:45 +09:00
Cheng Zhao
bffb31c337 Remove OnMessageReceived from NativeWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
44e7282b4b The UpdateDraggableRegions does not share implementations 2018-02-22 19:01:45 +09:00
Cheng Zhao
c2aa312e0c Check weak ptr before using it 2018-02-22 19:01:45 +09:00
Cheng Zhao
384b03d49b UpdateDraggableRegionViews is redundant 2018-02-22 19:01:45 +09:00
Cheng Zhao
6650a06339 Move RenderViewCreated logic to api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
c256a43139 Move ready-to-show to api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
0d9a157914 Turn api::Window into a WebContentsObserver 2018-02-22 19:01:45 +09:00
Cheng Zhao
47950f7b97 Merge pull request #12004 from electron/window-rename
Rename api::Window to api::BrowserWindow
2018-02-22 19:00:51 +09:00
Cheng Zhao
f9c48e1fb0 Merge pull request #12003 from electron/tools-new-api
Fix deprecated API in tools/dump-version-info.js
2018-02-22 18:58:24 +09:00
Cheng Zhao
973647eaa2 Rename api::Window to api::BrowserWindow 2018-02-22 12:50:47 +09:00
Samuel Attard
3bda63c350 Remove needless quotes around electron key 2018-02-22 13:37:53 +11:00
bughit
88b887fe47 frame navigation API 2018-02-21 18:50:15 -05:00
Cheng Zhao
58e15c7755 Fix deprecated API in tools/dump-version-info.js 2018-02-22 08:43:39 +09:00
John Kleinschmidt
7365a45948 Merge pull request #11937 from electron/groundwater-patch-1
Use New Versioning Strategy
2018-02-21 16:54:25 -05:00
shelley vohr
e8a57376f0 Merge pull request #12000 from kalikiana/quoted-snap-version
tutorial: Surround the snap version in quotes
2018-02-21 16:42:49 -05:00
Vanessa Yuen
8e51659237 Merge pull request #11966 from electron/documentation-overhaul
Documentation Overhaul
2018-02-21 20:51:52 +01: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
Felix Rieseberg
c403968230 ❤️ One more feedback item 2018-02-21 10:29:17 -08:00
Felix Rieseberg
9d4c68d272 ❤️ Feedback 2018-02-21 10:12:19 -08:00
Shelley Vohr
e3d4358068 bump electron-typescript-defs to 1.3.2 2018-02-21 12:42:07 -05:00
Christian Dywan
8268afdf33 tutorial: Surround the snap version in quotes 2018-02-21 18:08:39 +01: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
Felix Rieseberg
975e6e6194 ❤️ First round of feedback 2018-02-20 09:47:18 -06: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
Cheng Zhao
99d9e262eb Merge pull request #19 from electron/get-wrapper-const
GetWrapper should be const
2018-02-20 10:07:55 +09: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
Felix Rieseberg
037ee0cff3 📝 Fix the fix 2018-02-19 18:38:59 -06:00
Cheng Zhao
91ee99ab8a GetWrapper should be const 2018-02-20 09:29:02 +09:00
Felix Rieseberg
64fc523977 📝 Fix dead links 2018-02-19 18:25:02 -06:00
Felix Rieseberg
b869471068 📝 Add missing links 2018-02-19 18:20:35 -06:00
Felix Rieseberg
322f7dadc7 📝 Native drag & drop documentation 2018-02-19 18:20:21 -06:00
Felix Rieseberg
191463397b 📝 Cleanup this hot mess 2018-02-19 18:20:10 -06:00
Felix Rieseberg
683e02fbcd 📝 TIE IT ALL TOGETHER 2018-02-19 18:09:58 -06:00
Felix Rieseberg
ebbecce56d 📝 Document debugging 2018-02-19 18:09:38 -06:00
Felix Rieseberg
e98637596d 📝 Installation 2018-02-19 17:53:29 -06:00
Felix Rieseberg
3c66e810c0 📝 Document asar 2018-02-19 17:50:38 -06:00
Felix Rieseberg
20ca6b4a55 📝 Offscreen Rendering 2018-02-19 17:50:26 -06: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
Felix Rieseberg
69b0a358f3 📝 A11y documentation 2018-02-19 17:36:49 -06:00
Felix Rieseberg
8dd44f66ca 📝 Some consistency 2018-02-19 17:28:24 -06:00
Felix Rieseberg
eeb5845aac 📝 Documenting updates 2018-02-19 17:24:15 -06:00
Felix Rieseberg
fe4762588c 📝 Document the progress bar 2018-02-19 17:17:11 -06:00
Felix Rieseberg
c3362c7617 📝 Document the app architecture (main/renderer) 2018-02-19 17:16:51 -06:00
Felix Rieseberg
ffd607bb52 📝 Document the first app 2018-02-19 17:16:35 -06:00
Felix Rieseberg
d7360e3203 📝 Ensure that quick-start.md still exists 2018-02-19 17:14:31 -06:00
Felix Rieseberg
879d21c80e 📝 Document Unity Launcher 2018-02-19 17:14:07 -06:00
Felix Rieseberg
3623cf9729 📝 Windows Taskbar documentation 2018-02-19 17:10:25 -06:00
Felix Rieseberg
8d219e94dc 📝 Recent documents documentation 2018-02-19 17:09:58 -06:00
Felix Rieseberg
d552af97c3 📝 macOS Dock documentation 2018-02-19 17:09:43 -06:00
Felix Rieseberg
fc7e50dce2 📝 Add cli and boilerplate documentation 2018-02-19 15:34:33 -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
Felix Rieseberg
bdc0cd4418 📝 Document development environment 2018-02-19 12:25:38 -06: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
Jacob Groundwater
cdcd031192 Use New Versioning Strategy
The `package.json` file in master should always read `0.0.0-dev`. See https://electronjs.org/docs/tutorial/electron-versioning
2018-02-16 09:16:30 -08: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
Cheng Zhao
a38fb5df41 Merge pull request #18 from electron/upgrade-to-chromium-63
virtual members need a virtual destructor
2017-12-19 10:25:22 +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
Samuel Attard
66c0d6620b virtual members need a virtual destructor 2017-12-18 14:55:27 +11:00
Cheng Zhao
29b03fc242 Merge pull request #17 from sethlu/remove-getwrapper-dcheck
Remove WrappableBase::GetWrapper() DCHECK
2017-12-18 09:22:13 +09: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
Zhuo Lu
e0b77db46f Remove WrappableBase::GetWrapper() DCHECK 2017-12-13 13:26:51 -08: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
Charles Kerr
f0d9b93ede note that 'publish-to-npm' needs node 6 2017-12-05 09:10:26 -06:00
Charles Kerr
f398b5d843 add a tip for testing version number with 'bump-version.py --dry-run' 2017-12-05 08:51:37 -06:00
Charles Kerr
b8259a82c1 note that 'npm run release -- --validateRelease' must be run in release branch 2017-12-05 08:38:16 -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
Charles Kerr
7bcea57241 fix tyop 2017-12-04 21:09:12 -06: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
Charles Kerr
3cd6c2e9eb explain using the Electron S3 Bucket environment variables 2017-12-04 20:34:34 -06:00
Charles Kerr
455a61d210 in the npm upload step, explain the needed npm credentials 2017-12-04 20:32:24 -06:00
Charles Kerr
83e94f3de1 fix invocation of validateRelease pass 2017-12-04 20:19:43 -06: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
Charles Kerr
ffdd6ab821 add a troubleshooting note about branch checkout 2017-12-04 10:26:35 -06:00
Charles Kerr
60fe728c0f add section on environment variables 2017-12-04 10:13:22 -06:00
John Kleinschmidt
1989075d54 Ignore all npmrc and package-lock 2017-12-04 11:05:04 -05:00
Charles Kerr
b209620514 trim whitespace 2017-12-04 09:51:12 -06:00
Charles Kerr
e5f4916e31 fix numbering of 'Edit the release draft' steps 2017-12-04 09:50:24 -06:00
Charles Kerr
5212b98c87 wrap lines at 80 characters 2017-12-04 09:48:06 -06: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
Cheng Zhao
88fa343387 Merge pull request #16 from brenca/mark-independent-high-only
Only use MarkIndependent if high_memory_ flag is set
2017-11-28 10:52:03 +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
Heilig Benedek
40bd3336a5 only mark handle as independent when it's a high memory user 2017-11-27 00:50:51 +01: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
bf92fa88b7 Merge pull request #15 from mgc/muon-crash-workarounds
Upstream Muon changes to avoid crashing
2017-10-26 18:46:25 +09: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
Matt Crocker
6ea2755095 Upstream Muon changes to avoid crashing 2017-10-23 23:19:23 -07: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
f047bb61bb Merge pull request #14 from enlight/nullptr-converter
Add a converter for `nullptr_t`
2017-08-17 16:01:27 +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
Vadim Macagon
747495e77c Add a converter for nullptr_t 2017-08-16 00:24:20 +07: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
Kagami
a702f8a5f5 add peak working set size comment 2017-06-09 01:05:53 +08: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
Shubham
f001377493 🍎 Fix an issue where alwaysOnTop window disappears when restored from the application icon 2017-06-07 12:28:50 -04:00
dharders
aeb68c2369 Add test for Windows fullscreen state toggle. Fix #6036 2017-06-05 11:39:15 +10:00
Shubham
c2603aaac2 🎨 Add documentation 2017-06-03 11:48:18 -04: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
Shubham
217ddd629d 🍎 Fix incorrect extension when filters is used 2017-05-28 15:20:22 -04:00
Electron Bot
256b5c8a17 Update to Electron v1.7.2 2017-05-26 13:39:08 -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
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
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
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
Zeke Sikelianos
25a2480bd8 Merge pull request #249 from electron-userland/vendor-node-typings
add @types/node
2017-05-14 18:25:25 -07:00
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
Kevin Sawicki
159a25d8e7 Merge pull request #13 from tsekityam/patch-1
Fix broken link
2017-05-09 16:14:28 -07:00
Tse Kit Yam
c8cc021ea1 Fix broken link 2017-05-09 15:24:43 +08: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
Cheng Zhao
7d9c1a80f0 Merge pull request #12 from brenca/add-high-memory-option
Add a flag that skips the two round GC and instead uses only one
2017-05-01 16:06:50 +09: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
Heilig Benedek
ff8f439afd add ability to set high memory usage, skipping the second round of GC callbacks 2017-04-12 15:51:28 +02: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
Cheng Zhao
fd0e7dc4ab Use gin to manage FunctionTemplate
Sadly there is no way for us to know when V8 is closing, thus it is
impossible for us to clean the FunctionTemplate on exit at the right
time, which is critcal for multi-thread environment.
2017-03-08 17:11:29 +09:00
Cheng Zhao
ed909cd54c Make Wrappable thread safe 2017-03-08 16:33:05 +09: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
Kevin Sawicki
ad0fd82566 Merge pull request #10 from electron/five-argument-member-function
Remove template_util.h and use std functions
2017-02-17 10:25:02 -08:00
Kevin Sawicki
d2b9766886 Use std functions instead of template_util 2017-02-17 09:32:45 -08:00
Kevin Sawicki
f56ec818fb Support 5 argument member function 2017-02-17 09:32:45 -08:00
Kevin Sawicki
11a1b824c0 Merge pull request #11 from electron/ci
Add Travis/AppVeyor CI build through Electron
2017-02-17 09:32:30 -08:00
Kevin Sawicki
db542f2a26 Add CI build through Electron 2017-02-17 08:39:54 -08:00
Cheng Zhao
eb109cf905 Merge pull request #9 from renaesop/master
Add Converter<std::map<std::string, T>>::ToV8
2017-02-13 17:04:05 +09: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
Electron Bot
73e753ef9a Update to Electron v1.6.0 2017-02-06 18:23:20 -08:00
Electron Bot
381f8ffae7 Update to Electron v1.5.1 2017-02-06 10:00:16 -08:00
renaesop
7197368c6d Add Converter<std::map<std::string, T>>::ToV8 2017-02-06 16:54:11 +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
Cheng Zhao
400d6c3de5 Merge pull request #8 from electron/set-read-only
Support setting read-only property value
2017-01-16 06:53:42 +09:00
Kevin Sawicki
c78a6fa7d4 Support setting read-only property value 2017-01-12 12:21:23 -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
Kevin Sawicki
6b7e73db92 Merge pull request #7 from deepak1556/empty_handle_converter_patch
create empty handle for null value
2016-12-12 12:55:31 -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
deepak1556
70092b493e create empty handle for null or undefined value 2016-12-07 16:41:45 +05:30
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
Cheng Zhao
912307386c Merge pull request #6 from enlight/add-readme
Add README
2016-08-12 20:48:19 +09:00
Vadim Macagon
03b4f57d23 Add README 2016-08-12 17:33:41 +07:00
Cheng Zhao
b5e5de626c Merge pull request #5 from kevinsawicki/detail-string
Use ToDetailString for arguments error message
2016-08-11 17:22:39 +09:00
Kevin Sawicki
8155da152f Add back empty handle string 2016-08-10 10:04:04 -07:00
Kevin Sawicki
1dbaec0edd Use ToDetailString for processing error message 2016-08-10 09:34:33 -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
Cheng Zhao
fa483e1fe0 Do not set constructor name in SetConstructor 2016-08-02 19:27:58 +09:00
Cheng Zhao
4dbe051494 Pass FunctionTemplate in BuildPrototype 2016-08-02 18:06:20 +09:00
Cheng Zhao
3a7a6efffb GetConstructor should init default constructor 2016-08-02 17:20:41 +09:00
Cheng Zhao
2d26eebca8 Remove the Constructor class 2016-08-02 17:01:19 +09:00
Cheng Zhao
a259d10bcb NewOperatorFactory is not used 2016-08-02 16:20:29 +09:00
Cheng Zhao
0a48af9ff7 Create objects from InstanceTemplate 2016-08-02 16:08:00 +09:00
Cheng Zhao
d55c3c5030 Turn Wrappable into using FunctionTemplate 2016-08-02 15:56:47 +09:00
Cheng Zhao
ab62755a88 Make InitWith virtual 2016-08-02 15:28:09 +09:00
Cheng Zhao
bd20bde1a2 Call the user call Init in Constructor 2016-08-02 15:14:48 +09: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
Cheng Zhao
d9bfe6a49d CHECK is not needed 2016-07-21 16:51:48 +09: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
Cheng Zhao
8a31e2d9c0 Update to API changes of V8 5.2 2016-07-04 15:08:08 +09:00
Cheng Zhao
a1efa28520 Setup v8::MicrotasksScope for callbacks 2016-06-24 14:40:47 +09: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
Cheng Zhao
e75f2aa087 Add converter for std::map 2016-06-13 09:26:48 +09: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
Cheng Zhao
4ad6ecd196 Handle.ToV8 should return Object 2016-05-20 15:38:51 +09: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
Cheng Zhao
ea07d4c6c8 Leak Wrappable's template
Since it is declared as static variable it will be released
automatically when process exits, which causes crashes in
renderer process because the template will then be released
later than V8 is closed.

This commit simply leaks the template so the crash won't happen,
this leak should be fine since leaking resource on exit is not
a bad thing.
2016-05-10 16:07:04 +09:00
=^._.^=
562e751842 Update to Electron v0.37.8 2016-04-29 06:30:31 -07:00
Cheng Zhao
0df2d882ea Make Wrappable a template class 2016-04-25 10:17:39 +09: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
Cheng Zhao
553326b006 Merge pull request #4 from deepak1556/dictionary_patch
use v8::private symbols as identifiers for object properties
2016-03-31 10:18:26 +09: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
Robo
309887c444 use v8::private symbols as identifiers for object properties 2016-03-24 01:32:08 +05:30
=^._.^=
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
Cheng Zhao
38834cb997 Merge pull request #3 from paulcbetts/chrome49
basictypes.h => macros.h
2016-03-08 17:43:54 +09:00
Paul Betts
16270fa080 basic_types.h => macros.h 2016-03-07 20:36:14 -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
Cheng Zhao
e719eab878 Clear internal field when Wrapper is destroyed 2016-02-02 19:50:27 +08:00
Cheng Zhao
26520c5cf4 Improve error message for type error
Close atom/electron#4307.
2016-02-02 10:10:59 +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
Cheng Zhao
a3dcf8ced6 Fix converter for std::set 2015-12-11 21:13:33 +08: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
Cheng Zhao
5e70868fd0 isDestroy => isDestroyed 2015-12-04 19:23:13 +08:00
=^._.^=
85c8b66944 Update to Electron v0.35.3 2015-12-04 01:50:12 -08:00
Cheng Zhao
e859228db1 Do not manually destroy native resources 2015-12-03 15:38:14 +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
Cheng Zhao
9398494100 Add Dictionary::Delete 2015-11-11 00:25:10 +08:00
=^._.^=
2b289bb758 Update to Electron v0.34.3 2015-11-06 07:56:36 -08:00
Cheng Zhao
21cda4e7fc Don't return v8::Maybe for std::vector 2015-11-02 20:45:29 +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
Cheng Zhao
b7387da085 Check whether key exists in Dictionary::Get 2015-09-10 15:57:30 +08: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
Cheng Zhao
8ca005eb41 Use the new SetWeak in Wrappable 2015-08-27 15:55:48 +08:00
Cheng Zhao
f5e34deb1a Add SetHidden for Dictionary 2015-08-27 15:21:27 +08: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
Cheng Zhao
b41635e809 Don't pass callback as const reference 2015-08-13 12:07:35 +08:00
Cheng Zhao
24d31e2046 Don't convert Function to Dictionary 2015-08-12 21:31:45 +08:00
Cheng Zhao
7160054927 GetNext should have no side effect when failed 2015-08-12 21:31:31 +08:00
Cheng Zhao
b6c353ee80 Add Dictionary::CreateEmpty 2015-08-12 21:18:59 +08: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
Cheng Zhao
67d9eaa215 Remove locker.h 2015-08-07 19:32:27 +08:00
Cheng Zhao
ebcf4c0224 Remove callback.h 2015-08-07 18:09:37 +08: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
Cheng Zhao
656e403f01 Use C++11 version of CreateFunctionTemplate 2015-07-23 14:59:32 +08: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
Cheng Zhao
41cd6d13c9 Allow specify methods that can be called after object is destroyed 2015-07-06 21:25:55 +08:00
Cheng Zhao
7b9926807d Add IsDestroyed method for Wrappable 2015-07-06 18:16:57 +08: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
Cheng Zhao
cc4e2fcd94 Check for null when converting Wrappable 2015-06-24 16:35:37 +08:00
Cheng Zhao
cad1fa50a9 Make isolate() public 2015-06-23 17:13:02 +08:00
Cheng Zhao
0586822808 Remember isolate in Wrappable 2015-06-23 17:09:20 +08: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
Cheng Zhao
f310222ce1 Allow converting Array 2015-06-10 11:14:42 +08: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
Cheng Zhao
ad207eeabb Enter context before calling callback 2015-05-29 13:41:59 +08: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
Cheng Zhao
1696237a3f Pass Handle to upper HandleScope when returning a V8 Handle 2015-05-22 21:23:16 +08:00
Cheng Zhao
269be86998 Use Local instead of Handle 2015-05-22 19:11:02 +08: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
Cheng Zhao
047a8de934 Merge pull request #1 from deepak1556/converter_patch
added std::set converter
2015-04-20 16:16:42 +08:00
deepak1556
39fae3a480 added std::set converter 2015-04-18 01:33:54 +05:30
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
Cheng Zhao
40da835cbb Don't reset handle before Wrappable is destroyed
It is possible that the user wants to use the V8 object in the destructor.

Fixes atom/atom-shell#1112.
2015-03-23 16:20:59 +08: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
Cheng Zhao
38aba07290 usigned long is uint64 on Linux 2015-03-14 18:47:36 +00:00
Cheng Zhao
a636fad51e Add converter for unsigned long 2015-03-10 16:46:54 -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
Cheng Zhao
d0db7bfb58 Add AfterInit method for Wrappable 2015-02-13 11:37:55 +08:00
Cheng Zhao
8d537ee2b6 Remove unneeded helper 2015-02-12 12:55:50 +08:00
Cheng Zhao
3387f33a8e Check internal field before converting 2015-02-11 22:09:42 +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
Cheng Zhao
1116a36c15 Avoid unnecessary copy in ConvertToV8 2015-01-14 18:55:38 -08:00
Cheng Zhao
bcf87fd3c9 OVERRIDE => override 2015-01-09 17:23:18 -08:00
Cheng Zhao
753d5675dd Fix ignored exception thrown from constructor. 2015-01-04 22:13:19 -08:00
Cheng Zhao
be2934d9b5 Fix throwing error in constructor 2015-01-02 18:05:25 -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
Cheng Zhao
4a1d11b2be Guard against non-constructor call in Constructor::New 2014-10-30 21:54:29 +08:00
Cheng Zhao
b1f7cfa9da Don't throw error in Constructor 2014-10-30 21:31:53 +08: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
Cheng Zhao
cc9d222923 Use NODE_VERSION_AT_LEAST to determine node version 2014-09-30 22:44:27 +08:00
Cheng Zhao
c5b39126ee Make throwing exception when parsing args easier 2014-09-23 23:28:52 +08:00
Cheng Zhao
12f4e9b7ea Add PersistentDictionary. 2014-09-09 14:12:59 +08:00
Cheng Zhao
742923c73d Remove unused constructor of Dictionary. 2014-09-09 13:32:41 +08:00
Cheng Zhao
980036b78a Make ScopedPersistent's interface consistent with V8. 2014-08-10 21:18:42 +08:00
Cheng Zhao
1387d3969e Add callback converter. 2014-08-10 19:05:25 +08:00
Cheng Zhao
5d6921ff2a Use pump to generate source files. 2014-08-10 16:59:50 +08:00
Cheng Zhao
cbb5004ff9 Fix compilation error of Constructor and ScopedPersistent in node 0.10. 2014-08-10 12:17:47 +08:00
Cheng Zhao
9145a08395 Fix compilation error with node 0.10. 2014-08-10 11:20:41 +08:00
Cheng Zhao
3d713baa4c Enable converting ScopedPersistent. 2014-07-21 13:07:56 +08:00
Cheng Zhao
14c851e9f8 Reset handle in weak callback.
This doesn't seem to be neccesary, but we had better follow what upstream does.
2014-07-18 09:37:07 +08:00
Cheng Zhao
e6db1875d0 Some more APIs fixes. 2014-06-28 22:32:35 +08:00
Cheng Zhao
8e056672bc Bring back ScopedPersistent.SetWeak. 2014-06-28 21:26:34 +08:00
Cheng Zhao
6f574c3802 Add APIs to match new V8 APIs. 2014-06-28 19:48:49 +08:00
Cheng Zhao
a5c4a2c7c6 Add .gitignore. 2014-06-23 21:50:00 +08:00
Cheng Zhao
bfd5f5d221 Strictly check for boolean type. 2014-06-23 21:47:39 +08:00
Cheng Zhao
94044b2950 Mark Dictionary.Get as const. 2014-06-23 21:39:03 +08:00
Cheng Zhao
51a55810b9 Enable creating empty Dictionary directly. 2014-06-23 21:38:46 +08:00
Cheng Zhao
1884b9a235 Add converter for const char*. 2014-06-23 21:24:18 +08:00
Cheng Zhao
730acd59c7 Add object() accessor for Dictionary. 2014-06-23 21:11:00 +08:00
Cheng Zhao
c79aecf64d Call object._init if we have one. 2014-05-27 08:47:06 +08:00
Cheng Zhao
f033e23ea3 No need to reset wrapper_ when we would run destructor. 2014-04-23 12:29:22 +08:00
Cheng Zhao
3d219b4be6 Do not wrap an object when it's already wrapped. 2014-04-22 15:57:23 +08:00
Cheng Zhao
d950fe3736 Add Arguments.Length method. 2014-04-22 15:57:11 +08:00
Cheng Zhao
9cc90ac7d5 Make ScopedPersistent do type conversion. 2014-04-18 16:45:44 +08:00
Cheng Zhao
94dec0ff85 Add v8::Handle<v8::String> to converter. 2014-04-16 15:28:43 +08:00
Cheng Zhao
c9fa29ef64 Enable setting method in Dictionary. 2014-04-16 15:13:44 +08:00
Cheng Zhao
213ac43721 Enable converting void*. 2014-04-16 14:56:33 +08:00
Cheng Zhao
d0bf1a842f Support function with 7 parameters. 2014-04-16 14:56:05 +08:00
Cheng Zhao
2d3af6fc38 Remove helper typedefs. 2014-04-16 14:29:45 +08:00
Cheng Zhao
ace550d6b2 Simplify Wrappable API. 2014-04-16 11:58:17 +08:00
Cheng Zhao
ac5be7dad7 Constructor should wrap the this pointer. 2014-04-16 10:36:54 +08:00
Cheng Zhao
bdfbef41c6 Cleanup. 2014-04-16 10:25:22 +08:00
Cheng Zhao
e2e1faa225 Make the Constructor accept arbitrary callback. 2014-04-16 09:50:51 +08:00
Cheng Zhao
78ab726ec7 Fix passing the wrong parameter. 2014-04-15 15:39:13 +08:00
Cheng Zhao
caa5ea0316 Add initial Constructor type. 2014-04-15 15:30:46 +08:00
Cheng Zhao
a20e02ee23 Fix compilation error of function_template. 2014-04-15 15:30:30 +08:00
Cheng Zhao
6ac926aa32 Enable modifying existing ObjectTemplate. 2014-04-15 11:34:07 +08:00
Cheng Zhao
4cada31f80 Do not rely on latest base/template_util. 2014-04-15 11:15:19 +08:00
Cheng Zhao
ff65b7dae1 Initial commit. 2014-04-15 11:04:36 +08:00
1556 changed files with 69514 additions and 74000 deletions

339
.circleci/config.yml Normal file
View File

@@ -0,0 +1,339 @@
build-steps: &build-steps
steps:
- checkout
- run:
name: Install Node.js 10 on MacOS
command: |
if [ "$INSTALL_MACOS_NODE" == "true" ]; then
echo 'Installing Node.js 10 for MacOS'
brew update
brew install node@10
fi
- run:
name: Check for release
command: |
if [ -n "${RUN_RELEASE_BUILD}" ]; then
echo 'release build triggered from api'
echo 'export ELECTRON_RELEASE=1 UPLOAD_TO_S3=1' >> $BASH_ENV
fi
- run:
name: Bootstrap
command: |
if [ "$ELECTRON_RELEASE" == "1" ]; then
echo "Bootstrapping Electron for release build for $TARGET_ARCH"
script/bootstrap.py --target_arch=$TARGET_ARCH
else
echo "Bootstrapping Electron for debug build for $TARGET_ARCH"
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
fi
- run:
name: Lint
command: 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" ] && [ "$UPLOAD_TO_S3" != "1" ]; then
echo 'Uploading Electron release distribution to github releases'
script/upload.py
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$UPLOAD_TO_S3" == "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: Setup for headless testing
command: |
if [ "$RUN_HEADLESS_TESTS" == "true" ]; then
echo 'Setup for headless testing'
sh -e /etc/init.d/xvfb start
else
echo 'Headless testing not needed'
fi
- run:
name: Test
environment:
MOCHA_FILE: junit/test-results.xml
MOCHA_REPORTER: mocha-junit-reporter
command: |
if [ "$RUN_TESTS" == "true" ]; then
if [ "$ELECTRON_RELEASE" != "1" ]; then
echo 'Testing Electron debug build'
mkdir junit
script/test.py --ci --rebuild_native_modules
else
if [ "$UPLOAD_TO_S3" == "1" ]; then
echo 'Testing Electron release build'
mkdir junit
script/test.py --ci --rebuild_native_modules -c R
else
echo 'Skipping tests on GitHub release'
fi
fi
else
echo 'Skipping tests due to configuration'
fi
- run:
name: Verify FFmpeg
command: |
if [ "$RUN_TESTS" == "true" ]; then
if [ "$ELECTRON_RELEASE" != "1" ]; then
echo 'Verifying ffmpeg on debug build'
script/verify-ffmpeg.py
else
echo 'Verifying ffmpeg on release build'
script/verify-ffmpeg.py -R
fi
else
echo 'Skipping tests due to configuration'
fi
- run:
name: Generate Typescript Definitions
command: |
if [ "$CREATE_TYPESCRIPT_DEFS" == "true" ]; then
npm run create-typescript-definitions
fi
- persist_to_workspace:
root: out
paths:
- "*"
- store_test_results:
path: junit
- store_artifacts:
path: junit
- store_artifacts:
path: out
build-defaults: &build-defaults
docker:
- image: electronbuilds/electron:0.0.8
<<: *build-steps
version: 2
jobs:
electron-linux-arm:
environment:
TARGET_ARCH: arm
<<: *build-defaults
resource_class: 2xlarge
electron-linux-arm-test:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace/project/out
- 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-arm-release-nightly:
environment:
TARGET_ARCH: arm
RUN_RELEASE_BUILD: true
<<: *build-defaults
resource_class: 2xlarge
electron-linux-arm64:
environment:
TARGET_ARCH: arm64
<<: *build-defaults
resource_class: 2xlarge
electron-linux-arm64-test:
machine: true
steps:
- attach_workspace:
at: /tmp/workspace/project/out
- 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-arm64-release-nightly:
environment:
TARGET_ARCH: arm64
RUN_RELEASE_BUILD: true
<<: *build-defaults
resource_class: 2xlarge
electron-linux-ia32:
environment:
TARGET_ARCH: ia32
DISPLAY: ':99.0'
RUN_TESTS: true
RUN_HEADLESS_TESTS: true
<<: *build-defaults
resource_class: xlarge
electron-linux-ia32-release-nightly:
environment:
TARGET_ARCH: ia32
RUN_RELEASE_BUILD: true
<<: *build-defaults
resource_class: xlarge
electron-linux-mips64el:
environment:
TARGET_ARCH: mips64el
<<: *build-defaults
resource_class: xlarge
electron-linux-x64:
environment:
TARGET_ARCH: x64
DISPLAY: ':99.0'
RUN_TESTS: true
RUN_HEADLESS_TESTS: true
CREATE_TYPESCRIPT_DEFS: true
<<: *build-defaults
resource_class: xlarge
electron-linux-x64-release-nightly:
environment:
TARGET_ARCH: x64
RUN_RELEASE_BUILD: true
<<: *build-defaults
resource_class: xlarge
electron-osx-x64:
environment:
TARGET_ARCH: x64
RUN_TESTS: true
INSTALL_MACOS_NODE: true
macos:
xcode: "8.3.3"
<<: *build-steps
electron-osx-x64-release-nightly:
environment:
TARGET_ARCH: x64
RUN_RELEASE_BUILD: true
INSTALL_MACOS_NODE: true
macos:
xcode: "8.3.3"
<<: *build-steps
electron-mas-x64:
environment:
TARGET_ARCH: x64
MAS_BUILD: 1
RUN_TESTS: true
INSTALL_MACOS_NODE: true
macos:
xcode: "8.3.3"
<<: *build-steps
electron-mas-x64-release-nightly:
environment:
TARGET_ARCH: x64
MAS_BUILD: 1
RUN_RELEASE_BUILD: true
INSTALL_MACOS_NODE: true
macos:
xcode: "8.3.3"
<<: *build-steps
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
nightly-release-test:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
- 2-0-x
- 1-8-x
- 1-7-x
jobs:
- electron-linux-arm-release-nightly
- electron-linux-arm64-release-nightly
- electron-linux-ia32-release-nightly
- electron-linux-x64-release-nightly
experimental:
notify:
branches:
only:
- master
- 2-0-x
- 1-8-x
- 1-7-x

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/electrocats
/default_app/ @electron/docs
/docs/ @electron/docs
/docs-translations/ @electron/i18n
/npm/ @electron/electrocats

View File

@@ -10,6 +10,9 @@ Thanks for opening an issue! A few things to keep in mind:
* Electron version:
* Operating system:
<!-- If this used to work -->
* Last known working Electron version:
### Expected behavior
<!-- What do you think should happen? -->

32
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve Electron
---
* Electron Version:
* Operating System (Platform and Version):
* Last known working Electron version:
**Expected Behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
A clear and concise description of what actually happened.
**To Reproduce**
Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.
You can fork [electron-quick-start](https://github.com/electron/electron-quick-start) and include a link to the branch with your changes.
If you provide a URL, please list the commands required to clone/setup/run your repo e.g.
```sh
$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional Information**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for Electron
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

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

@@ -0,0 +1,15 @@
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Contributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTING.md
-->
##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
- [ ] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/master/docs/development/testing.md)
- [ ] relevant documentation is changed or added
- [ ] commit messages or PR title follow semantic [commit guidelines](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines)

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

@@ -0,0 +1,53 @@
# 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).
# 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! 💖
We use [semantic commit messages](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines) to streamline the release process. Before your pull request can be merged, you should **update your pull request title** to start with a semantic prefix, OR prefix at least one of your commit messages.
Examples of commit messages with semantic prefixes:
- `fix: don't overwrite prevent_default if default wasn't prevented`
- `feat: add app.isPackaged() method`
- `docs: app.isDefaultProtocolClient is now available on Linux`
Things that will help get your PR 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! 🎉🎉🎉
# Configuration for trop - https://github.com/codebytere/trop
watchedProject:
name: Backports
authorizedUsers:
- alexeykuzmin
- ckerr
- codebytere
- deepak1556
- jkleinsc
- MarshallOfSound
- nitsakh
- nornagon
- zcbenz

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!

70
.gitignore vendored
View File

@@ -1,40 +1,52 @@
.DS_Store
.env
.gclient_done
**/.npmrc
.tags*
/.idea/
/build/
/dist/
/external_binaries/
/out/
/vendor/download/
/vendor/debian_jessie_amd64-sysroot/
/vendor/debian_jessie_arm-sysroot/
/vendor/debian_jessie_arm64-sysroot/
/vendor/debian_jessie_i386-sysroot/
/vendor/debian_wheezy_amd64-sysroot/
/vendor/debian_wheezy_arm-sysroot/
/vendor/debian_wheezy_i386-sysroot/
/vendor/python_26/
/vendor/npm/
/vendor/llvm/
/vendor/llvm-build/
/vendor/.gclient
node_modules/
*.xcodeproj
*.swp
*.pyc
*.VC.db
*.VC.VC.opendb
.vs/
.vscode/
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
*.sln
*.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.vcxproj*
/brightray/brightray.suo
/brightray/brightray.v12.suo
/brightray/brightray.vcxproj*
/brightray/brightray.xcodeproj/
/dist/
/external_binaries/
/out/
/vendor/.gclient
/vendor/debian_jessie_mips64-sysroot/
/vendor/debian_stretch_amd64-sysroot/
/vendor/debian_stretch_arm-sysroot/
/vendor/debian_stretch_arm64-sysroot/
/vendor/debian_stretch_i386-sysroot/
/vendor/gcc-4.8.3-d197-n64-loongson/
/vendor/readme-gcc483-loongson.txt
/vendor/download/
/vendor/llvm-build/
/vendor/llvm/
/vendor/npm/
/vendor/python_26/
/vendor/native_mksnapshot
/vendor/LICENSES.chromium.html
node_modules/
SHASUMS256.txt
**/yarn.lock
compile_commands.json
.envrc
# npm package
/npm/dist
/npm/path.txt

3
.gitmodules vendored
View File

@@ -7,9 +7,6 @@
[submodule "vendor/breakpad"]
path = vendor/breakpad
url = https://github.com/electron/chromium-breakpad.git
[submodule "vendor/native_mate"]
path = vendor/native_mate
url = https://github.com/electron/native-mate.git
[submodule "vendor/crashpad"]
path = vendor/crashpad
url = https://github.com/electron/crashpad.git

View File

@@ -1 +0,0 @@
v7.9.0

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

592
BUILD.gn Normal file
View File

@@ -0,0 +1,592 @@
import("//build/config/locales.gni")
import("//tools/grit/repack.gni")
import("build/asar.gni")
import("build/npm.gni")
if (is_mac) {
import("//build/config/mac/rules.gni")
import("//third_party/icu/config.gni")
import("//v8/gni/v8.gni")
}
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
pkg_config("gio_unix") {
packages = [ "gio-unix-2.0" ]
}
}
declare_args() {
electron_project_name = "electron"
electron_product_name = "Electron"
electron_company_name = "GitHub, Inc"
electron_company_abbr = "github"
electron_version = "0.0.0-dev"
enable_desktop_capturer = true
enable_run_as_node = true
enable_osr = true
# Provide a fake location provider for mocking
# the geolocation responses. Disable it if you
# need to test with chromium's location provider.
# Should not be enabled for release build.
enable_fake_location_provider = !is_official_build
}
filenames_gypi = exec_script(
"//build/gypi_to_gn.py",
[
rebase_path("filenames.gypi"),
"--replace=<(SHARED_INTERMEDIATE_DIR)=$target_gen_dir",
],
"scope",
[ "filenames.gypi" ]
)
config("branding") {
defines = [
"ATOM_PRODUCT_NAME=\"$electron_product_name\"",
"ATOM_PROJECT_NAME=\"$electron_project_name\"",
]
}
config("features") {
defines = []
if (enable_desktop_capturer) {
defines += [ "ENABLE_DESKTOP_CAPTURER=1" ]
}
if (enable_run_as_node) {
defines += [ "ENABLE_RUN_AS_NODE=1" ]
}
if (enable_osr) {
defines += [ "ENABLE_OSR=1" ]
}
}
config("native_mate_config") {
include_dirs = [
"//third_party/native_mate",
]
cflags_cc = [
"-Wno-deprecated-declarations",
]
cflags_objcc = cflags_cc
}
source_set("native_mate") {
deps = [
"//base",
"//net",
"//v8:v8_headers",
"build/node",
]
public_configs = [ ":native_mate_config" ]
sources = [
"//third_party/native_mate/native_mate/arguments.cc",
"//third_party/native_mate/native_mate/arguments.h",
"//third_party/native_mate/native_mate/compat.h",
"//third_party/native_mate/native_mate/constructor.h",
"//third_party/native_mate/native_mate/converter.cc",
"//third_party/native_mate/native_mate/converter.h",
"//third_party/native_mate/native_mate/dictionary.cc",
"//third_party/native_mate/native_mate/dictionary.h",
"//third_party/native_mate/native_mate/function_template.cc",
"//third_party/native_mate/native_mate/function_template.h",
"//third_party/native_mate/native_mate/handle.h",
"//third_party/native_mate/native_mate/object_template_builder.cc",
"//third_party/native_mate/native_mate/object_template_builder.h",
"//third_party/native_mate/native_mate/persistent_dictionary.cc",
"//third_party/native_mate/native_mate/persistent_dictionary.h",
"//third_party/native_mate/native_mate/scoped_persistent.h",
"//third_party/native_mate/native_mate/wrappable.cc",
"//third_party/native_mate/native_mate/wrappable.h",
"//third_party/native_mate/native_mate/wrappable_base.h",
]
}
npm_action("atom_browserify_sandbox") {
deps = [ ":atom_js2c_copy" ]
sandbox_args = [
"lib/sandboxed_renderer/init.js",
"-r", "./lib/sandboxed_renderer/api/exports/electron.js:electron",
"-r", "./lib/sandboxed_renderer/api/exports/fs.js:fs",
"-r", "./lib/sandboxed_renderer/api/exports/os.js:os",
"-r", "./lib/sandboxed_renderer/api/exports/path.js:path",
"-r", "./lib/sandboxed_renderer/api/exports/child_process.js:child_process",
]
inputs = [
"lib/sandboxed_renderer/init.js",
"lib/sandboxed_renderer/api/exports/electron.js",
"lib/sandboxed_renderer/api/exports/fs.js",
"lib/sandboxed_renderer/api/exports/os.js",
"lib/sandboxed_renderer/api/exports/path.js",
"lib/sandboxed_renderer/api/exports/child_process.js",
]
outputs = [ "$target_gen_dir/js2c/preload_bundle.js" ]
script = "browserify"
args = sandbox_args + [
"-o", rebase_path(outputs[0])
]
}
npm_action("atom_browserify_isolated") {
deps = [ ":atom_js2c_copy" ]
inputs = [ "lib/isolated_renderer/init.js" ]
outputs = [ "$target_gen_dir/js2c/isolated_bundle.js" ]
script = "browserify"
args = inputs + [
"-o", rebase_path(outputs[0])
]
}
copy("atom_js2c_copy") {
sources = [
"lib/common/asar.js",
"lib/common/asar_init.js",
]
outputs = [ "$target_gen_dir/js2c/{{source_file_part}}" ]
}
action("atom_js2c") {
deps = [
":atom_js2c_copy",
":atom_browserify_sandbox",
":atom_browserify_isolated",
]
js2c_sources = filenames_gypi.js2c_sources
browserify_sources = [
"$target_gen_dir/js2c/isolated_bundle.js",
"$target_gen_dir/js2c/preload_bundle.js",
]
inputs = js2c_sources + browserify_sources
outputs = [ "$target_gen_dir/atom_natives.h" ]
script = "tools/js2c.py"
args = [
rebase_path("//third_party/electron_node")
] + rebase_path(outputs, root_build_dir) + [
rebase_path("$target_gen_dir/js2c", root_build_dir)
]
}
asar("js2asar") {
sources = filenames_gypi.js_sources
outputs = [ "$root_out_dir/resources/electron.asar" ]
root = "lib"
}
asar("app2asar") {
sources = filenames_gypi.default_app_sources
outputs = [ "$root_out_dir/resources/default_app.asar" ]
root = "default_app"
}
group("electron") {
deps = [ ":electron_lib" ]
}
static_library("electron_lib") {
configs += [
"//v8:external_startup_data",
]
public_configs = [
":branding",
":features",
]
deps = [
"//chrome/common:constants",
"//components/cdm/renderer",
"//components/network_session_configurator/common",
"//components/prefs",
"//components/printing/common",
"//components/security_state/content",
"//content/public/browser",
"//device/geolocation",
"//gin",
"//net:net_resources",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
"//printing",
"//services/device/wake_lock/power_save_blocker", # TODO: this requires a visibility patch to chromium src
"//skia",
"//third_party/WebKit/public:blink",
"//third_party/boringssl",
"//third_party/crashpad/crashpad/client",
"//third_party/leveldatabase",
"//third_party/libyuv",
"//third_party/webrtc/modules/desktop_capture",
"//third_party/webrtc/modules/desktop_capture:primitives",
"//ui/events:dom_keycode_converter",
"//ui/views",
"//v8",
":atom_js2c",
":native_mate",
"brightray",
"build/node",
]
if (is_mac) {
deps += [
"//ui/accelerated_widget_mac",
"//base/allocator:features",
]
}
if (is_linux) {
deps += [
"//build/config/linux/gtk3",
"//chrome/browser/ui/libgtkui",
"//device/bluetooth",
"//third_party/breakpad:client",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/native_theme",
"//ui/views/controls/webview",
"//ui/wm",
]
configs += [ ":gio_unix" ]
}
defines = [
# This is defined in skia/skia_common.gypi.
"SK_SUPPORT_LEGACY_GETTOPDEVICE",
# Disable warnings for g_settings_list_schemas.
"GLIB_DISABLE_DEPRECATION_WARNINGS",
# Import V8 symbols from shared library (node.dll / libnode.so)
"USING_V8_SHARED",
"USING_V8_PLATFORM_SHARED",
"USING_V8_BASE_SHARED",
# Enables SkBitmap size 64 operations
#"SK_SUPPORT_LEGACY_SAFESIZE64", # doesn't seem to be needed to build?
]
include_dirs = [
"chromium_src",
".",
"$target_gen_dir",
# TODO(nornagon): replace usage of SchemeRegistry by an actually exported
# API of blink, then delete this include dir.
"//third_party/WebKit/Source",
# NOTE(nornagon): other chromium files use the full path to include
# crashpad; this is just here for compatibility between GN and GYP, so that
# the #includes can be agnostic about where crashpad is vendored.
"//third_party/crashpad",
]
if (is_linux) {
include_dirs += [
"//third_party/breakpad",
]
}
extra_source_filters = []
if (!is_linux) {
extra_source_filters += [
"*\bx/*",
"*_x11.h",
"*_x11.cc",
"*_gtk.h",
"*_gtk.cc",
]
}
if (!is_win) {
extra_source_filters += [
"*\bwin_*.h",
"*\bwin_*.cc",
]
}
if (is_mac) {
extra_source_filters += [
"*_views.cc",
"*_views.h",
"*\bviews/*",
"*/autofill_popup.cc",
"*/autofill_popup.h",
]
}
set_sources_assignment_filter(sources_assignment_filter + extra_source_filters)
sources = filenames_gypi.lib_sources
set_sources_assignment_filter(sources_assignment_filter)
if (enable_fake_location_provider) {
defines += [
"OVERRIDE_LOCATION_PROVIDER"
]
sources += filenames_gypi.lib_sources_location_provider
}
if (enable_run_as_node) {
sources += [
"atom/app/node_main.cc",
"atom/app/node_main.h",
]
}
if (enable_osr) {
sources += [
"atom/browser/api/atom_api_web_contents_osr.cc",
"atom/browser/osr/osr_output_device.cc",
"atom/browser/osr/osr_output_device.h",
"atom/browser/osr/osr_render_widget_host_view.cc",
"atom/browser/osr/osr_render_widget_host_view.h",
"atom/browser/osr/osr_render_widget_host_view_mac.mm",
"atom/browser/osr/osr_view_proxy.cc",
"atom/browser/osr/osr_view_proxy.h",
"atom/browser/osr/osr_web_contents_view.cc",
"atom/browser/osr/osr_web_contents_view.h",
"atom/browser/osr/osr_web_contents_view_mac.mm",
]
deps += [
"//ui/compositor",
"//components/viz/service",
]
}
if (enable_desktop_capturer) {
sources += [
"atom/browser/api/atom_api_desktop_capturer.cc",
"atom/browser/api/atom_api_desktop_capturer.h",
]
}
if (is_mac) {
libs = [
"Squirrel.framework",
"ReactiveCocoa.framework",
"Mantle.framework",
]
cflags_objcc = [
"-F", rebase_path("external_binaries", root_build_dir)
]
if (true) { # !is_mas_build
# ReactiveCocoa which is used by Squirrel requires using __weak.
cflags_objcc += [ "-fobjc-weak" ]
}
}
if (is_linux) {
sources += filenames_gypi.lib_sources_linux
sources += filenames_gypi.lib_sources_nss
}
}
if (is_mac) {
electron_framework_name = electron_product_name + " Framework"
electron_helper_name = electron_product_name + " Helper"
electron_framework_version = "A"
electron_mac_bundle_id = "com.$electron_company_abbr.$electron_project_name"
mac_xib_bundle_data("electron_xibs") {
sources = [ "atom/common/resources/mac/MainMenu.xib" ]
}
bundle_data("electron_framework_resources") {
public_deps = [
"//content/shell:pak",
":electron_locales",
]
sources = [
"$root_out_dir/content_shell.pak",
]
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata" ]
}
if (v8_use_external_startup_data) {
sources += [
"$root_out_dir/natives_blob.bin",
"$root_out_dir/snapshot_blob.bin",
]
public_deps += [ "//v8" ]
}
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
bundle_data("electron_framework_libraries") {
public_deps = [ "build/node" ]
sources = [
"$root_out_dir/libnode.dylib"
]
outputs = [
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}"
]
}
bundle_data("electron_framework_helpers") {
sources = [
"$root_out_dir/crashpad_handler",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
public_deps = [
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
}
mac_framework_bundle("electron_framework") {
output_name = electron_framework_name
framework_version = electron_framework_version
framework_contents = [ "Resources" ]
public_deps = [ ":electron_lib" ]
deps = [
"//base",
"//base:i18n",
":electron_framework_helpers",
":electron_framework_libraries",
":electron_framework_resources",
":electron_xibs",
]
info_plist = "atom/common/resources/mac/Info.plist"
extra_substitutions = [
"ATOM_BUNDLE_ID=$electron_mac_bundle_id.framework",
]
include_dirs = [
".",
]
sources = filenames_gypi.framework_sources
libs = [
"Carbon.framework",
"QuartzCore.framework",
"Quartz.framework",
"Security.framework",
"SecurityInterface.framework",
"ServiceManagement.framework",
"StoreKit.framework",
]
ldflags = [
"-F", rebase_path("external_binaries", root_build_dir),
"-Wl,-install_name,@rpath/$output_name.framework/$output_name",
"-rpath",
"@loader_path/Libraries",
]
if (is_component_build) {
ldflags += [
"-rpath",
"@executable_path/../../../../../.."
]
}
}
mac_app_bundle("electron_helper_app") {
output_name = electron_helper_name
deps = [ ":electron_framework+link" ]
sources = filenames_gypi.app_sources
include_dirs = [ "." ]
info_plist = "atom/renderer/resources/mac/Info.plist"
extra_substitutions = [
"ATOM_BUNDLE_ID=$electron_mac_bundle_id.helper",
]
ldflags = [
"-rpath",
"@executable_path/../../..",
]
}
bundle_data("electron_app_framework_bundle_data") {
sources = [
"$root_out_dir/$electron_framework_name.framework",
"$root_out_dir/$electron_helper_name.app",
"external_binaries/Squirrel.framework",
"external_binaries/ReactiveCocoa.framework",
"external_binaries/Mantle.framework",
]
outputs = [
"{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
]
public_deps = [
":electron_framework+link",
":electron_helper_app",
]
}
bundle_data("electron_app_resources") {
public_deps = [
":js2asar",
":app2asar",
]
sources = [
"$root_out_dir/resources/electron.asar",
"$root_out_dir/resources/default_app.asar",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}"
]
}
repack_locales("electron_locales") {
source_patterns = [
"${root_gen_dir}/content/app/strings/content_strings_",
]
deps = [
"//content/app/strings",
]
input_locales = locales
if (is_mac) {
output_locales = locales_as_mac_outputs
} else {
output_locales = locales
}
if (is_mac) {
output_dir = "$root_gen_dir/repack"
copy_data_to_bundle = true
} else {
output_dir = root_out_dir
}
}
mac_app_bundle("electron_app") {
output_name = electron_product_name
sources = filenames_gypi.app_sources
include_dirs = [ "." ]
deps = [
":electron_app_framework_bundle_data",
":electron_app_resources",
]
info_plist = "atom/browser/resources/mac/Info.plist"
extra_substitutions = [
"ATOM_BUNDLE_ID=$electron_mac_bundle_id",
]
ldflags = [
"-rpath",
"@executable_path/../Frameworks",
]
}
}
if (is_linux) {
executable("electron_app") {
output_name = electron_project_name
sources = filenames_gypi.app_sources
include_dirs = [ "." ]
deps = [
":app2asar",
":electron_lib",
":js2asar",
"//build/config:exe_and_shlib_deps",
"//chrome:packed_resources",
"//content/shell:copy_shell_resources",
"//content/shell:pak",
"//third_party/WebKit/public:image_resources",
"//ui/strings",
]
}
}

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,60 @@
# 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
* 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
See [Coding Style](https://electronjs.org/docs/development/coding-style) for information about which standards Electron adheres to in different parts of its codebase.
## Further Reading
For more in-depth guides on developing Electron, see
[/docs/development](/docs/development/README.md)

73
DEPS Normal file
View File

@@ -0,0 +1,73 @@
vars = {
'chromium_version':
'63.0.3239.150',
'libchromiumcontent_revision':
'ecc87483bace2bce628bf5d02a73514ffa95f4bf',
'node_version':
'v9.7.0-33-g538a5023af',
'native_mate_revision':
'4cd7d113915de0cc08e9a218be35bff9c7361906',
'chromium_git':
'https://chromium.googlesource.com',
'electron_git':
'https://github.com/electron',
}
deps = {
'src':
(Var("chromium_git")) + '/chromium/src.git@' + (Var("chromium_version")),
'src/libchromiumcontent':
(Var("electron_git")) + '/libchromiumcontent.git@' + (Var("libchromiumcontent_revision")),
'src/third_party/electron_node':
(Var("electron_git")) + '/node.git@' + (Var("node_version")),
'src/third_party/native_mate':
(Var("electron_git")) + '/native-mate.git@' + (Var("native_mate_revision")),
}
hooks = [
{
'action': [
'src/libchromiumcontent/script/apply-patches'
],
'pattern':
'src/libchromiumcontent',
'name':
'patch_chromium'
},
{
'action': [
'src/electron/script/update-external-binaries.py'
],
'pattern':
'src/electron/script/update-external-binaries.py',
'name':
'electron_external_binaries'
},
{
'action': [
'bash',
'-c',
# NOTE(nornagon): this ridiculous {{}} stuff is because these strings get
# variable-substituted twice by gclient.
'echo -e "#\\n{{{{\'variables\':{{{{}}}}}}}}" > src/third_party/electron_node/config.gypi',
],
'pattern': 'src/third_party/electron_node',
'name': 'touch_node_config_gypi'
},
{
'action': [
'bash',
'-c',
'cd src/electron; npm install',
],
'pattern': 'src/electron/package.json',
'name': 'electron_npm_deps'
},
]
recursedeps = [
'src',
'src/libchromiumcontent',
]

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_10.x | bash -
RUN 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_10.x | bash -
RUN 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

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

122
README.md
View File

@@ -1,87 +1,95 @@
[![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)
[![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/i18n](https://github.com/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 for Electron prior to version 2, as it does not follow semantic
versioning. As of version 2.0.0, Electron follows semver, so you don't need `--save-exact` flag. 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/i18n](https://github.com/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,73 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
version: "{build}"
build_cloud: electron-16
image: electron-16-vs2017-15.4.5
build_script:
- ps: >-
echo "Build worker image $env:APPVEYOR_BUILD_WORKER_IMAGE"
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
&"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
if($env:SKIP_GYP_BUILD -eq "true") {
Write-warning "Skipping debug build for older branch"; Exit-AppveyorBuild
} elseif(($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

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

View File

@@ -7,7 +7,6 @@
#include <string>
#include <vector>
#include "atom/common/atom_constants.h"
#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
#include "atom/common/options_switches.h"
@@ -19,20 +18,90 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/user_agent.h"
#include "pdf/pdf.h"
#include "media/media_features.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/url_constants.h"
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE)
#include "base/native_library.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/widevine_cdm_constants.h"
#endif
#include "content/public/common/cdm_info.h"
#include "media/base/video_codecs.h"
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#if defined(ENABLE_PDF_VIEWER)
#include "atom/common/atom_constants.h"
#include "pdf/pdf.h"
#endif // defined(ENABLE_PDF_VIEWER)
namespace atom {
namespace {
#if defined(WIDEVINE_CDM_AVAILABLE)
bool IsWidevineAvailable(base::FilePath* adapter_path,
base::FilePath* cdm_path,
std::vector<media::VideoCodec>* codecs_supported) {
static enum {
NOT_CHECKED,
FOUND,
NOT_FOUND,
} widevine_cdm_file_check = NOT_CHECKED;
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
*adapter_path = command_line->GetSwitchValuePath(switches::kWidevineCdmPath);
if (!adapter_path->empty()) {
*cdm_path = adapter_path->DirName().AppendASCII(
base::GetNativeLibraryName(kWidevineCdmLibraryName));
if (widevine_cdm_file_check == NOT_CHECKED) {
widevine_cdm_file_check =
(base::PathExists(*adapter_path) && base::PathExists(*cdm_path))
? FOUND
: NOT_FOUND;
}
if (widevine_cdm_file_check == FOUND) {
// Add the supported codecs as if they came from the component manifest.
// This list must match the CDM that is being bundled with Chrome.
codecs_supported->push_back(media::VideoCodec::kCodecVP8);
codecs_supported->push_back(media::VideoCodec::kCodecVP9);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
codecs_supported->push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
return true;
}
}
return false;
}
void AddWidevineAdapterFromCommandLine(
base::CommandLine* command_line,
std::vector<content::PepperPluginInfo>* plugins) {
base::FilePath adapter_path;
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
if (IsWidevineAvailable(&adapter_path, &cdm_path, &video_codecs_supported)) {
auto cdm_version_string =
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
content::PepperPluginInfo info;
info.is_out_of_process = true;
info.path = adapter_path;
info.name = kWidevineCdmDisplayName;
info.description =
base::StringPrintf("%s (version: %s)", kWidevineCdmDescription,
cdm_version_string.c_str());
info.version = cdm_version_string;
info.permissions = kWidevineCdmPluginPermissions;
content::WebPluginMimeType mime_type(kWidevineCdmPluginMimeType,
kWidevineCdmPluginExtension,
kWidevineCdmPluginMimeTypeDescription);
info.mime_types.push_back(mime_type);
plugins->push_back(info);
}
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#if defined(ENABLE_PEPPER_FLASH)
content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
const std::string& version) {
content::PepperPluginInfo plugin;
@@ -57,60 +126,38 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
flash_version_numbers.push_back("999");
// E.g., "Shockwave Flash 10.2 r154":
plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
flash_version_numbers[1] + " r" + flash_version_numbers[2];
flash_version_numbers[1] + " r" +
flash_version_numbers[2];
plugin.version = base::JoinString(flash_version_numbers, ".");
content::WebPluginMimeType swf_mime_type(
content::kFlashPluginSwfMimeType,
content::kFlashPluginSwfExtension,
content::kFlashPluginSwfDescription);
content::WebPluginMimeType swf_mime_type(content::kFlashPluginSwfMimeType,
content::kFlashPluginSwfExtension,
content::kFlashPluginSwfDescription);
plugin.mime_types.push_back(swf_mime_type);
content::WebPluginMimeType spl_mime_type(
content::kFlashPluginSplMimeType,
content::kFlashPluginSplExtension,
content::kFlashPluginSplDescription);
content::WebPluginMimeType spl_mime_type(content::kFlashPluginSplMimeType,
content::kFlashPluginSplExtension,
content::kFlashPluginSplDescription);
plugin.mime_types.push_back(spl_mime_type);
return plugin;
}
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
const std::string& version) {
content::PepperPluginInfo widevine_cdm;
widevine_cdm.is_out_of_process = true;
widevine_cdm.path = path;
widevine_cdm.name = kWidevineCdmDisplayName;
widevine_cdm.description = kWidevineCdmDescription +
std::string(" (version: ") +
version + ")";
widevine_cdm.version = version;
content::WebPluginMimeType widevine_cdm_mime_type(
kWidevineCdmPluginMimeType,
kWidevineCdmPluginExtension,
kWidevineCdmPluginMimeTypeDescription);
void AddPepperFlashFromCommandLine(
base::CommandLine* command_line,
std::vector<content::PepperPluginInfo>* plugins) {
base::FilePath flash_path =
command_line->GetSwitchValuePath(switches::kPpapiFlashPath);
if (flash_path.empty())
return;
// Add the supported codecs as if they came from the component manifest.
std::vector<std::string> codecs;
codecs.push_back(kCdmSupportedCodecVp8);
codecs.push_back(kCdmSupportedCodecVp9);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
codecs.push_back(kCdmSupportedCodecAvc1);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
std::string codec_string = base::JoinString(
codecs, std::string(1, kCdmSupportedCodecsValueDelimiter));
widevine_cdm_mime_type.additional_param_names.push_back(
base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
widevine_cdm_mime_type.additional_param_values.push_back(
base::ASCIIToUTF16(codec_string));
auto flash_version =
command_line->GetSwitchValueASCII(switches::kPpapiFlashVersion);
widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
widevine_cdm.permissions = kWidevineCdmPluginPermissions;
return widevine_cdm;
plugins->push_back(CreatePepperFlashInfo(flash_path, flash_version));
}
#endif
#endif // defined(ENABLE_PEPPER_FLASH)
void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
#if defined(ENABLE_PDF_VIEWER)
content::PepperPluginInfo pdf_info;
pdf_info.is_internal = true;
pdf_info.is_out_of_process = true;
@@ -127,71 +174,33 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
chrome_pdf::PPP_ShutdownModule;
pdf_info.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
plugins->push_back(pdf_info);
#endif // defined(ENABLE_PDF_VIEWER)
}
void ConvertStringWithSeparatorToVector(std::vector<std::string>* vec,
const char* separator,
const char* cmd_switch) {
auto command_line = base::CommandLine::ForCurrentProcess();
auto* command_line = base::CommandLine::ForCurrentProcess();
auto string_with_separator = command_line->GetSwitchValueASCII(cmd_switch);
if (!string_with_separator.empty())
*vec = base::SplitString(string_with_separator, separator,
base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
}
} // namespace
void AddPepperFlashFromCommandLine(
std::vector<content::PepperPluginInfo>* plugins) {
auto command_line = base::CommandLine::ForCurrentProcess();
base::FilePath flash_path = command_line->GetSwitchValuePath(
switches::kPpapiFlashPath);
if (flash_path.empty())
return;
AtomContentClient::AtomContentClient() {}
auto flash_version = command_line->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
plugins->push_back(CreatePepperFlashInfo(flash_path, flash_version));
}
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
void AddWidevineCdmFromCommandLine(
std::vector<content::PepperPluginInfo>* plugins) {
auto command_line = base::CommandLine::ForCurrentProcess();
base::FilePath widevine_cdm_path = command_line->GetSwitchValuePath(
switches::kWidevineCdmPath);
if (widevine_cdm_path.empty())
return;
if (!base::PathExists(widevine_cdm_path))
return;
auto widevine_cdm_version = command_line->GetSwitchValueASCII(
switches::kWidevineCdmVersion);
if (widevine_cdm_version.empty())
return;
plugins->push_back(CreateWidevineCdmInfo(widevine_cdm_path,
widevine_cdm_version));
}
#endif
AtomContentClient::AtomContentClient() {
}
AtomContentClient::~AtomContentClient() {
}
AtomContentClient::~AtomContentClient() {}
std::string AtomContentClient::GetProduct() const {
return "Chrome/" CHROME_VERSION_STRING;
}
std::string AtomContentClient::GetUserAgent() const {
return content::BuildUserAgentFromProduct(
"Chrome/" CHROME_VERSION_STRING " "
ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING);
return content::BuildUserAgentFromProduct("Chrome/" CHROME_VERSION_STRING
" " ATOM_PRODUCT_NAME
"/" ATOM_VERSION_STRING);
}
base::string16 AtomContentClient::GetLocalizedString(int message_id) const {
@@ -215,11 +224,43 @@ void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) {
void AtomContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) {
AddPepperFlashFromCommandLine(plugins);
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
AddWidevineCdmFromCommandLine(plugins);
#endif
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
#if defined(ENABLE_PEPPER_FLASH)
AddPepperFlashFromCommandLine(command_line, plugins);
#endif // defined(ENABLE_PEPPER_FLASH)
#if defined(WIDEVINE_CDM_AVAILABLE)
AddWidevineAdapterFromCommandLine(command_line, plugins);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
ComputeBuiltInPlugins(plugins);
}
void AtomContentClient::AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
if (cdms) {
#if defined(WIDEVINE_CDM_AVAILABLE)
base::FilePath adapter_path;
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
bool supports_persistent_license = false;
if (IsWidevineAvailable(&adapter_path, &cdm_path,
&video_codecs_supported)) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
auto cdm_version_string =
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
// CdmInfo needs |path| to be the actual Widevine library,
// not the adapter, so adjust as necessary. It will be in the
// same directory as the installed adapter.
const base::Version version(cdm_version_string);
DCHECK(version.IsValid());
cdms->push_back(content::CdmInfo(
kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
kWidevineCdmFileSystemId, video_codecs_supported,
supports_persistent_license, kWidevineKeySystem, false));
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
}
}
} // namespace atom

View File

@@ -16,7 +16,7 @@ namespace atom {
class AtomContentClient : public brightray::ContentClient {
public:
AtomContentClient();
virtual ~AtomContentClient();
~AtomContentClient() override;
protected:
// content::ContentClient:
@@ -26,6 +26,9 @@ class AtomContentClient : public brightray::ContentClient {
void AddAdditionalSchemes(Schemes* schemes) override;
void AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) override;
void AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
private:
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);

View File

@@ -9,11 +9,13 @@
#if defined(OS_MACOSX)
extern "C" {
__attribute__((visibility("default")))
int AtomMain(int argc, const char* argv[]);
__attribute__((visibility("default"))) int AtomMain(int argc, char* argv[]);
__attribute__((visibility("default")))
int AtomInitializeICUandStartNode(int argc, char *argv[]);
#ifdef ENABLE_RUN_AS_NODE
__attribute__((visibility("default"))) int AtomInitializeICUandStartNode(
int argc,
char* argv[]);
#endif
}
#endif // OS_MACOSX

View File

@@ -14,17 +14,17 @@
#include "brightray/common/mac/main_application_bundle.h"
#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);
}
int AtomInitializeICUandStartNode(int argc, char *argv[]) {
#ifdef ENABLE_RUN_AS_NODE
int AtomInitializeICUandStartNode(int argc, char* argv[]) {
base::AtExitManager atexit_manager;
base::mac::ScopedNSAutoreleasePool pool;
base::mac::SetOverrideFrameworkBundlePath(
@@ -35,4 +35,4 @@ int AtomInitializeICUandStartNode(int argc, char *argv[]) {
base::i18n::InitializeICU();
return atom::NodeMain(argc, argv);
}
#endif // OS_MACOSX
#endif

View File

@@ -0,0 +1,12 @@
#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,23 +4,27 @@
#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"
#elif defined(OS_LINUX) // defined(OS_WIN)
#elif defined(OS_LINUX) // defined(OS_WIN)
#include "atom/app/atom_main_delegate.h" // NOLINT
#include "content/public/app/content_main.h"
#else // defined(OS_LINUX)
@@ -34,8 +38,11 @@
namespace {
const char* kRunAsNode = "ELECTRON_RUN_AS_NODE";
#ifdef ENABLE_RUN_AS_NODE
const char kRunAsNode[] = "ELECTRON_RUN_AS_NODE";
#endif
#if defined(ENABLE_RUN_AS_NODE) || defined(OS_WIN)
bool IsEnvSet(const char* name) {
#if defined(OS_WIN)
size_t required_size;
@@ -46,63 +53,95 @@ bool IsEnvSet(const char* name) {
return indicator && indicator[0] != '\0';
#endif
}
#endif
} // namespace
#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,19 @@
#include "base/logging.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_features.h"
#include "services/service_manager/sandbox/switches.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 {
@@ -36,22 +46,23 @@ bool IsBrowserProcess(base::CommandLine* cmd) {
}
#if defined(OS_WIN)
void InvalidParameterHandler(const wchar_t*, const wchar_t*, const wchar_t*,
unsigned int, uintptr_t) {
void InvalidParameterHandler(const wchar_t*,
const wchar_t*,
const wchar_t*,
unsigned int,
uintptr_t) {
// noop.
}
#endif
} // namespace
AtomMainDelegate::AtomMainDelegate() {
}
AtomMainDelegate::AtomMainDelegate() {}
AtomMainDelegate::~AtomMainDelegate() {
}
AtomMainDelegate::~AtomMainDelegate() {}
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
auto command_line = base::CommandLine::ForCurrentProcess();
auto* command_line = base::CommandLine::ForCurrentProcess();
logging::LoggingSettings settings;
#if defined(OS_WIN)
@@ -68,12 +79,12 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
#else
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
#endif // defined(DEBUG)
#else // defined(OS_WIN)
#else // defined(OS_WIN)
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
#endif // !defined(OS_WIN)
// Only enable logging when --enable-logging is specified.
std::unique_ptr<base::Environment> env(base::Environment::Create());
auto env = base::Environment::Create();
if (!command_line->HasSwitch(::switches::kEnableLogging) &&
!env->HasVar("ELECTRON_ENABLE_LOGGING")) {
settings.logging_dest = logging::LOG_NONE;
@@ -86,9 +97,15 @@ 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 defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS)
// For 32bit ARM enabling stack printing would end up crashing.
// https://github.com/electron/electron/pull/11230#issuecomment-363232482
enable_stack_dumping = false;
#endif
if (enable_stack_dumping)
base::debug::EnableInProcessStackDumping();
@@ -113,26 +130,24 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
void AtomMainDelegate::PreSandboxStartup() {
brightray::MainDelegate::PreSandboxStartup();
// Set google API key.
std::unique_ptr<base::Environment> env(base::Environment::Create());
if (!env->HasVar("GOOGLE_API_KEY"))
env->SetVar("GOOGLE_API_KEY", GOOGLEAPIS_API_KEY);
auto command_line = base::CommandLine::ForCurrentProcess();
std::string process_type = command_line->GetSwitchValueASCII(
::switches::kProcessType);
auto* command_line = base::CommandLine::ForCurrentProcess();
std::string process_type =
command_line->GetSwitchValueASCII(::switches::kProcessType);
// Only append arguments for browser process.
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(
service_manager::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.
@@ -150,9 +165,11 @@ content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
}
content::ContentRendererClient*
AtomMainDelegate::CreateContentRendererClient() {
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);
@@ -188,7 +205,7 @@ bool AtomMainDelegate::DelaySandboxInitialization(
std::unique_ptr<brightray::ContentClient>
AtomMainDelegate::CreateContentClient() {
return std::unique_ptr<brightray::ContentClient>(new AtomContentClient);
return std::make_unique<AtomContentClient>();
}
} // namespace atom

View File

@@ -15,7 +15,7 @@ namespace atom {
class AtomMainDelegate : public brightray::MainDelegate {
public:
AtomMainDelegate();
~AtomMainDelegate();
~AtomMainDelegate() override;
protected:
// content::ContentMainDelegate:
@@ -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_;

View File

@@ -4,9 +4,9 @@
#include "atom/app/atom_main_delegate.h"
#include "base/mac/bundle_locations.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/path_service.h"
@@ -20,16 +20,17 @@ namespace atom {
namespace {
base::FilePath GetFrameworksPath() {
return brightray::MainApplicationBundlePath().Append("Contents")
.Append("Frameworks");
return brightray::MainApplicationBundlePath()
.Append("Contents")
.Append("Frameworks");
}
base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
const std::string& name) {
return frameworks_path.Append(name + " Helper.app")
.Append("Contents")
.Append("MacOS")
.Append(name + " Helper");
.Append("Contents")
.Append("MacOS")
.Append(name + " Helper");
}
} // namespace
@@ -41,11 +42,11 @@ void AtomMainDelegate::OverrideFrameworkBundlePath() {
void AtomMainDelegate::OverrideChildProcessPath() {
base::FilePath frameworks_path = GetFrameworksPath();
base::FilePath helper_path = GetHelperAppPath(frameworks_path,
ATOM_PRODUCT_NAME);
base::FilePath helper_path =
GetHelperAppPath(frameworks_path, ATOM_PRODUCT_NAME);
if (!base::PathExists(helper_path))
helper_path = GetHelperAppPath(frameworks_path,
brightray::GetApplicationName());
helper_path =
GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
if (!base::PathExists(helper_path))
LOG(FATAL) << "Unable to find helper app";
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);

View File

@@ -0,0 +1,53 @@
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/app/command_line_args.h"
namespace {
bool IsUrlArg(const base::CommandLine::CharType* arg) {
// the first character must be a letter for this to be a URL
auto c = *arg;
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')) {
for (auto* p = arg + 1; *p; ++p) {
c = *p;
// colon indicates that the argument starts with a URI scheme
if (c == ':') {
// it could also be a Windows filesystem path
if (p == arg + 1)
break;
return true;
}
// white-space before a colon means it's not a URL
if (c == ' ' || (0x9 <= c && c <= 0xD))
break;
}
}
return false;
}
} // namespace
namespace atom {
bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) {
const base::CommandLine::StringType dashdash(2, '-');
bool block_args = false;
for (int i = 0; i < argc; ++i) {
if (argv[i] == dashdash)
break;
if (block_args) {
return false;
} else if (IsUrlArg(argv[i])) {
block_args = true;
}
}
return true;
}
} // namespace atom

View File

@@ -0,0 +1,16 @@
// 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,20 @@
// 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 "atom/common/node_bindings.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"
@@ -21,7 +26,7 @@
namespace atom {
int NodeMain(int argc, char *argv[]) {
int NodeMain(int argc, char* argv[]) {
base::CommandLine::Init(argc, argv);
int exit_code = 1;
@@ -33,22 +38,34 @@ int NodeMain(int argc, char *argv[]) {
base::ThreadTaskRunnerHandle handle(uv_task_runner);
// Initialize feature list.
std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
auto feature_list = std::make_unique<base::FeatureList>();
feature_list->InitializeFromCommandLine("", "");
base::FeatureList::SetInstance(std::move(feature_list));
gin::V8Initializer::LoadV8Snapshot();
gin::V8Initializer::LoadV8Snapshot(
gin::V8Initializer::V8SnapshotFileType::kWithAdditionalContext);
gin::V8Initializer::LoadV8Natives();
// V8 requires a task scheduler apparently
base::TaskScheduler::CreateAndStartWithDefaultParams("Electron");
// Initialize gin::IsolateHolder.
JavascriptEnvironment gin_env;
// Explicitly register electron's builtin modules.
NodeBindings::RegisterBuiltinModules();
int exec_argc;
const char** exec_argv;
node::Init(&argc, const_cast<const char**>(argv), &exec_argc, &exec_argv);
node::IsolateData isolate_data(gin_env.isolate(), loop);
node::Environment* env = node::CreateEnvironment(
&isolate_data, gin_env.context(), argc, argv,
exec_argc, exec_argv);
node::CreateIsolateData(gin_env.isolate(), loop, gin_env.platform()),
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)
@@ -66,6 +83,7 @@ int NodeMain(int argc, char *argv[]) {
bool more;
do {
more = uv_run(env->event_loop(), UV_RUN_ONCE);
gin_env.platform()->DrainBackgroundTasks(env->isolate());
if (more == false) {
node::EmitBeforeExit(env);
@@ -79,13 +97,24 @@ int NodeMain(int argc, char *argv[]) {
exit_code = node::EmitExit(env);
node::RunAtExit(env);
gin_env.platform()->DrainBackgroundTasks(env->isolate());
gin_env.platform()->CancelPendingDelayedTasks(env->isolate());
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[]);
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,14 +2,15 @@
// 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"
namespace atom {
UvTaskRunner::UvTaskRunner(uv_loop_t* loop) : loop_(loop) {
}
UvTaskRunner::UvTaskRunner(uv_loop_t* loop) : loop_(loop) {}
UvTaskRunner::~UvTaskRunner() {
for (auto& iter : tasks_) {
@@ -18,26 +19,25 @@ UvTaskRunner::~UvTaskRunner() {
}
}
bool UvTaskRunner::PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
bool UvTaskRunner::PostDelayedTask(const base::Location& from_here,
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::TimeDelta delay) {
return PostDelayedTask(from_here, task, delay);
bool UvTaskRunner::PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
return PostDelayedTask(from_here, std::move(task), delay);
}
// static
@@ -46,7 +46,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

@@ -8,8 +8,9 @@
#include <map>
#include "base/callback.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "vendor/node/deps/uv/include/uv.h"
#include "uv.h" // NOLINT(build/include)
namespace atom {
@@ -17,25 +18,24 @@ namespace atom {
class UvTaskRunner : public base::SingleThreadTaskRunner {
public:
explicit UvTaskRunner(uv_loop_t* loop);
~UvTaskRunner() override;
// base::SingleThreadTaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
bool RunsTasksInCurrentSequence() const override;
bool PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) override;
private:
~UvTaskRunner() override;
static void OnTimeout(uv_timer_t* timer);
static void OnClose(uv_handle_t* handle);
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

@@ -20,6 +20,7 @@
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/net_converter.h"
#include "atom/common/native_mate_converters/network_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
@@ -35,6 +36,7 @@
#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"
@@ -44,7 +46,9 @@
#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 "services/network/public/cpp/network_switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -53,14 +57,19 @@
#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 {
#if defined(OS_WIN)
template<>
template <>
struct Converter<Browser::UserTask> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
Browser::UserTask* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
@@ -77,13 +86,14 @@ struct Converter<Browser::UserTask> {
}
};
using atom::JumpListItem;
using atom::JumpListCategory;
using atom::JumpListItem;
using atom::JumpListResult;
template<>
template <>
struct Converter<JumpListItem::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
JumpListItem::Type* out) {
std::string item_type;
if (!ConvertFromV8(isolate, val, &item_type))
@@ -121,9 +131,10 @@ struct Converter<JumpListItem::Type> {
}
};
template<>
template <>
struct Converter<JumpListItem> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
JumpListItem* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
@@ -183,9 +194,10 @@ struct Converter<JumpListItem> {
}
};
template<>
template <>
struct Converter<JumpListCategory::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
JumpListCategory::Type* out) {
std::string category_type;
if (!ConvertFromV8(isolate, val, &category_type))
@@ -229,9 +241,10 @@ struct Converter<JumpListCategory::Type> {
}
};
template<>
template <>
struct Converter<JumpListCategory> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
JumpListCategory* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
@@ -258,7 +271,7 @@ struct Converter<JumpListCategory> {
};
// static
template<>
template <>
struct Converter<JumpListResult> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, JumpListResult val) {
std::string result_code;
@@ -292,9 +305,10 @@ struct Converter<JumpListResult> {
};
#endif
template<>
template <>
struct Converter<Browser::LoginItemSettings> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
Browser::LoginItemSettings* out) {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
@@ -319,15 +333,16 @@ struct Converter<Browser::LoginItemSettings> {
}
};
template<>
template <>
struct Converter<content::CertificateRequestResultType> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
content::CertificateRequestResultType* out) {
bool b;
if (!ConvertFromV8(isolate, val, &b))
return false;
*out = b ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
*out = b ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE
: content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
return true;
}
};
@@ -336,6 +351,16 @@ struct Converter<content::CertificateRequestResultType> {
namespace atom {
ProcessMetric::ProcessMetric(int type,
base::ProcessId pid,
std::unique_ptr<base::ProcessMetrics> metrics) {
this->type = type;
this->pid = pid;
this->metrics = std::move(metrics);
}
ProcessMetric::~ProcessMetric() = default;
namespace api {
namespace {
@@ -370,6 +395,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")
@@ -397,7 +424,9 @@ int GetPathConstant(const std::string& name) {
}
bool NotificationCallbackWrapper(
const ProcessSingleton::NotificationCallback& callback,
const base::Callback<
void(const base::CommandLine::StringVector& command_line,
const base::FilePath& current_directory)>& callback,
const base::CommandLine::StringVector& cmd,
const base::FilePath& cwd) {
// Make sure the callback is called after app gets ready.
@@ -407,25 +436,32 @@ bool NotificationCallbackWrapper(
scoped_refptr<base::SingleThreadTaskRunner> task_runner(
base::ThreadTaskRunnerHandle::Get());
task_runner->PostTask(
FROM_HERE, base::Bind(base::IgnoreResult(callback), cmd, cwd));
FROM_HERE, base::BindOnce(base::IgnoreResult(callback), cmd, cwd));
}
// ProcessSingleton needs to know whether current process is quiting.
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;
}
@@ -441,8 +477,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,
@@ -455,12 +500,11 @@ void PassLoginInformation(scoped_refptr<LoginHandler> login_handler,
}
#if defined(USE_NSS_CERTS)
int ImportIntoCertStore(
CertificateManagerModel* model,
const base::DictionaryValue& options) {
int ImportIntoCertStore(CertificateManagerModel* model,
const base::DictionaryValue& options) {
std::string file_data, cert_path;
base::string16 password;
net::CertificateList imported_certs;
net::ScopedCERTCertificateList imported_certs;
int rv = -1;
options.GetString("certificate", &cert_path);
options.GetString("password", &password);
@@ -468,17 +512,13 @@ int ImportIntoCertStore(
if (!cert_path.empty()) {
if (base::ReadFileToString(base::FilePath(cert_path), &file_data)) {
auto module = model->cert_db()->GetPrivateSlot();
rv = model->ImportFromPKCS12(module.get(),
file_data,
password,
true,
rv = model->ImportFromPKCS12(module.get(), file_data, password, true,
&imported_certs);
if (imported_certs.size() > 1) {
auto it = imported_certs.begin();
++it; // skip first which would be the client certificate.
for (; it != imported_certs.end(); ++it)
rv &= model->SetCertTrust(it->get(),
net::CA_CERT,
rv &= model->SetCertTrust(it->get(), net::CA_CERT,
net::NSSCertDatabase::TRUSTED_SSL);
}
}
@@ -497,7 +537,7 @@ void OnIconDataAvailable(v8::Isolate* isolate,
callback.Run(v8::Null(isolate), *icon);
} else {
v8::Local<v8::String> error_message =
v8::String::NewFromUtf8(isolate, "Failed to get file icon.");
v8::String::NewFromUtf8(isolate, "Failed to get file icon.");
callback.Run(v8::Exception::Error(error_message), gfx::Image());
}
}
@@ -508,31 +548,32 @@ App::App(v8::Isolate* isolate) {
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->set_delegate(this);
Browser::Get()->AddObserver(this);
content::GpuDataManager::GetInstance()->AddObserver(this);
content::BrowserChildProcessObserver::Add(this);
base::ProcessId pid = base::GetCurrentProcId();
std::unique_ptr<atom::ProcessMetric> process_metric(
new atom::ProcessMetric(
content::PROCESS_TYPE_BROWSER,
pid,
base::ProcessMetrics::CreateCurrentProcessMetrics()));
auto process_metric = std::make_unique<atom::ProcessMetric>(
content::PROCESS_TYPE_BROWSER, pid,
base::ProcessMetrics::CreateCurrentProcessMetrics());
app_metrics_[pid] = std::move(process_metric);
Init(isolate);
}
App::~App() {
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->set_delegate(
nullptr);
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
->set_delegate(nullptr);
Browser::Get()->RemoveObserver(this);
content::GpuDataManager::GetInstance()->RemoveObserver(this);
content::BrowserChildProcessObserver::Remove(this);
}
void App::OnBeforeQuit(bool* prevent_default) {
*prevent_default = Emit("before-quit");
if (Emit("before-quit")) {
*prevent_default = true;
}
}
void App::OnWillQuit(bool* prevent_default) {
*prevent_default = Emit("will-quit");
if (Emit("will-quit")) {
*prevent_default = true;
}
}
void App::OnWindowAllClosed() {
@@ -550,7 +591,9 @@ void App::OnQuit() {
}
void App::OnOpenFile(bool* prevent_default, const std::string& file_path) {
*prevent_default = Emit("open-file", file_path);
if (Emit("open-file", file_path)) {
*prevent_default = true;
}
}
void App::OnOpenURL(const std::string& url) {
@@ -574,57 +617,101 @@ 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::OnContinueUserActivity(
bool* prevent_default,
const std::string& type,
const base::DictionaryValue& user_info) {
*prevent_default = Emit("continue-activity", type, user_info);
void App::OnWillContinueUserActivity(bool* prevent_default,
const std::string& type) {
if (Emit("will-continue-activity", type)) {
*prevent_default = true;
}
}
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) {
if (Emit("continue-activity", type, user_info)) {
*prevent_default = true;
}
}
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) {
if (Emit("update-activity-state", type, user_info)) {
*prevent_default = true;
}
}
void App::OnNewWindowForTab() {
Emit("new-window-for-tab");
}
#endif
void App::OnLogin(LoginHandler* login_handler,
void App::OnLogin(scoped_refptr<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, base::RetainedRef(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<network::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, referrer, frame_name,
disposition, additional_features, body);
}
return false;
}
void App::AllowCertificateError(
@@ -633,19 +720,15 @@ void App::AllowCertificateError(
const net::SSLInfo& ssl_info,
const GURL& request_url,
content::ResourceType resource_type,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(content::CertificateRequestResultType)>&
callback) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
bool prevent_default = Emit("certificate-error",
WebContents::CreateFrom(isolate(), web_contents),
request_url,
net::ErrorToString(cert_error),
ssl_info.cert,
callback);
bool prevent_default = Emit(
"certificate-error", WebContents::CreateFrom(isolate(), web_contents),
request_url, net::ErrorToString(cert_error), ssl_info.cert, callback);
// Deny the certificate by default.
if (!prevent_default)
@@ -655,27 +738,40 @@ 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());
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) {
Emit("gpu-process-crashed",
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
}
void App::BrowserChildProcessLaunchedAndConnected(
@@ -717,9 +813,8 @@ void App::ChildProcessLaunched(int process_type, base::ProcessHandle handle) {
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);
app_metrics_[pid] = std::make_unique<atom::ProcessMetric>(process_type, pid,
std::move(metrics));
}
void App::ChildProcessDisconnected(base::ProcessId pid) {
@@ -769,32 +864,46 @@ void App::SetDesktopName(const std::string& desktop_name) {
}
std::string App::GetLocale() {
return l10n_util::GetApplicationLocale("");
return g_browser_process->GetApplicationLocale();
}
bool App::MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback) {
void App::OnSecondInstance(const base::CommandLine::StringVector& cmd,
const base::FilePath& cwd) {
Emit("second-instance", cmd, cwd);
}
bool App::HasSingleInstanceLock() const {
if (process_singleton_)
return false;
return true;
return false;
}
bool App::RequestSingleInstanceLock() {
if (HasSingleInstanceLock())
return true;
base::FilePath user_dir;
PathService::Get(brightray::DIR_USER_DATA, &user_dir);
auto cb = base::Bind(&App::OnSecondInstance, base::Unretained(this));
process_singleton_.reset(new ProcessSingleton(
user_dir, base::Bind(NotificationCallbackWrapper, callback)));
user_dir, base::Bind(NotificationCallbackWrapper, cb)));
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;
return false;
}
case ProcessSingleton::NotifyResult::PROCESS_NONE:
default: // Shouldn't be needed, but VS warns if it is not there.
return false;
return true;
}
}
void App::ReleaseSingleInstance() {
void App::ReleaseSingleInstanceLock() {
if (process_singleton_) {
process_singleton_->Cleanup();
process_singleton_.reset();
@@ -814,11 +923,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);
}
@@ -840,18 +945,40 @@ bool App::Relaunch(mate::Arguments* js_args) {
void App::DisableHardwareAcceleration(mate::Arguments* args) {
if (Browser::Get()->is_ready()) {
args->ThrowError("app.disableHardwareAcceleration() can only be called "
"before app is ready");
args->ThrowError(
"app.disableHardwareAcceleration() can only be called "
"before app is ready");
return;
}
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();
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);
@@ -859,18 +986,15 @@ Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
}
#if defined(USE_NSS_CERTS)
void App::ImportCertificate(
const base::DictionaryValue& options,
const net::CompletionCallback& callback) {
void App::ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback) {
auto browser_context = AtomBrowserContext::From("", false);
if (!certificate_manager_model_) {
std::unique_ptr<base::DictionaryValue> copy = options.CreateDeepCopy();
CertificateManagerModel::Create(
browser_context.get(),
base::Bind(&App::OnCertificateManagerModelCreated,
base::Unretained(this),
base::Passed(&copy),
callback));
base::Unretained(this), base::Passed(&copy), callback));
return;
}
@@ -883,8 +1007,8 @@ void App::OnCertificateManagerModelCreated(
const net::CompletionCallback& callback,
std::unique_ptr<CertificateManagerModel> model) {
certificate_manager_model_ = std::move(model);
int rv = ImportIntoCertStore(certificate_manager_model_.get(),
*(options.get()));
int rv =
ImportIntoCertStore(certificate_manager_model_.get(), *(options.get()));
callback.Run(rv);
}
#endif
@@ -913,7 +1037,7 @@ JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
std::vector<JumpListCategory> categories;
bool delete_jump_list = val->IsNull();
if (!delete_jump_list &&
!mate::ConvertFromV8(args->isolate(), val, &categories)) {
!mate::ConvertFromV8(args->isolate(), val, &categories)) {
args->ThrowError("Argument must be null or an array of categories");
return JumpListResult::ARGUMENT_ERROR;
}
@@ -921,9 +1045,8 @@ JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
JumpList jump_list(Browser::Get()->GetAppUserModelID());
if (delete_jump_list) {
return jump_list.Delete()
? JumpListResult::SUCCESS
: JumpListResult::GENERIC_ERROR;
return jump_list.Delete() ? JumpListResult::SUCCESS
: JumpListResult::GENERIC_ERROR;
}
// Start a transaction that updates the JumpList of this application.
@@ -946,8 +1069,7 @@ JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
}
#endif // defined(OS_WIN)
void App::GetFileIcon(const base::FilePath& path,
mate::Arguments* args) {
void App::GetFileIcon(const base::FilePath& path, mate::Arguments* args) {
mate::Dictionary options;
IconLoader::IconSize icon_size;
FileIconCallback callback;
@@ -970,7 +1092,7 @@ void App::GetFileIcon(const base::FilePath& path,
return;
}
auto icon_manager = g_browser_process->GetIconManager();
auto* icon_manager = g_browser_process->GetIconManager();
gfx::Image* icon =
icon_manager->LookupIconFromFilepath(normalized_path, icon_size);
if (icon) {
@@ -992,10 +1114,12 @@ std::vector<mate::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
mate::Dictionary memory_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary cpu_dict = mate::Dictionary::CreateEmpty(isolate);
memory_dict.Set("workingSetSize",
memory_dict.Set(
"workingSetSize",
static_cast<double>(
process_metric.second->metrics->GetWorkingSetSize() >> 10));
memory_dict.Set("peakWorkingSetSize",
memory_dict.Set(
"peakWorkingSetSize",
static_cast<double>(
process_metric.second->metrics->GetPeakWorkingSetSize() >> 10));
@@ -1007,15 +1131,25 @@ std::vector<mate::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
}
pid_dict.Set("memory", memory_dict);
cpu_dict.Set("percentCPUUsage",
process_metric.second->metrics->GetPlatformIndependentCPUUsage()
/ processor_count);
cpu_dict.Set(
"percentCPUUsage",
process_metric.second->metrics->GetPlatformIndependentCPUUsage() /
processor_count);
#if !defined(OS_WIN)
cpu_dict.Set("idleWakeupsPerSecond",
process_metric.second->metrics->GetIdleWakeupsPerSecond());
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));
pid_dict.Set("type", content::GetProcessTypeNameInEnglish(
process_metric.second->type));
result.push_back(pid_dict);
}
@@ -1024,18 +1158,56 @@ std::vector<mate::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
v8::Local<v8::Value> App::GetGPUFeatureStatus(v8::Isolate* isolate) {
auto status = content::GetFeatureStatus();
return mate::ConvertToV8(isolate,
status ? *status : base::DictionaryValue());
base::DictionaryValue temp;
return mate::ConvertToV8(isolate, status ? *status : temp);
}
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));
}
// static
void App::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void App::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "App"));
auto browser = base::Unretained(Browser::Get());
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
@@ -1071,6 +1243,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
@@ -1092,33 +1268,45 @@ void App::BuildPrototype(
#if defined(USE_NSS_CERTS)
.SetMethod("importCertificate", &App::ImportCertificate)
#endif
.SetMethod("makeSingleInstance", &App::MakeSingleInstance)
.SetMethod("releaseSingleInstance", &App::ReleaseSingleInstance)
.SetMethod("hasSingleInstanceLock", &App::HasSingleInstanceLock)
.SetMethod("requestSingleInstanceLock", &App::RequestSingleInstanceLock)
.SetMethod("releaseSingleInstanceLock", &App::ReleaseSingleInstanceLock)
.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("getAppMetrics", &App::GetAppMetrics)
.SetMethod("getGPUFeatureStatus", &App::GetGPUFeatureStatus)
// TODO(juturu): Remove in 2.0, deprecate before then with warnings
.SetMethod("getAppMemoryInfo", &App::GetAppMetrics);
// 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
} // namespace atom
namespace {
void AppendSwitch(const std::string& switch_string, mate::Arguments* args) {
auto command_line = base::CommandLine::ForCurrentProcess();
auto* command_line = base::CommandLine::ForCurrentProcess();
if (base::EndsWith(switch_string, "-path",
base::CompareCase::INSENSITIVE_ASCII) ||
switch_string == switches::kLogNetLog) {
switch_string == network::switches::kLogNetLog) {
base::FilePath path;
args->GetNext(&path);
command_line->AppendSwitchPath(switch_string, path);
@@ -1147,18 +1335,19 @@ void DockSetMenu(atom::api::Menu* menu) {
}
#endif
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
auto command_line = base::CommandLine::ForCurrentProcess();
auto* command_line = base::CommandLine::ForCurrentProcess();
mate::Dictionary dict(isolate, exports);
dict.Set("App", atom::api::App::GetConstructor(isolate)->GetFunction());
dict.Set("app", atom::api::App::Create(isolate));
dict.SetMethod("appendSwitch", &AppendSwitch);
dict.SetMethod("appendArgument",
base::Bind(&base::CommandLine::AppendArg,
base::Unretained(command_line)));
dict.SetMethod("appendArgument", base::Bind(&base::CommandLine::AppendArg,
base::Unretained(command_line)));
#if defined(OS_MACOSX)
auto browser = base::Unretained(Browser::Get());
dict.SetMethod("dockBounce", &DockBounce);
@@ -1180,4 +1369,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_app, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_app, Initialize)

View File

@@ -25,6 +25,7 @@
#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"
@@ -51,11 +52,8 @@ struct ProcessMetric {
ProcessMetric(int type,
base::ProcessId pid,
std::unique_ptr<base::ProcessMetrics> metrics) {
this->type = type;
this->pid = pid;
this->metrics = std::move(metrics);
}
std::unique_ptr<base::ProcessMetrics> metrics);
~ProcessMetric();
};
namespace api {
@@ -66,24 +64,14 @@ class App : public AtomBrowserClient::Delegate,
public content::GpuDataManagerObserver,
public content::BrowserChildProcessObserver {
public:
using FileIconCallback = base::Callback<void(v8::Local<v8::Value>,
const gfx::Image&)>;
using FileIconCallback =
base::Callback<void(v8::Local<v8::Value>, const gfx::Image&)>;
static mate::Handle<App> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::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,
@@ -94,6 +82,7 @@ class App : public AtomBrowserClient::Delegate,
base::FilePath GetAppPath() const;
void RenderProcessReady(content::RenderProcessHost* host);
void RenderProcessDisconnected(base::ProcessId host_pid);
void PreMainMessageLoopRun();
protected:
explicit App(v8::Isolate* isolate);
@@ -109,14 +98,26 @@ class App : public AtomBrowserClient::Delegate,
void OnActivate(bool has_visible_windows) override;
void OnWillFinishLaunching() override;
void OnFinishLaunching(const base::DictionaryValue& launch_info) override;
void OnLogin(LoginHandler* login_handler,
void OnLogin(scoped_refptr<LoginHandler> login_handler,
const base::DictionaryValue& request_details) override;
void OnAccessibilitySupportChanged() override;
void OnPreMainMessageLoopRun() override;
#if defined(OS_MACOSX)
void OnContinueUserActivity(
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:
@@ -126,7 +127,6 @@ class App : public AtomBrowserClient::Delegate,
const net::SSLInfo& ssl_info,
const GURL& request_url,
content::ResourceType resource_type,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(content::CertificateRequestResultType)>&
@@ -134,7 +134,23 @@ 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<network::ResourceRequestBody>& body,
bool user_gesture,
bool opener_suppressed,
bool* no_javascript_access) override;
// content::GpuDataManagerObserver:
void OnGpuProcessCrashed(base::TerminationStatus status) override;
@@ -144,10 +160,10 @@ class App : public AtomBrowserClient::Delegate,
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;
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);
@@ -162,22 +178,35 @@ class App : public AtomBrowserClient::Delegate,
void SetDesktopName(const std::string& desktop_name);
std::string GetLocale();
bool MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback);
void ReleaseSingleInstance();
void OnSecondInstance(const base::CommandLine::StringVector& cmd,
const base::FilePath& cwd);
bool HasSingleInstanceLock() const;
bool RequestSingleInstanceLock();
void ReleaseSingleInstanceLock();
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,
const net::CompletionCallback& callback);
#endif
void GetFileIcon(const base::FilePath& path,
mate::Arguments* args);
void GetFileIcon(const base::FilePath& path, mate::Arguments* args);
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.
@@ -199,8 +228,7 @@ class App : public AtomBrowserClient::Delegate,
base::FilePath app_path_;
using ProcessMetricMap =
std::unordered_map<base::ProcessId,
std::unique_ptr<atom::ProcessMetric>>;
std::unordered_map<base::ProcessId, std::unique_ptr<atom::ProcessMetric>>;
ProcessMetricMap app_metrics_;
DISALLOW_COPY_AND_ASSIGN(App);

View File

@@ -0,0 +1,63 @@
// 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

@@ -16,12 +16,12 @@
namespace mate {
template<>
template <>
struct Converter<base::Time> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::Time& val) {
v8::MaybeLocal<v8::Value> date = v8::Date::New(
isolate->GetCurrentContext(), val.ToJsTime());
v8::MaybeLocal<v8::Value> date =
v8::Date::New(isolate->GetCurrentContext(), val.ToJsTime());
if (date.IsEmpty())
return v8::Null(isolate);
else
@@ -49,14 +49,30 @@ void AutoUpdater::OnError(const std::string& message) {
v8::HandleScope handle_scope(isolate());
auto error = v8::Exception::Error(mate::StringToV8(isolate(), message));
mate::EmitEvent(
isolate(),
GetWrapper(),
"error",
isolate(), GetWrapper(), "error",
error->ToObject(isolate()->GetCurrentContext()).ToLocalChecked(),
// Message is also emitted to keep compatibility with old code.
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,13 +98,13 @@ 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() {
Emit("before-quit-for-update");
// If we don't have any window then quitAndInstall immediately.
if (WindowList::IsEmpty()) {
auto_updater::AutoUpdater::QuitAndInstall();
@@ -106,8 +122,8 @@ mate::Handle<AutoUpdater> AutoUpdater::Create(v8::Isolate* isolate) {
}
// static
void AutoUpdater::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void AutoUpdater::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "AutoUpdater"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates)
@@ -120,13 +136,14 @@ void AutoUpdater::BuildPrototype(
} // namespace atom
namespace {
using atom::api::AutoUpdater;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("autoUpdater", AutoUpdater::Create(isolate));
@@ -135,4 +152,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_auto_updater, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_auto_updater, Initialize)

View File

@@ -32,6 +32,9 @@ 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) override;
void OnCheckingForUpdate() override;
void OnUpdateAvailable() override;
void OnUpdateNotAvailable() override;
@@ -45,7 +48,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

@@ -0,0 +1,87 @@
// Copyright (c) 2018 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_box_layout.h"
#include <string>
#include "atom/browser/api/atom_api_view.h"
#include "atom/common/api/constructor.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace mate {
template <>
struct Converter<views::BoxLayout::Orientation> {
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
views::BoxLayout::Orientation* out) {
std::string orientation;
if (!ConvertFromV8(isolate, val, &orientation))
return false;
if (orientation == "horizontal")
*out = views::BoxLayout::kHorizontal;
else if (orientation == "vertical")
*out = views::BoxLayout::kVertical;
else
return false;
return true;
}
};
} // namespace mate
namespace atom {
namespace api {
BoxLayout::BoxLayout(views::BoxLayout::Orientation orientation)
: LayoutManager(new views::BoxLayout(orientation)) {}
BoxLayout::~BoxLayout() {}
void BoxLayout::SetFlexForView(mate::Handle<View> view, int flex) {
auto* box_layout = static_cast<views::BoxLayout*>(layout_manager());
box_layout->SetFlexForView(view->view(), flex);
}
// static
mate::WrappableBase* BoxLayout::New(mate::Arguments* args,
views::BoxLayout::Orientation orientation) {
auto* layout = new BoxLayout(orientation);
layout->InitWith(args->isolate(), args->GetThis());
return layout;
}
// static
void BoxLayout::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "BoxLayout"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("setFlexForView", &BoxLayout::SetFlexForView);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::BoxLayout;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("BoxLayout", mate::CreateConstructor<BoxLayout>(
isolate, base::Bind(&BoxLayout::New)));
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_box_layout, Initialize)

View File

@@ -0,0 +1,40 @@
// 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_BROWSER_API_ATOM_API_BOX_LAYOUT_H_
#define ATOM_BROWSER_API_ATOM_API_BOX_LAYOUT_H_
#include "atom/browser/api/atom_api_layout_manager.h"
#include "native_mate/handle.h"
#include "ui/views/layout/box_layout.h"
namespace atom {
namespace api {
class View;
class BoxLayout : public LayoutManager {
public:
static mate::WrappableBase* New(mate::Arguments* args,
views::BoxLayout::Orientation orientation);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
void SetFlexForView(mate::Handle<View> view, int flex);
protected:
explicit BoxLayout(views::BoxLayout::Orientation orientation);
~BoxLayout() override;
private:
DISALLOW_COPY_AND_ASSIGN(BoxLayout);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_BOX_LAYOUT_H_

View File

@@ -51,8 +51,7 @@ namespace api {
BrowserView::BrowserView(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options)
: api_web_contents_(nullptr) {
const mate::Dictionary& options) {
Init(isolate, wrapper, options);
}
@@ -68,8 +67,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 +113,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 +130,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,11 +151,14 @@ 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);
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_browser_view, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_browser_view, Initialize)

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,10 +56,10 @@ 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_;
class WebContents* api_web_contents_ = nullptr;
std::unique_ptr<NativeBrowserView> view_;

View File

@@ -0,0 +1,452 @@
// 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_browser_window.h"
#include "atom/browser/browser.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "atom/browser/web_contents_preferences.h"
#include "atom/browser/window_list.h"
#include "atom/common/api/api_messages.h"
#include "atom/common/api/constructor.h"
#include "atom/common/color_util.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "native_mate/dictionary.h"
#include "ui/gl/gpu_switching_manager.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
BrowserWindow::BrowserWindow(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options)
: TopLevelWindow(isolate, options), weak_factory_(this) {
mate::Handle<class WebContents> web_contents;
// Use options.webPreferences in 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);
v8::Local<v8::Value> transparent;
if (options.Get("transparent", &transparent))
web_preferences.Set("transparent", transparent);
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::From(web_contents->web_contents());
base::DictionaryValue web_preferences_dict;
if (mate::ConvertFromV8(isolate, web_preferences.GetHandle(),
&web_preferences_dict)) {
existing_preferences->dict()->Clear();
existing_preferences->Merge(web_preferences_dict);
}
} else {
// Creates the WebContents used by BrowserWindow.
web_contents = WebContents::Create(isolate, web_preferences);
}
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents.get();
api_web_contents_->AddObserver(this);
Observe(api_web_contents_->web_contents());
// Keep a copy of the options for later use.
mate::Dictionary(isolate, web_contents->GetWrapper())
.Set("browserWindowOptions", options);
// Tell the content module to initialize renderer widget with transparent
// mode.
ui::GpuSwitchingManager::SetTransparent(window()->transparent());
// Associate with BrowserWindow.
web_contents->SetOwnerWindow(window());
auto* host = web_contents->web_contents()->GetRenderViewHost();
if (host)
host->GetWidget()->AddInputEventObserver(this);
InitWith(isolate, wrapper);
#if defined(OS_MACOSX)
if (!window()->has_frame())
OverrideNSWindowContentView(web_contents->managed_web_contents());
#endif
// Init window after everything has been setup.
window()->InitFromOptions(options);
}
BrowserWindow::~BrowserWindow() {
api_web_contents_->RemoveObserver(this);
// Note that the OnWindowClosed will not be called after the destructor runs,
// since the window object is managed by the TopLevelWindow class.
if (web_contents())
Cleanup();
}
void BrowserWindow::OnInputEvent(const blink::WebInputEvent& event) {
switch (event.GetType()) {
case blink::WebInputEvent::kGestureScrollBegin:
case blink::WebInputEvent::kGestureScrollUpdate:
case blink::WebInputEvent::kGestureScrollEnd:
Emit("scroll-touch-edge");
break;
default:
break;
}
}
void BrowserWindow::RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) {
if (old_host)
old_host->GetWidget()->RemoveInputEventObserver(this);
if (new_host)
new_host->GetWidget()->AddInputEventObserver(this);
}
void BrowserWindow::RenderViewCreated(
content::RenderViewHost* render_view_host) {
if (!window()->transparent())
return;
content::RenderWidgetHostImpl* impl = content::RenderWidgetHostImpl::FromID(
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (impl)
impl->SetBackgroundOpaque(false);
}
void BrowserWindow::DidFirstVisuallyNonEmptyPaint() {
if (window()->IsVisible())
return;
// When there is a non-empty first paint, resize the RenderWidget to force
// Chromium to draw.
auto* const view = web_contents()->GetRenderWidgetHostView();
view->Show();
view->SetSize(window()->GetContentSize());
// Emit the ReadyToShow event in next tick in case of pending drawing work.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(
[](base::WeakPtr<BrowserWindow> self) {
if (self)
self->Emit("ready-to-show");
},
GetWeakPtr()));
}
void BrowserWindow::BeforeUnloadDialogCancelled() {
WindowList::WindowCloseCancelled(window());
// Cancel unresponsive event when window close is cancelled.
window_unresponsive_closure_.Cancel();
}
void BrowserWindow::OnRendererUnresponsive(content::RenderProcessHost*) {
// Schedule the unresponsive shortly later, since we may receive the
// responsive event soon. This could happen after the whole application had
// blocked for a while.
// Also notice that when closing this event would be ignored because we have
// explicitly started a close timeout counter. This is on purpose because we
// don't want the unresponsive event to be sent too early when user is closing
// the window.
ScheduleUnresponsiveEvent(50);
}
bool BrowserWindow::OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* rfh) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(BrowserWindow, message, rfh)
IPC_MESSAGE_HANDLER(AtomFrameHostMsg_UpdateDraggableRegions,
UpdateDraggableRegions)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
void BrowserWindow::OnCloseContents() {
DCHECK(web_contents());
// Close all child windows before closing current window.
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
for (v8::Local<v8::Value> value : child_windows_.Values(isolate())) {
mate::Handle<BrowserWindow> child;
if (mate::ConvertFromV8(isolate(), value, &child) && !child.IsEmpty())
child->window()->CloseImmediately();
}
// When the web contents is gone, close the window immediately, but the
// memory will not be freed until you call delete.
// In this way, it would be safe to manage windows via smart pointers. If you
// want to free memory when the window is closed, you can do deleting by
// overriding the OnWindowClosed method in the observer.
window()->CloseImmediately();
// Do not sent "unresponsive" event after window is closed.
window_unresponsive_closure_.Cancel();
}
void BrowserWindow::OnRendererResponsive() {
window_unresponsive_closure_.Cancel();
Emit("responsive");
}
void BrowserWindow::RequestPreferredWidth(int* width) {
*width = web_contents()->GetPreferredSize().width();
}
void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
// When user tries to close the window by clicking the close button, we do
// not close the window immediately, instead we try to close the web page
// first, and when the web page is closed the window will also be closed.
*prevent_default = true;
// Assume the window is not responding if it doesn't cancel the close and is
// not closed in 5s, in this way we can quickly show the unresponsive
// dialog when the window is busy executing some script withouth waiting for
// the unresponsive timeout.
if (window_unresponsive_closure_.IsCancelled())
ScheduleUnresponsiveEvent(5000);
if (!web_contents())
// Already closed by renderer
return;
if (web_contents()->NeedToFireBeforeUnload())
web_contents()->DispatchBeforeUnload();
else
web_contents()->Close();
}
void BrowserWindow::OnWindowClosed() {
Cleanup();
TopLevelWindow::OnWindowClosed();
}
void BrowserWindow::OnWindowBlur() {
web_contents()->StoreFocus();
#if defined(OS_MACOSX)
auto* rwhv = web_contents()->GetRenderWidgetHostView();
if (rwhv)
rwhv->SetActive(false);
#endif
TopLevelWindow::OnWindowBlur();
}
void BrowserWindow::OnWindowFocus() {
web_contents()->RestoreFocus();
#if defined(OS_MACOSX)
auto* rwhv = web_contents()->GetRenderWidgetHostView();
if (rwhv)
rwhv->SetActive(true);
#else
if (!api_web_contents_->IsDevToolsOpened())
web_contents()->Focus();
#endif
TopLevelWindow::OnWindowFocus();
}
void BrowserWindow::OnWindowResize() {
#if defined(OS_MACOSX)
if (!draggable_regions_.empty())
UpdateDraggableRegions(nullptr, draggable_regions_);
#endif
TopLevelWindow::OnWindowResize();
}
void BrowserWindow::OnWindowLeaveFullScreen() {
TopLevelWindow::OnWindowLeaveFullScreen();
#if defined(OS_MACOSX)
if (web_contents()->IsFullscreenForCurrentTab())
web_contents()->ExitFullscreen(true);
#endif
}
void BrowserWindow::Focus() {
if (api_web_contents_->IsOffScreen())
FocusOnWebView();
else
TopLevelWindow::Focus();
}
void BrowserWindow::Blur() {
if (api_web_contents_->IsOffScreen())
BlurWebView();
else
TopLevelWindow::Blur();
}
void BrowserWindow::SetBackgroundColor(const std::string& color_name) {
TopLevelWindow::SetBackgroundColor(color_name);
auto* view = web_contents()->GetRenderWidgetHostView();
if (view)
view->SetBackgroundColor(ParseHexColor(color_name));
}
void BrowserWindow::SetBrowserView(v8::Local<v8::Value> value) {
TopLevelWindow::SetBrowserView(value);
#if defined(OS_MACOSX)
UpdateDraggableRegions(nullptr, draggable_regions_);
#endif
}
void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
v8::Local<v8::Value> value) {
std::string type = mate::V8ToString(value);
auto* render_view_host = web_contents()->GetRenderViewHost();
if (render_view_host) {
auto* impl = content::RenderWidgetHostImpl::FromID(
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (impl)
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
}
TopLevelWindow::SetVibrancy(isolate, value);
}
void BrowserWindow::FocusOnWebView() {
web_contents()->GetRenderViewHost()->GetWidget()->Focus();
}
void BrowserWindow::BlurWebView() {
web_contents()->GetRenderViewHost()->GetWidget()->Blur();
}
bool BrowserWindow::IsWebViewFocused() {
auto* host_view = web_contents()->GetRenderViewHost()->GetWidget()->GetView();
return host_view && host_view->HasFocus();
}
v8::Local<v8::Value> BrowserWindow::GetWebContents(v8::Isolate* isolate) {
if (web_contents_.IsEmpty())
return v8::Null(isolate);
return v8::Local<v8::Value>::New(isolate, web_contents_);
}
// Convert draggable regions in raw format to SkRegion format.
std::unique_ptr<SkRegion> BrowserWindow::DraggableRegionsToSkRegion(
const std::vector<DraggableRegion>& regions) {
auto sk_region = std::make_unique<SkRegion>();
for (const DraggableRegion& region : regions) {
sk_region->op(
region.bounds.x(), region.bounds.y(), region.bounds.right(),
region.bounds.bottom(),
region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
}
return sk_region;
}
void BrowserWindow::ScheduleUnresponsiveEvent(int ms) {
if (!window_unresponsive_closure_.IsCancelled())
return;
window_unresponsive_closure_.Reset(
base::Bind(&BrowserWindow::NotifyWindowUnresponsive, GetWeakPtr()));
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, window_unresponsive_closure_.callback(),
base::TimeDelta::FromMilliseconds(ms));
}
void BrowserWindow::NotifyWindowUnresponsive() {
window_unresponsive_closure_.Cancel();
if (!window_->IsClosed() && window_->IsEnabled() &&
!IsUnresponsiveEventSuppressed()) {
Emit("unresponsive");
}
}
void BrowserWindow::Cleanup() {
auto* host = web_contents()->GetRenderViewHost();
if (host)
host->GetWidget()->RemoveInputEventObserver(this);
api_web_contents_->DestroyWebContents(true /* async */);
Observe(nullptr);
}
// static
mate::WrappableBase* BrowserWindow::New(mate::Arguments* args) {
if (!Browser::Get()->is_ready()) {
args->ThrowError("Cannot create BrowserWindow before app is ready");
return nullptr;
}
if (args->Length() > 1) {
args->ThrowError();
return nullptr;
}
mate::Dictionary options;
if (!(args->Length() == 1 && args->GetNext(&options))) {
options = mate::Dictionary::CreateEmpty(args->isolate());
}
return new BrowserWindow(args->isolate(), args->GetThis(), options);
}
// static
void BrowserWindow::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "BrowserWindow"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("focusOnWebView", &BrowserWindow::FocusOnWebView)
.SetMethod("blurWebView", &BrowserWindow::BlurWebView)
.SetMethod("isWebViewFocused", &BrowserWindow::IsWebViewFocused)
.SetProperty("webContents", &BrowserWindow::GetWebContents);
}
// static
v8::Local<v8::Value> BrowserWindow::From(v8::Isolate* isolate,
NativeWindow* native_window) {
auto* existing = TrackableObject::FromWrappedClass(isolate, native_window);
if (existing)
return existing->GetWrapper();
else
return v8::Null(isolate);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::BrowserWindow;
using atom::api::TopLevelWindow;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("BrowserWindow", mate::CreateConstructor<BrowserWindow>(
isolate, base::Bind(&BrowserWindow::New)));
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_window, Initialize)

View File

@@ -0,0 +1,126 @@
// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
#define ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
#include <string>
#include <vector>
#include "atom/browser/api/atom_api_top_level_window.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "base/cancelable_callback.h"
namespace atom {
namespace api {
class BrowserWindow : public TopLevelWindow,
public content::RenderWidgetHost::InputEventObserver,
public content::WebContentsObserver,
public ExtendedWebContentsObserver {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// Returns the BrowserWindow object from |native_window|.
static v8::Local<v8::Value> From(v8::Isolate* isolate,
NativeWindow* native_window);
base::WeakPtr<BrowserWindow> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
protected:
BrowserWindow(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
const mate::Dictionary& options);
~BrowserWindow() override;
// content::RenderWidgetHost::InputEventObserver:
void OnInputEvent(const blink::WebInputEvent& event) override;
// content::WebContentsObserver:
void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override;
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void DidFirstVisuallyNonEmptyPaint() override;
void BeforeUnloadDialogCancelled() override;
void OnRendererUnresponsive(content::RenderProcessHost*) override;
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* rfh) override;
// ExtendedWebContentsObserver:
void OnCloseContents() override;
void OnRendererResponsive() override;
// NativeWindowObserver:
void RequestPreferredWidth(int* width) override;
void OnCloseButtonClicked(bool* prevent_default) override;
// TopLevelWindow:
void OnWindowClosed() override;
void OnWindowBlur() override;
void OnWindowFocus() override;
void OnWindowResize() override;
void OnWindowLeaveFullScreen() override;
void Focus() override;
void Blur() override;
void SetBackgroundColor(const std::string& color_name) override;
void SetBrowserView(v8::Local<v8::Value> value) override;
void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value) override;
// BrowserWindow APIs.
void FocusOnWebView();
void BlurWebView();
bool IsWebViewFocused();
v8::Local<v8::Value> GetWebContents(v8::Isolate* isolate);
private:
#if defined(OS_MACOSX)
void OverrideNSWindowContentView(brightray::InspectableWebContents* iwc);
#endif
// Helpers.
// Called when the window needs to update its draggable region.
void UpdateDraggableRegions(content::RenderFrameHost* rfh,
const std::vector<DraggableRegion>& regions);
// Convert draggable regions in raw format to SkRegion format.
std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
const std::vector<DraggableRegion>& regions);
// Schedule a notification unresponsive event.
void ScheduleUnresponsiveEvent(int ms);
// Dispatch unresponsive event to observers.
void NotifyWindowUnresponsive();
// Cleanup our WebContents observers.
void Cleanup();
// Closure that would be called when window is unresponsive when closing,
// it should be cancelled when we can prove that the window is responsive.
base::CancelableClosure window_unresponsive_closure_;
#if defined(OS_MACOSX)
std::vector<DraggableRegion> draggable_regions_;
#endif
v8::Global<v8::Value> web_contents_;
api::WebContents* api_web_contents_;
base::WeakPtrFactory<BrowserWindow> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BrowserWindow);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_

View File

@@ -0,0 +1,130 @@
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_browser_window.h"
#import <Cocoa/Cocoa.h>
#include "atom/browser/native_browser_view.h"
#include "atom/browser/native_window_mac.h"
#include "atom/common/draggable_region.h"
#include "base/mac/scoped_nsobject.h"
#include "brightray/browser/inspectable_web_contents_view.h"
@interface NSView (WebContentsView)
- (void)setMouseDownCanMoveWindow:(BOOL)can_move;
@end
@interface ControlRegionView : NSView
@end
@implementation ControlRegionView
- (BOOL)mouseDownCanMoveWindow {
return NO;
}
- (NSView*)hitTest:(NSPoint)aPoint {
return nil;
}
@end
namespace atom {
namespace api {
namespace {
// Return a vector of non-draggable regions that fill a window of size
// |width| by |height|, but leave gaps where the window should be draggable.
std::vector<gfx::Rect> CalculateNonDraggableRegions(
std::unique_ptr<SkRegion> draggable,
int width,
int height) {
std::vector<gfx::Rect> result;
SkRegion non_draggable;
non_draggable.op(0, 0, width, height, SkRegion::kUnion_Op);
non_draggable.op(*draggable, SkRegion::kDifference_Op);
for (SkRegion::Iterator it(non_draggable); !it.done(); it.next()) {
result.push_back(gfx::SkIRectToRect(it.rect()));
}
return result;
}
} // namespace
void BrowserWindow::OverrideNSWindowContentView(
brightray::InspectableWebContents* iwc) {
// Make NativeWindow use a NSView as content view.
static_cast<NativeWindowMac*>(window())->OverrideNSWindowContentView();
// Add webview to contentView.
NSView* webView = iwc->GetView()->GetNativeView();
NSView* contentView = [window()->GetNativeWindow() contentView];
[webView setFrame:[contentView bounds]];
[contentView addSubview:webView];
[contentView viewDidMoveToWindow];
}
void BrowserWindow::UpdateDraggableRegions(
content::RenderFrameHost* rfh,
const std::vector<DraggableRegion>& regions) {
if (window_->has_frame())
return;
// All ControlRegionViews should be added as children of the WebContentsView,
// because WebContentsView will be removed and re-added when entering and
// leaving fullscreen mode.
NSView* webView = web_contents()->GetNativeView();
NSInteger webViewWidth = NSWidth([webView bounds]);
NSInteger webViewHeight = NSHeight([webView bounds]);
if ([webView respondsToSelector:@selector(setMouseDownCanMoveWindow:)]) {
[webView setMouseDownCanMoveWindow:YES];
}
// Remove all ControlRegionViews that are added last time.
// Note that [webView subviews] returns the view's mutable internal array and
// it should be copied to avoid mutating the original array while enumerating
// it.
base::scoped_nsobject<NSArray> subviews([[webView subviews] copy]);
for (NSView* subview in subviews.get())
if ([subview isKindOfClass:[ControlRegionView class]])
[subview removeFromSuperview];
// Draggable regions is implemented by having the whole web view draggable
// (mouseDownCanMoveWindow) and overlaying regions that are not draggable.
draggable_regions_ = regions;
std::vector<gfx::Rect> drag_exclude_rects;
if (regions.empty()) {
drag_exclude_rects.push_back(gfx::Rect(0, 0, webViewWidth, webViewHeight));
} else {
drag_exclude_rects = CalculateNonDraggableRegions(
DraggableRegionsToSkRegion(regions), webViewWidth, webViewHeight);
}
if (window_->browser_view())
window_->browser_view()->UpdateDraggableRegions(drag_exclude_rects);
// Create and add a ControlRegionView for each region that needs to be
// excluded from the dragging.
for (const auto& rect : drag_exclude_rects) {
base::scoped_nsobject<NSView> controlRegion(
[[ControlRegionView alloc] initWithFrame:NSZeroRect]);
[controlRegion setFrame:NSMakeRect(rect.x(), webViewHeight - rect.bottom(),
rect.width(), rect.height())];
[webView addSubview:controlRegion];
}
// AppKit will not update its cache of mouseDownCanMoveWindow unless something
// changes. Previously we tried adding an NSView and removing it, but for some
// reason it required reposting the mouse-down event, and didn't always work.
// Calling the below seems to be an effective solution.
[[webView window] setMovableByWindowBackground:NO];
[[webView window] setMovableByWindowBackground:YES];
}
} // namespace api
} // namespace atom

View File

@@ -0,0 +1,24 @@
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_browser_window.h"
#include "atom/browser/native_window_views.h"
namespace atom {
namespace api {
void BrowserWindow::UpdateDraggableRegions(
content::RenderFrameHost* rfh,
const std::vector<DraggableRegion>& regions) {
if (window_->has_frame())
return;
static_cast<NativeWindowViews*>(window_.get())
->UpdateDraggableRegions(DraggableRegionsToSkRegion(regions));
}
} // namespace api
} // namespace atom

View File

@@ -0,0 +1,58 @@
// Copyright (c) 2018 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_button.h"
#include "atom/common/api/constructor.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
Button::Button(views::Button* button) : View(button) {
view()->set_owned_by_client();
}
Button::~Button() {}
void Button::ButtonPressed(views::Button* sender, const ui::Event& event) {
Emit("click");
}
// static
mate::WrappableBase* Button::New(mate::Arguments* args) {
args->ThrowError("Button can not be created directly");
return nullptr;
}
// static
void Button::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Button"));
}
} // namespace api
} // namespace atom
namespace {
using atom::api::Button;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("Button",
mate::CreateConstructor<Button>(isolate, base::Bind(&Button::New)));
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_button, Initialize)

View File

@@ -0,0 +1,38 @@
// 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_BROWSER_API_ATOM_API_BUTTON_H_
#define ATOM_BROWSER_API_ATOM_API_BUTTON_H_
#include "atom/browser/api/atom_api_view.h"
#include "native_mate/handle.h"
#include "ui/views/controls/button/button.h"
namespace atom {
namespace api {
class Button : public View, public views::ButtonListener {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit Button(views::Button* view);
~Button() override;
// views::ButtonListener:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
private:
DISALLOW_COPY_AND_ASSIGN(Button);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_BUTTON_H_

View File

@@ -18,7 +18,7 @@ using content::TracingController;
namespace mate {
template<>
template <>
struct Converter<base::trace_event::TraceConfig> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
@@ -41,36 +41,39 @@ namespace {
using CompletionCallback = base::Callback<void(const base::FilePath&)>;
scoped_refptr<TracingController::TraceDataSink> GetTraceDataSink(
const base::FilePath& path, const CompletionCallback& callback) {
scoped_refptr<TracingController::TraceDataEndpoint> GetTraceDataEndpoint(
const base::FilePath& path,
const CompletionCallback& callback) {
base::FilePath result_file_path = path;
if (result_file_path.empty() && !base::CreateTemporaryFile(&result_file_path))
LOG(ERROR) << "Creating temporary file failed";
return TracingController::CreateFileSink(result_file_path,
base::Bind(callback,
result_file_path));
return TracingController::CreateFileEndpoint(
result_file_path, base::Bind(callback, result_file_path));
}
void StopRecording(const base::FilePath& path,
const CompletionCallback& callback) {
TracingController::GetInstance()->StopTracing(
GetTraceDataSink(path, callback));
GetTraceDataEndpoint(path, callback));
}
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
auto controller = base::Unretained(TracingController::GetInstance());
mate::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("getCategories", base::Bind(
&TracingController::GetCategories, controller));
dict.SetMethod("startRecording", base::Bind(
&TracingController::StartTracing, controller));
dict.SetMethod("getCategories",
base::Bind(&TracingController::GetCategories, controller));
dict.SetMethod("startRecording",
base::Bind(&TracingController::StartTracing, controller));
dict.SetMethod("stopRecording", &StopRecording);
dict.SetMethod("getTraceBufferUsage", base::Bind(
&TracingController::GetTraceBufferUsage, controller));
dict.SetMethod(
"getTraceBufferUsage",
base::Bind(&TracingController::GetTraceBufferUsage, controller));
}
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_content_tracing, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_content_tracing, Initialize)

View File

@@ -5,6 +5,7 @@
#include "atom/browser/api/atom_api_cookies.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/request_context_delegate.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
@@ -14,18 +15,17 @@
#include "content/public/browser/browser_thread.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/cookies/cookie_monster.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_store.h"
#include "net/cookies/cookie_util.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
using atom::AtomCookieDelegate;
using content::BrowserThread;
namespace mate {
template<>
template <>
struct Converter<atom::api::Cookies::Error> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
atom::api::Cookies::Error val) {
@@ -36,7 +36,7 @@ struct Converter<atom::api::Cookies::Error> {
}
};
template<>
template <>
struct Converter<net::CanonicalCookie> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const net::CanonicalCookie& val) {
@@ -55,25 +55,21 @@ struct Converter<net::CanonicalCookie> {
}
};
template<>
struct Converter<net::CookieStore::ChangeCause> {
template <>
struct Converter<net::CookieChangeCause> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const net::CookieStore::ChangeCause& val) {
const net::CookieChangeCause& val) {
switch (val) {
case net::CookieStore::ChangeCause::INSERTED:
case net::CookieStore::ChangeCause::EXPLICIT:
case net::CookieStore::ChangeCause::EXPLICIT_DELETE_BETWEEN:
case net::CookieStore::ChangeCause::EXPLICIT_DELETE_PREDICATE:
case net::CookieStore::ChangeCause::EXPLICIT_DELETE_SINGLE:
case net::CookieStore::ChangeCause::EXPLICIT_DELETE_CANONICAL:
case net::CookieChangeCause::INSERTED:
case net::CookieChangeCause::EXPLICIT:
return mate::StringToV8(isolate, "explicit");
case net::CookieStore::ChangeCause::OVERWRITE:
case net::CookieChangeCause::OVERWRITE:
return mate::StringToV8(isolate, "overwrite");
case net::CookieStore::ChangeCause::EXPIRED:
case net::CookieChangeCause::EXPIRED:
return mate::StringToV8(isolate, "expired");
case net::CookieStore::ChangeCause::EVICTED:
case net::CookieChangeCause::EVICTED:
return mate::StringToV8(isolate, "evicted");
case net::CookieStore::ChangeCause::EXPIRED_OVERWRITE:
case net::CookieChangeCause::EXPIRED_OVERWRITE:
return mate::StringToV8(isolate, "expired-overwrite");
default:
return mate::StringToV8(isolate, "unknown");
@@ -166,15 +162,16 @@ void GetCookiesOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
GetCookieStore(getter)->GetAllCookiesAsync(filtered_callback);
else
GetCookieStore(getter)->GetAllCookiesForURLAsync(GURL(url),
filtered_callback);
filtered_callback);
}
// Removes cookie with |url| and |name| in IO thread.
void RemoveCookieOnIOThread(scoped_refptr<net::URLRequestContextGetter> getter,
const GURL& url, const std::string& name,
const GURL& url,
const std::string& name,
const base::Closure& callback) {
GetCookieStore(getter)->DeleteCookieAsync(
url, name, base::Bind(RunCallbackInUI, callback));
url, name, base::BindOnce(RunCallbackInUI, callback));
}
// Callback of SetCookie.
@@ -187,7 +184,7 @@ void OnSetCookie(const Cookies::SetCallback& callback, bool success) {
void FlushCookieStoreOnIOThread(
scoped_refptr<net::URLRequestContextGetter> getter,
const base::Closure& callback) {
GetCookieStore(getter)->FlushStore(base::Bind(RunCallbackInUI, callback));
GetCookieStore(getter)->FlushStore(base::BindOnce(RunCallbackInUI, callback));
}
// Sets cookie with |details| in IO thread.
@@ -210,90 +207,106 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
base::Time creation_time;
if (details->GetDouble("creationDate", &creation_date)) {
creation_time = (creation_date == 0) ?
base::Time::UnixEpoch() :
base::Time::FromDoubleT(creation_date);
creation_time = (creation_date == 0)
? base::Time::UnixEpoch()
: base::Time::FromDoubleT(creation_date);
}
base::Time expiration_time;
if (details->GetDouble("expirationDate", &expiration_date)) {
expiration_time = (expiration_date == 0) ?
base::Time::UnixEpoch() :
base::Time::FromDoubleT(expiration_date);
expiration_time = (expiration_date == 0)
? base::Time::UnixEpoch()
: base::Time::FromDoubleT(expiration_date);
}
base::Time last_access_time;
if (details->GetDouble("lastAccessDate", &last_access_date)) {
last_access_time = (last_access_date == 0) ?
base::Time::UnixEpoch() :
base::Time::FromDoubleT(last_access_date);
last_access_time = (last_access_date == 0)
? base::Time::UnixEpoch()
: base::Time::FromDoubleT(last_access_date);
}
GetCookieStore(getter)->SetCookieWithDetailsAsync(
GURL(url), name, value, domain, path, creation_time,
expiration_time, last_access_time, secure, http_only,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT,
base::Bind(OnSetCookie, callback));
std::unique_ptr<net::CanonicalCookie> canonical_cookie(
net::CanonicalCookie::CreateSanitizedCookie(
GURL(url), name, value, domain, path, creation_time, expiration_time,
last_access_time, secure, http_only,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT));
auto completion_callback = base::BindOnce(OnSetCookie, callback);
if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
std::move(completion_callback).Run(false);
return;
}
if (url.empty()) {
std::move(completion_callback).Run(false);
return;
}
if (name.empty()) {
std::move(completion_callback).Run(false);
return;
}
GetCookieStore(getter)->SetCanonicalCookieAsync(
std::move(canonical_cookie), secure, http_only,
std::move(completion_callback));
}
} // namespace
Cookies::Cookies(v8::Isolate* isolate,
AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->url_request_context_getter()),
cookie_delegate_(browser_context->cookie_delegate()) {
Cookies::Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: browser_context_(browser_context) {
Init(isolate);
cookie_delegate_->AddObserver(this);
cookie_change_subscription_ =
browser_context->GetRequestContextDelegate()
->RegisterCookieChangeCallback(
base::Bind(&Cookies::OnCookieChanged, base::Unretained(this)));
}
Cookies::~Cookies() {
cookie_delegate_->RemoveObserver(this);
}
Cookies::~Cookies() {}
void Cookies::Get(const base::DictionaryValue& filter,
const GetCallback& callback) {
std::unique_ptr<base::DictionaryValue> copied(filter.CreateDeepCopy());
auto getter = make_scoped_refptr(request_context_getter_);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(GetCookiesOnIO, getter, Passed(&copied), callback));
base::BindOnce(GetCookiesOnIO, base::RetainedRef(getter),
std::move(copied), callback));
}
void Cookies::Remove(const GURL& url, const std::string& name,
void Cookies::Remove(const GURL& url,
const std::string& name,
const base::Closure& callback) {
auto getter = make_scoped_refptr(request_context_getter_);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(RemoveCookieOnIOThread, getter, url, name, callback));
base::BindOnce(RemoveCookieOnIOThread, base::RetainedRef(getter), url,
name, callback));
}
void Cookies::Set(const base::DictionaryValue& details,
const SetCallback& callback) {
std::unique_ptr<base::DictionaryValue> copied(details.CreateDeepCopy());
auto getter = make_scoped_refptr(request_context_getter_);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(SetCookieOnIO, getter, Passed(&copied), callback));
base::BindOnce(SetCookieOnIO, base::RetainedRef(getter),
std::move(copied), callback));
}
void Cookies::FlushStore(const base::Closure& callback) {
auto getter = make_scoped_refptr(request_context_getter_);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(FlushCookieStoreOnIOThread, getter, callback));
base::BindOnce(FlushCookieStoreOnIOThread, base::RetainedRef(getter),
callback));
}
void Cookies::OnCookieChanged(const net::CanonicalCookie& cookie,
bool removed,
net::CookieStore::ChangeCause cause) {
Emit("changed", cookie, cause, removed);
void Cookies::OnCookieChanged(const CookieDetails* details) {
Emit("changed", *(details->cookie), details->cause, details->removed);
}
// static
mate::Handle<Cookies> Cookies::Create(
v8::Isolate* isolate,
AtomBrowserContext* browser_context) {
mate::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context) {
return mate::CreateHandle(isolate, new Cookies(isolate, browser_context));
}

View File

@@ -8,8 +8,8 @@
#include <string>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/net/atom_cookie_delegate.h"
#include "base/callback.h"
#include "atom/browser/net/cookie_details.h"
#include "base/callback_list.h"
#include "native_mate/handle.h"
#include "net/cookies/canonical_cookie.h"
@@ -27,8 +27,7 @@ class AtomBrowserContext;
namespace api {
class Cookies : public mate::TrackableObject<Cookies>,
public AtomCookieDelegate::Observer {
class Cookies : public mate::TrackableObject<Cookies> {
public:
enum Error {
SUCCESS,
@@ -50,19 +49,19 @@ class Cookies : public mate::TrackableObject<Cookies>,
~Cookies() override;
void Get(const base::DictionaryValue& filter, const GetCallback& callback);
void Remove(const GURL& url, const std::string& name,
void Remove(const GURL& url,
const std::string& name,
const base::Closure& callback);
void Set(const base::DictionaryValue& details, const SetCallback& callback);
void FlushStore(const base::Closure& callback);
// AtomCookieDelegate::Observer:
void OnCookieChanged(const net::CanonicalCookie& cookie,
bool removed,
net::CookieStore::ChangeCause cause) override;
// AtomBrowserContext::RegisterCookieChangeCallback subscription:
void OnCookieChanged(const CookieDetails*);
private:
net::URLRequestContextGetter* request_context_getter_;
scoped_refptr<AtomCookieDelegate> cookie_delegate_;
std::unique_ptr<base::CallbackList<void(const CookieDetails*)>::Subscription>
cookie_change_subscription_;
scoped_refptr<AtomBrowserContext> browser_context_;
DISALLOW_COPY_AND_ASSIGN(Cookies);
};

View File

@@ -6,14 +6,13 @@
#include <string>
#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 "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/web_contents.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "atom/common/node_includes.h"
@@ -24,43 +23,31 @@ namespace atom {
namespace api {
Debugger::Debugger(v8::Isolate* isolate, content::WebContents* web_contents)
: web_contents_(web_contents),
previous_request_id_(0) {
: content::WebContentsObserver(web_contents), web_contents_(web_contents) {
Init(isolate);
}
Debugger::~Debugger() {
}
Debugger::~Debugger() {}
void Debugger::AgentHostClosed(DevToolsAgentHost* agent_host,
bool replaced_with_another_client) {
std::string detach_reason = "target closed";
if (replaced_with_another_client)
detach_reason = "replaced with devtools";
Emit("detach", detach_reason);
void Debugger::AgentHostClosed(DevToolsAgentHost* agent_host) {
DCHECK(agent_host == agent_host_);
agent_host_ = nullptr;
ClearPendingRequests();
Emit("detach", "target closed");
}
void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
const std::string& message) {
DCHECK(agent_host == agent_host_.get());
DCHECK(agent_host == 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;
@@ -89,42 +76,52 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
}
}
void Debugger::RenderFrameHostChanged(content::RenderFrameHost* old_rfh,
content::RenderFrameHost* new_rfh) {
if (agent_host_) {
agent_host_->DisconnectWebContents();
auto* web_contents = content::WebContents::FromRenderFrameHost(new_rfh);
agent_host_->ConnectWebContents(web_contents);
}
}
void Debugger::Attach(mate::Arguments* args) {
std::string protocol_version;
args->GetNext(&protocol_version);
if (agent_host_) {
args->ThrowError("Debugger is already attached to the target");
return;
}
if (!protocol_version.empty() &&
!DevToolsAgentHost::IsSupportedProtocolVersion(protocol_version)) {
args->ThrowError("Requested protocol version is not supported");
return;
}
agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents_);
if (!agent_host_.get()) {
if (!agent_host_) {
args->ThrowError("No target available");
return;
}
if (agent_host_->IsAttached()) {
args->ThrowError("Another debugger is already attached to this target");
return;
}
agent_host_->AttachClient(this);
}
bool Debugger::IsAttached() {
return agent_host_.get() ? agent_host_->IsAttached() : false;
return agent_host_ && agent_host_->IsAttached();
}
void Debugger::Detach() {
if (!agent_host_.get())
if (!agent_host_)
return;
agent_host_->DetachClient(this);
AgentHostClosed(agent_host_.get(), false);
agent_host_ = nullptr;
AgentHostClosed(agent_host_.get());
}
void Debugger::SendCommand(mate::Arguments* args) {
if (!agent_host_.get())
if (!agent_host_)
return;
std::string method;
@@ -143,17 +140,26 @@ 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);
agent_host_->DispatchProtocolMessage(this, json_args);
}
void Debugger::ClearPendingRequests() {
if (pending_requests_.empty())
return;
base::Value error(base::Value::Type::DICTIONARY);
base::Value error_msg("target closed while handling command");
error.SetKey("message", std::move(error_msg));
for (const auto& it : pending_requests_)
it.second.Run(error, base::Value());
}
// static
mate::Handle<Debugger> Debugger::Create(
v8::Isolate* isolate,
content::WebContents* web_contents) {
mate::Handle<Debugger> Debugger::Create(v8::Isolate* isolate,
content::WebContents* web_contents) {
return mate::CreateHandle(isolate, new Debugger(isolate, web_contents));
}
@@ -176,8 +182,10 @@ namespace {
using atom::api::Debugger;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary(isolate, exports)
.Set("Debugger", Debugger::GetConstructor(isolate)->GetFunction());
@@ -185,4 +193,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_debugger, Initialize);
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_debugger, Initialize);

View File

@@ -12,12 +12,13 @@
#include "base/callback.h"
#include "base/values.h"
#include "content/public/browser/devtools_agent_host_client.h"
#include "content/public/browser/web_contents_observer.h"
#include "native_mate/handle.h"
namespace content {
class DevToolsAgentHost;
class WebContents;
}
} // namespace content
namespace mate {
class Arguments;
@@ -27,15 +28,15 @@ namespace atom {
namespace api {
class Debugger: public mate::TrackableObject<Debugger>,
public content::DevToolsAgentHostClient {
class Debugger : public mate::TrackableObject<Debugger>,
public content::DevToolsAgentHostClient,
public content::WebContentsObserver {
public:
using SendCommandCallback =
base::Callback<void(const base::DictionaryValue&,
const base::DictionaryValue&)>;
base::Callback<void(const base::Value&, const base::Value&)>;
static mate::Handle<Debugger> Create(
v8::Isolate* isolate, content::WebContents* web_contents);
static mate::Handle<Debugger> Create(v8::Isolate* isolate,
content::WebContents* web_contents);
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
@@ -46,11 +47,14 @@ class Debugger: public mate::TrackableObject<Debugger>,
~Debugger() override;
// content::DevToolsAgentHostClient:
void AgentHostClosed(content::DevToolsAgentHost* agent_host,
bool replaced_with_another_client) override;
void AgentHostClosed(content::DevToolsAgentHost* agent_host) override;
void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host,
const std::string& message) override;
// content::WebContentsObserver:
void RenderFrameHostChanged(content::RenderFrameHost* old_rfh,
content::RenderFrameHost* new_rfh) override;
private:
using PendingRequestMap = std::map<int, SendCommandCallback>;
@@ -58,12 +62,13 @@ class Debugger: public mate::TrackableObject<Debugger>,
bool IsAttached();
void Detach();
void SendCommand(mate::Arguments* args);
void ClearPendingRequests();
content::WebContents* web_contents_; // Weak Reference.
scoped_refptr<content::DevToolsAgentHost> agent_host_;
PendingRequestMap pending_requests_;
int previous_request_id_;
int previous_request_id_ = 0;
DISALLOW_COPY_AND_ASSIGN(Debugger);
};

View File

@@ -4,94 +4,172 @@
#include "atom/browser/api/atom_api_desktop_capturer.h"
#include <vector>
using base::PlatformThreadRef;
#include "atom/common/api/atom_api_native_image.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/media/desktop_media_list.h"
#include "content/public/browser/browser_thread.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"
#if defined(OS_WIN)
#include "third_party/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h"
#include "third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
#include "ui/display/win/display_info.h"
#endif // defined(OS_WIN)
#include "atom/common/node_includes.h"
namespace mate {
template<>
struct Converter<DesktopMediaList::Source> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const DesktopMediaList::Source& source) {
template <>
struct Converter<atom::api::DesktopCapturer::Source> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const atom::api::DesktopCapturer::Source& source) {
mate::Dictionary dict(isolate, v8::Object::New(isolate));
content::DesktopMediaID id = source.id;
dict.Set("name", base::UTF16ToUTF8(source.name));
content::DesktopMediaID id = source.media_list_source.id;
dict.Set("name", base::UTF16ToUTF8(source.media_list_source.name));
dict.Set("id", id.ToString());
dict.Set(
"thumbnail",
atom::api::NativeImage::Create(isolate, gfx::Image(source.thumbnail)));
dict.Set("thumbnail",
atom::api::NativeImage::Create(
isolate, gfx::Image(source.media_list_source.thumbnail)));
dict.Set("display_id", source.display_id);
return ConvertToV8(isolate, dict);
}
};
} // namespace mate
namespace {
void EmitFinished(
const std::vector<atom::api::DesktopCapturer::Source>& sources,
atom::api::DesktopCapturer* cap) {
cap->Emit("finished", sources);
}
void StartHandlingTask(bool capture_window,
bool capture_screen,
const gfx::Size& thumbnail_size,
atom::api::DesktopCapturer* cap) {
#if defined(OS_WIN)
if (content::desktop_capture::CreateDesktopCaptureOptions()
.allow_directx_capturer()) {
// DxgiDuplicatorController should be alive in this scope according to
// screen_capturer_win.cc.
auto duplicator = webrtc::DxgiDuplicatorController::Instance();
cap->using_directx_capturer_ =
webrtc::ScreenCapturerWinDirectx::IsSupported();
}
#endif // defined(OS_WIN)
std::unique_ptr<webrtc::DesktopCapturer> screen_capturer(
capture_screen ? content::desktop_capture::CreateScreenCapturer()
: nullptr);
std::unique_ptr<webrtc::DesktopCapturer> window_capturer(
capture_window ? content::desktop_capture::CreateWindowCapturer()
: nullptr);
cap->media_list_.reset(new NativeDesktopMediaList(
std::move(screen_capturer), std::move(window_capturer)));
cap->media_list_->SetThumbnailSize(thumbnail_size);
cap->media_list_->StartUpdating(cap);
}
void OnRefreshFinishedTask(atom::api::DesktopCapturer* cap) {
const auto media_list_sources = cap->media_list_->GetSources();
std::vector<atom::api::DesktopCapturer::Source> sources;
for (const auto& media_list_source : media_list_sources) {
sources.emplace_back(
atom::api::DesktopCapturer::Source{media_list_source, std::string()});
}
#if defined(OS_WIN)
// Gather the same unique screen IDs used by the electron.screen API in order
// to provide an association between it and desktopCapturer/getUserMedia.
// This is only required when using the DirectX capturer, otherwise the IDs
// across the APIs already match.
if (cap->using_directx_capturer_) {
std::vector<std::string> device_names;
// Crucially, this list of device names will be in the same order as
// |media_list_sources|.
webrtc::DxgiDuplicatorController::Instance()->GetDeviceNames(&device_names);
int device_name_index = 0;
for (auto& source : sources) {
if (source.media_list_source.id.type ==
content::DesktopMediaID::TYPE_SCREEN) {
const auto& device_name = device_names[device_name_index++];
std::wstring wide_device_name;
base::UTF8ToWide(device_name.c_str(), device_name.size(),
&wide_device_name);
const int64_t device_id =
display::win::DisplayInfo::DeviceIdFromDeviceName(
wide_device_name.c_str());
source.display_id = base::Int64ToString(device_id);
}
}
}
#elif defined(OS_MACOSX)
// On Mac, the IDs across the APIs match.
for (auto& source : sources) {
if (source.media_list_source.id.type ==
content::DesktopMediaID::TYPE_SCREEN) {
source.display_id = base::Int64ToString(source.media_list_source.id.id);
}
}
#endif // defined(OS_WIN)
// TODO(ajmacd): Add Linux support. The IDs across APIs differ but Chrome only
// supports capturing the entire desktop on Linux. Revisit this if individual
// screen support is added.
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(EmitFinished, sources, cap));
}
} // namespace
namespace atom {
namespace api {
DesktopCapturer::DesktopCapturer(v8::Isolate* isolate) {
Init(isolate);
capture_thread_ = base::CreateSequencedTaskRunnerWithTraits(
{base::WithBaseSyncPrimitives(), base::MayBlock(),
base::TaskPriority::USER_VISIBLE});
}
DesktopCapturer::~DesktopCapturer() {
}
DesktopCapturer::~DesktopCapturer() {}
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
std::unique_ptr<webrtc::DesktopCapturer> screen_capturer(
capture_screen ? webrtc::DesktopCapturer::CreateScreenCapturer(options)
: nullptr);
std::unique_ptr<webrtc::DesktopCapturer> window_capturer(
capture_window ? webrtc::DesktopCapturer::CreateWindowCapturer(options)
: nullptr);
media_list_.reset(new NativeDesktopMediaList(
std::move(screen_capturer), std::move(window_capturer)));
media_list_->SetThumbnailSize(thumbnail_size);
media_list_->StartUpdating(this);
capture_thread_->PostTask(
FROM_HERE, base::BindOnce(StartHandlingTask, capture_window,
capture_screen, thumbnail_size, this));
}
void DesktopCapturer::OnSourceAdded(int index) {
}
void DesktopCapturer::OnSourceAdded(int index) {}
void DesktopCapturer::OnSourceRemoved(int index) {
}
void DesktopCapturer::OnSourceRemoved(int index) {}
void DesktopCapturer::OnSourceMoved(int old_index, int new_index) {
}
void DesktopCapturer::OnSourceMoved(int old_index, int new_index) {}
void DesktopCapturer::OnSourceNameChanged(int index) {
}
void DesktopCapturer::OnSourceNameChanged(int index) {}
void DesktopCapturer::OnSourceThumbnailChanged(int index) {
}
void DesktopCapturer::OnSourceThumbnailChanged(int index) {}
bool DesktopCapturer::OnRefreshFinished() {
Emit("finished", media_list_->GetSources());
capture_thread_->PostTask(FROM_HERE,
base::BindOnce(OnRefreshFinishedTask, this));
return false;
}
@@ -102,7 +180,8 @@ mate::Handle<DesktopCapturer> DesktopCapturer::Create(v8::Isolate* isolate) {
// static
void DesktopCapturer::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "DesktopCapturer"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("startHandling", &DesktopCapturer::StartHandling);
@@ -114,8 +193,10 @@ void DesktopCapturer::BuildPrototype(
namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("desktopCapturer", atom::api::DesktopCapturer::Create(isolate));
@@ -123,4 +204,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_desktop_capturer, Initialize);
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_desktop_capturer, Initialize);

View File

@@ -5,6 +5,8 @@
#ifndef ATOM_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
#define ATOM_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
#include <string>
#include "atom/browser/api/event_emitter.h"
#include "chrome/browser/media/desktop_media_list_observer.h"
#include "chrome/browser/media/native_desktop_media_list.h"
@@ -14,9 +16,15 @@ namespace atom {
namespace api {
class DesktopCapturer: public mate::EventEmitter<DesktopCapturer>,
public DesktopMediaListObserver {
class DesktopCapturer : public mate::EventEmitter<DesktopCapturer>,
public DesktopMediaListObserver {
public:
struct Source {
DesktopMediaList::Source media_list_source;
// Will be an empty string if not available.
std::string display_id;
};
static mate::Handle<DesktopCapturer> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
@@ -26,6 +34,11 @@ class DesktopCapturer: public mate::EventEmitter<DesktopCapturer>,
bool capture_screen,
const gfx::Size& thumbnail_size);
std::unique_ptr<DesktopMediaList> media_list_;
#if defined(OS_WIN)
bool using_directx_capturer_ = false;
#endif // defined(OS_WIN)
protected:
explicit DesktopCapturer(v8::Isolate* isolate);
~DesktopCapturer() override;
@@ -39,7 +52,7 @@ class DesktopCapturer: public mate::EventEmitter<DesktopCapturer>,
bool OnRefreshFinished() override;
private:
std::unique_ptr<DesktopMediaList> media_list_;
scoped_refptr<base::SequencedTaskRunner> capture_thread_;
DISALLOW_COPY_AND_ASSIGN(DesktopCapturer);
};

View File

@@ -6,7 +6,7 @@
#include <utility>
#include <vector>
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/api/atom_api_browser_window.h"
#include "atom/browser/native_window.h"
#include "atom/browser/ui/certificate_trust.h"
#include "atom/browser/ui/file_dialog.h"
@@ -21,7 +21,7 @@
namespace mate {
template<>
template <>
struct Converter<file_dialog::Filter> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
@@ -37,7 +37,7 @@ struct Converter<file_dialog::Filter> {
}
};
template<>
template <>
struct Converter<file_dialog::DialogSettings> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
@@ -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;
}
};
@@ -77,8 +80,7 @@ void ShowMessageBox(int type,
mate::Arguments* args) {
v8::Local<v8::Value> peek = args->PeekNext();
atom::MessageBoxCallback callback;
if (mate::Converter<atom::MessageBoxCallback>::FromV8(args->isolate(),
peek,
if (mate::Converter<atom::MessageBoxCallback>::FromV8(args->isolate(), peek,
&callback)) {
atom::ShowMessageBox(window, static_cast<atom::MessageBoxType>(type),
buttons, default_id, cancel_id, options, title,
@@ -96,9 +98,8 @@ void ShowOpenDialog(const file_dialog::DialogSettings& settings,
mate::Arguments* args) {
v8::Local<v8::Value> peek = args->PeekNext();
file_dialog::OpenDialogCallback callback;
if (mate::Converter<file_dialog::OpenDialogCallback>::FromV8(args->isolate(),
peek,
&callback)) {
if (mate::Converter<file_dialog::OpenDialogCallback>::FromV8(
args->isolate(), peek, &callback)) {
file_dialog::ShowOpenDialog(settings, callback);
} else {
std::vector<base::FilePath> paths;
@@ -111,9 +112,8 @@ void ShowSaveDialog(const file_dialog::DialogSettings& settings,
mate::Arguments* args) {
v8::Local<v8::Value> peek = args->PeekNext();
file_dialog::SaveDialogCallback callback;
if (mate::Converter<file_dialog::SaveDialogCallback>::FromV8(args->isolate(),
peek,
&callback)) {
if (mate::Converter<file_dialog::SaveDialogCallback>::FromV8(
args->isolate(), peek, &callback)) {
file_dialog::ShowSaveDialog(settings, callback);
} else {
base::FilePath path;
@@ -122,8 +122,10 @@ void ShowSaveDialog(const file_dialog::DialogSettings& settings,
}
}
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
mate::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("showMessageBox", &ShowMessageBox);
dict.SetMethod("showErrorBox", &atom::ShowErrorBox);
@@ -137,4 +139,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_dialog, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_dialog, Initialize)

View File

@@ -19,22 +19,23 @@
namespace mate {
template<>
struct Converter<content::DownloadItem::DownloadState> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
content::DownloadItem::DownloadState state) {
template <>
struct Converter<download::DownloadItem::DownloadState> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
download::DownloadItem::DownloadState state) {
std::string download_state;
switch (state) {
case content::DownloadItem::IN_PROGRESS:
case download::DownloadItem::IN_PROGRESS:
download_state = "progressing";
break;
case content::DownloadItem::COMPLETE:
case download::DownloadItem::COMPLETE:
download_state = "completed";
break;
case content::DownloadItem::CANCELLED:
case download::DownloadItem::CANCELLED:
download_state = "cancelled";
break;
case content::DownloadItem::INTERRUPTED:
case download::DownloadItem::INTERRUPTED:
download_state = "interrupted";
break;
default:
@@ -57,7 +58,7 @@ std::map<uint32_t, v8::Global<v8::Object>> g_download_item_objects;
} // namespace
DownloadItem::DownloadItem(v8::Isolate* isolate,
content::DownloadItem* download_item)
download::DownloadItem* download_item)
: download_item_(download_item) {
download_item_->AddObserver(this);
Init(isolate);
@@ -75,18 +76,18 @@ DownloadItem::~DownloadItem() {
g_download_item_objects.erase(weak_map_id());
}
void DownloadItem::OnDownloadUpdated(content::DownloadItem* item) {
void DownloadItem::OnDownloadUpdated(download::DownloadItem* item) {
if (download_item_->IsDone()) {
Emit("done", item->GetState());
// Destroy the item once item is downloaded.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
GetDestroyClosure());
} else {
Emit("updated", item->GetState());
}
}
void DownloadItem::OnDownloadDestroyed(content::DownloadItem* download_item) {
void DownloadItem::OnDownloadDestroyed(download::DownloadItem* download_item) {
download_item_ = nullptr;
// Destroy the native class immediately when downloadItem is destroyed.
delete this;
@@ -129,12 +130,11 @@ bool DownloadItem::HasUserGesture() const {
}
std::string DownloadItem::GetFilename() const {
return base::UTF16ToUTF8(net::GenerateFileName(GetURL(),
GetContentDisposition(),
std::string(),
download_item_->GetSuggestedFilename(),
GetMimeType(),
"download").LossyDisplayName());
return base::UTF16ToUTF8(
net::GenerateFileName(GetURL(), GetContentDisposition(), std::string(),
download_item_->GetSuggestedFilename(),
GetMimeType(), "download")
.LossyDisplayName());
}
std::string DownloadItem::GetContentDisposition() const {
@@ -149,7 +149,7 @@ const std::vector<GURL>& DownloadItem::GetURLChain() const {
return download_item_->GetUrlChain();
}
content::DownloadItem::DownloadState DownloadItem::GetState() const {
download::DownloadItem::DownloadState DownloadItem::GetState() const {
return download_item_->GetState();
}
@@ -206,9 +206,9 @@ void DownloadItem::BuildPrototype(v8::Isolate* isolate,
}
// static
mate::Handle<DownloadItem> DownloadItem::Create(
v8::Isolate* isolate, content::DownloadItem* item) {
auto existing = TrackableObject::FromWrappedClass(isolate, item);
mate::Handle<DownloadItem> DownloadItem::Create(v8::Isolate* isolate,
download::DownloadItem* item) {
auto* existing = TrackableObject::FromWrappedClass(isolate, item);
if (existing)
return mate::CreateHandle(isolate, static_cast<DownloadItem*>(existing));
@@ -226,8 +226,10 @@ mate::Handle<DownloadItem> DownloadItem::Create(
namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary(isolate, exports)
.Set("DownloadItem",
@@ -236,4 +238,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_download_item, Initialize);
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_download_item, Initialize);

View File

@@ -10,7 +10,7 @@
#include "atom/browser/api/trackable_object.h"
#include "base/files/file_path.h"
#include "content/public/browser/download_item.h"
#include "components/download/public/common/download_item.h"
#include "native_mate/handle.h"
#include "url/gurl.h"
@@ -19,10 +19,10 @@ namespace atom {
namespace api {
class DownloadItem : public mate::TrackableObject<DownloadItem>,
public content::DownloadItem::Observer {
public download::DownloadItem::Observer {
public:
static mate::Handle<DownloadItem> Create(v8::Isolate* isolate,
content::DownloadItem* item);
download::DownloadItem* item);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
@@ -40,7 +40,7 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
std::string GetContentDisposition() const;
const GURL& GetURL() const;
const std::vector<GURL>& GetURLChain() const;
content::DownloadItem::DownloadState GetState() const;
download::DownloadItem::DownloadState GetState() const;
bool IsDone() const;
void SetSavePath(const base::FilePath& path);
base::FilePath GetSavePath() const;
@@ -49,16 +49,16 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
double GetStartTime() const;
protected:
DownloadItem(v8::Isolate* isolate, content::DownloadItem* download_item);
~DownloadItem();
DownloadItem(v8::Isolate* isolate, download::DownloadItem* download_item);
~DownloadItem() override;
// Override content::DownloadItem::Observer methods
void OnDownloadUpdated(content::DownloadItem* download) override;
void OnDownloadDestroyed(content::DownloadItem* download) override;
// Override download::DownloadItem::Observer methods
void OnDownloadUpdated(download::DownloadItem* download) override;
void OnDownloadDestroyed(download::DownloadItem* download) override;
private:
base::FilePath save_path_;
content::DownloadItem* download_item_;
download::DownloadItem* download_item_;
DISALLOW_COPY_AND_ASSIGN(DownloadItem);
};

View File

@@ -40,8 +40,8 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
const base::Closure& callback) {
if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(
accelerator, this)) {
if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(accelerator,
this)) {
return false;
}
@@ -54,8 +54,8 @@ void GlobalShortcut::Unregister(const ui::Accelerator& accelerator) {
return;
accelerator_callback_map_.erase(accelerator);
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(
accelerator, this);
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
this);
}
bool GlobalShortcut::IsRegistered(const ui::Accelerator& accelerator) {
@@ -73,8 +73,8 @@ mate::Handle<GlobalShortcut> GlobalShortcut::Create(v8::Isolate* isolate) {
}
// static
void GlobalShortcut::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void GlobalShortcut::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "GlobalShortcut"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("register", &GlobalShortcut::Register)
@@ -89,8 +89,10 @@ void GlobalShortcut::BuildPrototype(
namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("globalShortcut", atom::api::GlobalShortcut::Create(isolate));
@@ -98,4 +100,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_global_shortcut, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_global_shortcut, Initialize)

View File

@@ -0,0 +1,142 @@
// 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();
}
};
template <>
struct Converter<in_app_purchase::Product> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const in_app_purchase::Product& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("productIdentifier", val.productIdentifier);
dict.Set("localizedDescription", val.localizedDescription);
dict.Set("localizedTitle", val.localizedTitle);
dict.Set("contentVersion", val.localizedTitle);
dict.Set("contentLengths", val.contentLengths);
// Pricing Information
dict.Set("price", val.price);
dict.Set("formattedPrice", val.formattedPrice);
// Downloadable Content Information
dict.Set("isDownloadable", val.downloadable);
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)
.SetMethod("finishAllTransactions",
&in_app_purchase::FinishAllTransactions)
.SetMethod("finishTransactionByDate",
&in_app_purchase::FinishTransactionByDate)
.SetMethod("getProducts", &in_app_purchase::GetProducts);
}
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_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_in_app_purchase, Initialize)

View File

@@ -0,0 +1,47 @@
// 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 "atom/browser/mac/in_app_purchase_product.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

@@ -0,0 +1,58 @@
// Copyright (c) 2018 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_label_button.h"
#include "atom/common/api/constructor.h"
#include "base/strings/utf_string_conversions.h"
#include "native_mate/dictionary.h"
#include "ui/views/controls/button/label_button.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
LabelButton::LabelButton(const std::string& text)
: Button(new views::LabelButton(this, base::UTF8ToUTF16(text))) {}
LabelButton::~LabelButton() {}
// static
mate::WrappableBase* LabelButton::New(mate::Arguments* args,
const std::string& text) {
// Constructor call.
auto* view = new LabelButton(text);
view->InitWith(args->isolate(), args->GetThis());
return view;
}
// static
void LabelButton::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "LabelButton"));
}
} // namespace api
} // namespace atom
namespace {
using atom::api::LabelButton;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("LabelButton", mate::CreateConstructor<LabelButton>(
isolate, base::Bind(&LabelButton::New)));
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_label_button, Initialize)

View File

@@ -0,0 +1,36 @@
// 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_BROWSER_API_ATOM_API_LABEL_BUTTON_H_
#define ATOM_BROWSER_API_ATOM_API_LABEL_BUTTON_H_
#include <string>
#include "atom/browser/api/atom_api_button.h"
namespace atom {
namespace api {
class LabelButton : public Button {
public:
static mate::WrappableBase* New(mate::Arguments* args,
const std::string& text);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
protected:
explicit LabelButton(const std::string& text);
~LabelButton() override;
private:
DISALLOW_COPY_AND_ASSIGN(LabelButton);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_LABEL_BUTTON_H_

View File

@@ -0,0 +1,63 @@
// Copyright (c) 2018 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_layout_manager.h"
#include "atom/common/api/constructor.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
LayoutManager::LayoutManager(views::LayoutManager* layout_manager)
: layout_manager_(layout_manager) {
DCHECK(layout_manager_);
}
LayoutManager::~LayoutManager() {
if (managed_by_us_)
delete layout_manager_;
}
std::unique_ptr<views::LayoutManager> LayoutManager::TakeOver() {
if (!managed_by_us_) // already taken over.
return nullptr;
managed_by_us_ = false;
return std::unique_ptr<views::LayoutManager>(layout_manager_);
}
// static
mate::WrappableBase* LayoutManager::New(mate::Arguments* args) {
args->ThrowError("LayoutManager can not be created directly");
return nullptr;
}
// static
void LayoutManager::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {}
} // namespace api
} // namespace atom
namespace {
using atom::api::LayoutManager;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("LayoutManager", mate::CreateConstructor<LayoutManager>(
isolate, base::Bind(&LayoutManager::New)));
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_layout_manager, Initialize)

View File

@@ -0,0 +1,44 @@
// 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_BROWSER_API_ATOM_API_LAYOUT_MANAGER_H_
#define ATOM_BROWSER_API_ATOM_API_LAYOUT_MANAGER_H_
#include <memory>
#include "atom/browser/api/trackable_object.h"
#include "ui/views/layout/layout_manager.h"
namespace atom {
namespace api {
class LayoutManager : public mate::TrackableObject<LayoutManager> {
public:
static mate::WrappableBase* New(mate::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// Take over the ownership of the LayoutManager, and leave weak ref here.
std::unique_ptr<views::LayoutManager> TakeOver();
views::LayoutManager* layout_manager() const { return layout_manager_; }
protected:
explicit LayoutManager(views::LayoutManager* layout_manager);
~LayoutManager() override;
private:
bool managed_by_us_ = true;
views::LayoutManager* layout_manager_;
DISALLOW_COPY_AND_ASSIGN(LayoutManager);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_LAYOUT_MANAGER_H_

View File

@@ -20,12 +20,15 @@ namespace atom {
namespace api {
Menu::Menu(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: model_(new AtomMenuModel(this)),
parent_(nullptr) {
: model_(new AtomMenuModel(this)) {
InitWith(isolate, wrapper);
model_->AddObserver(this);
}
Menu::~Menu() {
if (model_) {
model_->RemoveObserver(this);
}
}
void Menu::AfterInit(v8::Isolate* isolate) {
@@ -43,15 +46,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(
@@ -60,23 +69,28 @@ bool Menu::GetAcceleratorForCommandIdWithParams(
ui::Accelerator* accelerator) const {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::Value> val = get_accelerator_.Run(
command_id, use_default_accelerator);
v8::Local<v8::Value> val =
get_accelerator_.Run(GetWrapper(), command_id, use_default_accelerator);
return mate::ConvertFromV8(isolate(), val, accelerator);
}
void Menu::ExecuteCommand(int command_id, int flags) {
execute_command_.Run(
mate::internal::CreateEventFromFlags(isolate(), flags),
command_id);
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(
int index, int command_id, const base::string16& label) {
void Menu::InsertItemAt(int index,
int command_id,
const base::string16& label) {
model_->InsertItemAt(index, command_id, label);
}
@@ -153,6 +167,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) {
@@ -184,13 +206,14 @@ void Menu::BuildPrototype(v8::Isolate* isolate,
} // namespace atom
namespace {
using atom::api::Menu;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
Menu::SetConstructor(isolate, base::Bind(&Menu::New));
@@ -205,4 +228,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_menu, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_menu, Initialize)

View File

@@ -8,7 +8,7 @@
#include <memory>
#include <string>
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/api/atom_api_top_level_window.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/ui/atom_menu_model.h"
#include "base/callback.h"
@@ -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,12 +54,19 @@ 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(TopLevelWindow* 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_;
Menu* parent_ = nullptr;
// Observable:
void OnMenuWillClose() override;
void OnMenuWillShow() override;
private:
void InsertItemAt(int index, int command_id, const base::string16& label);
@@ -88,12 +96,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);
};
@@ -102,12 +112,12 @@ class Menu : public mate::TrackableObject<Menu>,
} // namespace atom
namespace mate {
template<>
template <>
struct Converter<atom::AtomMenuModel*> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
atom::AtomMenuModel** out) {
// null would be tranfered to NULL.
if (val->IsNull()) {

View File

@@ -21,18 +21,25 @@ namespace api {
class MenuMac : public Menu {
protected:
MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
~MenuMac() override;
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void PopupAt(TopLevelWindow* 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

@@ -9,8 +9,6 @@
#include "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
@@ -18,47 +16,53 @@
using content::BrowserThread;
namespace {
static scoped_nsobject<NSMenu> applicationMenu_;
} // namespace
namespace atom {
namespace api {
MenuMac::MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: Menu(isolate, wrapper),
weak_factory_(this) {
}
: Menu(isolate, wrapper), weak_factory_(this) {}
void MenuMac::PopupAt(
Window* window, int x, int y, int positioning_item, bool async) {
MenuMac::~MenuMac() = default;
void MenuMac::PopupAt(TopLevelWindow* 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();
native_window->GetWeakPtr(), window->weak_map_id(), x,
y, 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 =
native_window->inspectable_web_contents();
if (!web_contents)
return;
NSWindow* nswindow = native_window->GetNativeWindow();
auto close_callback = base::Bind(&MenuMac::ClosePopupAt,
weak_factory_.GetWeakPtr(), window_id);
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>(
[[AtomMenuController alloc] initWithModel:model()
useDefaultAccelerator:NO]);
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]);
NSMenu* menu = [popup_controllers_[window_id] menu];
NSView* view = web_contents->GetView()->GetNativeView();
NSView* view = [nswindow contentView];
// Which menu item to show.
NSMenuItem* item = nil;
@@ -68,7 +72,6 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
// (-1, -1) means showing on mouse location.
NSPoint position;
if (x == -1 || y == -1) {
NSWindow* nswindow = native_window->GetNativeWindow();
position = [view convertPoint:[nswindow mouseLocationOutsideOfEventStream]
fromView:nil];
} else {
@@ -92,42 +95,61 @@ 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
void Menu::SetApplicationMenu(Menu* base_menu) {
MenuMac* menu = static_cast<MenuMac*>(base_menu);
base::scoped_nsobject<AtomMenuController> menu_controller(
[[AtomMenuController alloc] initWithModel:menu->model_.get()
useDefaultAccelerator:YES]);
[NSApp setMainMenu:[menu_controller menu]];
base::scoped_nsobject<AtomMenuController> menu_controller([
[AtomMenuController alloc] initWithModel:menu->model_.get()
useDefaultAccelerator:YES]);
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,6 @@
#include "atom/browser/native_window_views.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/display/screen.h"
using views::MenuRunner;
@@ -16,54 +15,61 @@ namespace atom {
namespace api {
MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
: Menu(isolate, wrapper),
weak_factory_(this) {
}
: Menu(isolate, 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());
MenuViews::~MenuViews() = default;
void MenuViews::PopupAt(TopLevelWindow* 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;
// Show the menu.
int32_t window_id = window->ID();
int32_t window_id = window->weak_map_id();
auto close_callback = base::Bind(
&MenuViews::ClosePopupAt, weak_factory_.GetWeakPtr(), window_id);
menu_runners_[window_id] = std::unique_ptr<MenuRunner>(new MenuRunner(
model(), flags, close_callback));
ignore_result(menu_runners_[window_id]->RunMenuAt(
static_cast<NativeWindowViews*>(window->window())->widget(),
NULL,
gfx::Rect(location, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT,
ui::MENU_SOURCE_MOUSE));
&MenuViews::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback);
menu_runners_[window_id] =
std::make_unique<MenuRunner>(model(), flags, close_callback);
menu_runners_[window_id]->RunMenuAt(
native_window->widget(), NULL, gfx::Rect(location, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT, 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

@@ -19,13 +19,19 @@ namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
~MenuViews() override;
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item, bool async) override;
void PopupAt(TopLevelWindow* 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

@@ -58,4 +58,4 @@ void Initialize(v8::Local<v8::Object> exports,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_net, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_net, Initialize)

View File

@@ -0,0 +1,90 @@
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_net_log.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "base/callback.h"
#include "content/public/common/content_switches.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
NetLog::NetLog(v8::Isolate* isolate) {
Init(isolate);
net_log_ = atom::AtomBrowserClient::Get()->GetNetLog();
}
NetLog::~NetLog() {}
// static
v8::Local<v8::Value> NetLog::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new NetLog(isolate)).ToV8();
}
void NetLog::StartLogging(mate::Arguments* args) {
base::FilePath log_path;
if (!args->GetNext(&log_path) || log_path.empty()) {
args->ThrowError("The first parameter must be a valid string");
return;
}
net_log_->StartDynamicLogging(log_path);
}
bool NetLog::IsCurrentlyLogging() {
return net_log_->IsDynamicLogging();
}
base::FilePath::StringType NetLog::GetCurrentlyLoggingPath() {
return net_log_->GetDynamicLoggingPath().value();
}
void NetLog::StopLogging(mate::Arguments* args) {
base::OnceClosure callback;
args->GetNext(&callback);
net_log_->StopDynamicLogging(std::move(callback));
}
// static
void NetLog::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "NetLog"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetProperty("currentlyLogging", &NetLog::IsCurrentlyLogging)
.SetProperty("currentlyLoggingPath", &NetLog::GetCurrentlyLoggingPath)
.SetMethod("startLogging", &NetLog::StartLogging)
.SetMethod("_stopLogging", &NetLog::StopLogging);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::NetLog;
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("netLog", NetLog::Create(isolate));
dict.Set("NetLog", NetLog::GetConstructor(isolate)->GetFunction());
}
} // namespace
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_net_log, Initialize)

View File

@@ -0,0 +1,42 @@
// 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_BROWSER_API_ATOM_API_NET_LOG_H_
#define ATOM_BROWSER_API_ATOM_API_NET_LOG_H_
#include <string>
#include "brightray/browser/net_log.h"
#include "native_mate/wrappable.h"
namespace atom {
namespace api {
class NetLog : public mate::Wrappable<NetLog> {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
void StartLogging(mate::Arguments* args);
bool IsCurrentlyLogging();
base::FilePath::StringType GetCurrentlyLoggingPath();
void StopLogging(mate::Arguments* args);
protected:
explicit NetLog(v8::Isolate* isolate);
~NetLog() override;
private:
brightray::NetLog* net_log_;
DISALLOW_COPY_AND_ASSIGN(NetLog);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_NET_LOG_H_

View File

@@ -9,12 +9,43 @@
#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 "atom/common/node_includes.h"
#include "base/guid.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 {
@@ -30,6 +61,7 @@ Notification::Notification(v8::Isolate* isolate,
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_) {
@@ -38,6 +70,9 @@ Notification::Notification(v8::Isolate* isolate,
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_);
}
}
@@ -56,24 +91,40 @@ mate::WrappableBase* Notification::New(mate::Arguments* args) {
}
// Getters
base::string16 Notification::GetTitle() {
base::string16 Notification::GetTitle() const {
return title_;
}
base::string16 Notification::GetBody() {
base::string16 Notification::GetSubtitle() const {
return subtitle_;
}
base::string16 Notification::GetBody() const {
return body_;
}
bool Notification::GetSilent() {
bool Notification::GetSilent() const {
return silent_;
}
base::string16 Notification::GetReplyPlaceholder() {
bool Notification::GetHasReply() const {
return has_reply_;
}
base::string16 Notification::GetReplyPlaceholder() const {
return reply_placeholder_;
}
bool Notification::GetHasReply() {
return has_reply_;
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
@@ -81,6 +132,10 @@ 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;
}
@@ -89,12 +144,29 @@ 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::SetHasReply(bool new_has_reply) {
has_reply_ = new_has_reply;
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() {
@@ -109,20 +181,38 @@ void Notification::NotificationDisplayed() {
Emit("show");
}
void Notification::NotificationDestroyed() {
void Notification::NotificationDestroyed() {}
void Notification::NotificationClosed() {
Emit("close");
}
void Notification::NotificationClosed() {
void Notification::Close() {
if (notification_) {
notification_->Dismiss();
notification_.reset();
}
}
// Showing notifications
void Notification::Show() {
Close();
if (presenter_) {
notification_ = presenter_->CreateNotification(this);
notification_ = presenter_->CreateNotification(this, base::GenerateGUID());
if (notification_) {
notification_->Show(title_, body_, "", GURL(), icon_.AsBitmap(), silent_,
has_reply_, reply_placeholder_);
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);
}
}
}
@@ -138,13 +228,21 @@ void Notification::BuildPrototype(v8::Isolate* isolate,
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("hasReply", &Notification::GetHasReply,
&Notification::SetHasReply);
.SetProperty("sound", &Notification::GetSound, &Notification::SetSound)
.SetProperty("actions", &Notification::GetActions,
&Notification::SetActions)
.SetProperty("closeButtonText", &Notification::GetCloseButtonText,
&Notification::SetCloseButtonText);
}
} // namespace api
@@ -171,4 +269,4 @@ void Initialize(v8::Local<v8::Object> exports,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_common_notification, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_common_notification, Initialize)

View File

@@ -31,6 +31,7 @@ class Notification : public mate::TrackableObject<Notification>,
v8::Local<v8::FunctionTemplate> prototype);
// NotificationDelegate:
void NotificationAction(int index) override;
void NotificationClick() override;
void NotificationReplied(const std::string& reply) override;
void NotificationDisplayed() override;
@@ -44,30 +45,43 @@ class Notification : public mate::TrackableObject<Notification>,
~Notification() override;
void Show();
void Close();
// Prop Getters
base::string16 GetTitle();
base::string16 GetBody();
bool GetSilent();
base::string16 GetReplyPlaceholder();
bool GetHasReply();
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 SetReplyPlaceholder(const base::string16& new_reply_placeholder);
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;
base::string16 reply_placeholder_;
bool has_reply_ = false;
base::string16 reply_placeholder_;
base::string16 sound_;
std::vector<brightray::NotificationAction> actions_;
base::string16 close_button_text_;
brightray::NotificationPresenter* presenter_;

View File

@@ -5,25 +5,70 @@
#include "atom/browser/api/atom_api_power_monitor.h"
#include "atom/browser/browser.h"
#include "atom/common/native_mate_converters/callback.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace mate {
template <>
struct Converter<ui::IdleState> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const ui::IdleState& in) {
switch (in) {
case ui::IDLE_STATE_ACTIVE:
return mate::StringToV8(isolate, "active");
case ui::IDLE_STATE_IDLE:
return mate::StringToV8(isolate, "idle");
case ui::IDLE_STATE_LOCKED:
return mate::StringToV8(isolate, "locked");
case ui::IDLE_STATE_UNKNOWN:
default:
return mate::StringToV8(isolate, "unknown");
}
}
};
} // namespace mate
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);
#if defined(OS_MACOSX) || defined(OS_WIN)
InitPlatformSpecificMonitors();
#endif
}
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");
@@ -39,6 +84,21 @@ void PowerMonitor::OnResume() {
Emit("resume");
}
void PowerMonitor::QuerySystemIdleState(v8::Isolate* isolate,
int idle_threshold,
const ui::IdleCallback& callback) {
if (idle_threshold > 0) {
ui::CalculateIdleState(idle_threshold, callback);
} else {
isolate->ThrowException(v8::Exception::TypeError(mate::StringToV8(
isolate, "Invalid idle threshold, must be greater than 0")));
}
}
void PowerMonitor::QuerySystemIdleTime(const ui::IdleTimeCallback& callback) {
ui::CalculateIdleTime(callback);
}
// static
v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
@@ -52,26 +112,32 @@ v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
}
// static
void PowerMonitor::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void PowerMonitor::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "PowerMonitor"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.MakeDestroyable()
#if defined(OS_LINUX)
.SetMethod("blockShutdown", &PowerMonitor::BlockShutdown)
.SetMethod("unblockShutdown", &PowerMonitor::UnblockShutdown)
#endif
.SetMethod("querySystemIdleState", &PowerMonitor::QuerySystemIdleState)
.SetMethod("querySystemIdleTime", &PowerMonitor::QuerySystemIdleTime);
}
} // namespace api
} // namespace atom
namespace {
using atom::api::PowerMonitor;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
#if defined(OS_MACOSX)
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
#endif
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("powerMonitor", PowerMonitor::Create(isolate));
@@ -81,4 +147,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_power_monitor, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_power_monitor, Initialize)

View File

@@ -6,16 +6,17 @@
#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"
#include "ui/base/idle/idle.h"
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,12 +27,52 @@ 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
#if defined(OS_MACOSX) || defined(OS_WIN)
void InitPlatformSpecificMonitors();
#endif
// base::PowerObserver implementations:
void OnPowerStateChange(bool on_battery_power) override;
void OnSuspend() override;
void OnResume() override;
private:
void QuerySystemIdleState(v8::Isolate* isolate,
int idle_threshold,
const ui::IdleCallback& callback);
void QuerySystemIdleTime(const ui::IdleTimeCallback& callback);
#if defined(OS_WIN)
// Static callback invoked when a message comes in to our messaging window.
static LRESULT CALLBACK WndProcStatic(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam);
LRESULT CALLBACK WndProc(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam);
// The window class of |window_|.
ATOM atom_;
// The handle of the module that contains the window procedure of |window_|.
HMODULE instance_;
// The window used for processing events.
HWND window_;
#endif
DISALLOW_COPY_AND_ASSIGN(PowerMonitor);
};

View File

@@ -0,0 +1,74 @@
// 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_power_monitor.h"
#include <ApplicationServices/ApplicationServices.h>
#import <Cocoa/Cocoa.h>
@interface MacLockMonitor : NSObject {
@private
std::vector<atom::api::PowerMonitor*> emitters;
}
- (void)addEmitter:(atom::api::PowerMonitor*)monitor_;
@end
@implementation MacLockMonitor
- (id)init {
if ((self = [super init])) {
NSDistributedNotificationCenter* distCenter =
[NSDistributedNotificationCenter defaultCenter];
[distCenter addObserver:self
selector:@selector(onScreenLocked:)
name:@"com.apple.screenIsLocked"
object:nil];
[distCenter addObserver:self
selector:@selector(onScreenUnlocked:)
name:@"com.apple.screenIsUnlocked"
object:nil];
}
return self;
}
- (void)dealloc {
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)addEmitter:(atom::api::PowerMonitor*)monitor_ {
self->emitters.push_back(monitor_);
}
- (void)onScreenLocked:(NSNotification*)notification {
for (auto*& emitter : self->emitters) {
emitter->Emit("lock-screen");
}
}
- (void)onScreenUnlocked:(NSNotification*)notification {
for (auto*& emitter : self->emitters) {
emitter->Emit("unlock-screen");
}
}
@end
namespace atom {
namespace api {
static MacLockMonitor* g_lock_monitor = nil;
void PowerMonitor::InitPlatformSpecificMonitors() {
if (!g_lock_monitor)
g_lock_monitor = [[MacLockMonitor alloc] init];
[g_lock_monitor addEmitter:this];
}
} // namespace api
} // namespace atom

View File

@@ -0,0 +1,71 @@
// 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_power_monitor.h"
#include "base/win/wrapped_window_proc.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/win/hwnd_util.h"
#include "Wtsapi32.h"
namespace atom {
namespace {
const wchar_t kPowerMonitorWindowClass[] =
L"Electron_PowerMonitorHostWindow";
} // namespace
namespace api {
void PowerMonitor::InitPlatformSpecificMonitors() {
WNDCLASSEX window_class;
base::win::InitializeWindowClass(
kPowerMonitorWindowClass,
&base::win::WrappedWindowProc<PowerMonitor::WndProcStatic>, 0, 0, 0,
NULL, NULL, NULL, NULL, NULL, &window_class);
instance_ = window_class.hInstance;
atom_ = RegisterClassEx(&window_class);
// Create an offscreen window for receiving broadcast messages for the
// session lock and unlock events.
window_ = CreateWindow(MAKEINTATOM(atom_), 0, 0, 0, 0, 0, 0, HWND_MESSAGE, 0,
instance_, 0);
gfx::CheckWindowCreated(window_);
gfx::SetWindowUserData(window_, this);
// Tel windows we want to be notified with session events
WTSRegisterSessionNotification(window_, NOTIFY_FOR_THIS_SESSION);
}
LRESULT CALLBACK PowerMonitor::WndProcStatic(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam) {
PowerMonitor* msg_wnd = reinterpret_cast<PowerMonitor*>(
GetWindowLongPtr(hwnd, GWLP_USERDATA));
if (msg_wnd)
return msg_wnd->WndProc(hwnd, message, wparam, lparam);
else
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
LRESULT CALLBACK PowerMonitor::WndProc(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam) {
if (message == WM_WTSSESSION_CHANGE) {
if (wparam == WTS_SESSION_LOCK) {
Emit("lock-screen");
} else if (wparam == WTS_SESSION_UNLOCK) {
Emit("unlock-screen");
}
}
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
} // namespace api
} // namespace atom

View File

@@ -6,28 +6,26 @@
#include <string>
#include "content/public/browser/browser_thread.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
using content::BrowserThread;
namespace mate {
template<>
struct Converter<device::PowerSaveBlocker::PowerSaveBlockerType> {
template <>
struct Converter<device::mojom::WakeLockType> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
device::PowerSaveBlocker::PowerSaveBlockerType* out) {
using device::PowerSaveBlocker;
device::mojom::WakeLockType* out) {
std::string type;
if (!ConvertFromV8(isolate, val, &type))
return false;
if (type == "prevent-app-suspension")
*out = PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension;
*out = device::mojom::WakeLockType::kPreventAppSuspension;
else if (type == "prevent-display-sleep")
*out = PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep;
*out = device::mojom::WakeLockType::kPreventDisplaySleep;
else
return false;
return true;
@@ -42,12 +40,11 @@ namespace api {
PowerSaveBlocker::PowerSaveBlocker(v8::Isolate* isolate)
: current_blocker_type_(
device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension) {
device::mojom::WakeLockType::kPreventAppSuspension) {
Init(isolate);
}
PowerSaveBlocker::~PowerSaveBlocker() {
}
PowerSaveBlocker::~PowerSaveBlocker() {}
void PowerSaveBlocker::UpdatePowerSaveBlocker() {
if (power_save_blocker_types_.empty()) {
@@ -55,38 +52,39 @@ void PowerSaveBlocker::UpdatePowerSaveBlocker() {
return;
}
// |kPowerSaveBlockPreventAppSuspension| keeps system active, but allows
// |WakeLockType::kPreventAppSuspension| keeps system active, but allows
// screen to be turned off.
// |kPowerSaveBlockPreventDisplaySleep| keeps system and screen active, has a
// higher precedence level than |kPowerSaveBlockPreventAppSuspension|.
// |WakeLockType::kPreventDisplaySleep| keeps system and screen active, has a
// higher precedence level than |WakeLockType::kPreventAppSuspension|.
//
// Only the highest-precedence blocker type takes effect.
device::PowerSaveBlocker::PowerSaveBlockerType new_blocker_type =
device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension;
device::mojom::WakeLockType new_blocker_type =
device::mojom::WakeLockType::kPreventAppSuspension;
for (const auto& element : power_save_blocker_types_) {
if (element.second ==
device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep) {
device::mojom::WakeLockType::kPreventDisplaySleep) {
new_blocker_type =
device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep;
device::mojom::WakeLockType::kPreventDisplaySleep;
break;
}
}
if (!power_save_blocker_ || new_blocker_type != current_blocker_type_) {
std::unique_ptr<device::PowerSaveBlocker> new_blocker(
new device::PowerSaveBlocker(
new_blocker_type,
device::PowerSaveBlocker::kReasonOther,
ATOM_PRODUCT_NAME,
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
auto new_blocker = std::make_unique<device::PowerSaveBlocker>(
new_blocker_type, device::mojom::WakeLockReason::kOther,
ATOM_PRODUCT_NAME, base::ThreadTaskRunnerHandle::Get(),
// This task runner may be used by some device service
// implementation bits to interface with dbus client code, which in
// turn imposes some subtle thread affinity on the clients. We
// therefore require a single-thread runner.
base::CreateSingleThreadTaskRunnerWithTraits(
{base::MayBlock(), base::TaskPriority::BACKGROUND}));
power_save_blocker_.swap(new_blocker);
current_blocker_type_ = new_blocker_type;
}
}
int PowerSaveBlocker::Start(
device::PowerSaveBlocker::PowerSaveBlockerType type) {
int PowerSaveBlocker::Start(device::mojom::WakeLockType type) {
static int count = 0;
power_save_blocker_types_[count] = type;
UpdatePowerSaveBlocker();
@@ -110,7 +108,8 @@ mate::Handle<PowerSaveBlocker> PowerSaveBlocker::Create(v8::Isolate* isolate) {
// static
void PowerSaveBlocker::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "PowerSaveBlocker"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("start", &PowerSaveBlocker::Start)
@@ -124,8 +123,10 @@ void PowerSaveBlocker::BuildPrototype(
namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("powerSaveBlocker", atom::api::PowerSaveBlocker::Create(isolate));
@@ -133,4 +134,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_power_save_blocker, Initialize);
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_power_save_blocker, Initialize);

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;
@@ -33,19 +33,18 @@ class PowerSaveBlocker : public mate::TrackableObject<PowerSaveBlocker> {
private:
void UpdatePowerSaveBlocker();
int Start(device::PowerSaveBlocker::PowerSaveBlockerType type);
int Start(device::mojom::WakeLockType type);
bool Stop(int id);
bool IsStarted(int id);
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
// Currnet blocker type used by |power_save_blocker_|
device::PowerSaveBlocker::PowerSaveBlockerType current_blocker_type_;
// Current blocker type used by |power_save_blocker_|
device::mojom::WakeLockType current_blocker_type_;
// Map from id to the corresponding blocker type for each request.
using PowerSaveBlockerTypeMap =
std::map<int, device::PowerSaveBlocker::PowerSaveBlockerType>;
PowerSaveBlockerTypeMap power_save_blocker_types_;
using WakeLockTypeMap = std::map<int, device::mojom::WakeLockType>;
WakeLockTypeMap power_save_blocker_types_;
DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker);
};

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"
@@ -32,14 +33,6 @@ namespace {
// List of registered custom standard schemes.
std::vector<std::string> g_standard_schemes;
// Clear protocol handlers in IO thread.
void ClearJobFactoryInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter) {
auto job_factory = static_cast<AtomURLRequestJobFactory*>(
request_context_getter->job_factory());
job_factory->Clear();
}
} // namespace
std::vector<std::string> GetStandardSchemes() {
@@ -70,44 +63,39 @@ void RegisterStandardSchemes(const std::vector<std::string>& schemes,
atom::switches::kStandardSchemes, base::JoinString(schemes, ","));
if (secure) {
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
atom::switches::kSecureSchemes, base::JoinString(schemes, ","));
atom::switches::kSecureSchemes, base::JoinString(schemes, ","));
}
}
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->GetRequestContext()),
weak_factory_(this) {
: browser_context_(browser_context), weak_factory_(this) {
Init(isolate);
}
Protocol::~Protocol() {
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
base::Bind(ClearJobFactoryInIO, request_context_getter_));
}
Protocol::~Protocol() {}
void Protocol::RegisterServiceWorkerSchemes(
const std::vector<std::string>& schemes) {
atom::AtomBrowserClient::SetCustomServiceWorkerSchemes(schemes);
}
void Protocol::UnregisterProtocol(
const std::string& scheme, mate::Arguments* args) {
void Protocol::UnregisterProtocol(const std::string& scheme,
mate::Arguments* args) {
CompletionCallback callback;
args->GetNext(&callback);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&Protocol::UnregisterProtocolInIO,
request_context_getter_, scheme),
base::Bind(&Protocol::OnIOCompleted,
GetWeakPtr(), callback));
base::BindOnce(&Protocol::UnregisterProtocolInIO,
base::RetainedRef(getter), scheme),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
}
// static
Protocol::ProtocolError Protocol::UnregisterProtocolInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
const std::string& scheme) {
auto job_factory = static_cast<AtomURLRequestJobFactory*>(
auto* job_factory = static_cast<AtomURLRequestJobFactory*>(
request_context_getter->job_factory());
if (!job_factory->HasProtocolHandler(scheme))
return PROTOCOL_NOT_REGISTERED;
@@ -117,10 +105,11 @@ Protocol::ProtocolError Protocol::UnregisterProtocolInIO(
void Protocol::IsProtocolHandled(const std::string& scheme,
const BooleanCallback& callback) {
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&Protocol::IsProtocolHandledInIO,
request_context_getter_, scheme),
base::Bind(&Protocol::IsProtocolHandledInIO, base::RetainedRef(getter),
scheme),
callback);
}
@@ -131,16 +120,16 @@ bool Protocol::IsProtocolHandledInIO(
return request_context_getter->job_factory()->IsHandledProtocol(scheme);
}
void Protocol::UninterceptProtocol(
const std::string& scheme, mate::Arguments* args) {
void Protocol::UninterceptProtocol(const std::string& scheme,
mate::Arguments* args) {
CompletionCallback callback;
args->GetNext(&callback);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&Protocol::UninterceptProtocolInIO,
request_context_getter_, scheme),
base::Bind(&Protocol::OnIOCompleted,
GetWeakPtr(), callback));
base::BindOnce(&Protocol::UninterceptProtocolInIO,
base::RetainedRef(getter), scheme),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
}
// static
@@ -148,12 +137,14 @@ Protocol::ProtocolError Protocol::UninterceptProtocolInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
const std::string& scheme) {
return static_cast<AtomURLRequestJobFactory*>(
request_context_getter->job_factory())->UninterceptProtocol(scheme) ?
PROTOCOL_OK : PROTOCOL_NOT_INTERCEPTED;
request_context_getter->job_factory())
->UninterceptProtocol(scheme)
? PROTOCOL_OK
: PROTOCOL_NOT_INTERCEPTED;
}
void Protocol::OnIOCompleted(
const CompletionCallback& callback, ProtocolError error) {
void Protocol::OnIOCompleted(const CompletionCallback& callback,
ProtocolError error) {
// The completion callback is optional.
if (callback.is_null())
return;
@@ -171,31 +162,30 @@ void Protocol::OnIOCompleted(
std::string Protocol::ErrorCodeToString(ProtocolError error) {
switch (error) {
case PROTOCOL_FAIL: return "Failed to manipulate protocol factory";
case PROTOCOL_REGISTERED: return "The scheme has been registered";
case PROTOCOL_NOT_REGISTERED: return "The scheme has not been registered";
case PROTOCOL_INTERCEPTED: return "The scheme has been intercepted";
case PROTOCOL_NOT_INTERCEPTED: return "The scheme has not been intercepted";
default: return "Unexpected error";
case PROTOCOL_FAIL:
return "Failed to manipulate protocol factory";
case PROTOCOL_REGISTERED:
return "The scheme has been registered";
case PROTOCOL_NOT_REGISTERED:
return "The scheme has not been registered";
case PROTOCOL_INTERCEPTED:
return "The scheme has been intercepted";
case PROTOCOL_NOT_INTERCEPTED:
return "The scheme has not been intercepted";
default:
return "Unexpected error";
}
}
AtomURLRequestJobFactory* Protocol::GetJobFactoryInIO() const {
request_context_getter_->GetURLRequestContext(); // Force init.
return static_cast<AtomURLRequestJobFactory*>(
static_cast<brightray::URLRequestContextGetter*>(
request_context_getter_.get())->job_factory());
}
// static
mate::Handle<Protocol> Protocol::Create(
v8::Isolate* isolate, AtomBrowserContext* browser_context) {
mate::Handle<Protocol> Protocol::Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context) {
return mate::CreateHandle(isolate, new Protocol(isolate, browser_context));
}
// static
void Protocol::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void Protocol::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Protocol"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("registerServiceWorkerSchemes",
@@ -208,6 +198,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 +210,8 @@ void Protocol::BuildPrototype(
&Protocol::InterceptProtocol<URLRequestAsyncAsarJob>)
.SetMethod("interceptHttpProtocol",
&Protocol::InterceptProtocol<URLRequestFetchJob>)
.SetMethod("interceptStreamProtocol",
&Protocol::InterceptProtocol<URLRequestStreamJob>)
.SetMethod("uninterceptProtocol", &Protocol::UninterceptProtocol);
}
@@ -227,19 +221,22 @@ void Protocol::BuildPrototype(
namespace {
void RegisterStandardSchemes(
const std::vector<std::string>& schemes, mate::Arguments* args) {
void RegisterStandardSchemes(const std::vector<std::string>& schemes,
mate::Arguments* args) {
if (atom::Browser::Get()->is_ready()) {
args->ThrowError("protocol.registerStandardSchemes should be called before "
"app is ready");
args->ThrowError(
"protocol.registerStandardSchemes should be called before "
"app is ready");
return;
}
atom::api::RegisterStandardSchemes(schemes, args);
}
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.SetMethod("registerStandardSchemes", &RegisterStandardSchemes);
@@ -248,4 +245,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_protocol, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_protocol, Initialize)

View File

@@ -39,20 +39,20 @@ class Protocol : public mate::TrackableObject<Protocol> {
using CompletionCallback = base::Callback<void(v8::Local<v8::Value>)>;
using BooleanCallback = base::Callback<void(bool)>;
static mate::Handle<Protocol> Create(
v8::Isolate* isolate, AtomBrowserContext* browser_context);
static mate::Handle<Protocol> Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
protected:
Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context);
~Protocol();
~Protocol() override;
private:
// Possible errors.
enum ProtocolError {
PROTOCOL_OK, // no error
PROTOCOL_OK, // no error
PROTOCOL_FAIL, // operation failed, should never occur
PROTOCOL_REGISTERED,
PROTOCOL_NOT_REGISTERED,
@@ -62,14 +62,13 @@ class Protocol : public mate::TrackableObject<Protocol> {
// The protocol handler that will create a protocol handler for certain
// request job.
template<typename RequestJob>
template <typename RequestJob>
class CustomProtocolHandler
: public net::URLRequestJobFactory::ProtocolHandler {
public:
CustomProtocolHandler(
v8::Isolate* isolate,
net::URLRequestContextGetter* request_context,
const Handler& handler)
CustomProtocolHandler(v8::Isolate* isolate,
net::URLRequestContextGetter* request_context,
const Handler& handler)
: isolate_(isolate),
request_context_(request_context),
handler_(handler) {}
@@ -79,13 +78,13 @@ class Protocol : public mate::TrackableObject<Protocol> {
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
RequestJob* request_job = new RequestJob(request, network_delegate);
request_job->SetHandlerInfo(isolate_, request_context_.get(), handler_);
request_job->SetHandlerInfo(isolate_, request_context_, handler_);
return request_job;
}
private:
v8::Isolate* isolate_;
scoped_refptr<net::URLRequestContextGetter> request_context_;
net::URLRequestContextGetter* request_context_;
Protocol::Handler handler_;
DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler);
@@ -95,32 +94,31 @@ class Protocol : public mate::TrackableObject<Protocol> {
void RegisterServiceWorkerSchemes(const std::vector<std::string>& schemes);
// Register the protocol with certain request job.
template<typename RequestJob>
template <typename RequestJob>
void RegisterProtocol(const std::string& scheme,
const Handler& handler,
mate::Arguments* args) {
CompletionCallback callback;
args->GetNext(&callback);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&Protocol::RegisterProtocolInIO<RequestJob>,
request_context_getter_, isolate(), scheme, handler),
base::Bind(&Protocol::OnIOCompleted,
GetWeakPtr(), callback));
base::BindOnce(&Protocol::RegisterProtocolInIO<RequestJob>,
base::RetainedRef(getter), isolate(), scheme, handler),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
}
template<typename RequestJob>
template <typename RequestJob>
static ProtocolError RegisterProtocolInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
v8::Isolate* isolate,
const std::string& scheme,
const Handler& handler) {
auto job_factory = static_cast<AtomURLRequestJobFactory*>(
auto* job_factory = static_cast<AtomURLRequestJobFactory*>(
request_context_getter->job_factory());
if (job_factory->IsHandledProtocol(scheme))
return PROTOCOL_REGISTERED;
std::unique_ptr<CustomProtocolHandler<RequestJob>> protocol_handler(
new CustomProtocolHandler<RequestJob>(
isolate, request_context_getter.get(), handler));
auto protocol_handler = std::make_unique<CustomProtocolHandler<RequestJob>>(
isolate, request_context_getter.get(), handler);
if (job_factory->SetProtocolHandler(scheme, std::move(protocol_handler)))
return PROTOCOL_OK;
else
@@ -141,35 +139,34 @@ class Protocol : public mate::TrackableObject<Protocol> {
const std::string& scheme);
// Replace the protocol handler with a new one.
template<typename RequestJob>
template <typename RequestJob>
void InterceptProtocol(const std::string& scheme,
const Handler& handler,
mate::Arguments* args) {
CompletionCallback callback;
args->GetNext(&callback);
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&Protocol::InterceptProtocolInIO<RequestJob>,
request_context_getter_, isolate(), scheme, handler),
base::Bind(&Protocol::OnIOCompleted,
GetWeakPtr(), callback));
base::BindOnce(&Protocol::InterceptProtocolInIO<RequestJob>,
base::RetainedRef(getter), isolate(), scheme, handler),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
}
template<typename RequestJob>
template <typename RequestJob>
static ProtocolError InterceptProtocolInIO(
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
v8::Isolate* isolate,
const std::string& scheme,
const Handler& handler) {
auto job_factory = static_cast<AtomURLRequestJobFactory*>(
auto* job_factory = static_cast<AtomURLRequestJobFactory*>(
request_context_getter->job_factory());
if (!job_factory->IsHandledProtocol(scheme))
return PROTOCOL_NOT_REGISTERED;
// It is possible a protocol is handled but can not be intercepted.
if (!job_factory->HasProtocolHandler(scheme))
return PROTOCOL_FAIL;
std::unique_ptr<CustomProtocolHandler<RequestJob>> protocol_handler(
new CustomProtocolHandler<RequestJob>(
isolate, request_context_getter.get(), handler));
auto protocol_handler = std::make_unique<CustomProtocolHandler<RequestJob>>(
isolate, request_context_getter.get(), handler);
if (!job_factory->InterceptProtocol(scheme, std::move(protocol_handler)))
return PROTOCOL_INTERCEPTED;
return PROTOCOL_OK;
@@ -187,13 +184,9 @@ class Protocol : public mate::TrackableObject<Protocol> {
// Convert error code to string.
std::string ErrorCodeToString(ProtocolError error);
AtomURLRequestJobFactory* GetJobFactoryInIO() const;
base::WeakPtr<Protocol> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
base::WeakPtr<Protocol> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter_;
scoped_refptr<AtomBrowserContext> browser_context_;
base::WeakPtrFactory<Protocol> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(Protocol);

View File

@@ -21,8 +21,8 @@ namespace {
bool IsWebContents(v8::Isolate* isolate, content::RenderProcessHost* process) {
content::WebContents* web_contents =
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->
GetWebContentsFromProcessID(process->GetID());
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
->GetWebContentsFromProcessID(process->GetID());
if (!web_contents)
return false;
@@ -41,8 +41,7 @@ RenderProcessPreferences::RenderProcessPreferences(
Init(isolate);
}
RenderProcessPreferences::~RenderProcessPreferences() {
}
RenderProcessPreferences::~RenderProcessPreferences() {}
int RenderProcessPreferences::AddEntry(const base::DictionaryValue& entry) {
return preferences_.AddEntry(entry);
@@ -54,7 +53,8 @@ void RenderProcessPreferences::RemoveEntry(int id) {
// static
void RenderProcessPreferences::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(
mate::StringToV8(isolate, "RenderProcessPreferences"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
@@ -65,10 +65,9 @@ void RenderProcessPreferences::BuildPrototype(
// static
mate::Handle<RenderProcessPreferences>
RenderProcessPreferences::ForAllWebContents(v8::Isolate* isolate) {
return mate::CreateHandle(
isolate,
new RenderProcessPreferences(isolate,
base::Bind(&IsWebContents, isolate)));
return mate::CreateHandle(isolate,
new RenderProcessPreferences(
isolate, base::Bind(&IsWebContents, isolate)));
}
} // namespace api
@@ -77,8 +76,10 @@ RenderProcessPreferences::ForAllWebContents(v8::Isolate* isolate) {
namespace {
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
mate::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("forAllWebContents",
&atom::api::RenderProcessPreferences::ForAllWebContents);
@@ -86,5 +87,5 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_render_process_preferences,
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_browser_render_process_preferences,
Initialize)

View File

@@ -16,8 +16,8 @@ namespace api {
class RenderProcessPreferences
: public mate::Wrappable<RenderProcessPreferences> {
public:
static mate::Handle<RenderProcessPreferences>
ForAllWebContents(v8::Isolate* isolate);
static mate::Handle<RenderProcessPreferences> ForAllWebContents(
v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);

View File

@@ -7,6 +7,7 @@
#include <algorithm>
#include <string>
#include "atom/browser/api/atom_api_browser_window.h"
#include "atom/browser/browser.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "base/bind.h"
@@ -16,6 +17,10 @@
#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
#if defined(OS_WIN)
#include "ui/display/win/screen_win.h"
#endif
#include "atom/common/node_includes.h"
namespace atom {
@@ -25,9 +30,9 @@ namespace api {
namespace {
// Find an item in container according to its ID.
template<class T>
template <class T>
typename T::iterator FindById(T* container, int id) {
auto predicate = [id] (const typename T::value_type& item) -> bool {
auto predicate = [id](const typename T::value_type& item) -> bool {
return item.id() == id;
};
return std::find_if(container->begin(), container->end(), predicate);
@@ -79,6 +84,22 @@ display::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
return screen_->GetDisplayMatching(match_rect);
}
#if defined(OS_WIN)
static gfx::Rect ScreenToDIPRect(atom::NativeWindow* window,
const gfx::Rect& rect) {
HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr;
return display::win::ScreenWin::ScreenToDIPRect(hwnd, rect);
}
static gfx::Rect DIPToScreenRect(atom::NativeWindow* window,
const gfx::Rect& rect) {
HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr;
return display::win::ScreenWin::DIPToScreenRect(hwnd, rect);
}
#endif
void Screen::OnDisplayAdded(const display::Display& new_display) {
Emit("display-added", new_display);
}
@@ -96,15 +117,14 @@ void Screen::OnDisplayMetricsChanged(const display::Display& display,
v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate,
"Cannot require \"screen\" module before app is ready")));
isolate, "Cannot require \"screen\" module before app is ready")));
return v8::Null(isolate);
}
display::Screen* screen = display::Screen::GetScreen();
if (!screen) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Failed to get screen information")));
isolate->ThrowException(v8::Exception::Error(
mate::StringToV8(isolate, "Failed to get screen information")));
return v8::Null(isolate);
}
@@ -112,16 +132,19 @@ v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
}
// static
void Screen::BuildPrototype(
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
void Screen::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "Screen"));
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("getCursorScreenPoint", &Screen::GetCursorScreenPoint)
.SetMethod("getPrimaryDisplay", &Screen::GetPrimaryDisplay)
.SetMethod("getAllDisplays", &Screen::GetAllDisplays)
.SetMethod("getDisplayNearestPoint", &Screen::GetDisplayNearestPoint)
#if defined(OS_MACOSX)
.SetMethod("getMenuBarHeight", &Screen::getMenuBarHeight)
#if defined(OS_WIN)
.SetMethod("screenToDipPoint", &display::win::ScreenWin::ScreenToDIPPoint)
.SetMethod("dipToScreenPoint", &display::win::ScreenWin::DIPToScreenPoint)
.SetMethod("screenToDipRect", &ScreenToDIPRect)
.SetMethod("dipToScreenRect", &DIPToScreenRect)
#endif
.SetMethod("getDisplayMatching", &Screen::GetDisplayMatching);
}
@@ -134,8 +157,10 @@ namespace {
using atom::api::Screen;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("screen", Screen::Create(isolate));
@@ -144,4 +169,4 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
} // namespace
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_common_screen, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_common_screen, Initialize)

View File

@@ -16,7 +16,7 @@ namespace gfx {
class Point;
class Rect;
class Screen;
}
} // namespace gfx
namespace atom {
@@ -40,10 +40,6 @@ 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;

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