Commit graph

655 commits

Author SHA1 Message Date
Samuel Attard
7b7def7d1e
feat: set app.enableRendererProcessReuse to true by default (#22336)
* feat: set app.enableRendererProcessReuse to true by default

* chore: add context aware info to breaking changes doc

* spec: fix nodeIntegration in child windows test for rendererprocessreuse

* spec: fix remote listeners in destroyed renderers spec as the error is now async

* Update api-browser-window-spec.ts

* chore: deprecate affinity

* chore: fix docs

* spec: handle tests crashing without an exist code

* spec: update tests for new rendererprocessreuse default

* spec: with renderer process re-use we get to destroy less views
2020-02-24 18:11:06 -08:00
Jeremy Apthorp
a061c87e56
feat: enable native extensions support (#21814) 2020-02-03 14:01:10 -08:00
Jeremy Apthorp
662b94f46e
docs: windows don't need to be retained (#21957) 2020-01-30 14:15:35 -08:00
Samuel Attard
edafbc43e1 Update browser-window.md (#21892) 2020-01-26 12:17:18 -08:00
Tony
5781850706 feat: custom positioning for traffic light buttons (#21781)
* feat: custom positioning for traffic light buttons

* remove NSLog and unnecessary call-site in IsVisible()

* no longer need to check if entering fullscreen

* change API to take a point object

Co-authored-by: tonyfwoo <55114329+tonyfwoo@users.noreply.github.com>
2020-01-23 10:13:08 -08:00
Martin
9636acb907 docs: update setAspectRatio documentation (#19945) 2020-01-17 20:35:27 +00:00
Shelley Vohr
2858471151
feat: remove visibleOnFullscreen option (#21706) 2020-01-10 09:11:38 -08:00
Victor Bennich
cf833a7650 feat: add win.getBackgroundColor() for macOS (#21448)
thanks @vbennich - great work on this 🌟
2019-12-13 11:08:30 -05:00
Samuel Attard
0cadf2846b
docs: remove string literal type from window events (#21235) 2019-11-21 11:12:03 -08:00
Bruce Auyeung
07b94ff578 docs: clarify uniqueness of WebContents.id, BrowserWindow.id (#21101) 2019-11-21 11:11:44 -08:00
Shelley Vohr
05de7277ab docs: fix win.setIcon ts type (#20950)
* docs: fix win.setIcon ts type

* test: update smoke tests
2019-11-05 13:47:08 -08:00
Erick Zhao
dcf6f046d9 feat: implement win.setAspectRatio() on Linux (#19516) 2019-11-01 09:22:07 -07:00
Samuel Attard
6bcf67e051
feat: enable builtin spellchecker (#20692)
* chore: add code required to use chromes spellchecker

* chore: fix linting

* chore: manifests needs buildflags now

* chore: add dictionarySuggestions to the context menu event when the spellchecker is active

* chore: enable by default for windows builds

* chore: add patch to remove incognito usage in the spellchecker

* chore: add dependencies on spellcheck common and flags

* chore: conditionally include spell check panel impl

* chore: fix deps for spellcheck feature flags

* chore: add patch for electron resources

* chore: add dependency on //components/language/core/browser

* chore: patches to make hunspell work on windows

* build: collect hunspell dictionaries into a zip file and publish

* chore: clean up patches

* chore: add docs and set spell checker url method

* chore: fix error handling

* chore: fix hash logic

* build: update hunspell filename generator

* fix: default spellchecker list to the current system locale if we can

* docs: document the language getter

* chore: patch IDS_ resources for linux builds

* feat: add spellcheck webpref flag to disable the builtin spellchecker

* chore: fix docs typo

* chore: clean up spellchecker impl as per feedback

* remove unneeded deps
2019-10-31 13:11:51 -07:00
Milan Burda
ead8f2bbcd fix: BrowserWindow.fromWebContents() can return null (#19983) 2019-09-27 13:07:55 +02:00
Charles Kerr
8a0a41b9ef docs: fix BrowserWindow options.hasShadow platform (#20038)
The docs claimed this is only available on macOS; however, Linux and Win
got this feature in 239bfe970c
2019-09-05 16:04:07 -04:00
Samuel Attard
137622931b
fix: ensure document.visibilityState aligns with the visibility of the TopLevelWindow (#19988)
* fix: ensure document.visibilityState aligns with the visibility of the
TopLevelWindow

* chore: disable the specs on linux on CI
2019-09-05 10:56:06 -07:00
Cem Schemel
bff16e027a docs: Improve wording of setBrowserView and getBrowserView (#20065)
* Improve wording of setBrowserView and getBrowserView

* Update wording based on feedback
2019-09-04 14:19:49 -07:00
Marat Abdullin
ae9424d93a feat: add "accessibleTitle" property to a BrowserWindow instance (#19698)
Sometimes it's necessary to convey more information about the window to screen reader users only (simply putting everything to the window title might be unnecessarily noisy).

For example, Chromium uses that technique to tell screen reader users that the window is in incognito mode (the incognito window looks differently and doesn't have «incognito» in the title, but for blind users the screen reader will announce that it's incognito).
2019-08-28 00:35:34 +02:00
Erick Zhao
145b4fae94 feat: implement will-move event on macOS (#19641) 2019-08-20 07:53:43 -07:00
Julien Isorce
680399f476 feat: Implement BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId) (#18926)
* feat: Implement BrowserWindow.moveAbove(mediaSourceId)

BrowserWindow.{focus,blur,moveTop}() are not enough in some
situations. For example when implementing an overlay that
follows another window that can lose focus. In that case
it is useful to move the overlay above the tracked window.

sourceId is a string in the format of DesktopCapturerSource.id,
for example "window:1869:0".

Notes: Added BrowserWindow.moveAbove(mediaSourceId)

https://github.com/electron/electron/issues/18922

* feat: Implement BrowserWindow.getMediaSourceId

Return the Window id in the format of DesktopCapturerSource's id.
For example "window🔢0".

https://github.com/electron/electron/issues/16460

Notes: Added BrowserWindow.getMediaSourceId
2019-08-15 15:51:15 +09:00
Shelley Vohr
ed3b69ffb1
docs: update hasShadow for win and linux (#19675) 2019-08-08 15:49:43 -07:00
Erick Zhao
8a9a5d69b6 fix: normalize behavior of win.setOpacity() for invalid number values across operating systems (#19535)
* fix: define behavior for out-of-bounds setOpacity

* fix linux issue

* fix getOpacity behaviour

* wrong variable

* normalize more stuff

* docs

* test: use ifdescribe helper

* Update spec-main/api-browser-window-spec.ts

Co-Authored-By: Charles Kerr <ckerr@github.com>

* fixes

* more tests!!!

* Update shell/browser/native_window_views.cc

Co-Authored-By: Charles Kerr <ckerr@github.com>

* Update shell/browser/native_window_mac.mm

Co-Authored-By: Charles Kerr <ckerr@github.com>
2019-08-07 16:17:32 +09:00
Samuel Attard
cfd230d7f1
docs: remove implicit 'any' and 'Object' types from the docs (#19585)
* docs: remove implicit 'any' and 'Object' types from the docs

* docs: more docs improvements, remove all remaining empty interfaces

* chore: update tests for better types
2019-08-05 10:45:58 -07:00
Erick Zhao
ceb64b3b1b docs: BrowserWindow transparency limitation on Windows (#19399)
* docs: BrowserWindow transparency limitation on Win

* fix md link
2019-07-29 11:22:31 -07:00
Micha Hanselmann
9da1251dbc add desc (#19417) 2019-07-29 11:21:56 -07:00
Shelley Vohr
6c9d40ec33
feat: emit always-on-top-changed on macOS (#19462)
* feat: emit always-on-top-changed on macOS

* update event emission test for macos
2019-07-26 22:25:51 -07:00
Samuel Attard
db3cf52add
docs: add support for readonly,deprecated and platform doc annotations (#19478) 2019-07-26 16:12:59 -07:00
Jeremy Apthorp
e58f8a79ee
test: move the TouchBar specs to the main process (#19413) 2019-07-25 11:30:42 -07:00
Jeremy Apthorp
9910507bc4 test: move BrowserView specs to main process (#19409) 2019-07-24 08:44:24 -07:00
Samuel Attard
b7f554f1dc
docs: make setBounds take a Partial<Rectangle> (#19416) 2019-07-23 23:51:22 -07:00
Erick Zhao
2c383b51c1 feat: add rotate gesture for macOS (#19294)
* feat: add rotate gesture for macOS

* docs: document change

* refactor: rename 'rotate' -> 'rotate-gesture'

* refactor: const float -> float

* forgot one 🤦‍♂️
2019-07-23 14:42:26 -05:00
Shelley Vohr
3395a1d4db
doc: improve EventEmitter md formatting (#19345) 2019-07-22 08:20:43 -07:00
Jeremy Apthorp
70857e9a5d test: move more BrowserWindow specs (#19290)
* test: move more BrowserWindow specs

* use async instead of setTimeout for cleaner code
2019-07-16 16:37:17 -07:00
Jeremy Apthorp
27599a851f test: move some BrowserWindow specs to the main process (#19182)
* test: move some BrowserWindow specs to the main process

* uncomment cross-site test

* move more tests

* re-enable, refactor and move visibilitychange specs

* move new-window event tests and re-enable them on mac

* move max/minimize event tests

* move modal tests

* move beginFrameSubscription tests

* move savePage test

* move BrowserWindow options argument is optional test

* move restore, unmaximize, fullscreen tests

* move parent window tests

* don't wait for show event on windows (#8664)

* add debugging logs to fullscreen tests

* more debugging on windows

* explicitly destroy browserviews to prevent crash during gc

* only await show on darwin

* more event timing fixes

* disable max/minimize event tests on linux, since they're broken on CI
2019-07-15 21:13:32 -07:00
Shelley Vohr
50f4977048
docs: differentiate static/instance class props (#19196) 2019-07-15 10:15:32 -07:00
Shelley Vohr
75a020e0ac
feat: expose new vibrancy types (#19073) 2019-07-11 14:10:45 -05:00
Julien Isorce
8b31953d40 feat: Can a window always on top but behind the taskbar on Win32 (#18982)
For now it only adds the ability to place the window below
the task bar while still being always on top.
Previous behaviour was always showing the window above the task
bar when top is true. We keep this default behaviour, i.e. when
the 'level' parameter is omitted.

https://github.com/electron/electron/issues/18933

Notes: Can set a window always on top but behind the taskbar on Windows
2019-07-10 09:40:11 -05:00
Jeremy Apthorp
c3ae476deb
test: move some browser window specs to the main process (#19089) 2019-07-08 15:44:37 -07:00
Julien Isorce
09c3277b42 feat: Implement BrowserWindow.setFocusable on macOS (#19033)
It was not implemented on Mac despite being available as a constructor
option. Implementation already exists on Windows. Linux case can be
separately.

https://github.com/electron/electron/issues/19032

Notes: Implemented BrowserWindow.setFocusable on macOS.
2019-07-08 11:34:18 +09:00
Shelley Vohr
43b4a3ae6a
chore: deprecate some NSVisualEffectMaterial types (#19072) 2019-07-03 14:56:03 -07:00
Alexandre Lacheze
2b3a256647 docs: precise that node integration is enabled in natively opened window if nodeIntegrationInSubFrames is true (#18156) 2019-06-25 21:03:23 -07:00
Charles Kerr
792f6b246c
docs: fix spelling and grammar errors (#18910) 2019-06-21 16:19:21 -05:00
Milan Burda
4575a4aae3 Revert "feat: only allow bundled preload scripts (#17308)" (#18091)
This reverts commit 8cf15cc931.
2019-06-20 08:39:12 +09:00
Shelley Vohr
a0b1f4fe0b
refactor: convert browser window state fns to props (#18618) 2019-06-04 22:44:16 -07:00
Samuel Attard
f80601da16
docs: ensure that optionality matches between documented params and signatures (#18613)
* docs: ensure that optionality matches between documented params and signatures

* docs: ensure that all optional declarations are lower case

* chore: fix broken link
2019-06-04 14:03:24 -07:00
Shelley Vohr
52c76d737a
refactor: make autoHideMenuBar a property on BrowserWindows (#18555) 2019-06-03 09:09:47 -07:00
Lucas Gabriel Schneider
286fdaa53c fix: docs/api/browser-window.md: fix typo (#18367) 2019-05-21 15:42:27 +09:00
Milan Burda
76783e2a90 fix: 'page-title-updated' event forwarding + documentation (#18270) 2019-05-16 12:33:16 +03:00
Samuel Attard
a96b6e2c96 build: move to the new docs parser (#18103)
* build: move to the new docs parser

* chore: remove the bad getTitle param doc

* build: update parser/ts gen deps + fix some docs issues highlighted by GH desktop

* chore: apply suggestions from code review

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>

* chore: update docs for accidentally removed things

* chore: update docs/api/command-line.md

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
2019-05-06 08:29:01 -07:00
Shelley Vohr
8d83518f9a
refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
2019-04-30 13:55:33 -07:00