Commit graph

66 commits

Author SHA1 Message Date
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
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
Charles Kerr
e400585a0e Apply further ES6 bikeshedding 2018-03-13 17:09:47 +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
685948bcaa Parent's visibility trumps inherited 'show' option 2018-03-13 00:28:34 +09:00
Shelley Vohr
db6d84de74
don't inherit isBrowserView for spawned child windows 2018-02-01 00:09:37 -05:00
Kevin Sawicki
fc53ac3d38 Always register closed listeners 2017-07-17 11:55:16 -07:00
Kevin Sawicki
86b1deedfa Inherit enabled-sandbox in opened windows 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
e735aa7dee web-preferences -> webPreferences 2017-05-26 10:10:36 -07:00
Kevin Sawicki
4e9efebf47 🎨 2017-05-26 10:10:36 -07:00
Kevin Sawicki
9e88d337ec Inherit webviewTag setting from parent window 2017-05-17 13:37:23 -07:00
Ryohei Ikegami
7ac93045b7 Merge branch 'master' into native-window-open 2017-05-11 13:51:43 +09:00
Kevin Sawicki
fa4ec11a12 Use isSameOrigin helper when posting message 2017-05-01 08:45:38 -07:00
Ryohei Ikegami
1d73e84a29 Merge branch 'master' into native-window-open 2017-04-27 12:03:55 +09:00
Kevin Sawicki
507f60e33e Don't allow webPreferences to be overrideden in features string 2017-04-26 10:56:53 -07:00
Kevin Sawicki
91a1e5cdfe Store frame to guests in map 2017-04-26 10:14:11 -07:00
Kevin Sawicki
3e2a1034af Disable JavaScript on child when disabled on parent 2017-04-25 12:57:53 -07:00
Kevin Sawicki
6ec74060b4 Enable setting javascript and contextIsolation via window.open 2017-04-25 12:57:53 -07:00
Ryohei Ikegami
9edfbab89f Add comment why defaultPrevented = false 2017-03-28 19:58:58 +09:00
Ryohei Ikegami
de2019f6b8 Change webContents -> options.webContents 2017-03-28 19:58:23 +09:00
Ryohei Ikegami
4e473897b7 Use === 2017-03-24 11:08:08 +09:00
Ryohei Ikegami
deba6553f5 Better preventDefault for ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN 2017-03-23 23:51:33 +09:00
Ryohei Ikegami
d3252e0eb1 Reuse existing event 2017-03-21 16:09:53 +09:00
Ryohei Ikegami
076427673e Fix JavaScript style 2017-03-19 18:20:10 +09:00
Ryohei Ikegami
319a7759d0 Fix ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN handler 2017-03-19 17:52:39 +09:00
Kevin Sawicki
3f7b3c4bd7 Implement window overrides in main context 2017-01-16 12:38:16 -08:00
Kevin Sawicki
95054f443f Enable context isolation on child windows 2017-01-16 12:38:16 -08:00
Kevin Sawicki
1944fdc962 Track visited parents and null out cycles 2017-01-06 09:58:40 -08:00
Kevin Sawicki
c8ff67ab75 Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
Kevin Sawicki
3a29555772 Access URL through webContents directly 2016-11-28 10:56:23 -08:00
Kevin Sawicki
0134d62681 Always use guest contents for canAccessWindow check 2016-11-23 12:01:09 -08:00
Kevin Sawicki
651eaec64f Use sender.id instead of sender.webContents.id 2016-11-16 07:50:30 -08:00
Kevin Sawicki
92577c37c8 Don't log blocked messages when guestWindow is null 2016-11-16 07:50:30 -08:00
Cheng Zhao
18fca785c4 Print error messages 2016-11-16 07:50:30 -08:00
Cheng Zhao
a1066617a8 Do permission check when calling guest window methods 2016-11-16 07:50:30 -08:00
Kevin Sawicki
50019f39e9 🎨 2016-11-11 10:54:01 -08:00
deepak1556
5f596b22c7 specify content type depending on post data 2016-11-11 10:54:01 -08:00
deepak1556
2d7ceae320 fix js lint error 2016-11-11 10:53:00 -08:00
deepak1556
0410a184ce webContents: handle POST navigation for new windows 2016-11-11 10:53:00 -08:00
Samuel Attard
09e5035ab5
Default webPreferences to empty object always 2016-10-07 11:45:13 +11:00
Michael Vasseur
3dd41bc09a Fix errors 2016-10-05 11:46:55 +02:00
Michael Vasseur
9490ec7686 Fix JS Lint issues 2016-10-05 09:47:39 +02:00
Michael Vasseur
a2b3cf95a7 Sets correct openerId in mergeBrowserWindowOptions() to give correct options to 'new-window' event handler 2016-10-05 09:47:39 +02:00
Michael Vasseur
cc7f4fedf6 Rebase with recent changes 2016-10-05 09:47:39 +02:00
Michael Vasseur
3408c8038e Fix indentation 2016-10-05 09:47:38 +02:00
Michael Vasseur
5a4cdcfde1 'new-window' event handlers can return their window when default behavior is prevented 2016-10-05 09:46:54 +02:00
Michael Vasseur
c811188e22 Updated required code to handle missing additional features for popup windows 2016-10-04 14:38:32 +09:00
Thiago de Arruda
06cc9a44fe Add support for native chromium popups on sandboxed renderers.
- Allow `api::Window` instances to be created from existing `api::WebContents`.
- Override `WebContentsCreated` and `AddNewContents` to wrap renderer-created
  `content::WebContents` into `api::WebContents`.
- For `content::WebContents` that should be displayed in new windows, pass the
  wrapped `api::WebContents` object to window manager.
2016-09-27 06:01:46 -03:00