* chore: bump chromium in DEPS to 117.0.5846.0 * chore: update patches * 4628901: Bump the macOS deployment target to 10.15 https://chromium-review.googlesource.com/c/chromium/src/+/4628901 * 4593350: [Private Network Access] Trigger Permission Prompt https://chromium-review.googlesource.com/c/chromium/src/+/4593350 * 4631011: Remove unlaunched "InstallReplacementAndroidApp" Platform App APIs https://chromium-review.googlesource.com/c/chromium/src/+/4631011 * chore: disable API deprecation warnings in NSKeyedArchiver * chore: update libcxx filenames * chore: bump chromium in DEPS to 117.0.5848.2 * chore: update feat_add_set_theme_source_to_allow_apps_to.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629743 No manual changes; patch succeeded with fuzz * chore: update process_singleton.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4605398 Trivial manual patch adjustments to account for code shear. * chore: remove electron::BrowserContext::GetMediaDeviceIDSalt() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4608130 upstream tldr: - content::BrowserContext::GetMediaDeviceIDSalt() - content::ContentBrowserClient::ArePersistentMediaDeviceIDsAllowed() + content::ContentBrowserClient::GetMediaDeviceIDSalt() This commit leaves ElectronBrowserContext::GetMediaDeviceIDSalt() in place (now non-virtual, non-override). It is now called by the new function ElectronBrowserClient::GetMediaDeviceIDSalt(). As a followup, we might want to consider using the new upstream media_device_salt::MediaDeviceSaltService and removing our electron::MediaDeviceIDSalt code. CC @MarshallOfSound for 2nd opinion since he has done the most work on MediaDeviceIDSalt and may have more context. * chore: fix iwyu breakage Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629624 electron_browser_main_parts.cc uses ui::ColorProviderManager but didn't include it. Things worked anyway because we got it indirectly from content/public/browser/web_contents.h until 4629624. * chore: remove call to base::mac::IsAtLeastOS10_14 upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove obsolete API_AVAILABLE calls in IAP upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove obsolete API_AVAILABLE calls in electron_application_delegate upstream has bumped minimum version to 10.15 so this call is moot? * chore: remove broken-before-macOS-10.15 patch in mas_avoid_usage_of_private_macos_apis.patch Upstream has bumped minimum to macOS 10.15 * chore: remove @available(macOS 10.14) check Upstream minimum requirement for macOS is now 10.15 * chore: update patches * chore: bump chromium in DEPS to 117.0.5850.0 * chore: update patches * chore: bump chromium in DEPS to 117.0.5852.0 * chore: update patches * Move two params from NetworkContextParams to NetworkContextFilePaths. https://chromium-review.googlesource.com/c/chromium/src/+/4615930 * WebUSB: Add exclusionFilters to USBRequestDeviceOptions https://chromium-review.googlesource.com/c/chromium/src/+/4614682 * Convert /chrome/browser/ui to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4615920 * fixup! Bump the macOS deployment target to 10.15 * fixup! Bump the macOS deployment target to 10.15 * chore: update libcxx files * win: Remove 10Glass from Windows10Glass function and var names https://chromium-review.googlesource.com/c/chromium/src/+/4641314 * chore: revert 392e5f43 from chromium * Add an ExecutionContext to ScriptState https://chromium-review.googlesource.com/c/chromium/src/+/4609446 * fixup! Add an ExecutionContext to ScriptState * chore: fix header * Revert "chore: revert 392e5f43 from chromium" This reverts commit b7f782943e4ce83cae8cd35780d8d3618cf0772c. * fix: return correct min/max sizes in WinFrameView * fixup! Revert chore: revert 392e5f43 from chromium * fixup! Add an ExecutionContext to ScriptState * Revert "fixup! Revert chore: revert 392e5f43 from chromium" This reverts commit 7e2c7281abfc4f309255339fdba073d90a9ae3eb. * Revert "fix: return correct min/max sizes in WinFrameView" This reverts commit 3f418b1ab5155686730e087ae6cabe4a21b4bb61. * Revert "Revert "chore: revert 392e5f43 from chromium"" This reverts commit 56296d8b7c434147e032e3c3b08c0e371b6c27ba. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
12 KiB
12 KiB
BrowserWindowConstructorOptions Object
widthInteger (optional) - Window's width in pixels. Default is800.heightInteger (optional) - Window's height in pixels. Default is600.xInteger (optional) - (required if y is used) Window's left offset from screen. Default is to center the window.yInteger (optional) - (required if x is used) Window's top offset from screen. Default is to center the window.useContentSizeboolean (optional) - Thewidthandheightwould be used as web page's size, which means the actual window's size will include window frame's size and be slightly larger. Default isfalse.centerboolean (optional) - Show window in the center of the screen. Default isfalse.minWidthInteger (optional) - Window's minimum width. Default is0.minHeightInteger (optional) - Window's minimum height. Default is0.maxWidthInteger (optional) - Window's maximum width. Default is no limit.maxHeightInteger (optional) - Window's maximum height. Default is no limit.resizableboolean (optional) - Whether window is resizable. Default istrue.movableboolean (optional) macOS Windows - Whether window is movable. This is not implemented on Linux. Default istrue.minimizableboolean (optional) macOS Windows - Whether window is minimizable. This is not implemented on Linux. Default istrue.maximizableboolean (optional) macOS Windows - Whether window is maximizable. This is not implemented on Linux. Default istrue.closableboolean (optional) macOS Windows - Whether window is closable. This is not implemented on Linux. Default istrue.focusableboolean (optional) - Whether the window can be focused. Default istrue. On Windows settingfocusable: falsealso implies settingskipTaskbar: true. On Linux settingfocusable: falsemakes the window stop interacting with wm, so the window will always stay on top in all workspaces.alwaysOnTopboolean (optional) - Whether the window should always stay on top of other windows. Default isfalse.fullscreenboolean (optional) - Whether the window should show in fullscreen. When explicitly set tofalsethe fullscreen button will be hidden or disabled on macOS. Default isfalse.fullscreenableboolean (optional) - Whether the window can be put into fullscreen mode. On macOS, also whether the maximize/zoom button should toggle full screen mode or maximize window. Default istrue.simpleFullscreenboolean (optional) macOS - Use pre-Lion fullscreen on macOS. Default isfalse.skipTaskbarboolean (optional) macOS Windows - Whether to show the window in taskbar. Default isfalse.hiddenInMissionControlboolean (optional) macOS - Whether window should be hidden when the user toggles into mission control.kioskboolean (optional) - Whether the window is in kiosk mode. Default isfalse.titlestring (optional) - Default window title. Default is"Electron". If the HTML tag<title>is defined in the HTML file loaded byloadURL(), this property will be ignored.icon(NativeImage | string) (optional) - The window icon. On Windows it is recommended to useICOicons to get best visual effects, you can also leave it undefined so the executable's icon will be used.showboolean (optional) - Whether window should be shown when created. Default istrue.paintWhenInitiallyHiddenboolean (optional) - Whether the renderer should be active whenshowisfalseand it has just been created. In order fordocument.visibilityStateto work correctly on first load withshow: falseyou should set this tofalse. Setting this tofalsewill cause theready-to-showevent to not fire. Default istrue.frameboolean (optional) - Specifyfalseto create a frameless window. Default istrue.parentBrowserWindow (optional) - Specify parent window. Default isnull.modalboolean (optional) - Whether this is a modal window. This only works when the window is a child window. Default isfalse.acceptFirstMouseboolean (optional) macOS - Whether clicking an inactive window will also click through to the web contents. Default isfalseon macOS. This option is not configurable on other platforms.disableAutoHideCursorboolean (optional) - Whether to hide cursor when typing. Default isfalse.autoHideMenuBarboolean (optional) - Auto hide the menu bar unless theAltkey is pressed. Default isfalse.enableLargerThanScreenboolean (optional) macOS - Enable the window to be resized larger than screen. Only relevant for macOS, as other OSes allow larger-than-screen windows by default. Default isfalse.backgroundColorstring (optional) - The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported iftransparentis set totrue. Default is#FFF(white). See win.setBackgroundColor for more information.hasShadowboolean (optional) - Whether window should have a shadow. Default istrue.opacitynumber (optional) macOS Windows - Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.darkThemeboolean (optional) - Forces using dark theme for the window, only works on some GTK+3 desktop environments. Default isfalse.transparentboolean (optional) - Makes the window transparent. Default isfalse. On Windows, does not work unless the window is frameless.typestring (optional) - The type of window, default is normal window. See more about this below.visualEffectStatestring (optional) macOS - Specify how the material appearance should reflect window activity state on macOS. Must be used with thevibrancyproperty. Possible values are:followWindow- The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default.active- The backdrop should always appear active.inactive- The backdrop should always appear inactive.
titleBarStylestring (optional) macOS Windows - The style of window title bar. Default isdefault. Possible values are:default- Results in the standard title bar for macOS or Windows respectively.hidden- Results in a hidden title bar and a full size content window. On macOS, the window still has the standard window controls (“traffic lights”) in the top left. On Windows, when combined withtitleBarOverlay: trueit will activate the Window Controls Overlay (seetitleBarOverlayfor more information), otherwise no window controls will be shown.hiddenInsetmacOS - Only on macOS, results in a hidden title bar with an alternative look where the traffic light buttons are slightly more inset from the window edge.customButtonsOnHovermacOS - Only on macOS, results in a hidden title bar and a full size content window, the traffic light buttons will display when being hovered over in the top left of the window. Note: This option is currently experimental.
trafficLightPositionPoint (optional) macOS - Set a custom position for the traffic light buttons in frameless windows.roundedCornersboolean (optional) macOS - Whether frameless window should have rounded corners on macOS. Default istrue. Setting this property tofalsewill prevent the window from being fullscreenable.fullscreenWindowTitleboolean (optional) macOS Deprecated - Shows the title in the title bar in full screen mode on macOS forhiddenInsettitleBarStyle. Default isfalse.thickFrameboolean (optional) - UseWS_THICKFRAMEstyle for frameless windows on Windows, which adds standard window frame. Setting it tofalsewill remove window shadow and window animations. Default istrue.vibrancystring (optional) macOS - Add a type of vibrancy effect to the window, only on macOS. Can beappearance-based,titlebar,selection,menu,popover,sidebar,header,sheet,window,hud,fullscreen-ui,tooltip,content,under-window, orunder-page.backgroundMaterialstring (optional) Windows - Set the window's system-drawn background material, including behind the non-client area. Can beauto,none,mica,acrylicortabbed. See win.setBackgroundMaterial for more information.zoomToPageWidthboolean (optional) macOS - Controls the behavior on macOS when option-clicking the green stoplight button on the toolbar or by clicking the Window > Zoom menu item. Iftrue, the window will grow to the preferred width of the web page when zoomed,falsewill cause it to zoom to the width of the screen. This will also affect the behavior when callingmaximize()directly. Default isfalse.tabbingIdentifierstring (optional) macOS - Tab group name, allows opening the window as a native tab. Windows with the same tabbing identifier will be grouped together. This also adds a native new tab button to your window's tab bar and allows yourappand window to receive thenew-window-for-tabevent.webPreferencesWebPreferences (optional) - Settings of web page's features.titleBarOverlayObject | Boolean (optional) - When using a frameless window in conjunction withwin.setWindowButtonVisibility(true)on macOS or using atitleBarStyleso that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay JavaScript APIs and CSS Environment Variables. Specifyingtruewill result in an overlay with default system colors. Default isfalse.colorString (optional) Windows - The CSS color of the Window Controls Overlay when enabled. Default is the system color.symbolColorString (optional) Windows - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.heightInteger (optional) macOS Windows - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
When setting minimum or maximum window size with minWidth/maxWidth/
minHeight/maxHeight, it only constrains the users. It won't prevent you from
passing a size that does not follow size constraints to setBounds/setSize or
to the constructor of BrowserWindow.
The possible values and behaviors of the type option are platform dependent.
Possible values are:
- On Linux, possible types are
desktop,dock,toolbar,splash,notification. - On macOS, possible types are
desktop,textured,panel.- The
texturedtype adds metal gradient appearance (NSWindowStyleMaskTexturedBackground). - The
desktoptype places the window at the desktop background window level (kCGDesktopWindowLevel - 1). Note that desktop window will not receive focus, keyboard or mouse events, but you can useglobalShortcutto receive input sparingly. - The
paneltype enables the window to float on top of full-screened apps by adding theNSWindowStyleMaskNonactivatingPanelstyle mask,normally reserved for NSPanel, at runtime. Also, the window will appear on all spaces (desktops).
- The
- On Windows, possible type is
toolbar.