Commit graph

87 commits

Author SHA1 Message Date
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
Cheng Zhao
affa21600c Remove unnecessary methods on WebContentsPreferences 2018-02-13 15:57:54 +09:00
Emmanuel Kimmerlin
9c1b47361f Add an "affinity" option to webPreferences 2018-02-13 15:18:55 +09:00
Samuel Attard
b3234f634b Add ability to set arbitrary arguments in a renderer process (#11850) 2018-02-12 11:54:31 -06:00
Aleksei Kuzmin
971002a197 Switch to using scoped_ptr with UserData
https://codereview.chromium.org/2815913005
2017-11-24 10:58:16 +09:00
Kevin Sawicki
2cd49f3036 Merge pull request #9644 from electron/webview-sandbox
Enable sandbox on webview
2017-06-28 10:10:25 -07:00
Hari Juturu
421bf71b98 Adding no-sandbox to non sandbox webcontents 2017-06-13 18:45:24 -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
dc5221d551 Guard against null window like before 2017-06-06 17:02:23 -07:00
Birunthan Mohanathas
7d2226e05e Let Chromium manage document.visibilityState and document.hidden
Chromium already includes the necessary plumbing to manage the
visibility properties and `visibilitychange` event so this gets rid of
most of our custom logic for `BrowserWindow` and `BrowserView`.

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

User facing changes:

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

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

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

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

This should also fix #6860 (but not for `webview`).
2017-06-06 15:16:01 -07:00
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
Kevin Sawicki
dbd240a7cb Return null from native window.open when allowpopups is unset 2017-05-26 10:10:36 -07:00
rreimann
25015c4c63 Fix naming and formatting 2017-05-22 14:14:59 -07:00
rreimann
791486433d Extract common code into IsPreferenceEnabled method 2017-05-22 14:14:59 -07:00
rreimann
7982754958 Fix linting violations 2017-05-22 14:14:59 -07:00
rreimann
1b75e45a62 Suppress pdf plugin dispatch if plugins are disabled 2017-05-22 14:14:59 -07:00
Kevin Sawicki
bde13353fb Rename option to webviewTag and default to nodeIntegration value 2017-05-17 13:12:23 -07:00
Kevin Sawicki
837ea884de Merge remote-tracking branch 'origin/master' into enable-webview 2017-05-17 12:45:29 -07:00
Hari Krishna Reddy Juturu
3321f7d39c Changing command line option name 2017-05-08 17:27:31 -07:00
Hari Krishna Reddy Juturu
94d054cf11 Add option to override webview security 2017-05-06 22:10:42 -07:00
Ryohei Ikegami
37c4569982 Use GetBoolean directly 2017-03-28 20:00:33 +09:00
Ryohei Ikegami
6f9dbd4e04 Merge branch 'master' into native-window-open 2017-03-24 00:11:43 +09:00
Cheng Zhao
a49af26e39 Add nodeIntegrationInWorker option 2017-03-20 12:52:46 -07:00
Ryohei Ikegami
f3ce93f1bb Fix C++ style 2017-03-19 18:24:05 +09:00
Ryohei Ikegami
a1f9a45276 Use native window.open implementation 2017-03-19 17:41:20 +09:00
Ryohei Ikegami
f7935b429a Add WebContentsPreferences::IsNativeWindowOpenEnabled 2017-03-19 17:12:25 +09:00
deepak1556
07794a58aa use zoom factor webpreference option when required.
* When setzoomlevel is not called for the host.
* When there is no zoom preference for the host.
2017-02-12 00:49:17 +05:30
Kevin Sawicki
4de637779b Make int converter helper an instance method 2017-02-07 09:13:42 -08:00
Tan Wang Leng
7ec88d16a6 Use base::StringToInt() instead of std::stringstream 2017-02-07 09:05:55 -08:00
Tan Wang Leng
42f65c52fb 🐛 Fix webpreferences not accepting numeric options
The webpreferences attribute values are parsed as strings instead
of numbers. Therefore, a conversion is required.
2017-02-07 09:05:55 -08:00
Cheng Zhao
2e0780308c allowDisplayingInsecureContent is removed by Chrome 2017-02-06 10:34:29 -08:00
Cheng Zhao
497f5a1199 Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
Kevin Sawicki
3f7b3c4bd7 Implement window overrides in main context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
ad3b837ad5 Rename option to contextIsolation 2017-01-16 12:38:16 -08:00
Kevin Sawicki
4bca6fe672 Add isolated world web preference option 2017-01-16 12:38:15 -08:00
Kevin Sawicki
5d505f9139 Support cursive/fantasy default font families 2016-12-28 13:40:53 -08:00
Thiago de Arruda
c783ec72bc Add "sandboxed" option to "webPreferences".
When "sandboxed" is passed as a web preference for `BrowserWindow`, the newly
created renderer won't run any node.js code/integration, only communicating with
the system via the IPC API of the content module. This is a requirement for
running the renderer under chrome OS-level sandbox.

Beyond that, certain behaviors of AtomBrowserClient are modified when dealing
with sandboxed renderers:

- `OverrideSiteInstanceNavigation` no longer create a new `SiteInstance` for
  every navigation. Instead, it reuses the source `SiteInstance` when not
  navigating to a different site.
- `CanCreateWindow` will return true and allow javascript access.
2016-09-27 06:01:46 -03:00
Kevin Sawicki
6285500cdc Sort includes alphabetically 2016-08-26 15:30:02 -07:00
Cheng Zhao
ea8ea1543f Refactor osr_output_device 2016-08-03 13:06:38 +09:00
Cheng Zhao
aefd99ec7f Only enable kEnableBeginFrameScheduling for offscreen
It has effects on performance and only gets turned on after Chrome 54.
2016-08-03 10:40:12 +09:00
Heilig Benedek
0a349ef16c remove fpscounter, can be enabled from node 2016-07-31 05:13:29 +02:00
gellert
f60d791fa8 adds docs for osr 2016-07-31 00:22:34 +02:00
Heilig Benedek
0dbe4bc417 api base 2016-07-28 01:58:23 +02:00
gellert
0ad0c79202 adds beginframe scheduling 2016-07-25 19:58:14 +02:00
Cheng Zhao
8d3e09747a directWrite option is removed 2016-07-05 09:20:57 +09:00
Kevin Sawicki
ae71cf3df1 Add disableBlinkFeatures option 2016-06-07 13:42:42 -07:00
Cheng Zhao
dd804d7432 Enable specifying custom command line switches 2016-05-29 10:34:53 +09:00
Kevin Sawicki
4e44900930 Initialize guest_instance_id 2016-05-25 18:05:37 -07:00