Commit graph

62 commits

Author SHA1 Message Date
Robo
52fe92d02e feat: Upgrade to Chromium 71.0.3578.98 (#15966) 2019-01-11 17:00:43 -08:00
Milan Burda
3f1d22759a refactor: use helpers for command-line parsing in renderer/init.js (#16239) 2019-01-03 11:22:34 -05:00
Cheng Zhao
897c6e93cb chore: simplify main world setup of contextIsolation (#16046) 2018-12-13 16:25:12 -05:00
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
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
Milan Burda
2337237d58 Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
Jeremy Apthorp
e6695cf2ec [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
Shelley Vohr
53bdf22c85
clang-format atom files 2018-04-18 20:48:45 -04: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
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
Thiago de Arruda
ef07e25f9d Make SetupMainWorldOverrides/isolated_world pure virtual.
Also implement stubs in AtomSandboxedRendererClient.
2017-04-08 11:12:18 -03:00
Thiago de Arruda
f751335bf9 Make DidCreateScriptContext/WillReleaseScriptContext pure virtual. 2017-04-08 10:58:13 -03:00
Thiago de Arruda
0227254774 Move DidClearWindowObject into RendererClientBase.
Also adapt AtomSandboxedRenderFrameObserver to forward DidClearWindowObject to
RendererClientBase.
2017-04-08 10:43:19 -03:00
Thiago de Arruda
91ee0ea740 Move AtomRenderFrameObserver into a separate module.
Also move SetupMainWorldOverrides into the AtomRendererClient class(since the
code there is specific to AtomRendererClient).
2017-04-08 10:29:05 -03:00
Thiago de Arruda
c3a8f665f2 Extract base class from AtomRendererClient
The new `RendererClientBase` class contains code that is not specific to node.js
integration with the renderer.
2017-03-27 18:49:55 -03:00
Cheng Zhao
e017e157ba Insert node integrations into WebWorker 2017-03-20 12:52:45 -07:00
Cheng Zhao
1709e74958 Fix crash when the main frame is replaced 2017-03-02 17:19:00 +09:00
Kevin Sawicki
2e7dbe6c6b Use patch worldScriptContext to get isolated context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
5b6397aaa6 Store context that API is running in to deliver IPC events 2017-01-16 12:38:16 -08:00
Kevin Sawicki
78e0b80dc7 Support IPC messages in isolated context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
d194a84ae4 Setup isolated context from AtomRenderFrameObserver 2017-01-16 12:38:16 -08:00
Kevin Sawicki
736befe90f Add initial support for loading into isolated world 2017-01-16 12:38:15 -08:00
Cheng Zhao
b57665330c Merge branch 'master' into chrome52 2016-07-21 05:34:36 -06:00
deepak1556
c8bf6edcc6 webcontents: replace deprecated navigation observers 2016-07-14 06:47:38 +05:30
Cheng Zhao
1ba3907038 Update to API changes of Chrome 52 2016-07-04 15:32:43 +09:00
Cheng Zhao
6755aa44f6 Initialize script context in DidClearWindowObject
Doing it in RunScriptsAtDocumentStart would somehow result in weird
results when webSecurity is off.
2016-05-30 16:34:28 +09:00
Cheng Zhao
134f9019eb Enable node integration for pages in devtools extension 2016-05-27 15:10:46 +09:00
Cheng Zhao
7e1f159185 Run content scripts at correct phase 2016-05-27 11:12:51 +09:00
Cheng Zhao
4fb9e20c33 Add API to set render process preferences 2016-05-27 08:51:02 +09:00
Cheng Zhao
7ba391da7c Update to API changes of Chrome 51 2016-05-23 10:59:39 +09:00
deepak1556
c9b314d43c renderer: generate net error strings when requested 2016-05-21 10:21:15 +05:30
Cheng Zhao
bb5b30b8a0 It is not allowed to run scripts in DidCreateDocumentElement 2016-05-13 11:12:01 +09:00
Cheng Zhao
ffcf609de1 Ensure only main frame get notifications 2016-02-02 23:44:33 +08:00
Cheng Zhao
4b67ff9534 Override WillReleaseScriptContext 2016-02-02 23:38:49 +08:00
Cheng Zhao
bd20b3f32a Rely on content switches for implementing experimental features 2016-01-07 12:49:00 +08:00
Cheng Zhao
16d23bbda5 Remove pageVisibility option
The original purpose of this option is not working anymore, also adds
docs on the current way to disable process backgrounding.
2016-01-07 12:28:20 +08:00
Cheng Zhao
c76db0ba1d Fix coding styles 2015-12-29 18:59:27 +08:00
Cyrille Lebeaupin
9d878ad6b2 Add widevine third party
Add 2 new command options to use widevine:
- widevine-cdm-path: Path to widevine plugin
- widevine-cdm-version: Version of the widevine plugin
2015-12-29 14:50:59 +08:00
Cheng Zhao
45491ca7ab Fix API changes 2015-09-03 17:50:23 +09:00
Cheng Zhao
ebedb60684 Insert node integration for all main frames 2015-08-31 21:59:13 +08:00
deepak1556
683917ae67 renderer: option to override page visiblity state 2015-06-04 14:40:13 +05:30
Cheng Zhao
01e891652f Fix compilation errors 2015-05-22 15:24:34 +08:00
Cheng Zhao
c82d21b39f Add AtomRenderFrameObserver 2015-05-22 15:01:13 +08:00
deepak1556
3fdc4543b8 ppapi flash plugin support 2015-05-10 09:22:09 +05:30
Cheng Zhao
12d5474077 Fix webview for the new API 2015-03-18 09:57:46 +08:00
Cheng Zhao
de99c38fb6 Get rid of AtomRenderFrameObserver 2015-01-23 20:51:19 -08:00
Cheng Zhao
91320a9e55 Remove AtomRendererBindings
After the simplification of code this class is no longer needed.
2015-01-23 20:43:38 -08:00
Cheng Zhao
ef15b670a9 Initialize node integration after window object is cleared 2015-01-21 16:40:19 -08:00
Cheng Zhao
706f547287 Don't insert node symbols in frames
This greatly simplified our code, and it is not useful to enable node
integrations in frames.
2015-01-21 15:42:57 -08:00
Cheng Zhao
f142f572c3 Add DidClearWindowObject for renderer client 2015-01-21 15:35:43 -08:00