Commit graph

732 commits

Author SHA1 Message Date
Cheng Zhao
c7aa747891 chore: no need to expose Initialize of ipc module (#16066) 2018-12-14 08:01:29 -08:00
Cheng Zhao
8584c2f14b
fix: register webview in main world when using contextIsolation (#16067) 2018-12-14 15:38:35 +09:00
Cheng Zhao
897c6e93cb chore: simplify main world setup of contextIsolation (#16046) 2018-12-13 16:25:12 -05:00
deepak1556
e1336d8453 chore: fix v8 deprecation warnings 2018-12-03 20:07:43 +05:30
Shelley Vohr
c51fef1568 fix: use url::AddCORSEnabledScheme 2018-12-03 20:07:41 +05:30
Samuel Attard
5798b152a6 chore: check GetAgent as GetTracingController() crashes if no agent is set 2018-12-03 20:07:41 +05:30
Samuel Attard
9c36576ddd chore: SetTracingController becomes SetAgent and corresponing contructions updated 2018-12-03 20:07:41 +05:30
deepak1556
b5b49c9ed0 FIXME: Remove SchemeRegistry::RegisterURLSchemeAsCORSEnabled
https://chromium-review.googlesource.com/c/chromium/src/+/1157364
2018-12-03 20:07:40 +05:30
deepak1556
66349261a5 fix: update to per context v8::Script::Compile api 2018-12-03 20:07:39 +05:30
Samuel Attard
74d1685523 chore: fix ShouldFork impl, referrer stripping has been removed
refs: https://chromium-review.googlesource.com/c/chromium/src/+/1124329
2018-12-03 20:07:38 +05:30
Milan Burda
07f8f5f95a refactor: eliminate duplicate code exposing process APIs (#15824) 2018-11-28 11:08:17 -05:00
Milan Burda
81e00d8e56 chore: fix V8 deprecation warnings (#15842) 2018-11-27 16:42:02 -05:00
Samuel Attard
0b0a17ff91 fix: load the chrome.* API on chrome-extension pages in sandbox mode (#15563)
With mixed sandbox enabled we need to load the chrome.* APIs in the
sandbox init.js so that chrome extensions load correctly.

This mirrors the equivilant impl in `atom_renderer_client.cc`

Fixes #15561
2018-11-21 12:56:58 -05:00
Jeremy Apthorp
0642be296d
fix: crash in sandbox on linux when getting execPath (#15701) 2018-11-15 12:59:01 -08:00
Robo
82322968a3 refactor: printing implementation (#15143)
* refactor: basic printing

* move build files to chromium_src/BUILD.gn
* remove dependency on chrome prerender sources

* spec: move printing specs behind feature flag

* build: register pdf compositor service
2018-11-09 14:42:34 +11:00
Michelle Tilley
2a8e8a0603 fix: make certain values on process read-only (#15628)
* docs: Add 'worker' as a possible value for `process.type`

* fix: make certain properties on `process` read only:

* `mas`
* `windowsStore`
* `versions.electron`
* `versions.chrome`
* `type`
* `pid`
* `sandboxed`
2018-11-08 10:28:06 -04:00
Milan Burda
f921df7ad1 chore: move spellcheck out of chromium_src (#15407) 2018-10-26 10:34:57 -07:00
Cheng Zhao
2f3a8ecd42
fix: child window with nativeWindowOpen should disable node integration (#15213)
* fix: child window with nativeWindowOpen should disable node integration

* Revert "fix: do not enable node integration in child window if not enabled (#15076)"

This reverts commit 0252d7686c.

This patch is not needed anymore since we are force disabling node integration
for child windows.
2018-10-25 15:31:07 +09:00
Milan Burda
8ba271efba refactor: eliminate brightray (#15240) 2018-10-24 12:49:10 +02:00
Nitish Sakhawalkar
a9ca152069 feat: Spellchecker Async Implementation (#14032)
* feat:Spellchecker Async Implementation

* Adhere to chromium style

* Updating dependency to use gh branch

* Update docs and electron-typescript-definitions module

* Fix lint

* Update electron typescript definitions version

* Update spec

* Address review
2018-10-18 11:11:53 -05:00
Cheng Zhao
0252d7686c
fix: do not enable node integration in child window if not enabled (#15076) 2018-10-16 18:10:03 +09:00
Andy Dill
89bf71e580 fix: preserve background color through reload (#15105)
* fix: preserve background color through reload

* fix: only set backgroundColor on top-level frames
2018-10-14 10:59:47 -07: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
Heilig Benedek
95696c9456 refactor: move text-to-speech out of chromium_src (#15024)
* chore: add tts patch and buildflag, makes tts work again

* chore: add tts patch and buildflag, makes tts work again

* fix: make things compile

* build: add relevant tts files for linux

* fix: update patch and patch description, should now compile on mac

* build: move chrome specific sources under chromium_src:chrome target

* build: enable_extensions again

We are depending on them, check `//electron/chromium_src:chrome` target
for more info.

* fix: update tts.patch to receive notifications about browser context destruction

* fix: extend browser process from chrome layer

The global state g_browser_process is shared between //chrome
and //electron.

* spec: add basic speech synthesis test

* spec: skip speech tests on ci

* build: fix compilation on windows
2018-10-11 08:52:12 -05: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
Jeremy Apthorp
7a043a800d ExecuteScriptInIsolatedWorld is single-script only 2018-10-04 00:12:54 +02:00
Jeremy Apthorp
de581ca0b4 PathService -> base::PathService 2018-10-04 00:12:54 +02:00
Robo
a24ad6bc14 build: define compile time features with buildflag header (#14840)
* build: define compile time features with buildflag header

* refactor: switch to BUILDFLAG(ENABLE_DESKTOP_CAPTURER)

* refactor: switch to BUILDFLAG(ENABLE_RUN_AS_NODE)

* refactor: switch to BUILDFLAG(ENABLE_OSR)

* refactor: switch to BUILDFLAG(ENABLE_VIEW_API)

* refactor: switch to BUILDFLAG(ENABLE_PEPPER_FLASH)

* refactor: switch to BUILDFLAG(OVERRIDE_LOCATION_PROVIDER)

* refactor: switch to BUILDFLAG(ENABLE_PDF_VIEWER)
2018-10-01 16:00:53 -04: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
Aleksei Kuzmin
7fc3bcaa02 chore: run clang-format
- atom/
 - brightray/
 - chromium_src/
2018-09-19 17:18:10 +02:00
Milan Burda
e22142ef9c feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456) 2018-09-18 11:00:31 -07:00
Charles Kerr
d663b4eaee
fix: fix gn cpplint warnings (#14583)
* chore: fix cpplint 'include_what_you_use' warnings

Typically by including <memory>, <utility> etc.

* chore: fix 'static/global string constant' warning

Use C style strings instead of std::string.

Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

/home/charles/electron/electron-gn/src/electron/script/cpplint.js

* refactor: remove global string variables.

Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.

The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

* fix: initializer error introduced in last commit

* fix: remove WIP file that was included by accident

* fix: include order

* fix: include order

* fix: include order

* fix: include order, again
2018-09-12 19:25:56 -05:00
Robo
f76a8c7b24 build: [m67] enable widevine support (#14519)
* build: [m67] enable widevine support

* fix: remove plugin cache reset hack

It was added in (#8907) to make widevine cdm shows up in
navigator.plugins, since widevine support is no longer
enabled by a plugin it can be removed safely.
2018-09-11 20:24:04 +02:00
deepak1556
ba0a1cc5e9 build: guard widevine related code behind flag 2018-09-11 20:24:04 +02:00
Samuel Attard
0b2b44becf Handle unknown symbols for media:: method
small implementation so instead of exposing with patch, copy impl

This will be fixed once we remove chromium_src as a thing from e/e
2018-09-11 20:24:03 +02:00
Samuel Attard
8a6fccf3d1 [GURL] (1 of 2) Prep for stripping "username:password" from internal schemes
https://chromium-review.googlesource.com/c/chromium/src/+/978450
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
Aleksei Kuzmin
0afebdc531 The Great Blink mv for source files, part 2.
https://chromium-review.googlesource.com/1001153
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
Robo
c7c95fab2f build: [gn] widevine cdm support behind flag (#14423)
* build: [gn] widevine cdm support behind flag

* build: [gyp] link cdm_support in the component build
2018-09-05 16:00:37 -05:00
Milan Burda
c17a1b37ea feat: add event.senderId property to IPCs sent via ipcRenderer.sendTo (#14395) 2018-08-31 20:13:51 -05:00
Robo
edd5c4b9bb fix: use OS process handle to clear object registry (#14324)
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 13:32:46 -05:00
Milan Burda
2a253c73db refactor: use std::string instead of base::string16 for IPC channel names (ipcRenderer.sendTo) (#14302) 2018-08-24 15:30:10 -07:00
Milan Burda
c23e7fa101 refactor: implement ipcRenderer.sendTo in native code for better performance (#14285) 2018-08-24 14:14:39 -07:00
Milan Burda
e6e3ccfc50 refactor: use std::string instead of base::string16 for IPC channel names (#14286) 2018-08-24 10:30:37 -05:00
Milan Burda
fc85d02786 feat: expose missing process APIs in sandboxed renderers (#13505) 2018-08-21 11:05:45 -07:00
Cheng Zhao
dd5b8769be fix: use OOPIF for webview tag (#13869)
* 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-16 15:57:40 -07:00
Milan Burda
702cc84bd3 Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031) 2018-08-10 17:19:49 -05:00
Shelley Vohr
9f328abe19 refactor: remove instances of createDeepCopy (#13703)
* add new native_mate converters for base::Value

* fix converter swapping

* remove createDeepCopy from browser/api

* replace missing ListValue converter

* convert bulk of remaining createDeepCopy instances

* convert last remaining instances of createDeepCopy

* incremental progress and helper methods for value conversion

* convert Get and add template function for GetString

* final DictionaryValue method conversions

* remove usage of base::DictionaryValue in web_contents_preferences

* use IsEnabled helper where possible

* Update atom_api_web_view_manager.cc
2018-08-04 07:23:07 +10:00