Commit graph

381 commits

Author SHA1 Message Date
Birunthan Mohanathas
945fef8a5a Merge pull request #10483 from jublonet/fix-double-downloads
Use Squirrel.Windows --checkForUpdate
2017-09-27 20:26:24 +03:00
Shelley Vohr
c932871bb1
change default to null 2017-09-26 20:35:14 -04:00
Shelley Vohr
f49f7d65a5
remove check on items instance 2017-09-26 14:38:34 -04:00
Shelley Vohr
afe033a6e1
stray semicolon fml 2017-09-26 12:10:16 -04:00
Shelley Vohr
4753ada7a9
rewrite method with only id parameter 2017-09-26 12:05:45 -04:00
Shelley Vohr
5217718d7b
conform to linter standard 2017-09-26 09:50:47 -04:00
Shelley Vohr
ea42851c9b
add first pass at getMenuItemById 2017-09-26 09:47:13 -04:00
J.M
6442e6b5e8 Use Squirrel.Windows --checkForUpdate
Avoid downloading updates twice. Fix #5057.
2017-09-11 00:54:08 +02:00
Cheng Zhao
d233fc044a Pass dpiVertical and dpiHorizontal to print settings 2017-08-22 13:54:49 +09:00
Thiago de Arruda
1709b8e39d Fix sandbox crash when opening a background tab
When a link is clicked with the middle mouse button, chrome opens a window with
"background-tab" disposition. This is not currently handled in sandbox mode,
causing an api::WebContents to leak leading to eventual crash(since it has no
wrapper).

Also fix the event handler for "-add-new-contents" by having it call
`event.preventDefault()` when the window creation should be cancelled.
2017-08-15 09:55:39 -03:00
Samuel Attard
59e85c0f33 Fix stupid or check in scrubber defaults 2017-07-27 17:49:05 +10:00
Kevin Sawicki
959231f766 Merge pull request #9834 from shubham2892/input-type-file-treating-packaged-app-as-directory
Fix treat packaged app as directory
2017-07-18 10:21:07 -07:00
Shubham
b25a1d10a2 🍎 Add treatPackageasDirectory as an option 2017-07-18 10:13:25 -07:00
Cheng Zhao
5fbcb6ef4e Merge pull request #9396 from drulm/printtopdf-custom-pagesize
Add Math.ceil to pageSize.height and pageSize.width to printToPDF() o…
2017-06-26 14:48:44 +09: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
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
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
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
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
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
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
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