Commit graph

801 commits

Author SHA1 Message Date
Matthias Niess
254dcdaa45 add tray icon workaround for newer Ubuntu releases (fixes #9046) 2017-06-09 15:22:18 +02: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
Kevin Sawicki
53b6ee0e3f Merge pull request #9468 from tonyganch/9296-history-state
Remove page url check during `history.pushState`
2017-06-05 14:47:49 -07:00
Cheng Zhao
e82af41591 Merge pull request #9269 from electron/main-notifications
Notifications from the main process
2017-05-31 17:21:05 +09:00
Samuel Attard
3938373ecb
Fix linting errors and add isSupported 2017-05-30 20:27:24 +10:00
Kevin Sawicki
e735aa7dee web-preferences -> webPreferences 2017-05-26 10:10:36 -07:00
Kevin Sawicki
9ac2cf0d44 Add comment about disablePopups setting 2017-05-26 10:10:36 -07:00
Kevin Sawicki
dbd240a7cb Return null from native window.open when allowpopups is unset 2017-05-26 10:10:36 -07:00
Kevin Sawicki
4e9efebf47 🎨 2017-05-26 10:10:36 -07:00
Kevin Sawicki
47759a01de Only forward events when nativeWindowOpen is set 2017-05-26 10:10:36 -07:00
Kevin Sawicki
7baf472c0f Implement BrowserPluginGuestDelegate::CreateNewGuestWindow for nativeWindowOpen 2017-05-26 10:10:36 -07:00
Tony Ganch
3a9b035d36 Remove page url check in history.pushState
Current implementation of NavigationController does not allow using
`history.pushState()` if page url is not changed.
It worked by mistake in versions < 1.3.6 and got visible after fix 180a77e6.
2017-05-23 22:42:33 +02:00
Samuel Attard
5dd4d6a961
macOS implementation of notifications in the main process 2017-05-23 02:05:13 +10:00
Kevin Sawicki
9e88d337ec Inherit webviewTag setting from parent window 2017-05-17 13:37:23 -07:00
Thiago de Arruda
6b5bd3b6ce Fix how rpc-server releases references after page reload
In addition to listening for "render-view-deleted", listen for
"ELECTRON_BROWSER_CONTEXT_RELEASE" synchronous message, which is sent by the
remote module when the page is about to be navigated.

This is required to allow child windows running in the same renderer to
correctly manage remote object references, since `render-view-deleted` is only
called when the renderer exits.

Close #9387
2017-05-16 09:05:52 -03:00
Ryohei Ikegami
7ac93045b7 Merge branch 'master' into native-window-open 2017-05-11 13:51:43 +09:00
Darrell Ulm
fa2bfd3ff5 Add Math.ceil to pageSize.height and pageSize.width to printToPDF() options to prevent error on display. 2017-05-06 19:19:31 -04:00
Kevin Sawicki
eebae82bc1 Merge pull request #9315 from electron/segmented-control-mode
Add mode prop to segmented touch bar control
2017-05-04 14:16:28 -07:00
Samuel Attard
718dc732ad
Add docs and add isSelected arg 2017-05-03 20:25:50 +10:00
Kevin Sawicki
fa4ec11a12 Use isSameOrigin helper when posting message 2017-05-01 08:45:38 -07:00
deepak1556
5e976be43b remove page-title-updated workaround for #3380 2017-05-01 16:53:55 +09:00
Samuel Attard
225ccab3d2
Add mode prop to segmented touch bar control 2017-04-28 14:50:58 +10: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
Kevin Sawicki
a004cada7c Merge pull request #9095 from seanchas116/better-path-resolve
Search for module from app path when URL is not file protocol
2017-04-20 10:49:53 -07:00
Samuel Attard
11c7c107a9 add iconPosition property to touch bar buttons 2017-04-18 08:56:39 -07:00
Ryohei Ikegami
8dff29185b Merge branch 'master' into native-window-open 2017-04-18 21:59:22 +09:00
Birunthan Mohanathas
8b9f7e5b00 Implement initial, experimental BrowserView API
Right now, `<webview>` is the only way to embed additional content in a
`BrowserWindow`. Unfortunately `<webview>` suffers from a [number of
problems](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Awebview%20).
To make matters worse, many of these are upstream Chromium bugs instead
of Electron-specific bugs.

For us at [Figma](https://www.figma.com), the main issue is very slow
performance.

Despite the upstream improvements to `<webview>` through the OOPIF work, it is
probable that there will continue to be `<webview>`-specific bugs in the
future.

Therefore, this introduces a `<webview>` alternative to called `BrowserView`,
which...

- is a thin wrapper around `api::WebContents` (so bugs in `BrowserView` will
  likely also be bugs in `BrowserWindow` web contents)

- is instantiated in the main process like `BrowserWindow` (and unlike
  `<webview>`, which lives in the DOM of a `BrowserWindow` web contents)

- needs to be added to a `BrowserWindow` to display something on the screen

This implements the most basic API. The API is expected to evolve and change in
the near future and has consequently been marked as experimental. Please do not
use this API in production unless you are prepared to deal with breaking
changes.

In the future, we will want to change the API to support multiple
`BrowserView`s per window. We will also want to consider z-ordering
auto-resizing, and possibly even nested views.
2017-04-13 01:27:27 +03:00
Samuel Attard
bea56bbdc8 Update as per feedback 2017-04-04 13:51:38 -07:00
Samuel Attard
2fd62d090a Allow items to be assigned to multiple popovers 2017-04-04 13:51:33 -07:00
Samuel Attard
f05dfc74da Store parent popover in popover touch bar items 2017-04-04 13:51:13 -07:00
Kevin Sawicki
74a3a34caa Add spec for interaction event with escape item 2017-04-04 13:14:56 -07:00
Kevin Sawicki
bbadeb62ac Check that escape item is non-null before checking id 2017-04-04 13:12:29 -07:00
Kevin Sawicki
414540bfcb Support passing escape item to TouchBar constructor 2017-04-04 12:50:41 -07:00
Kevin Sawicki
b24b4212c5 Make escape item a property instead of setter 2017-04-04 12:50:41 -07:00
Kevin Sawicki
21c1ddffb3 Handle change and interaction events on escape items 2017-04-04 12:50:41 -07:00
Kevin Sawicki
591cd8d073 Update window via listener when escape item changes 2017-04-04 12:50:41 -07:00
Kevin Sawicki
d596d85288 🎨 2017-04-04 12:50:41 -07:00
Samuel Attard
60cc862031 Make everything pointer like 2017-04-04 12:50:41 -07:00
Samuel Attard
4d6b0fc01b Add a method to set the escape identifier on the touch bar 2017-04-04 12:50:41 -07:00
Kevin Sawicki
fdd36334e5 Match args style of other IPC handlers 2017-04-04 11:18:16 -07:00
Kevin Sawicki
7065123266 Wrap remote value being set as an arg 2017-04-04 11:18:16 -07:00
Kevin Sawicki
3e9014c371 Merge pull request #9099 from electron/certificate-trust
macOS: Add certificate trust API
2017-04-04 11:17:09 -07:00
Kevin Sawicki
2e32525e8f Make browser window optional 2017-04-04 10:49:10 -07:00
joshaber
2749ded062 Fix c&p error 2017-04-04 11:45:27 -04:00
Ryohei Ikegami
61fa8693d2 Merge branch 'master' into native-window-open 2017-04-04 20:54:37 +09:00
joshaber
e2bda3ca0f Use an options object for most of the params 2017-04-03 21:33:21 -04:00
Ryohei Ikegami
4a7eec8f2d Pass app path as command line argument 2017-04-04 09:36:01 +09:00
joshaber
0b7ffd094a Expose through the actual JS API too 2017-04-03 15:25:06 -04:00
Kevin Sawicki
fcb7cbc54a Check name directly instead of arguments length 2017-03-30 14:03:00 -07:00
Thiago de Arruda
b3cf00a19a Fix net module to accept non-string header values
This is required to be compatible with node.js http module.
2017-03-30 16:01:40 -03:00
Kevin Sawicki
57edc28b0d Merge pull request #8880 from mst128256/2814
Default menu items for 'Edit' and 'Window' #2814
2017-03-29 12:31:58 -07:00
Kevin Sawicki
8b4bf1f29e 🎨 2017-03-29 12:29:36 -07:00
mst128256
6ae198a625 Empty objects within default menu replaced by nulls 2017-03-29 12:50:31 +02:00
deepak1556
3ae62615f4 net: allow controlling redirects 2017-03-28 18:46:21 +05:30
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
mst128256
9e471d8f1c Added specs 2017-03-24 12:14:08 +01:00
Ryohei Ikegami
4e473897b7 Use === 2017-03-24 11:08:08 +09:00
Ryohei Ikegami
6f9dbd4e04 Merge branch 'master' into native-window-open 2017-03-24 00:11:43 +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
Kevin Sawicki
23b235c9c7 Default async to false when object is specified 2017-03-20 20:37:52 -07: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
f71353a4c5 Merge pull request #8939 from electron/expose-remote-to-sandbox
Expose remote module to sandbox
2017-03-17 09:41:59 -07:00
Thiago de Arruda
e9b955b9ec Use remote/fs to read preload script during sandboxed setup
Also expose the "fs" module to preload scripts, as a shortcut to
`require('electron').remote.require('fs')`
2017-03-16 14:23:00 -03:00
Kevin Sawicki
bc31f05404 highlightedStyle -> overlayStyle 2017-03-15 09:47:07 -07:00
Kevin Sawicki
2e0e4e69bb Drop on prefix from property names 2017-03-14 14:02:48 -07:00
Samuel Attard
a55cddaa53
Add more options 2017-03-14 18:57:57 +11:00
Kevin Sawicki
5e70adb511 Guard against only specifying select or highlight handler 2017-03-13 11:23:27 -07:00
mst128256
76ee7fda2b Fixed linting 2017-03-13 14:26:34 +01:00
Samuel Attard
a85ae27d68
Fix linting 2017-03-13 11:00:10 +11:00
Samuel Attard
25a231fc50
Initial NSScrubber implementation 2017-03-13 10:51:12 +11:00
Samuel Attard
bfe63d7a88
Fix linting 2017-03-10 17:56:26 +11:00
Samuel Attard
1c027c526b
Add segmented control implementation 2017-03-10 17:40:39 +11:00
Thiago de Arruda
44bd93589a Refactor electron exports to keep module list in separate files 2017-03-09 19:08:01 -03:00
mst128256
8aba640250 added default menu items for 'Edit' and 'Window' #2814 2017-03-09 16:01:33 +01:00
Kevin Sawicki
6240e30be1 Default hasUserGesture to false when null 2017-03-06 10:51:17 -08:00
Samuel Attard
095e79b043 Ensure the callback is a function when executing JS 2017-03-06 10:46:20 -08:00
Kevin Sawicki
2680ee9f8f Add support for setting TouchBarLabel text color 2017-03-03 15:14:51 -08:00
Kevin Sawicki
c349aeff80 Add initial touch bar specs 2017-03-03 14:00:39 -08:00
Kevin Sawicki
002369576f Add initial touch bar docs 2017-03-03 14:00:39 -08:00
Kevin Sawicki
81ecd4499c Make exported properties match class names 2017-03-03 14:00:39 -08:00
Kevin Sawicki
eb03ab561d Make config optional 2017-03-03 14:00:39 -08:00
Kevin Sawicki
ce12dcd3b4 Add live popover icon property 2017-03-03 14:00:39 -08:00
Kevin Sawicki
a34f9d3583 Support icon property to match MenuItem 2017-03-03 14:00:39 -08:00
Kevin Sawicki
d1edd80ef8 Use NSTouchBar itemForIdentifier to lookup existing item 2017-03-03 14:00:39 -08:00
Kevin Sawicki
8d716e8b17 Register item after validating 2017-03-03 14:00:39 -08:00
Kevin Sawicki
76f112ffc5 Only export TouchBar to start 2017-03-03 14:00:39 -08:00
Kevin Sawicki
5f9e9d4b36 Add move live updating properties 2017-03-03 14:00:39 -08:00
Kevin Sawicki
61aa9bbff4 Add support for spacer items 2017-03-03 14:00:39 -08:00
Kevin Sawicki
f153d08297 Support setting the initial/available colors 2017-03-03 14:00:39 -08:00
Kevin Sawicki
f9dd91d54d Add static helper to bind touch bar to window 2017-03-03 14:00:39 -08:00
Kevin Sawicki
51f1c5a557 Use SetTouchBar withe empty vector instead of DestroyTouchBar 2017-03-03 14:00:39 -08:00
Kevin Sawicki
d5dbe3676e Add window helpers to TouchBar class 2017-03-03 14:00:39 -08:00
Kevin Sawicki
98f5858b11 Initial support for dynamic properties 2017-03-03 14:00:38 -08:00
Kevin Sawicki
cbb6f8c33e Store event listeners in each TouchBar class 2017-03-03 14:00:38 -08:00
Kevin Sawicki
eff49ad19c Return early when touchBar is null 2017-03-03 14:00:38 -08:00
Kevin Sawicki
9bdca3bbfb Remove linter warnings 2017-03-03 14:00:38 -08:00
Samuel Attard
dd09c91cf2 initial work on updating touch bar item config without rerender 2017-03-03 14:00:38 -08:00
Samuel Attard
15dcc314d3 Export the TouchBar items as their own props on the electron main export 2017-03-03 14:00:38 -08:00
Samuel Attard
4f0caffc3b Fix JS linting 2017-03-03 14:00:38 -08:00
Samuel Attard
43cc5079d8 Implement group item 2017-03-03 14:00:38 -08:00
Samuel Attard
269d899a99 Implement popOver item type (woo hoo it worked) 2017-03-03 14:00:38 -08:00
Samuel Attard
c92c4138a8 Add Slider item type and add options to the button type 2017-03-03 14:00:38 -08:00
Samuel Attard
18c7c3ece8 Make label and colorpicker types work 2017-03-03 14:00:38 -08:00
Samuel Attard
7857c83ea1 Make dynamic buttons work along with click events 2017-03-03 14:00:38 -08:00
Kevin Sawicki
7a99f0435b Fix typo in comment 2017-02-28 08:45:39 -08:00
Kevin Sawicki
bb1a981a01 Mention variable name to update 2017-02-28 08:45:39 -08:00
Kevin Sawicki
e8a79cb88d Don't require browser process module from renderer
This can cause issues when it is accessed from the
require cache or module tree since the getters throw
errors when called.
2017-02-28 08:45:39 -08:00
Kevin Sawicki
1d84d83fd4 Forward webview visibility change events from browser process 2017-02-28 08:23:00 -08:00
Kevin Sawicki
739f3ed102 Popup pepper menu in owner browser window 2017-02-24 08:39:22 -08:00
Kevin Sawicki
c951e253c6 Default to focused window whenever param is null/undefined 2017-02-24 08:39:22 -08:00
Kevin Sawicki
3e05350d6b Check that window is non-null before accessing constructor prop 2017-02-24 08:39:22 -08:00
Kevin Sawicki
d0b07d5c36 Check that x is non-null 2017-02-22 10:49:25 -08:00
Kevin Sawicki
6a023dc4fe Add Menu.closePopup API on macOS 2017-02-22 10:30:28 -08:00
Kevin Sawicki
4430927f98 Add async option to menu.popup 2017-02-22 10:30:28 -08:00
deepak1556
71fd3e807c use sync zoom api with guest view manager webpreferences 2017-02-18 01:34:32 +05:30
deepak1556
203a920c64 fix signature of zoom getter apis 2017-02-18 01:34:32 +05:30
Samuel Attard
17fe5efa13 Fix linting 2017-02-13 08:23:53 -08:00
Samuel Attard
e45d8079b8 Add support for a noResolveAliases property 2017-02-13 08:23:53 -08:00
deepak1556
63c0e4cbb1 Add ZoomController to manager zoom changes for webcontents 2017-02-12 00:49:17 +05:30
deepak1556
b27c94368d webContents: set zoom levels with HostZoomMap 2017-02-12 00:49:17 +05:30
Kevin Sawicki
acedc3e726 Merge pull request #8584 from electron/new-webview-event
Add will-attach-webview event
2017-02-09 12:40:11 -08:00
Kevin Sawicki
941f6c63e3 🎨 Use embedder var for clarity 2017-02-09 11:48:45 -08:00
Kevin Sawicki
a7c050107b Remove guest from will-attach-webview event 2017-02-09 11:47:45 -08:00
Kevin Sawicki
8b0d3a2567 Emit attach params as well in event 2017-02-09 11:45:07 -08:00
Kevin Sawicki
46f1a49594 new-webview -> will-attach-webview 2017-02-09 11:45:07 -08:00
Kevin Sawicki
7eda8fbdfb Add new-webview event that can be prevented 2017-02-09 11:45:07 -08:00
Kevin Sawicki
5130ad24eb 🎨 2017-02-09 11:30:17 -08:00
Kevin Sawicki
f7f4de36af Merge remote-tracking branch 'origin/master' into macos-open-save-panel 2017-02-09 11:25:05 -08:00
Kevin Sawicki
867bb5a94e Add DialogSettings helper struct 2017-02-09 10:13:11 -08:00
Birunthan Mohanathas
c8c11e68c6 Add support for checkbox with dialog.showMessageBox
This adds the `checkboxLabel` and `checkboxChecked` options to display a
checkbox in the message box. Fixes #6048.
2017-02-09 09:03:54 -08:00
Tan Wang Leng
347dc835b5 Fix code formatting 2017-02-09 21:51:11 +08:00
Tan Wang Leng
9423143211 Change the default value of showsTagField to true
The default value of showsTagField in macOS's NSSavePanel is true.

Therefore, in order to follow the standard behavior and not break
backwards-compatibility, let's change the default value of
showsTagField to true.

Reference:
https://developer.apple.com/reference/appkit/nssavepanel/1525589-showstagfield?language=objc
2017-02-09 21:01:40 +08:00
Tan Wang Leng
36209ddd90 🍎 Add additional options for Mac's open dialog
Support an additional attributes available in macOS's NSOpenPanel:
message.
2017-02-09 20:10:57 +08:00
Tan Wang Leng
1d612a12a1 🍎 Add additional options for Mac's save dialog
Support additional attributes available in macOS's NSSavePanel: message,
nameFieldLabel and showsTagField
2017-02-09 20:10:57 +08:00
Kevin Sawicki
70178adb6e Use object for verification request 2017-02-08 11:59:43 -08:00
Kevin Sawicki
5245d42d15 Only document deprecation for now 2017-02-08 11:59:43 -08:00
Greg Nolle
e29b64a18a modify CertVerifier Class
* respond to multiple similar verification requests.
* accept net error result as callback response.
2017-02-08 11:59:43 -08:00
Cheng Zhao
3024d0563f There were new defaultPrintingSetting fields added 2017-02-06 10:34:29 -08:00
Kevin Sawicki
fb08f56fc8 Add forcereload menu item role 2017-02-03 09:39:41 -08:00
Kevin Sawicki
9fef6a1fd7 Add support for FOS_CREATEPROMPT option 2017-02-02 08:51:10 -08:00
Kevin Sawicki
56a8eb3a94 Check that sender is a WebContents instance 2017-01-25 12:36:55 -08:00
Charlie Hess
ddedcf22d1 Move console.warn inside the helper method. 2017-01-25 12:36:55 -08:00
Charlie Hess
f6410d3b77 Assert that listener count decreases after a remove event. 2017-01-25 12:36:55 -08:00
Charlie Hess
c213971a2d Write a warning instead of crashing. 2017-01-25 12:36:55 -08:00
Charlie Hess
bc2f1e8199 Argh. 2017-01-25 12:36:55 -08:00
Charlie Hess
63d8137da2 Use EventEmitter public methods instead of _events. 2017-01-25 12:36:55 -08:00
Kevin Sawicki
45986405b8 Assert remote event names 2017-01-25 12:36:55 -08:00
Charlie Hess
a0b24bd155 Simplify. 2017-01-25 12:36:55 -08:00
Charlie Hess
67f7a60524 Review CommentZ 2017-01-25 12:36:55 -08:00
Charlie Hess
41ea169784 L I N T I N G P T I I 2017-01-25 12:36:55 -08:00
Charlie Hess
49c6446267 L I N T I N G 2017-01-25 12:36:55 -08:00
Charlie Hess
26e3ad3c2e Display more information about remote event crashes.
If possible, we'll dig into the function args and print the ones that are attached remotely.
2017-01-25 12:36:55 -08:00
Kevin Sawicki
d6eb0d6629 Implement insertCSS on webFrame 2017-01-19 09:05:59 +02:00
Kevin Sawicki
de4be56b09 Use internal open event name with fully parsed options 2017-01-16 12:38:16 -08: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
Javan Makhmali
a64bdbd306 Add "context-menu" DOM event to <webview> 2017-01-13 17:04:09 -05:00
Kevin Sawicki
1944fdc962 Track visited parents and null out cycles 2017-01-06 09:58:40 -08:00
Kevin Sawicki
5f862effaa Access directly on options object 2017-01-06 09:17:32 -08:00
Kevin Sawicki
eb533e04b9 Add option to normalize dialog access keys 2017-01-06 08:56:24 -08:00
Kevin Sawicki
2bd8ef83d1 Use != null to handle undefined 2016-12-12 16:25:56 -08:00
Daniel Pham
4b53cd9c3c 🐛 Allow buttons to be optional in 'showMessageBox' 2016-12-12 13:25:32 -05:00
Kevin Sawicki
820fb3b82b Guard against no devtools web contents 2016-12-06 10:36:59 -08:00
Kevin Sawicki
635c909aab Implement window.alert/confirm/close in main process 2016-12-02 13:40:31 -08:00
Kevin Sawicki
ec43dd067c Co-locate with other private methods 2016-12-02 10:41:42 -08:00
Kevin Sawicki
f3d391e3f2 Don't clear until render view is deleted for process id 2016-12-02 10:41:42 -08:00
Kevin Sawicki
07f99c06ea Don't write back to passed in options object 2016-12-01 17:16:18 -08:00
Kevin Sawicki
af555bd879 Use spread syntax instead of apply 2016-12-01 14:56:00 -08:00
Kevin Sawicki
c8ff67ab75 Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
Kevin Sawicki
36371357cd buttonLabel -> Button label for consistency 2016-12-01 14:16:33 -08:00
Kevin Sawicki
3a29555772 Access URL through webContents directly 2016-11-28 10:56:23 -08:00
Cheng Zhao
bbaab755e3 Merge pull request #8049 from electron/prevent-remove-all-ipc
Throw an error when users attempt to remove all listeners from the IPC modules
2016-11-27 14:29:49 +08:00
Kevin Sawicki
0134d62681 Always use guest contents for canAccessWindow check 2016-11-23 12:01:09 -08:00
Kevin Sawicki
9a5df9da41 Expose setVisualZoomLevelLimits on webContents and <web-view> 2016-11-22 08:07:55 -08:00
Samuel Attard
db729b5b52
Throw an error when users attempt to remove all listeners from the IPC modules 2016-11-22 18:30:58 +11:00
Paul Betts
e2649ce7d8 Add new method to set layout-based zoom level limit 2016-11-21 14:59:55 -05:00
Kevin Sawicki
996ddba715 Add rpc error for ELECTRON_BROWSER_MEMBER_GET 2016-11-17 12:29:23 -08:00
Kevin Sawicki
88959079bd Add toggledevtools menu item role 2016-11-17 10:57:20 -08:00
Kevin Sawicki
0698b5f1be Add reload menu item role 2016-11-17 10:57:20 -08:00
Kevin Sawicki
28c39d5151 Merge pull request #8003 from electron/missing-remote-object-error
Throw custom error when remote object is missing from registry
2016-11-17 10:57:03 -08:00
Kevin Sawicki
5427ec4844 Negate code as per node docs 2016-11-17 10:22:29 -08:00
Kevin Sawicki
aef898ad93 Set errno on RPC error 2016-11-17 10:09:29 -08:00
Kevin Sawicki
c05ca68811 Throw custom error when remote object is missing from registry 2016-11-17 09:55:13 -08:00
Cheng Zhao
3834f0c6a6 Merge pull request #7974 from electron/chrome-runtime-response-callback
Implement chrome.runtime.onMessage response callback
2016-11-17 13:01:38 +09: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
Samuel Attard
01005688b6
Implement chrome.runtime.onMessage response callback 2016-11-15 21:30:40 +11: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
Kevin Sawicki
133ad6e18b Only set size and load URL on first attach 2016-11-07 13:42:36 -08:00
Kevin Sawicki
a737732521 Only remove guest from embedder when view id changes 2016-11-07 13:42:36 -08:00
Kevin Sawicki
73774f21b7 🎨 2016-11-07 08:28:02 -08:00
Kevin Sawicki
3c18de9c5a Only return when guestInstance is non-null 2016-11-07 08:25:01 -08:00
Kevin Sawicki
76f96bd99c Destructure requires 2016-11-07 08:25:01 -08:00
Kevin Sawicki
48bcad87c2 Use template strings 2016-11-07 08:25:01 -08:00
Kevin Sawicki
712b15286c Use let/const instead of var 2016-11-07 08:25:01 -08:00
Kevin Sawicki
3053be345b Remove unneeded returns 2016-11-07 08:25:01 -08:00
Kevin Sawicki
8e203592e2 🎨 Remove extra returns 2016-11-03 09:51:01 -07:00
Samuel Attard
9f18a6e65c Use ES6 template strings, fix docs and remove _ERROR_ IPC event 2016-11-03 09:33:47 -07:00
Samuel Attard
857e1da6a3 Make executeJavaScript return a Promise so that caught errors can be sent to the caller 2016-11-03 09:33:47 -07:00
Brendan Forster
651b0c0f82 fixed a couple of typos 2016-10-31 08:59:26 -07:00
Cheng Zhao
dfefa00a50 Merge pull request #7577 from thomsonreuters/net_module
net module
2016-10-31 10:31:56 +09:00
ali.ibrahim
bdb3f4d4cb Fixing code review issues: adding some test cases for partition/session options. 2016-10-25 16:19:26 +02:00
ali.ibrahim
b44d5290e2 Fixing code review issues: adding a partition options and making the session option only takes Session objects. 2016-10-25 15:47:54 +02:00
ali.ibrahim
61278f9ace Fixing code review issues. 2016-10-25 12:41:01 +02:00
Kevin Sawicki
3aad6a0c99 Use forEach and destructuring for parsing features 2016-10-25 10:31:50 +09:00
Paul Frazee
f35536bdc5 factor out parse-features-string.js 2016-10-24 20:21:42 -05:00
ali.ibrahim
7f8b180f70 Fixing authentication cancel with null/undefined credentials. 2016-10-20 11:43:26 +02:00
ali.ibrahim
c198828e58 Adding gc tests: fixing a memory leak with C++ URLRequest objects. 2016-10-17 19:02:25 +02:00
Paul Frazee
e7962c7ba2 fixes and tests for webview 'webpreferences' attr 2016-10-14 18:04:33 -05:00
Paul Frazee
194b14100e add the 'webpreferences' attribute to webviews 2016-10-14 17:16:39 -05:00
ali.ibrahim
0e13b8dd01 making the net module usable only after the ready event. 2016-10-14 17:57:37 +02:00
ali.ibrahim
6f5b0a28c5 Fixing code review issues: function call formatting, renaming JS member variables, refactoring response headers conversion. 2016-10-13 17:14:23 +02:00
Samuel Attard
a9d5699a52 Update standard to v8 to be inline with standard-markdown 2016-10-13 12:46:00 +11:00
ali.ibrahim
ae1c33b863 fixing linter issues. 2016-10-12 14:54:32 +02:00
ali.ibrahim
a5c508d2d7 Adding abort, webRequest interception and creation tests. 2016-10-12 14:54:31 +02:00
ali.ibrahim
4eb9fc1bb6 Adding chunked uploading test. 2016-10-12 14:54:29 +02:00
ali.ibrahim
9b94dfcbdc Adding basic http tests, fixing issues in ClientRequest constructor. 2016-10-12 14:54:29 +02:00
ali.ibrahim
42bae9d71d Making the HTTP response a full-fledged Readable stream. 2016-10-12 14:54:27 +02:00
ali.ibrahim
ec1fc5a17b Implementing error, close, finish, abort events management. 2016-10-12 14:54:24 +02:00
ali.ibrahim
42adb2afd4 Fixing lint-js issues. 2016-10-12 14:54:22 +02:00
ali.ibrahim
08947682b0 Implementing abort workflow, emitting error events. 2016-10-12 14:54:21 +02:00
ali.ibrahim
cbbc4376ca Adding support for upload chunked encoding. 2016-10-12 14:54:20 +02:00
ali.ibrahim
9498a5738a Refactoring net module, adding a ClientRequest and IncomingMessage classes. 2016-10-12 14:54:20 +02:00
ali.ibrahim
fcaf9cb031 Some code cleaning. 2016-10-12 14:54:19 +02:00
ali.ibrahim
f7525d7877 Adding support for POST requests. 2016-10-12 14:54:18 +02:00
ali.ibrahim
2b3b41d5f9 Implementing authentication callback. 2016-10-12 14:54:18 +02:00
ali.ibrahim
2d9d4af98d Implementing URLRequest API, getting response body. 2016-10-12 14:54:17 +02:00
ali.ibrahim
81eab9887b Adding URLResponse to emit response events, implementing status code. 2016-10-12 14:54:16 +02:00
ali.ibrahim
7521aeea09 Implement URLRequest::Delegate, handle thread sync. 2016-10-12 14:54:15 +02:00
ali.ibrahim
e8d4abe78f Adding net module and URLRequest class. 2016-10-12 14:54:15 +02:00
Zeke Sikelianos
d4a8a64ba7 Merge pull request #7498 from electron/custom-props-in-menu-item-constructor
Preserve custom properties passed to MenuItem constructor
2016-10-11 14:24:13 -07:00
Zeke Sikelianos
8aaf029e55 remove unused var 2016-10-10 15:38:27 -07:00
Zeke Sikelianos
b575055d7e inherit user-specific MenuItem properties more safely 2016-10-10 14:40:49 -07:00
Zeke Sikelianos
2cd10d339f remove duplicated prop copying 2016-10-10 11:07:01 -07:00
Samuel Attard
09e5035ab5
Default webPreferences to empty object always 2016-10-07 11:45:13 +11:00
Zeke Sikelianos
b7e078e98d sanitize MenuItem options 2016-10-06 14:37:13 -07:00
Zeke Sikelianos
16b3962b66 preserve custom properties passed to MenuItem constructor 2016-10-05 12:24:08 -07:00
Michael Vasseur
3dd41bc09a Fix errors 2016-10-05 11:46:55 +02:00