Граф коммитов

1258 Коммитов

Автор SHA1 Сообщение Дата
Shelley Vohr 40874ddec6
fix: update fs methods for options param (#15323)
* fix: update fs methods for options param

* fix: update rest of fs methods with changes
2018-10-23 15:14:05 -07:00
Cheng Zhao 260778e0fb feat: add MdTextButton to View APIs (#15328)
* view: make button focusable by default

* view: add MdTextButton

* view: add common methods to LabelButton
2018-10-23 10:57:13 -04:00
Cheng Zhao cb9be091aa refactor: remove potential double free when managing WebContents (#15280)
* refactor: remove -new-contents-created event

Chromium expects us to take ownership of WebContents in AddNewContents,
we should not create V8 wrapper in WebContentsCreated, otherwise we
would have WebContents being managed by 2 unique_ptr at the same time.

* refactor: make CreateAndTake take unique_ptr
2018-10-22 13:02:25 -05:00
Shelley Vohr f9f34fd628
fix: ability to fetch separators by id (#15290) 2018-10-19 13:09:40 -07:00
Samuel Attard 122017e6fa
fix: trim app name and productName (#15269)
Fixes #15245
2018-10-19 23:57:55 +11:00
Andy Dill 37f2113032 feat: expose setBackgroundThrottling api (#15104) 2018-10-19 11:32:22 +11:00
Eric 10db2bce4e fix: loading of devtools extensions on startup (#13844)
* Fix loading of devtools extensions on startup

The persisted DevTools Extensions were not being loaded correctly at startup. The `addDevToolsExtension` function was not defined when it was being called. An error was being thrown and ignored, so the whole thing would fail silently. I moved the code to load the extensions to the end of the event handler, so now it works.

* fixup: remove trailing spaces to unblock CI

* fixup: add logging when the Electron Enable Logging env var is set

* Fix linter error on undefined srcDirectory

* fixup: catch exception when loading extension

* Revert "fixup: catch exception when loading extension"

This reverts commit 42c2cf95bc.
2018-10-19 11:22:42 +11:00
Milan Burda db37ab1039 feat: add remote.require() / remote.getGlobal() filtering (#15014) 2018-10-18 14:36:45 +11:00
Milan Burda 508551b81b fix: small refactoring regressions (#15206)
* fix: require('@electron/internal/browser/guest-view-manager')

* fix: add missing crashServicePid used by tests
2018-10-17 12:18:18 -07:00
Adam Meyer d43ef97a7b add width to webview iframe (#15195) 2018-10-17 09:33:31 +09:00
Milan Burda 70c49b78ae fix: Memory > Profiles > Load in DevTools (#15151) 2018-10-14 17:30:49 +11:00
Milan Burda d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Heilig Benedek a82bcc7e3c refactor: move printing out of chromium_src (#15023)
* remove printing related things from chromium_src

* chore: add printing build flag and patch

* fix: include PrintingService on other platforms too

* fix: printing_handler is only needed on Windows

* fix: format BUILD.gn properly

* fix: rename printing build flag to avoid conflict with chromium

* fix: place previously missed printing calls behind build flag

* fix: accidentally renamed flag in patch file

* fix: don't include all printing strings

* fix: allow ShowItemInFolder and OpenItem to block, fixing a DCHECK crash

* fix: make things compile, some changes got lost while rebasing

* fix: remove rogue line from BUILD.gn

* chore: update patch description

* style: lint fix

* chore: use chromium printing buildflag, move node related stuff out of patch

* revert: remove ScopedAllowBlockingForTesting call

* fix: fix my rebase blooper

* fix: re-add header lost during rebase, update patch

* fix: add <map> include, tweak the patch a bit

* revert: remove rogue diff from patch

* fix: clean up after rebase
2018-10-13 12:57:04 +11:00
Felix Rieseberg d1b2d1a10e fix: Remove `statSyncNoException` for good (#15092)
* fix: Small JS assignment error

* fix: Call the right og method

* fix: Goodbye, statSyncNoException
2018-10-12 19:43:19 +11:00
Milan Burda 9177dbb584 refactor: use boolean for nodeIntegration / webviewTag (#15005) 2018-10-08 15:51:31 +02:00
Milan Burda b50f86ef43 refactor: use separate ipc-renderer-internal / ipc-main-internal APIs for Electron internals (#13940) 2018-10-07 00:48:00 +13:00
Robo 434a6e3561 refactor: create request context from network context (#14656)
* [ci skip] refactor: create request context from network context

* [ci skip] refactor: subscribe to mojo cookiemanager for cookie changes

* [ci skip] refactor: manage the lifetime of custom URLRequestJobFactory

* refactor: use OOP mojo proxy resolver

* revert: add support for kIgnoreCertificateErrorsSPKIList

* build: provide service manifest overlays for content services

* chore: gn format

* fix: log-net-log switch not working as expected

* spec: verify proxy settings are respected from pac script with session.setProxy

* chore: use chrome constants where possible

* fix: initialize request context for global cert fetcher

* refactor: fix destruction of request context getters

* spec: use custom session for proxy tests

* fix: queue up additional stop callbacks while net log is being stopped

* fix: Add CHECK for cookie manager retrieval

* chore: add helper to retrieve logging state for net log module

* fix: ui::ResourceBundle::GetRawDataResourceForScale => GetRawDataResource

* style: comment unused parameters

* build: move //components/certificate_transparency deps from //brightray

* chore: update gritsettings_resource_ids patch

* chore: update api for chromium 68

* fix: net log instance is now a property of session
2018-10-04 13:08:56 -05:00
Milan Burda 5efb0fdff1 feat: add security warnings to sandboxed renderers (#14869)
Also refactor not to use the remote module.
2018-10-03 21:36:12 +02:00
Cheng Zhao 4c4d8c5bfa fix: support ASAR in fs.copyFile (#14942) 2018-10-03 09:36:20 -07:00
Samuel Attard d628aad3bf
feat: remove needless mojave dark mode APIs and add instructions on how to use the macOS replacement (#14895) 2018-10-02 14:44:50 +10:00
Milan Burda 3ad3ade828 refactor: add prefer-const to .eslintrc + fix errors (#14880) 2018-10-02 11:56:31 +10:00
Milan Burda d48f9bcf7f refactor: implement <webview> methods via dedicated IPCs without the remote module (#14377) 2018-10-01 10:07:50 +09:00
Milan Burda ce38be74df refactor: simplify process object initialization for sandboxed renderers (#14878)
Also fix `process.windowsStore`.
2018-09-30 23:24:00 +02:00
Milan Burda c61db523c7 refactor: replace var with const / let (#14866) 2018-09-29 09:17:00 +10:00
Samuel Attard a524c5ec12
chore: move the view APIs to their own directory (#14722)
* chore: move the view APIs to their own directory

* move view api cpp files
2018-09-28 12:47:09 +10:00
Samuel Attard 0d2a0c7583 feat: add APIs to support mojave dark modes (#14755)
* feat: add APIs to support mojave dark mode

Closes #13387

* docs: fix system-prefs typo
2018-09-27 10:33:31 -05:00
Milan Burda b499d57cfd refactor: use error-utils for remote exception serialization / deserialization (#14788)
* refactor: use error-utils for remote exception serialization / deserialization

* fix internal process.type in sandboxed renderer
2018-09-26 15:44:55 +10:00
Milan Burda 3df739fa89 refactor: implement crashReporter.start() without the remote module (#14434) 2018-09-26 15:43:34 +10:00
Samuel Attard 176a76217c
chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
Samuel Attard 32a9df2940
refactor: clean up the default app implementation (#14719)
* Disable nodeIntegration
* Enable contextIsolation
* Re-implement the CSP security check to handle running in
contextIsolation
* Disable bad DCHECKS for the promise helper
* Remove the unused "-d" flag for the electron binary
* Added a way to hide the default help output for electron devs who
don't want to see it every time
2018-09-21 15:24:42 +10:00
Samuel Attard 54ef906832
[RFC] perf: use an internal module resolver to improve require performance (#14633)
* perf: use an internal module resolver instead of relative requires

* perf: memoize the results of getting exported Electron properties

* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00
Milan Burda e22142ef9c feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456) 2018-09-18 11:00:31 -07:00
Samuel Attard 6d01952e66
chore: replace standard with eslint-config-standard and add custom rules (#14636)
* chore: replace standard with eslint-config-standard

This adds support for --cache so linting JS only takes ~1 second and only lints things that changed

It also allows us to add custom linting rules

* chore: add eslint-plugin-mocha and enable the no-exclusive-tests rule

This will block anyone from pushing / merging a `.only` test or describe
2018-09-16 03:51:23 +10:00
Samuel Attard 558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Charles Kerr a3f7e298cf
refactor: remove unused, duplicated code in deprecate module (#14579)
* remove obsolete tests

 * remove unused deprecate API

 * make a warnOnce helper for the deprecate methods

 * misc. copyediting, e.g. variable names, whitespace

 * test that any deprecation warns once at most

 * use strict
2018-09-12 17:13:22 -05:00
Shelley Vohr a8a610cb34
chore: remove only on deprecations api spec (#14564)
* chore: remove only

* add option to ignore missing properties
2018-09-11 23:00:41 -07:00
Samuel Attard dde194d853 Remove the memory property from getAppMetrics
See 03d0bfd593 for more information
2018-09-11 20:24:03 +02:00
Samuel Attard 14df89f214 Remove the 'getProcessMemoryInfo' API
* Underlying APIs have been removed in Chromium
  * https://chromium-review.googlesource.com/c/chromium/src/+/969089
  * https://chromium-review.googlesource.com/c/chromium/src/+/953723
  * https://bugs.chromium.org/p/chromium/issues/detail?id=819289
* https://github.com/electron/electron/projects/11#card-11509601
2018-09-11 20:21:32 +02:00
Robo 14ed71fa1b fix: use render client id to track deleted render process hosts (#14520)
* fix: use render client id to track deleted render process hosts

Instead of relying on OS process id, which may not be unique
when a process is reused, we rely on the renderer client id
passed by the content layer when starting the renderer process
which is guaranteed to be unique for the lifetime of the app.

* fix: store context id as int64_t

Ensuring that it doesn't wrap easily with a large number
of context creation on some malformed web pages.
2018-09-11 11:18:10 -07:00
Shelley Vohr 2157d09956
chore: refactor deprecation apis (#14495) 2018-09-11 11:16:49 -07:00
Milan Burda 0821edc843 refactor: cleanup web-frame-init.js (#14516)
* refactor: add error-utils.js

* fix exception handling for asyncWebFrameMethods

* remove dead code

* handle exceptions

* rename rehydratedError to deserializedError

* Revert "handle exceptions"

This reverts commit 396b179948.
2018-09-11 19:56:00 +10:00
Milan Burda 38419e3a6a chore: address TODO for WebContents.prototype.setSize / reportRemovedAttribute removal (#14517)
* chore: remove WebContents.prototype.setSize

* chore: remove reportRemovedAttribute

* chore: remove unused fixtures
2018-09-11 17:58:57 +10:00
Milan Burda 58577bd431 feat: add options to webContents.loadFile (#14515) 2018-09-11 17:56:49 +10:00
Alexey Kuzmin 382afc03ae chore: clean up asar stuff (#14505)
* chore: reformat code

* refactor: getOrCreateArchive() for ASARs

 - store cached archive in a Map
 - return `null` instead of `false` on failures

* refactor: splitPath() for ASARs

 - store custom extension in a constant
 - remove magic numbers
 - add comments

* refactor: explicitly use assert() for a developer error

* chore: remove console.log() calls

* refactor: replace "p" arguments with "pathArgument"

"path" would be a better name, but it is already taken
but the "path" Node module.

* refactor: createError() for ASARs

 - return an `Error` instance
 - use enum for error types
 - minor improvements

* refactor: use more meaningful name for an arg than just "arg"
2018-09-10 08:29:19 -07:00
Milan Burda dcd580b6cf chore: remove app.makeSingleInstance / releaseSingleInstance (#14518) 2018-09-10 16:33:36 +10:00
Shelley Vohr 2963e377ae
refactor: clean up asar functionality (#14046) 2018-09-07 19:23:47 -07:00
Cheng Zhao 92e094c5f6 fix: manually manage WebContents of webview when it is detached 2018-09-07 15:47:58 +09:00
Charles Kerr c5820bfabb
fix: don't use deprecated fstatNoException API (#14463) 2018-09-06 13:06:32 -05:00
Shelley Vohr 9bf1fb323b
chore: add removeFunction to deprecate module (#14468)
* chore: add removeFunction function to deprecate api

* re-comment deprecate.member
2018-09-05 21:55:28 -07:00
Cheng Zhao 10176c71ff
fix: webview.focus() should move page focus to webview (#14427) 2018-09-03 11:41:54 +09:00