mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
27 Commits
v16.0.0-al
...
v16.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92f20955bd | ||
|
|
762ecfef24 | ||
|
|
ea96f4c176 | ||
|
|
d085de4787 | ||
|
|
dd7a8da6be | ||
|
|
a4ded39e61 | ||
|
|
d3ff2033ed | ||
|
|
005b193307 | ||
|
|
369269c475 | ||
|
|
339eccfc42 | ||
|
|
65c8415bac | ||
|
|
30be3150ff | ||
|
|
7d9ce1379f | ||
|
|
27d1f6a360 | ||
|
|
be46387f22 | ||
|
|
fe160165b6 | ||
|
|
be1c18096b | ||
|
|
2e3b05bcad | ||
|
|
54657fb667 | ||
|
|
c83d65eab0 | ||
|
|
3daad4fd40 | ||
|
|
b4a79672cf | ||
|
|
a71c610747 | ||
|
|
b1366421d1 | ||
|
|
f2696fb431 | ||
|
|
25c536d355 | ||
|
|
6530067b85 |
7
BUILD.gn
7
BUILD.gn
@@ -187,6 +187,12 @@ action("electron_js2c") {
|
||||
rebase_path(sources, root_build_dir)
|
||||
}
|
||||
|
||||
action("generate_config_gypi") {
|
||||
outputs = [ "$root_gen_dir/config.gypi" ]
|
||||
script = "script/generate-config-gypi.py"
|
||||
args = rebase_path(outputs) + [ target_cpu ]
|
||||
}
|
||||
|
||||
target_gen_default_app_js = "$target_gen_dir/js/default_app"
|
||||
|
||||
typescript_build("default_app_js") {
|
||||
@@ -347,6 +353,7 @@ source_set("electron_lib") {
|
||||
"//base/allocator:buildflags",
|
||||
"//chrome/app:command_ids",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
"//components/autofill/core/common:features",
|
||||
"//components/certificate_transparency",
|
||||
"//components/language/core/browser",
|
||||
"//components/net_log",
|
||||
|
||||
2
DEPS
2
DEPS
@@ -15,7 +15,7 @@ gclient_gn_args = [
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'95.0.4629.0',
|
||||
'96.0.4647.0',
|
||||
'node_version':
|
||||
'v16.9.1',
|
||||
'nan_version':
|
||||
|
||||
@@ -1 +1 @@
|
||||
16.0.0-alpha.7
|
||||
16.0.0-beta.3
|
||||
@@ -212,6 +212,7 @@ static_library("chrome") {
|
||||
"//components/services/print_compositor",
|
||||
"//components/services/print_compositor/public/cpp",
|
||||
"//components/services/print_compositor/public/mojom",
|
||||
"//printing/backend",
|
||||
]
|
||||
|
||||
deps += [
|
||||
|
||||
@@ -483,6 +483,7 @@ Returns:
|
||||
* `event` Event
|
||||
* `argv` String[] - An array of the second instance's command line arguments
|
||||
* `workingDirectory` String - The second instance's working directory
|
||||
* `additionalData` unknown - A JSON object of additional data passed from the second instance
|
||||
|
||||
This event will be emitted inside the primary instance of your application
|
||||
when a second instance has been executed and calls `app.requestSingleInstanceLock()`.
|
||||
@@ -941,6 +942,8 @@ app.setJumpList([
|
||||
|
||||
### `app.requestSingleInstanceLock()`
|
||||
|
||||
* `additionalData` unknown (optional) - A JSON object containing additional data to send to the first instance.
|
||||
|
||||
Returns `Boolean`
|
||||
|
||||
The return value of this method indicates whether or not this instance of your
|
||||
@@ -966,12 +969,16 @@ starts:
|
||||
const { app } = require('electron')
|
||||
let myWindow = null
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
const additionalData = { myKey: 'myValue' }
|
||||
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
||||
|
||||
if (!gotTheLock) {
|
||||
app.quit()
|
||||
} else {
|
||||
app.on('second-instance', (event, commandLine, workingDirectory) => {
|
||||
app.on('second-instance', (event, commandLine, workingDirectory, additionalData) => {
|
||||
// Print out data received from the second instance.
|
||||
console.log(additionalData)
|
||||
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (myWindow) {
|
||||
if (myWindow.isMinimized()) myWindow.restore()
|
||||
|
||||
@@ -17,10 +17,11 @@ win.loadURL('https://github.com')
|
||||
win.loadFile('index.html')
|
||||
```
|
||||
|
||||
## Frameless window
|
||||
## Window customization
|
||||
|
||||
To create a window without chrome, or a transparent window in arbitrary shape,
|
||||
you can use the [Frameless Window](frameless-window.md) API.
|
||||
The `BrowserWindow` class exposes various ways to modify the look and behavior of
|
||||
your app's windows. For more details, see the [Window Customization](../tutorial/window-customization.md)
|
||||
tutorial.
|
||||
|
||||
## Showing the window gracefully
|
||||
|
||||
@@ -184,7 +185,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
`true`.
|
||||
* `paintWhenInitiallyHidden` Boolean (optional) - Whether the renderer should be active when `show` is `false` and it has just been created. In order for `document.visibilityState` to work correctly on first load with `show: false` you should set this to `false`. Setting this to `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
||||
* `frame` Boolean (optional) - Specify `false` to create a
|
||||
[Frameless Window](frameless-window.md). Default is `true`.
|
||||
[frameless window](../tutorial/window-customization.md#create-frameless-windows). Default is `true`.
|
||||
* `parent` BrowserWindow (optional) - Specify parent window. Default is `null`.
|
||||
* `modal` Boolean (optional) - Whether this is a modal window. This only works when the
|
||||
window is a child window. Default is `false`.
|
||||
@@ -206,7 +207,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
|
||||
* `darkTheme` Boolean (optional) - Forces using dark theme for the window, only works on
|
||||
some GTK+3 desktop environments. Default is `false`.
|
||||
* `transparent` Boolean (optional) - Makes the window [transparent](frameless-window.md#transparent-window).
|
||||
* `transparent` Boolean (optional) - Makes the window [transparent](../tutorial/window-customization.md#create-transparent-windows).
|
||||
Default is `false`. On Windows, does not work unless the window is frameless.
|
||||
* `type` String (optional) - The type of window, default is normal window. See more about
|
||||
this below.
|
||||
|
||||
@@ -53,3 +53,12 @@ Returns `Boolean` - Whether the command-line switch is present.
|
||||
Returns `String` - The command-line switch value.
|
||||
|
||||
**Note:** When the switch is not present or has no value, it returns empty string.
|
||||
|
||||
#### `commandLine.removeSwitch(switch)`
|
||||
|
||||
* `switch` String - A command-line switch
|
||||
|
||||
Removes the specified switch from Chromium's command line.
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
# Frameless Window
|
||||
|
||||
> Open a window without toolbars, borders, or other graphical "chrome".
|
||||
|
||||
A frameless window is a window that has no
|
||||
[chrome](https://developer.mozilla.org/en-US/docs/Glossary/Chrome), the parts of
|
||||
the window, like toolbars, that are not a part of the web page. These are
|
||||
options on the [`BrowserWindow`](browser-window.md) class.
|
||||
|
||||
## Create a frameless window
|
||||
|
||||
To create a frameless window, you need to set `frame` to `false` in
|
||||
[BrowserWindow](browser-window.md)'s `options`:
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ width: 800, height: 600, frame: false })
|
||||
win.show()
|
||||
```
|
||||
|
||||
### Alternatives
|
||||
|
||||
There's an alternative way to specify a chromeless window on macOS and Windows.
|
||||
Instead of setting `frame` to `false` which disables both the titlebar and window controls,
|
||||
you may want to have the title bar hidden and your content extend to the full window size,
|
||||
yet still preserve the window controls ("traffic lights" on macOS) for standard window actions.
|
||||
You can do so by specifying the `titleBarStyle` option:
|
||||
|
||||
#### `hidden`
|
||||
|
||||
Results in a hidden title bar and a full size content window. On macOS, the title bar still has the standard window controls (“traffic lights”) in the top left.
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'hidden' })
|
||||
win.show()
|
||||
```
|
||||
|
||||
### Alternatives on macOS
|
||||
|
||||
#### `hiddenInset`
|
||||
|
||||
Results in a hidden title bar with an alternative look where the traffic light buttons are slightly more inset from the window edge.
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'hiddenInset' })
|
||||
win.show()
|
||||
```
|
||||
|
||||
#### `customButtonsOnHover`
|
||||
|
||||
Uses custom drawn close, and miniaturize buttons that display
|
||||
when hovering in the top left of the window. The fullscreen button
|
||||
is not available due to restrictions of frameless windows as they
|
||||
interface with Apple's macOS window masks. These custom buttons prevent
|
||||
issues with mouse events that occur with the standard window toolbar buttons.
|
||||
This option is only applicable for frameless windows.
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'customButtonsOnHover', frame: false })
|
||||
win.show()
|
||||
```
|
||||
|
||||
## Windows Control Overlay
|
||||
|
||||
When using a frameless window in conjuction with `win.setWindowButtonVisibility(true)` on macOS, using one of the `titleBarStyle`s as described above so
|
||||
that the traffic lights are visible, or using `titleBarStyle: hidden` on Windows, you can access the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and
|
||||
[CSS Environment Variables][overlay-css-env-vars] by setting the `titleBarOverlay` option to true. Specifying `true` will result in an overlay with default system colors.
|
||||
|
||||
On Windows, you can also specify the color of the overlay and its symbols by setting `titleBarOverlay` to an object with the options `color` and `symbolColor`. If an option is not specified, the color will default to its system color for the window control buttons:
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: true
|
||||
})
|
||||
win.show()
|
||||
```
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: {
|
||||
color: '#2f3241',
|
||||
symbolColor: '#74b1be'
|
||||
}
|
||||
})
|
||||
win.show()
|
||||
```
|
||||
|
||||
## Transparent window
|
||||
|
||||
By setting the `transparent` option to `true`, you can also make the frameless
|
||||
window transparent:
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ transparent: true, frame: false })
|
||||
win.show()
|
||||
```
|
||||
|
||||
### Limitations
|
||||
|
||||
* You can not click through the transparent area. We are going to introduce an
|
||||
API to set window shape to solve this, see
|
||||
[our issue](https://github.com/electron/electron/issues/1335) for details.
|
||||
* Transparent windows are not resizable. Setting `resizable` to `true` may make
|
||||
a transparent window stop working on some platforms.
|
||||
* The `blur` filter only applies to the web page, so there is no way to apply
|
||||
blur effect to the content below the window (i.e. other applications open on
|
||||
the user's system).
|
||||
* The window will not be transparent when DevTools is opened.
|
||||
* On Windows operating systems,
|
||||
* transparent windows will not work when DWM is
|
||||
disabled.
|
||||
* transparent windows can not be maximized using the Windows system menu or by double clicking the title bar. The reasoning behind this can be seen on [this pull request](https://github.com/electron/electron/pull/28207).
|
||||
* On Linux, users have to put `--enable-transparent-visuals --disable-gpu` in
|
||||
the command line to disable GPU and allow ARGB to make transparent window,
|
||||
this is caused by an upstream bug that [alpha channel doesn't work on some
|
||||
NVidia drivers](https://bugs.chromium.org/p/chromium/issues/detail?id=369209) on
|
||||
Linux.
|
||||
* On Mac, the native window shadow will not be shown on a transparent window.
|
||||
|
||||
## Click-through window
|
||||
|
||||
To create a click-through window, i.e. making the window ignore all mouse
|
||||
events, you can call the [win.setIgnoreMouseEvents(ignore)][ignore-mouse-events]
|
||||
API:
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow()
|
||||
win.setIgnoreMouseEvents(true)
|
||||
```
|
||||
|
||||
### Forwarding
|
||||
|
||||
Ignoring mouse messages makes the web page oblivious to mouse movement, meaning
|
||||
that mouse movement events will not be emitted. On Windows operating systems an
|
||||
optional parameter can be used to forward mouse move messages to the web page,
|
||||
allowing events such as `mouseleave` to be emitted:
|
||||
|
||||
```javascript
|
||||
const { ipcRenderer } = require('electron')
|
||||
const el = document.getElementById('clickThroughElement')
|
||||
el.addEventListener('mouseenter', () => {
|
||||
ipcRenderer.send('set-ignore-mouse-events', true, { forward: true })
|
||||
})
|
||||
el.addEventListener('mouseleave', () => {
|
||||
ipcRenderer.send('set-ignore-mouse-events', false)
|
||||
})
|
||||
|
||||
// Main process
|
||||
const { ipcMain } = require('electron')
|
||||
ipcMain.on('set-ignore-mouse-events', (event, ...args) => {
|
||||
BrowserWindow.fromWebContents(event.sender).setIgnoreMouseEvents(...args)
|
||||
})
|
||||
```
|
||||
|
||||
This makes the web page click-through when over `el`, and returns to normal
|
||||
outside it.
|
||||
|
||||
## Draggable region
|
||||
|
||||
By default, the frameless window is non-draggable. Apps need to specify
|
||||
`-webkit-app-region: drag` in CSS to tell Electron which regions are draggable
|
||||
(like the OS's standard titlebar), and apps can also use
|
||||
`-webkit-app-region: no-drag` to exclude the non-draggable area from the
|
||||
draggable region. Note that only rectangular shapes are currently supported.
|
||||
|
||||
Note: `-webkit-app-region: drag` is known to have problems while the developer tools are open. See this [GitHub issue](https://github.com/electron/electron/issues/3647) for more information including a workaround.
|
||||
|
||||
To make the whole window draggable, you can add `-webkit-app-region: drag` as
|
||||
`body`'s style:
|
||||
|
||||
```html
|
||||
<body style="-webkit-app-region: drag">
|
||||
</body>
|
||||
```
|
||||
|
||||
And note that if you have made the whole window draggable, you must also mark
|
||||
buttons as non-draggable, otherwise it would be impossible for users to click on
|
||||
them:
|
||||
|
||||
```css
|
||||
button {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
```
|
||||
|
||||
If you're only setting a custom titlebar as draggable, you also need to make all
|
||||
buttons in titlebar non-draggable.
|
||||
|
||||
## Text selection
|
||||
|
||||
In a frameless window the dragging behavior may conflict with selecting text.
|
||||
For example, when you drag the titlebar you may accidentally select the text on
|
||||
the titlebar. To prevent this, you need to disable text selection within a
|
||||
draggable area like this:
|
||||
|
||||
```css
|
||||
.titlebar {
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
```
|
||||
|
||||
## Context menu
|
||||
|
||||
On some platforms, the draggable area will be treated as a non-client frame, so
|
||||
when you right click on it a system menu will pop up. To make the context menu
|
||||
behave correctly on all platforms you should never use a custom context menu on
|
||||
draggable areas.
|
||||
|
||||
[ignore-mouse-events]: browser-window.md#winsetignoremouseeventsignore-options
|
||||
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis
|
||||
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
|
||||
@@ -297,6 +297,35 @@ app.whenReady().then(() => {
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||
if (permission === 'serial') {
|
||||
// Add logic here to determine if permission should be given to allow serial selection
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
// Optionally, retrieve previously persisted devices from a persistent store
|
||||
const grantedDevices = fetchGrantedDevices()
|
||||
|
||||
win.webContents.session.setDevicePermissionHandler((details) => {
|
||||
if (new URL(details.origin).hostname === 'some-host' && details.deviceType === 'serial') {
|
||||
if (details.device.vendorId === 123 && details.device.productId === 345) {
|
||||
// Always allow this type of device (this allows skipping the call to `navigator.serial.requestPort` first)
|
||||
return true
|
||||
}
|
||||
|
||||
// Search through the list of devices that have previously been granted permission
|
||||
return grantedDevices.some((grantedDevice) => {
|
||||
return grantedDevice.vendorId === details.device.vendorId &&
|
||||
grantedDevice.productId === details.device.productId &&
|
||||
grantedDevice.serialNumber && grantedDevice.serialNumber === details.device.serialNumber
|
||||
})
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
win.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => {
|
||||
event.preventDefault()
|
||||
const selectedPort = portList.find((device) => {
|
||||
@@ -589,6 +618,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `permissionGranted` Boolean - Allow or deny the permission.
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `externalURL` String (optional) - The url of the `openExternal` request.
|
||||
* `securityOrigin` String (optional) - The security origin of the `media` request.
|
||||
* `mediaTypes` String[] (optional) - The types of media access being requested, elements can be `video`
|
||||
or `audio`
|
||||
* `requestingUrl` String - The last URL the requesting frame loaded
|
||||
@@ -647,9 +677,9 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
|
||||
|
||||
* `handler` Function\<Boolean> | null
|
||||
* `details` Object
|
||||
* `deviceType` String - The type of device that permission is being requested on, can be `hid`.
|
||||
* `deviceType` String - The type of device that permission is being requested on, can be `hid` or `serial`.
|
||||
* `origin` String - The origin URL of the device permission check.
|
||||
* `device` [HIDDevice](structures/hid-device.md) - the device that permission is being requested for.
|
||||
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
|
||||
* `frame` [WebFrameMain](web-frame-main.md) - WebFrameMain checking the device permission.
|
||||
|
||||
Sets the handler which can be used to respond to device permission checks for the `session`.
|
||||
@@ -674,6 +704,8 @@ app.whenReady().then(() => {
|
||||
if (permission === 'hid') {
|
||||
// Add logic here to determine if permission should be given to allow HID selection
|
||||
return true
|
||||
} else if (permission === 'serial') {
|
||||
// Add logic here to determine if permission should be given to allow serial port selection
|
||||
}
|
||||
return false
|
||||
})
|
||||
@@ -694,6 +726,11 @@ app.whenReady().then(() => {
|
||||
grantedDevice.productId === details.device.productId &&
|
||||
grantedDevice.serialNumber && grantedDevice.serialNumber === details.device.serialNumber
|
||||
})
|
||||
} else if (details.deviceType === 'serial') {
|
||||
if (details.device.vendorId === 123 && details.device.productId === 345) {
|
||||
// Always allow this type of device (this allows skipping the call to `navigator.hid.requestDevice` first)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
@@ -1494,8 +1494,8 @@ win.loadURL('http://github.com')
|
||||
|
||||
win.webContents.on('did-finish-load', () => {
|
||||
// Use default printing options
|
||||
const pdfPath = path.join(os.homedir(), 'Desktop', 'temp.pdf')
|
||||
win.webContents.printToPDF({}).then(data => {
|
||||
const pdfPath = path.join(os.homedir(), 'Desktop', 'temp.pdf')
|
||||
fs.writeFile(pdfPath, data, (error) => {
|
||||
if (error) throw error
|
||||
console.log(`Wrote PDF successfully to ${pdfPath}`)
|
||||
|
||||
@@ -59,8 +59,9 @@
|
||||
|
||||
<p>
|
||||
For more details, see the
|
||||
<a href="https://electronjs.org/docs/api/frameless-window/">
|
||||
Frameless Window
|
||||
<a href="https://electronjs.org/docs/tutorial/window-customization/">
|
||||
Window Customization
|
||||
|
||||
</a>
|
||||
documentation.
|
||||
</p>
|
||||
|
||||
BIN
docs/images/windows-progress-bar.png
Normal file
BIN
docs/images/windows-progress-bar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -84,13 +84,22 @@ There are several additional APIs for working with the Web Serial API:
|
||||
and [`serial-port-removed`](../api/session.md#event-serial-port-removed) events
|
||||
on the Session can be used to handle devices being plugged in or unplugged during the
|
||||
`navigator.serial.requestPort` process.
|
||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
can be used to provide default permissioning to devices without first calling
|
||||
for permission to devices via `navigator.serial.requestPort`. Additionally,
|
||||
the default behavior of Electron is to store granted device permision through
|
||||
the lifetime of the corresponding WebContents. If longer term storage is
|
||||
needed, a developer can store granted device permissions (eg when handling
|
||||
the `select-serial-port` event) and then read from that storage with
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
can be used to disable serial access for specific origins.
|
||||
|
||||
### Example
|
||||
|
||||
This example demonstrates an Electron application that automatically selects
|
||||
the first available Arduino Uno serial device (if connected) through
|
||||
serial devices through [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
as well as demonstrating selecting the first available Arduino Uno serial device (if connected) through
|
||||
[`select-serial-port` event on the Session](../api/session.md#event-select-serial-port)
|
||||
when the `Test Web Serial` button is clicked.
|
||||
|
||||
|
||||
@@ -2,43 +2,31 @@
|
||||
|
||||
> A detailed look at our versioning policy and implementation.
|
||||
|
||||
As of version 2.0.0, Electron follows [SemVer](#semver). The following command will install the most recent stable build of Electron:
|
||||
As of version 2.0.0, Electron follows the [SemVer](#semver) spec. The following command will install the most recent stable build of Electron:
|
||||
|
||||
```sh
|
||||
```sh npm2yarn
|
||||
npm install --save-dev electron
|
||||
```
|
||||
|
||||
To update an existing project to use the latest stable version:
|
||||
|
||||
```sh
|
||||
```sh npm2yarn
|
||||
npm install --save-dev electron@latest
|
||||
```
|
||||
|
||||
## Version 1.x
|
||||
|
||||
Electron versions *< 2.0* did not conform to the [SemVer](https://semver.org) spec: major versions corresponded to end-user API changes, minor versions corresponded to Chromium major releases, and patch versions corresponded to new features and bug fixes. While convenient for developers merging features, it creates problems for developers of client-facing applications. The QA testing cycles of major apps like Slack, Stride, Teams, Skype, VS Code, Atom, and Desktop can be lengthy and stability is a highly desired outcome. There is a high risk in adopting new features while trying to absorb bug fixes.
|
||||
|
||||
Here is an example of the 1.x strategy:
|
||||
|
||||

|
||||
|
||||
An app developed with `1.8.1` cannot take the `1.8.3` bug fix without either absorbing the `1.8.2` feature, or by backporting the fix and maintaining a new release line.
|
||||
|
||||
## Version 2.0 and Beyond
|
||||
## Versioning scheme
|
||||
|
||||
There are several major changes from our 1.x strategy outlined below. Each change is intended to satisfy the needs and priorities of developers/maintainers and app developers.
|
||||
|
||||
1. Strict use of SemVer
|
||||
1. Strict use of the the [SemVer](#semver) spec
|
||||
2. Introduction of semver-compliant `-beta` tags
|
||||
3. Introduction of [conventional commit messages](https://conventionalcommits.org/)
|
||||
4. Well-defined stabilization branches
|
||||
5. The `master` branch is versionless; only stabilization branches contain version information
|
||||
5. The `main` branch is versionless; only stabilization branches contain version information
|
||||
|
||||
We will cover in detail how git branching works, how npm tagging works, what developers should expect to see, and how one can backport changes.
|
||||
|
||||
# SemVer
|
||||
|
||||
From 2.0 onward, Electron will follow SemVer.
|
||||
## SemVer
|
||||
|
||||
Below is a table explicitly mapping types of changes to their corresponding category of SemVer (e.g. Major, Minor, Patch).
|
||||
|
||||
@@ -48,22 +36,25 @@ Below is a table explicitly mapping types of changes to their corresponding cate
|
||||
| Node.js major version updates | Node.js minor version updates | Node.js patch version updates |
|
||||
| Chromium version updates | | fix-related chromium patches |
|
||||
|
||||
For more information, see the [Semantic Versioning 2.0.0](https://semver.org/) spec.
|
||||
|
||||
Note that most Chromium updates will be considered breaking. Fixes that can be backported will likely be cherry-picked as patches.
|
||||
|
||||
# Stabilization Branches
|
||||
## Stabilization branches
|
||||
|
||||
Stabilization branches are branches that run parallel to master, taking in only cherry-picked commits that are related to security or stability. These branches are never merged back to master.
|
||||
Stabilization branches are branches that run parallel to `main`, taking in only cherry-picked commits that are related to security or stability. These branches are never merged back to `main`.
|
||||
|
||||

|
||||
|
||||
Since Electron 8, stabilization branches are always **major** version lines, and named against the following template `$MAJOR-x-y` e.g. `8-x-y`. Prior to that we used **minor** version lines and named them as `$MAJOR-$MINOR-x` e.g. `2-0-x`
|
||||
Since Electron 8, stabilization branches are always **major** version lines, and named against the following template `$MAJOR-x-y` e.g. `8-x-y`. Prior to that we used **minor** version lines and named them as `$MAJOR-$MINOR-x` e.g. `2-0-x`.
|
||||
|
||||
We allow for multiple stabilization branches to exist simultaneously, one for each supported version. For more details on which versions are supported, see our [Electron Release Timelines](./electron-timelines.md) doc.
|
||||
|
||||
We allow for multiple stabilization branches to exist simultaneously, and intend to support at least two in parallel at all times, backporting security fixes as necessary.
|
||||

|
||||
|
||||
Older lines will not be supported by GitHub, but other groups can take ownership and backport stability and security fixes on their own. We discourage this, but recognize that it makes life easier for many app developers.
|
||||
Older lines will not be supported by the Electron project, but other groups can take ownership and backport stability and security fixes on their own. We discourage this, but recognize that it makes life easier for many app developers.
|
||||
|
||||
# Beta Releases and Bug Fixes
|
||||
## Beta releases and bug fixes
|
||||
|
||||
Developers want to know which releases are _safe_ to use. Even seemingly innocent features can introduce regressions in complex applications. At the same time, locking to a fixed version is dangerous because you’re ignoring security patches and bug fixes that may have come out since your version. Our goal is to allow the following standard semver ranges in `package.json` :
|
||||
|
||||
@@ -116,15 +107,7 @@ A few examples of how various SemVer ranges will pick up new releases:
|
||||
|
||||

|
||||
|
||||
# Missing Features: Alphas
|
||||
|
||||
Our strategy has a few tradeoffs, which for now we feel are appropriate. Most importantly that new features in master may take a while before reaching a stable release line. If you want to try a new feature immediately, you will have to build Electron yourself.
|
||||
|
||||
As a future consideration, we may introduce one or both of the following:
|
||||
|
||||
* alpha releases that have looser stability constraints to betas; for example it would be allowable to admit new features while a stability channel is in _alpha_
|
||||
|
||||
# Feature Flags
|
||||
## Feature flags
|
||||
|
||||
Feature flags are a common practice in Chromium, and are well-established in the web-development ecosystem. In the context of Electron, a feature flag or **soft branch** must have the following properties:
|
||||
|
||||
@@ -132,20 +115,29 @@ Feature flags are a common practice in Chromium, and are well-established in the
|
||||
* it completely segments new and old code paths; refactoring old code to support a new feature _violates_ the feature-flag contract
|
||||
* feature flags are eventually removed after the feature is released
|
||||
|
||||
# Semantic Commits
|
||||
## Semantic commits
|
||||
|
||||
We seek to increase clarity at all levels of the update and releases process. Starting with `2.0.0` we will require pull requests adhere to the [Conventional Commits](https://conventionalcommits.org/) spec, which can be summarized as follows:
|
||||
All pull requests must adhere to the [Conventional Commits](https://conventionalcommits.org/) spec, which can be summarized as follows:
|
||||
|
||||
* Commits that would result in a SemVer **major** bump must start their body with `BREAKING CHANGE:`.
|
||||
* Commits that would result in a SemVer **minor** bump must start with `feat:`.
|
||||
* Commits that would result in a SemVer **patch** bump must start with `fix:`.
|
||||
|
||||
* We allow squashing of commits, provided that the squashed message adheres to the above message format.
|
||||
* It is acceptable for some commits in a pull request to not include a semantic prefix, as long as the pull request title contains a meaningful encompassing semantic message.
|
||||
The `electron/electron` repository also enforces squash merging, so you only need to make sure that your pull request has the correct title prefix.
|
||||
|
||||
# Versioned `master`
|
||||
## Versioned `main` branch
|
||||
|
||||
* The `master` branch will always contain the next major version `X.0.0-nightly.DATE` in its `package.json`
|
||||
* Release branches are never merged back to master
|
||||
* Release branches _do_ contain the correct version in their `package.json`
|
||||
* As soon as a release branch is cut for a major, master must be bumped to the next major. I.e. `master` is always versioned as the next theoretical release branch
|
||||
* The `main` branch will always contain the next major version `X.0.0-nightly.DATE` in its `package.json`.
|
||||
* Release branches are never merged back to `main`.
|
||||
* Release branches _do_ contain the correct version in their `package.json`.
|
||||
* As soon as a release branch is cut for a major, `main` must be bumped to the next major (i.e. `main` is always versioned as the next theoretical release branch).
|
||||
|
||||
## Historical versioning (Electron 1.X)
|
||||
|
||||
Electron versions *< 2.0* did not conform to the [SemVer](https://semver.org) spec: major versions corresponded to end-user API changes, minor versions corresponded to Chromium major releases, and patch versions corresponded to new features and bug fixes. While convenient for developers merging features, it creates problems for developers of client-facing applications. The QA testing cycles of major apps like Slack, Teams, Skype, VS Code, and GitHub Desktop can be lengthy and stability is a highly desired outcome. There is a high risk in adopting new features while trying to absorb bug fixes.
|
||||
|
||||
Here is an example of the 1.x strategy:
|
||||
|
||||

|
||||
|
||||
An app developed with `1.8.1` cannot take the `1.8.3` bug fix without either absorbing the `1.8.2` feature, or by backporting the fix and maintaining a new release line.
|
||||
|
||||
@@ -17,7 +17,7 @@ the dirty area is passed to the `paint` event to be more efficient.
|
||||
losses with no benefits.
|
||||
* When nothing is happening on a webpage, no frames are generated.
|
||||
* An offscreen window is always created as a
|
||||
[Frameless Window](../api/frameless-window.md).
|
||||
[Frameless Window](../tutorial/window-customization.md)..
|
||||
|
||||
### Rendering Modes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ without the need of switching to the window itself.
|
||||
|
||||
On Windows, you can use a taskbar button to display a progress bar.
|
||||
|
||||
![Windows Progress Bar][https://cloud.githubusercontent.com/assets/639601/5081682/16691fda-6f0e-11e4-9676-49b6418f1264.png]
|
||||

|
||||
|
||||
On macOS, the progress bar will be displayed as a part of the dock icon.
|
||||
|
||||
|
||||
271
docs/tutorial/window-customization.md
Normal file
271
docs/tutorial/window-customization.md
Normal file
@@ -0,0 +1,271 @@
|
||||
# Window Customization
|
||||
|
||||
The `BrowserWindow` module is the foundation of your Electron application, and it exposes
|
||||
many APIs that can change the look and behavior of your browser windows. In this
|
||||
tutorial, we will be going over the various use-cases for window customization on
|
||||
macOS, Windows, and Linux.
|
||||
|
||||
## Create frameless windows
|
||||
|
||||
A frameless window is a window that has no [chrome]. Not to be confused with the Google
|
||||
Chrome browser, window _chrome_ refers to the parts of the window (e.g. toolbars, controls)
|
||||
that are not a part of the web page.
|
||||
|
||||
To create a frameless window, you need to set `frame` to `false` in the `BrowserWindow`
|
||||
constructor.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ frame: false })
|
||||
```
|
||||
|
||||
## Apply custom title bar styles _macOS_ _Windows_
|
||||
|
||||
Title bar styles allow you to hide most of a BrowserWindow's chrome while keeping the
|
||||
system's native window controls intact and can be configured with the `titleBarStyle`
|
||||
option in the `BrowserWindow` constructor.
|
||||
|
||||
Applying the `hidden` title bar style results in a hidden title bar and a full-size
|
||||
content window.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'hidden' })
|
||||
```
|
||||
|
||||
### Control the traffic lights _macOS_
|
||||
|
||||
On macOS, applying the `hidden` title bar style will still expose the standard window
|
||||
controls (“traffic lights”) in the top left.
|
||||
|
||||
#### Customize the look of your traffic lights _macOS_
|
||||
|
||||
The `customButtonsOnHover` title bar style will hide the traffic lights until you hover
|
||||
over them. This is useful if you want to create custom traffic lights in your HTML but still
|
||||
use the native UI to control the window.
|
||||
|
||||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'customButtonsOnHover' })
|
||||
```
|
||||
|
||||
#### Customize the traffic light position _macOS_
|
||||
|
||||
To modify the position of the traffic light window controls, there are two configuration
|
||||
options available.
|
||||
|
||||
Applying `hiddenInset` title bar style will shift the vertical inset of the traffic lights
|
||||
by a fixed amount.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ titleBarStyle: 'hiddenInset' })
|
||||
```
|
||||
|
||||
If you need more granular control over the positioning of the traffic lights, you can pass
|
||||
a set of coordinates to the `trafficLightPosition` option in the `BrowserWindow`
|
||||
constructor.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
trafficLightPosition: { x: 10, y: 10 }
|
||||
})
|
||||
```
|
||||
|
||||
#### Show and hide the traffic lights programmatically _macOS_
|
||||
|
||||
You can also show and hide the traffic lights programmatically from the main process.
|
||||
The `win.setWindowButtonVisibility` forces traffic lights to be show or hidden depending
|
||||
on the value of its boolean parameter.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow()
|
||||
// hides the traffic lights
|
||||
win.setWindowButtonVisibility(false)
|
||||
```
|
||||
|
||||
> Note: Given the number of APIs available, there are many ways of achieving this. For instance,
|
||||
> combining `frame: false` with `win.setWindowButtonVisibility(true)` will yield the same
|
||||
> layout outcome as setting `titleBarStyle: 'hidden'`.
|
||||
|
||||
## Window Controls Overlay _macOS_ _Windows_
|
||||
|
||||
The [Window Controls Overlay API] is a web standard that gives web apps the ability to
|
||||
customize their title bar region when installed on desktop. Electron exposes this API
|
||||
through the `BrowserWindow` constructor option `titleBarOverlay`.
|
||||
|
||||
This option only works whenever a custom `titlebarStyle` is applied on macOS or Windows.
|
||||
When `titleBarOverlay` is enabled, the window controls become exposed in their default
|
||||
position, and DOM elements cannot use the area underneath this region.
|
||||
|
||||
The `titleBarOverlay` option accepts two different value formats.
|
||||
|
||||
Specifying `true` on either platform will result in an overlay region with default
|
||||
system colors:
|
||||
|
||||
```javascript title='main.js'
|
||||
// on macOS or Windows
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: true
|
||||
})
|
||||
```
|
||||
|
||||
On Windows, you can also specify the color of the overlay and its symbols by setting
|
||||
`titleBarOverlay` to an object with the `color` and `symbolColor` properties. If an option
|
||||
is not specified, the color will default to its system color for the window control buttons:
|
||||
|
||||
```javascript title='main.js'
|
||||
// on Windows
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: {
|
||||
color: '#2f3241',
|
||||
symbolColor: '#74b1be'
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
> Note: Once your title bar overlay is enabled from the main process, you can access the overlay's
|
||||
> color and dimension values from a renderer using a set of readonly
|
||||
> [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars].
|
||||
|
||||
## Create transparent windows
|
||||
|
||||
By setting the `transparent` option to `true`, you can make a fully transparent window.
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ transparent: true })
|
||||
```
|
||||
|
||||
### Limitations
|
||||
|
||||
* You cannot click through the transparent area. See
|
||||
[#1335](https://github.com/electron/electron/issues/1335) for details.
|
||||
* Transparent windows are not resizable. Setting `resizable` to `true` may make
|
||||
a transparent window stop working on some platforms.
|
||||
* The CSS [`blur()`] filter only applies to the window's web contents, so there is no way to apply
|
||||
blur effect to the content below the window (i.e. other applications open on
|
||||
the user's system).
|
||||
* The window will not be transparent when DevTools is opened.
|
||||
* On _Windows_:
|
||||
* Transparent windows will not work when DWM is disabled.
|
||||
* Transparent windows can not be maximized using the Windows system menu or by double
|
||||
clicking the title bar. The reasoning behind this can be seen on
|
||||
PR [#28207](https://github.com/electron/electron/pull/28207).
|
||||
* On _macOS_:
|
||||
* The native window shadow will not be shown on a transparent window.
|
||||
|
||||
## Create click-through windows
|
||||
|
||||
To create a click-through window, i.e. making the window ignore all mouse
|
||||
events, you can call the [win.setIgnoreMouseEvents(ignore)][ignore-mouse-events]
|
||||
API:
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow()
|
||||
win.setIgnoreMouseEvents(true)
|
||||
```
|
||||
|
||||
### Forward mouse events _macOS_ _Windows_
|
||||
|
||||
Ignoring mouse messages makes the web contents oblivious to mouse movement,
|
||||
meaning that mouse movement events will not be emitted. On Windows and macOS, an
|
||||
optional parameter can be used to forward mouse move messages to the web page,
|
||||
allowing events such as `mouseleave` to be emitted:
|
||||
|
||||
```javascript title='main.js'
|
||||
const { BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
const win = new BrowserWindow({
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js')
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.on('set-ignore-mouse-events', (event, ...args) => {
|
||||
const win = BrowserWindow.fromWebContents(event.sender)
|
||||
win.setIgnoreMouseEvents(...args)
|
||||
})
|
||||
```
|
||||
|
||||
```javascript title='preload.js'
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const el = document.getElementById('clickThroughElement')
|
||||
el.addEventListener('mouseenter', () => {
|
||||
ipcRenderer.send('set-ignore-mouse-events', true, { forward: true })
|
||||
})
|
||||
el.addEventListener('mouseleave', () => {
|
||||
ipcRenderer.send('set-ignore-mouse-events', false)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
This makes the web page click-through when over the `#clickThroughElement` element,
|
||||
and returns to normal outside it.
|
||||
|
||||
## Set custom draggable region
|
||||
|
||||
By default, the frameless window is non-draggable. Apps need to specify
|
||||
`-webkit-app-region: drag` in CSS to tell Electron which regions are draggable
|
||||
(like the OS's standard titlebar), and apps can also use
|
||||
`-webkit-app-region: no-drag` to exclude the non-draggable area from the
|
||||
draggable region. Note that only rectangular shapes are currently supported.
|
||||
|
||||
To make the whole window draggable, you can add `-webkit-app-region: drag` as
|
||||
`body`'s style:
|
||||
|
||||
```css title='styles.css'
|
||||
body {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
```
|
||||
|
||||
And note that if you have made the whole window draggable, you must also mark
|
||||
buttons as non-draggable, otherwise it would be impossible for users to click on
|
||||
them:
|
||||
|
||||
```css title='styles.css'
|
||||
button {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
```
|
||||
|
||||
If you're only setting a custom titlebar as draggable, you also need to make all
|
||||
buttons in titlebar non-draggable.
|
||||
|
||||
### Tip: disable text selection
|
||||
|
||||
When creating a draggable region, the dragging behavior may conflict with text selection.
|
||||
For example, when you drag the titlebar, you may accidentally select its text contents.
|
||||
To prevent this, you need to disable text selection within a draggable area like this:
|
||||
|
||||
```css
|
||||
.titlebar {
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
```
|
||||
|
||||
### Tip: disable context menus
|
||||
|
||||
On some platforms, the draggable area will be treated as a non-client frame, so
|
||||
when you right click on it, a system menu will pop up. To make the context menu
|
||||
behave correctly on all platforms, you should never use a custom context menu on
|
||||
draggable areas.
|
||||
|
||||
[`blur()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/blur()
|
||||
[`BrowserWindow`]: ../api/browser-window.md
|
||||
[chrome]: https://developer.mozilla.org/en-US/docs/Glossary/Chrome
|
||||
[ignore-mouse-events]: ../api/browser-window.md#winsetignoremouseeventsignore-options
|
||||
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
|
||||
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis
|
||||
[Window Controls Overlay API]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md
|
||||
@@ -23,7 +23,6 @@ auto_filenames = {
|
||||
"docs/api/environment-variables.md",
|
||||
"docs/api/extensions.md",
|
||||
"docs/api/file-object.md",
|
||||
"docs/api/frameless-window.md",
|
||||
"docs/api/global-shortcut.md",
|
||||
"docs/api/in-app-purchase.md",
|
||||
"docs/api/incoming-message.md",
|
||||
|
||||
@@ -39,7 +39,8 @@ Object.assign(app, {
|
||||
hasSwitch: (theSwitch: string) => commandLine.hasSwitch(String(theSwitch)),
|
||||
getSwitchValue: (theSwitch: string) => commandLine.getSwitchValue(String(theSwitch)),
|
||||
appendSwitch: (theSwitch: string, value?: string) => commandLine.appendSwitch(String(theSwitch), typeof value === 'undefined' ? value : String(value)),
|
||||
appendArgument: (arg: string) => commandLine.appendArgument(String(arg))
|
||||
appendArgument: (arg: string) => commandLine.appendArgument(String(arg)),
|
||||
removeSwitch: (theSwitch: string) => commandLine.removeSwitch(String(theSwitch))
|
||||
} as Electron.CommandLine
|
||||
});
|
||||
|
||||
|
||||
@@ -593,6 +593,9 @@ WebContents.prototype._init = function () {
|
||||
ipcMainInternal.emit(channel, event, ...args);
|
||||
} else {
|
||||
addReplyToEvent(event);
|
||||
if (this.listenerCount('ipc-message-sync') === 0 && ipcMain.listenerCount(channel) === 0) {
|
||||
console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${channel}' channel without listeners.`);
|
||||
}
|
||||
this.emit('ipc-message-sync', event, channel, ...args);
|
||||
ipcMain.emit(channel, event, ...args);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,11 @@ WebFrameMain.prototype.send = function (channel, ...args) {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(false /* internal */, channel, args);
|
||||
try {
|
||||
return this._send(false /* internal */, channel, args);
|
||||
} catch (e) {
|
||||
console.error('Error sending from webFrameMain: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
WebFrameMain.prototype._sendInternal = function (channel, ...args) {
|
||||
@@ -15,7 +19,11 @@ WebFrameMain.prototype._sendInternal = function (channel, ...args) {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(true /* internal */, channel, args);
|
||||
try {
|
||||
return this._send(true /* internal */, channel, args);
|
||||
} catch (e) {
|
||||
console.error('Error sending from webFrameMain: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
WebFrameMain.prototype.postMessage = function (...args) {
|
||||
|
||||
@@ -65,8 +65,13 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#apis-for-creating-and-navigating-browsing-contexts-by-name
|
||||
const existingWindow = getGuestWindowByFrameName(frameName);
|
||||
if (existingWindow) {
|
||||
existingWindow.loadURL(url);
|
||||
return existingWindow;
|
||||
if (existingWindow.isDestroyed() || existingWindow.webContents.isDestroyed()) {
|
||||
// FIXME(t57ser): The webContents is destroyed for some reason, unregister the frame name
|
||||
unregisterFrameName(frameName);
|
||||
} else {
|
||||
existingWindow.loadURL(url);
|
||||
return existingWindow;
|
||||
}
|
||||
}
|
||||
|
||||
const window = new BrowserWindow({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "16.0.0-alpha.7",
|
||||
"version": "16.0.0-beta.3",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -2,5 +2,4 @@ expose_ripemd160.patch
|
||||
expose_aes-cfb.patch
|
||||
expose_des-ede3.patch
|
||||
fix_sync_evp_get_cipherbynid_and_evp_get_cipherbyname.patch
|
||||
add_maskhash_to_rsa_pss_params_st_for_compat.patch
|
||||
enable_x509_v_flag_trusted_first_flag.patch
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 8 Sep 2021 10:59:51 +0200
|
||||
Subject: Add maskHash to rsa_pss_params_st for compat
|
||||
|
||||
This CL adds a maskHash member to the rsa_pss_params_st struct for
|
||||
increased compatibility with OpenSSL.
|
||||
|
||||
Node.js recently began to make use of this member in
|
||||
https://github.com/nodejs/node/pull/39851
|
||||
and without this member Electron sees compilation errors.
|
||||
|
||||
Upstreamed at https://boringssl-review.googlesource.com/c/boringssl/+/49365
|
||||
|
||||
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
|
||||
index fa333ca057dd8e90a3e38c51db6269815de7b85f..0f4a6d79514739fb4c719f9e5b41db364e775417 100644
|
||||
--- a/include/openssl/x509.h
|
||||
+++ b/include/openssl/x509.h
|
||||
@@ -1949,6 +1949,7 @@ typedef struct rsa_pss_params_st {
|
||||
X509_ALGOR *maskGenAlgorithm;
|
||||
ASN1_INTEGER *saltLength;
|
||||
ASN1_INTEGER *trailerField;
|
||||
+ X509_ALGOR *maskHash;
|
||||
} RSA_PSS_PARAMS;
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS)
|
||||
@@ -31,7 +31,7 @@ index 786a5d5fb13d7ceafc9b7d58c0aaccb88552506d..5ede89f9f0761d1da1baa899e9a02b77
|
||||
return EVP_aes_128_ctr();
|
||||
} else if (OPENSSL_strcasecmp(name, "aes-192-ctr") == 0) {
|
||||
diff --git a/decrepit/evp/evp_do_all.c b/decrepit/evp/evp_do_all.c
|
||||
index 5a41a7b7dc9afee65d9004c497da735073715bd3..c6c901eaff474eaa3f06128ea825b8203d064a52 100644
|
||||
index 852b76bea69988e0b3ac76a17b603128f239dde0..d443f4dc2daea0b7aa86ae75d31d995fae667ba9 100644
|
||||
--- a/decrepit/evp/evp_do_all.c
|
||||
+++ b/decrepit/evp/evp_do_all.c
|
||||
@@ -20,8 +20,10 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
||||
|
||||
@@ -19,7 +19,7 @@ index 5ede89f9f0761d1da1baa899e9a02b77ffcffe93..8205e121c152fe4e2d8df34a1ac2fe04
|
||||
// This is not a name used by OpenSSL, but tcpdump registers it
|
||||
// with |EVP_add_cipher_alias|. Our |EVP_add_cipher_alias| is a
|
||||
diff --git a/decrepit/evp/evp_do_all.c b/decrepit/evp/evp_do_all.c
|
||||
index c6c901eaff474eaa3f06128ea825b8203d064a52..f577cd23bf72b94b2651fe5eeb757106f5adaea2 100644
|
||||
index d443f4dc2daea0b7aa86ae75d31d995fae667ba9..5e71420b765019edea82a33884ace539cd91bda5 100644
|
||||
--- a/decrepit/evp/evp_do_all.c
|
||||
+++ b/decrepit/evp/evp_do_all.c
|
||||
@@ -39,6 +39,7 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
||||
|
||||
@@ -10,12 +10,12 @@ this patch is required to provide ripemd160 support in the nodejs crypto
|
||||
module.
|
||||
|
||||
diff --git a/crypto/digest_extra/digest_extra.c b/crypto/digest_extra/digest_extra.c
|
||||
index a93601c170dc407f7d6d628fb7e2d2f0788467f3..00911ee69bb99a34b938ea6a62cd10bc930ec95c 100644
|
||||
index 8cbb28e3afde3dbae3887b22e8b607fa7303e89f..32caba196eb9f0823f774dac9e91314035b3ff7f 100644
|
||||
--- a/crypto/digest_extra/digest_extra.c
|
||||
+++ b/crypto/digest_extra/digest_extra.c
|
||||
@@ -84,6 +84,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
{NID_sha384, EVP_sha384, SN_sha384, LN_sha384},
|
||||
@@ -85,6 +85,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
|
||||
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
|
||||
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
|
||||
+ {NID_ripemd160, EVP_ripemd160, SN_ripemd160, LN_ripemd160},
|
||||
// As a remnant of signing |EVP_MD|s, OpenSSL returned the corresponding
|
||||
@@ -62,21 +62,21 @@ index f006ebbc53eea78ce0337a076a05285f22da7a18..7b9309f39a2e5dc6e61bb89e5d32b176
|
||||
+
|
||||
#undef CHECK
|
||||
diff --git a/decrepit/evp/evp_do_all.c b/decrepit/evp/evp_do_all.c
|
||||
index d8023e08f70a060aed083212fefd1de3ecc142e4..5a41a7b7dc9afee65d9004c497da735073715bd3 100644
|
||||
index a3fb077b9b9e66d1bc524fd7987622e73aa4776a..852b76bea69988e0b3ac76a17b603128f239dde0 100644
|
||||
--- a/decrepit/evp/evp_do_all.c
|
||||
+++ b/decrepit/evp/evp_do_all.c
|
||||
@@ -78,6 +78,7 @@ void EVP_MD_do_all_sorted(void (*callback)(const EVP_MD *cipher,
|
||||
callback(EVP_sha256(), "SHA256", NULL, arg);
|
||||
@@ -79,6 +79,7 @@ void EVP_MD_do_all_sorted(void (*callback)(const EVP_MD *cipher,
|
||||
callback(EVP_sha384(), "SHA384", NULL, arg);
|
||||
callback(EVP_sha512(), "SHA512", NULL, arg);
|
||||
+ callback(EVP_ripemd160(), "RIPEMD160", NULL, arg);
|
||||
callback(EVP_sha512_256(), "SHA512-256", NULL, arg);
|
||||
+ callback(EVP_ripemd160(), "ripemd160", NULL, arg);
|
||||
|
||||
callback(EVP_md4(), "md4", NULL, arg);
|
||||
callback(EVP_md5(), "md5", NULL, arg);
|
||||
@@ -86,6 +87,7 @@ void EVP_MD_do_all_sorted(void (*callback)(const EVP_MD *cipher,
|
||||
callback(EVP_sha256(), "sha256", NULL, arg);
|
||||
@@ -88,6 +89,7 @@ void EVP_MD_do_all_sorted(void (*callback)(const EVP_MD *cipher,
|
||||
callback(EVP_sha384(), "sha384", NULL, arg);
|
||||
callback(EVP_sha512(), "sha512", NULL, arg);
|
||||
callback(EVP_sha512_256(), "sha512-256", NULL, arg);
|
||||
+ callback(EVP_ripemd160(), "ripemd160", NULL, arg);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
revert_remove_warning_about_unknown_abstract_origin.patch
|
||||
revert_add_inline_and_inline_origin_records_to_symbol_file.patch
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Thu, 2 Sep 2021 22:55:25 +0000
|
||||
Subject: Revert "Remove warning about unknown abstract origin"
|
||||
|
||||
This reverts commit 7933ec0a69bac134b7cee4b60a5dc80743b2b1a9.
|
||||
|
||||
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc
|
||||
index dacc9cbe4b0e13d19b5969fe91ba7a867e64a36c..c51514b7575c2e961aaae3ff883be00d80e3ec15 100644
|
||||
--- a/src/common/dwarf_cu_to_module.cc
|
||||
+++ b/src/common/dwarf_cu_to_module.cc
|
||||
@@ -504,6 +504,8 @@ void DwarfCUToModule::GenericDIEHandler::ProcessAttributeReference(
|
||||
abstract_origin_ = &(origin->second);
|
||||
} else if (data > offset_) {
|
||||
forward_ref_die_offset_ = data;
|
||||
+ } else {
|
||||
+ cu_context_->reporter->UnknownAbstractOrigin(offset_, data);
|
||||
}
|
||||
specification_offset_ = data;
|
||||
break;
|
||||
@@ -748,6 +750,14 @@ void DwarfCUToModule::InlineHandler::Finish() {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Malformed DWARF may omit the name, but all Module::Functions must
|
||||
+ // have names.
|
||||
+ // If we have a forward reference to a DW_AT_specification or
|
||||
+ // DW_AT_abstract_origin, then don't warn, the name will be fixed up
|
||||
+ // later
|
||||
+ if (name_.empty() && forward_ref_die_offset_ == 0)
|
||||
+ cu_context_->reporter->UnnamedFunction(offset_);
|
||||
+
|
||||
// Every DW_TAG_inlined_subroutine should have a DW_AT_abstract_origin.
|
||||
assert(specification_offset_ != 0);
|
||||
|
||||
@@ -919,6 +929,11 @@ void DwarfCUToModule::FuncHandler::Finish() {
|
||||
if (!name_.empty()) {
|
||||
name = name_;
|
||||
} else {
|
||||
+ // If we have a forward reference to a DW_AT_specification or
|
||||
+ // DW_AT_abstract_origin, then don't warn, the name will be fixed up
|
||||
+ // later
|
||||
+ if (forward_ref_die_offset_ == 0)
|
||||
+ cu_context_->reporter->UnnamedFunction(offset_);
|
||||
name = "<name omitted>";
|
||||
}
|
||||
|
||||
@@ -104,8 +104,10 @@ logging_win32_only_create_a_console_if_logging_to_stderr.patch
|
||||
fix_media_key_usage_with_globalshortcuts.patch
|
||||
feat_expose_raw_response_headers_from_urlloader.patch
|
||||
chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch
|
||||
fix_chrome_root_store_codegen_for_cross-compile_builds.patch
|
||||
process_singleton.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
cherry-pick-ec42dfd3545f.patch
|
||||
cherry-pick-39090918efac.patch
|
||||
roll_perfetto_trace_processor_linux_from_b852166f90d5_to_e90b9fb93385.patch
|
||||
feat_add_data_parameter_to_processsingleton.patch
|
||||
mas_gate_private_enterprise_APIs
|
||||
|
||||
@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 794a89ded73c415403d0d590780869c8d8b4ae38..5eb76debe9804a5195747cb6b90707fd0a242ec6 100644
|
||||
index 808bbcb0a13bbf069b2354bf39aabcd6d316d514..20e4cbe56bdb8dca3883778b16b9c127aca34793 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -127,6 +127,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -23,10 +23,10 @@ index 794a89ded73c415403d0d590780869c8d8b4ae38..5eb76debe9804a5195747cb6b90707fd
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 173952d4545d59ecb1b99aa07b6c8f8bcd1b2e86..395bb615c0a2d5a49cfbc6d8a9e9f3d9a809b595 100644
|
||||
index 4560b2e363e7392467ff623691d3bd0302b5a502..ebf2d997f03c36e5242405002c7dce583aec31dc 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4461,6 +4461,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4460,6 +4460,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 173952d4545d59ecb1b99aa07b6c8f8bcd1b2e86..395bb615c0a2d5a49cfbc6d8a9e9f3d9
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 4cd3901203e5399fb5a2855fca98e083fe0973d1..b11cb66d157023d36113f28399d57ff2b2f10abb 100644
|
||||
index 100e382cc73c1f107cd1b7e618b93e009a1f6c65..afebce99ebbcb28aff27d2d7044bb080ce9fd40e 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -593,6 +593,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -594,6 +594,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -123,10 +123,10 @@ index 57c9b6b733ebf5b9483d31959fbdccad8b72031c..13c7e6924a19717473379045ae1c1f0e
|
||||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index 65356d0acdc5868cce8401ed88b90d75c6306f28..338ebba74360e09bfc93c5be943ab828d22b500b 100644
|
||||
index 0a4a0b8a4dc871dc86887774a6c81282ea98cda6..ab6ada68a78aa22e723080925d20cf14e8fe822a 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -359,6 +359,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -360,6 +360,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index e4f71e2ce9cf7cce68c0b2c336d6a7329a7cd564..30bd888e778d27c738eb67df2316db191a3c3066 100644
|
||||
index af75828e89e8cb1cca20c8acd64c9f864c0ffab7..182a6ebdf1ccad6b6ef7a2d45791bc0f5dc456f2 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -616,6 +616,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -627,6 +627,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ index e4f71e2ce9cf7cce68c0b2c336d6a7329a7cd564..30bd888e778d27c738eb67df2316db19
|
||||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index b9a91d4cf22379408c296742f8ec66eb20c34f7e..f110151e555fc90f9ad863a43b6185c7481cf3b3 100644
|
||||
index b51bd8160bf63a75066d23514b727eb365a3918c..48413119621f6b118b80d681f777e74af8dc8ab7 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
bool IsRenderViewLive() override;
|
||||
void WriteIntoTrace(perfetto::TracedValue context) override;
|
||||
|
||||
@@ -34,10 +34,10 @@ index b9a91d4cf22379408c296742f8ec66eb20c34f7e..f110151e555fc90f9ad863a43b6185c7
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
|
||||
index 740d1c322b740d374dd0287d99daebc1fe39ceda..f6ed1402120c0d8b30356c87a52d88fe39ed08d9 100644
|
||||
index 8bb06dec16fbf205230a10e0e52daa787338bc23..9ebc42788391e838e78af75e2449dde4f1107f22 100644
|
||||
--- a/content/public/browser/render_view_host.h
|
||||
+++ b/content/public/browser/render_view_host.h
|
||||
@@ -90,6 +90,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
@@ -84,6 +84,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
// Write a representation of this object into a trace.
|
||||
virtual void WriteIntoTrace(perfetto::TracedValue context) = 0;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a088
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index cf505929c9f6eac724a22e5abcd362ed70aed710..b49500d62fb29f179ae802366108c84e2f891836 100644
|
||||
index be646cf80c0d3490979e3500821c5fc4351af2a7..dca161475f9e0cd86db8675faec3d375d94c490f 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -553,10 +553,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index efa8e6578dbdda31a9cfafe680d03c809617f84c..46affd2c438a5108440848943fb20efe070e6ed0 100644
|
||||
index 702ac1a5464635acb1064ca31f7ef211cc0b4a66..6adcf56ca83237d93cd289744b4eb29d7f9e39d6 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -77,6 +77,7 @@
|
||||
|
||||
@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 897e473cbb4c3e8b244210706e4e1549b1e71a0c..cde17f7fee3851e96afc181c92121867c97a0f95 100644
|
||||
index abab9c8e8c60a6d1690acca5133b3c54d0ccc793..f4378acd7c92193c6e6ac2785cd8a670bd9c650c 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -165,11 +165,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,10 +33,10 @@ index 897e473cbb4c3e8b244210706e4e1549b1e71a0c..cde17f7fee3851e96afc181c92121867
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 3acfeb5e5bf721fabe2339e389193cd9e154e293..9cdea4ca822f74cf7398d3f474bcc5ccfd43f829 100644
|
||||
index 27f4f83da31dbd3a1e754279e760dddf00224e1b..5cdcad53c32d7f25fe041344cb7441bdd6c524a5 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4398,7 +4398,7 @@ static_library("browser") {
|
||||
@@ -4415,7 +4415,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
@@ -46,10 +46,10 @@ index 3acfeb5e5bf721fabe2339e389193cd9e154e293..9cdea4ca822f74cf7398d3f474bcc5cc
|
||||
}
|
||||
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index f8eeccc044eebd0c7f1a845ff29c7e46acf83252..d81d15061a88a7e38d7ee46ca7b0f6fcbe994961 100644
|
||||
index a7e09cea9b71e810e08790d109e805a8119c0825..52f9f2b0d4e3ee7d3221f04f122f41e1429f6016 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -5353,7 +5353,6 @@ test("unit_tests") {
|
||||
@@ -5482,7 +5482,6 @@ test("unit_tests") {
|
||||
assert(toolkit_views)
|
||||
sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
|
||||
deps += [
|
||||
@@ -57,7 +57,7 @@ index f8eeccc044eebd0c7f1a845ff29c7e46acf83252..d81d15061a88a7e38d7ee46ca7b0f6fc
|
||||
"//chrome/browser:chrome_process_finder",
|
||||
"//chrome/browser/safe_browsing/chrome_cleaner",
|
||||
"//chrome/browser/safe_browsing/chrome_cleaner:public",
|
||||
@@ -5366,6 +5365,12 @@ test("unit_tests") {
|
||||
@@ -5495,6 +5494,12 @@ test("unit_tests") {
|
||||
"//components/chrome_cleaner/public/proto",
|
||||
"//ui/events/devices:test_support",
|
||||
]
|
||||
@@ -70,7 +70,7 @@ index f8eeccc044eebd0c7f1a845ff29c7e46acf83252..d81d15061a88a7e38d7ee46ca7b0f6fc
|
||||
}
|
||||
|
||||
# TODO(crbug.com/931218): Ninja cannot handle certain characters appearing
|
||||
@@ -5953,7 +5958,6 @@ test("unit_tests") {
|
||||
@@ -6088,7 +6093,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -78,7 +78,7 @@ index f8eeccc044eebd0c7f1a845ff29c7e46acf83252..d81d15061a88a7e38d7ee46ca7b0f6fc
|
||||
"//chrome/browser:cart_db_content_proto",
|
||||
"//chrome/browser/media/router:test_support",
|
||||
"//chrome/browser/resource_coordinator:intervention_policy_database_proto",
|
||||
@@ -5989,6 +5993,9 @@ test("unit_tests") {
|
||||
@@ -6124,6 +6128,9 @@ test("unit_tests") {
|
||||
"//ui/native_theme:test_support",
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
||||
rebuild the entire tree.
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 725894d05274355be4ad5d6ac3388a489220a50c..e568780d699a9ac977e509165b2e9b0516cde779 100644
|
||||
index 62e7e4bcd3e6c1ef49e3c929af7ac4634a1e6e2b..4edb4b27d985f6cd836832cde49346089ebe579e 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index befd11fbac2068e6ac303989528ee609263ae9b2..ea22c655ae4e5c1e023d68fbedb2a684edabe1fe 100644
|
||||
index 78eb422f2ac9c56f7a601f2e82a759817be23f82..1a62a9669484980a69d658ca6729e7caf3db96fb 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -6406,6 +6406,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -6533,6 +6533,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index befd11fbac2068e6ac303989528ee609263ae9b2..ea22c655ae4e5c1e023d68fbedb2a684
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index afee3ed1f21aa9b95e2dc48191445d0f18049bbb..0ba0990cf02624cc7cf1b304a0d9b63692cd464d 100644
|
||||
index b9aa5d69242727e1a01df7a0d00d592c58e3815a..5a86229bf1fc52e6cccbf609ed029fe88d35cd8f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3739,6 +3739,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3734,6 +3734,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -39,7 +39,7 @@ index afee3ed1f21aa9b95e2dc48191445d0f18049bbb..0ba0990cf02624cc7cf1b304a0d9b636
|
||||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_id, session_storage_namespace);
|
||||
|
||||
@@ -3781,12 +3789,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3776,12 +3784,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -68,10 +68,10 @@ index 74ed9ae0eae10e77dace6905b5108a834b07f8b4..924d6b43d444ccb919d6985c975eb886
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 9f8dbbc7a63cf8a1a8166dd67efd452eab791426..8a45f8c39fe160829de316c513e73327dabfc391 100644
|
||||
index 0cf1f777dc5ffbca606fff558ef6a41e8ed60a99..40bd443cb3c82d9671c4716900a1f19b3c26de69 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -557,6 +557,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -555,6 +555,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -81,10 +81,10 @@ index 9f8dbbc7a63cf8a1a8166dd67efd452eab791426..8a45f8c39fe160829de316c513e73327
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 4db050cb8e5e328f84d4a5fc92aee7d743ee16c4..bb30bb3604a793cbe37d20a3a18b21d5abfd6530 100644
|
||||
index b6dae0082a297a6dbafd63bd56729b77ffb832fc..66ff9593b8f3d62c486ef83c4c682edf73081d88 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -166,6 +166,7 @@ class NetworkService;
|
||||
@@ -167,6 +167,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -92,7 +92,7 @@ index 4db050cb8e5e328f84d4a5fc92aee7d743ee16c4..bb30bb3604a793cbe37d20a3a18b21d5
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -924,6 +925,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -922,6 +923,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -173,10 +173,10 @@ index ea22a86dc1a6e5cdb3e3dfa31a929a3dd14b9e61..215b059bb2dfcead6c709c99b39578f8
|
||||
/*is_opener_navigation=*/false, request.HasUserGesture(),
|
||||
// `openee_can_access_opener_origin` only matters for opener navigations,
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index c6872573086e628a894f482877db2d417552c6a1..5e67b6a59c3e3d6881f738985ab947a2d7902f0a 100644
|
||||
index 520b6f8146361cf8c00079c1cc0f5394f747d405..77f58cc157229eb01ce9a35aa5814f64d6e8f2f2 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -450,6 +450,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -438,6 +438,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -186,10 +186,10 @@ index c6872573086e628a894f482877db2d417552c6a1..5e67b6a59c3e3d6881f738985ab947a2
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
|
||||
index 427656a1a01a9305459a8f1d6616fd0666413b39..c8e296286cdd148348932d2bdfa4d064f8cbe36d 100644
|
||||
index 1580bd13ea123740dc7a8813680a8d2448d49969..5c0809733b366ecff02c5a4b77dac9530eb15fbf 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -80,6 +80,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 10e40d408bb0b1526534918add49906e65d17368..b6a0473ad93f8ef1adc53536411e8fd62c106b5d 100644
|
||||
index 3915f0df47d5a2ae1a5f2909d2aa59192c0cc44b..ada26f26f2ac0fab4a2dc02a5b64c72614c06965 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2022,6 +2022,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2027,6 +2027,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, incumbent_window);
|
||||
|
||||
@@ -18,7 +18,7 @@ Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#925457}
|
||||
|
||||
diff --git a/chrome/browser/net/websocket_browsertest.cc b/chrome/browser/net/websocket_browsertest.cc
|
||||
index 0714f0d0231d677edd0f0cdf82f4129ddc43a5c2..6f2f101743fbd470bafe90d7e5d14351ee0ff708 100644
|
||||
index 8a9fe6db3b0030496d00cf57d96a90ee899babaf..de48b97b96c22eeae5fe680868c48381d9a13cc2 100644
|
||||
--- a/chrome/browser/net/websocket_browsertest.cc
|
||||
+++ b/chrome/browser/net/websocket_browsertest.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -113,13 +113,11 @@ index 0714f0d0231d677edd0f0cdf82f4129ddc43a5c2..6f2f101743fbd470bafe90d7e5d14351
|
||||
std::string query("url=" + url.spec());
|
||||
GURL::Replacements replacements;
|
||||
replacements.SetQueryStr(query);
|
||||
- ui_test_utils::NavigateToURL(browser(),
|
||||
- http_server_.GetURL("/connect_to.html")
|
||||
- .ReplaceComponents(replacements));
|
||||
+ ASSERT_TRUE(ui_test_utils::NavigateToURL(
|
||||
ASSERT_TRUE(ui_test_utils::NavigateToURL(
|
||||
- browser(), http_server_.GetURL("/connect_to.html")
|
||||
+ browser(), server()
|
||||
+ .GetURL(host, "/connect_to.html")
|
||||
+ .ReplaceComponents(replacements)));
|
||||
.ReplaceComponents(replacements)));
|
||||
}
|
||||
|
||||
- private:
|
||||
@@ -261,19 +259,19 @@ index 05c653fc5d2ab9a333efea5b4c5eee83a03bbe07..8a6d78214fe5974cbb0ec62b61f4d7fd
|
||||
</head>
|
||||
</html>
|
||||
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
|
||||
index 5157cde07dc141f64509a50df848013c0b60dac5..4d947a6f7211b265a22e8e1d2445a9977572d6ac 100644
|
||||
index 71199ca12a6b805f288349b0d702b834d4e51df7..90626857ea6452a04e872d13f4474c67a905353c 100644
|
||||
--- a/net/test/spawned_test_server/base_test_server.cc
|
||||
+++ b/net/test/spawned_test_server/base_test_server.cc
|
||||
@@ -156,6 +156,8 @@ base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const {
|
||||
@@ -137,6 +137,8 @@ base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const {
|
||||
case CERT_KEY_USAGE_RSA_DIGITAL_SIGNATURE:
|
||||
return base::FilePath(
|
||||
FILE_PATH_LITERAL("key_usage_rsa_digitalsignature.pem"));
|
||||
case CERT_AUTO:
|
||||
return base::FilePath();
|
||||
+ case CERT_TEST_NAMES:
|
||||
+ return base::FilePath(FILE_PATH_LITERAL("test_names.pem"));
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -247,6 +249,14 @@ GURL BaseTestServer::GetURL(const std::string& path) const {
|
||||
@@ -228,6 +230,14 @@ GURL BaseTestServer::GetURL(const std::string& path) const {
|
||||
return GURL(GetScheme() + "://" + host_port_pair_.ToString() + "/" + path);
|
||||
}
|
||||
|
||||
@@ -289,10 +287,10 @@ index 5157cde07dc141f64509a50df848013c0b60dac5..4d947a6f7211b265a22e8e1d2445a997
|
||||
const std::string& user) const {
|
||||
return GURL(GetScheme() + "://" + user + "@" + host_port_pair_.ToString() +
|
||||
diff --git a/net/test/spawned_test_server/base_test_server.h b/net/test/spawned_test_server/base_test_server.h
|
||||
index a3854cb9d81bcccae33a67b3952517a8d82521e9..aab6ab6c3e9d1480c74a46a8a97d2be112685ff1 100644
|
||||
index e16c548686fd00517493a33ad390dfd2a4ead380..091c5b3ea3f910bfe188c82bc1be85f75dd7dc78 100644
|
||||
--- a/net/test/spawned_test_server/base_test_server.h
|
||||
+++ b/net/test/spawned_test_server/base_test_server.h
|
||||
@@ -81,6 +81,11 @@ class BaseTestServer {
|
||||
@@ -77,6 +77,11 @@ class BaseTestServer {
|
||||
// A certificate with invalid notBefore and notAfter times. Windows'
|
||||
// certificate library will not parse this certificate.
|
||||
CERT_BAD_VALIDITY,
|
||||
@@ -303,8 +301,8 @@ index a3854cb9d81bcccae33a67b3952517a8d82521e9..aab6ab6c3e9d1480c74a46a8a97d2be1
|
||||
+ CERT_TEST_NAMES,
|
||||
};
|
||||
|
||||
// Bitmask of key exchange algorithms that the test server supports and that
|
||||
@@ -276,6 +281,8 @@ class BaseTestServer {
|
||||
// NOTE: the values of these enumerators are passed to the the Python test
|
||||
@@ -206,6 +211,8 @@ class BaseTestServer {
|
||||
bool GetAddressList(AddressList* address_list) const WARN_UNUSED_RESULT;
|
||||
|
||||
GURL GetURL(const std::string& path) const;
|
||||
|
||||
@@ -35,10 +35,10 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..fe1977c5e6ce0f5b30e8be529b9efa51
|
||||
|
||||
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
|
||||
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
||||
index d6295d809381f4f4a86a9948762079232ba6c93c..ad429250984cf367e1194bda67bc56a886f650ae 100644
|
||||
index c0823105ecc86ce2e60ede44be29a14889dad887..bb0f2672c6e565657500e617b4eb416c0575dac7 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.cc
|
||||
+++ b/chrome/browser/media/offscreen_tab.cc
|
||||
@@ -283,8 +283,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
@@ -284,8 +284,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -49,10 +49,10 @@ index d6295d809381f4f4a86a9948762079232ba6c93c..ad429250984cf367e1194bda67bc56a8
|
||||
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||
// offscreen tabs.
|
||||
diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h
|
||||
index 3fd38bcb861174f99369d0e53b9946c632baf21a..de1a4df623538cc2857f8bb85b05e17d411c45a0 100644
|
||||
index c80128b816cc77b95af215384fdc36b2150f95ea..3fe773e671d1c087eaf1303ca60883597c0c3907 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.h
|
||||
+++ b/chrome/browser/media/offscreen_tab.h
|
||||
@@ -103,8 +103,7 @@ class OffscreenTab final : public ProfileObserver,
|
||||
@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -94,10 +94,10 @@ index 07014765f33bdddebcc5bc32a2713d6523faf394..f866f69f9c810d89f1a0e9e4952293f6
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) override;
|
||||
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3582e02c3 100644
|
||||
index ba376cca99e6b8b367c6a4cfc9925b940728b9fc..f1b831507d628d35cc65f697ffc832568fc28193 100644
|
||||
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
@@ -66,8 +66,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
@@ -72,8 +72,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -108,10 +108,10 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 61724ab53609f80cf5a0139c8bdb2ad1fb0413b2..b8647710bf9a16e8ffc3ca3b25aa4f6c584fa9be 100644
|
||||
index c8d3c04475fe3ee60ec4671ee47c18aa78840dd1..e5d95132b4f20f17f328e41cf6d0cf839787222a 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1789,12 +1789,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1790,12 +1790,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -155,10 +155,10 @@ index ff97ac6e97c688d677053a5f01546a4c2d91ff1d..1da6a9c32b883a17975e61d603639182
|
||||
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||
// local presentations.
|
||||
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
index 058ec72442d59989c4d6df4a7c791ecfeff0ef99..f7c8c2139382cb2e290c561624291afe647383cf 100644
|
||||
index 45cd02ecf7b7acb107f95656b3fa07a5fca2ea95..b06ca2dbdd0c21554802ab3b99576b381d0e4ddb 100644
|
||||
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
@@ -99,8 +99,7 @@ class PresentationReceiverWindowController final
|
||||
@@ -104,8 +104,7 @@ class PresentationReceiverWindowController final
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -232,10 +232,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index bc84aa5826d4ca8aef8f496acd3569152007b7a8..b6524566b96a141ba710441ab70d17f46e5b1b9a 100644
|
||||
index ad1b4abe0390215e007ad2db8d972661470e94ed..d3593a6f3e9f6cba5823169d36fd93a6f97608ae 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3687,8 +3687,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3682,8 +3682,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -316,10 +316,10 @@ index b794ee4204fb8eaf90084e762f80988af13609b4..ac4e00f2ef1d2a722851d88531c28e65
|
||||
}
|
||||
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index bb90319f768ed2f3a3e530d64bf622de585ce163..d84de1d218267887f6b8624f913438ebc4aa7a79 100644
|
||||
index 647a9bdf39c60f61cf3c9520bc7e57e206678cd0..59860dc143467168e2ce596f26c84ed8a26be6ed 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -158,8 +158,7 @@ class MimeHandlerViewGuest
|
||||
@@ -167,8 +167,7 @@ class MimeHandlerViewGuest
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
|
||||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 8847ed67e305d746c671afb49b445afaf24b85b3..3acfeb5e5bf721fabe2339e389193cd9e154e293 100644
|
||||
index 7f050d074a057b9226444432625e3df856c5d1d8..27f4f83da31dbd3a1e754279e760dddf00224e1b 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -6689,6 +6689,7 @@ static_library("browser") {
|
||||
@@ -6736,6 +6736,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
@@ -32,7 +32,7 @@ index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581cc
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
|
||||
index 1ece01a38683e81fdf07ec475c2bf1bf19fab891..668789ca5c0b3b6381313dbb4cccf119b80e9b66 100644
|
||||
index e2f54334ed199b0cb4658c1b1c956dd8bc8b2bf0..0241849170f6d589d011c28127abfd9bc830e5e5 100644
|
||||
--- a/components/language/core/browser/BUILD.gn
|
||||
+++ b/components/language/core/browser/BUILD.gn
|
||||
@@ -28,6 +28,7 @@ static_library("browser") {
|
||||
|
||||
@@ -52,10 +52,10 @@ index d6d896b87bb327bd7387335bd5bbac4616316f1e..ec0293ba8b66df5c9a34435cb2a0c9a3
|
||||
NotifyKeyPressed(ui::Accelerator(key_code, modifiers));
|
||||
}
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
index 27655641551afe9763cd76afe366f04e56efbbc6..14ff891a057464a1bd570cb14e127ce865d9ba91 100644
|
||||
index 866c4e6c1ff8c1a2399d943837fce1753c8ea1a5..ecde46fe5f8c5f250a7cb505c86ae59cfa1bd623 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
@@ -41,7 +41,8 @@ class GlobalShortcutListenerOzone
|
||||
@@ -46,7 +46,8 @@ class GlobalShortcutListenerOzone
|
||||
void OnKeyPressed(ui::KeyboardCode key_code,
|
||||
bool is_alt_down,
|
||||
bool is_ctrl_down,
|
||||
|
||||
@@ -75,10 +75,10 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31
|
||||
// Used by WebView to sample crashes without generating the unwanted dumps. If
|
||||
// the returned value is less than 100, crash dumping will be sampled to that
|
||||
diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc
|
||||
index 1abde7faf44a4526d7c622e6ce2d6fafe957a4c8..68d745567c1a0e37fa4ebc9e7e705d2a24f3e1fe 100644
|
||||
index 99e5ee6eeadb9ff12b7b027ceba4c838a8fedc6d..838ccd82b5828c1c58b3089064b7baeb35982f7e 100644
|
||||
--- a/components/crash/core/app/crashpad_linux.cc
|
||||
+++ b/components/crash/core/app/crashpad_linux.cc
|
||||
@@ -165,6 +165,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -178,6 +178,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
// where crash_reporter provides it's own values for lsb-release.
|
||||
annotations["lsb-release"] = base::GetLinuxDistro();
|
||||
#endif
|
||||
@@ -86,7 +86,7 @@ index 1abde7faf44a4526d7c622e6ce2d6fafe957a4c8..68d745567c1a0e37fa4ebc9e7e705d2a
|
||||
|
||||
std::vector<std::string> arguments;
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
@@ -186,6 +187,13 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -199,6 +200,13 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
|
||||
re-submitting the patch.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 7e7a16e6f9cb187a834ecc44b27f288c9146b6a6..a2aca80f9a95c345e6d394b78d3341534fd0450f 100644
|
||||
index 29fd158813a0d4ecd5f7cb41cd2c9a6bf8a29f6c..b3f2e64cb729f43faeb0e3af39ca5469d77fb503 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -751,7 +751,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -752,7 +752,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ index a3e1de40e843b5450f417a0455e0e7d7dee1d1bd..63befdc162a4b4a16e8c5099abb0f5af
|
||||
|
||||
int DesktopMediaListBase::GetSourceCount() const {
|
||||
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
index a1038183d5b44ca760576bff55534b5841e2e9d2..e9cc308271c561b249ace7dc9e703b549fcfbbd2 100644
|
||||
index c87535950fdc6cf1c5641835a69971d0e1654025..a6151407ae3ac3456d0af07330db3d1ae82bd6a9 100644
|
||||
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
@@ -31,7 +31,7 @@ class DesktopMediaListBase : public DesktopMediaList {
|
||||
@@ -35,7 +35,7 @@ class DesktopMediaListBase : public DesktopMediaList {
|
||||
void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
|
||||
void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
|
||||
void StartUpdating(DesktopMediaListObserver* observer) override;
|
||||
@@ -51,7 +51,7 @@ index a1038183d5b44ca760576bff55534b5841e2e9d2..e9cc308271c561b249ace7dc9e703b54
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 5a851f4c89b4ed2b41640bf8bad47b7d8eba8ca1..2dc65acfc355180dc966aab76b39fc1956325b84 100644
|
||||
index 4c822ebcca602ecbd30fbc79d72a1ecabc273229..d9f45c280ce4f5771c379033d8034e68681e42f8 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -16,7 +16,7 @@
|
||||
@@ -74,7 +74,7 @@ index 5a851f4c89b4ed2b41640bf8bad47b7d8eba8ca1..2dc65acfc355180dc966aab76b39fc19
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
@@ -425,6 +426,8 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -427,6 +428,8 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
@@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
|
||||
can be found at https://github.com/electron/electron/issues/1821
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 21e96caaa87538f962b7446dc889bd0ece3ca986..21d64ed9c116088fb5f4becad8a5e827ff47f1c4 100644
|
||||
index 81132959080d21a341fcc418fcd7c73cf62b78c4..9cac7284aeacda2d877502f97d9e442ae4fdadd3 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
@@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -29,7 +29,7 @@ index 21e96caaa87538f962b7446dc889bd0ece3ca986..21d64ed9c116088fb5f4becad8a5e827
|
||||
// A scoping class that prevents a window from being able to redraw in response
|
||||
// to invalidations that may occur within it for the lifetime of the object.
|
||||
//
|
||||
@@ -358,6 +362,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
@@ -360,6 +364,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
cancel_unlock_(false),
|
||||
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
||||
::IsWindow(hwnd_) &&
|
||||
@@ -37,7 +37,7 @@ index 21e96caaa87538f962b7446dc889bd0ece3ca986..21d64ed9c116088fb5f4becad8a5e827
|
||||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
@@ -979,6 +984,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
return scoped_enable;
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ index 21e96caaa87538f962b7446dc889bd0ece3ca986..21d64ed9c116088fb5f4becad8a5e827
|
||||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index a338ec40a4052a40304d7cf8c4e222f539412e68..6c109dde127bb04b33d18f030ffe4ec2a2e044c6 100644
|
||||
index fd402c3d6b0130dc91d6d369bc3337f9955ccf6d..36caa4704af99a6769cf359582a11b025a2b24a0 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -202,6 +202,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
@@ -206,6 +206,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
using TouchIDs = std::set<DWORD>;
|
||||
enum class DwmFrameState { kOff, kOn };
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
||||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index 3be9e62159ad6ac98e1cd0790c7c06921effe5e3..356a8f451061b0bddeb1fcc1b64d7e48b7e8c8a6 100644
|
||||
index c841d7f51ea7a99fe2e806e4102bf91d75853ed0..ed983081afb0f4ead01da32cd56d61ecb63d33dd 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1802,6 +1802,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1789,6 +1789,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
|
||||
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
@@ -60,7 +60,7 @@ index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b52
|
||||
bool force_antialiasing = false;
|
||||
bool force_blending_with_shaders = false;
|
||||
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
|
||||
index f919df4d79a1168269c1538ac13a2a944586cf4e..fc34cf5d7dab95e7b6fc0576674b3e2be1792c65 100644
|
||||
index aab0c5d1dbdfce9b56ada8861a0a7ffb42704a96..430ad6cfc7bba31bc097e654765fb94d42bcdfe5 100644
|
||||
--- a/components/viz/host/renderer_settings_creation.cc
|
||||
+++ b/components/viz/host/renderer_settings_creation.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -229,7 +229,7 @@ index 1e2ad6423a5e316a9a1713abab7579ea0d2a82f9..22df5e1728e5dc2879c9b96911f6e734
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index cc90e0aae77c0ca80eeab84eee8ff89a1295dbd2..fa96e7fa8c4f5d14da548398e533b10f153723ed 100644
|
||||
index 49d6d4107c0e4e0c37471394c5b7bdf84b3c823a..f0773c8fe1ccf0a3f920c840719ad7ee07d5d0db 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -224,6 +224,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -241,10 +241,10 @@ index cc90e0aae77c0ca80eeab84eee8ff89a1295dbd2..fa96e7fa8c4f5d14da548398e533b10f
|
||||
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
|
||||
sandbox::policy::switches::kGpuSandboxFailuresFatal,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 0a53d80feb2cdaa599da3ea87a8a6a8f8327ae92..532e82ca5145853b218c1e835d0b71bc1b158564 100644
|
||||
index 3555928a29b3c6022621c4e9b65531edbefa7797..9b36af8cd02f56810b6b8ed86d1c8ba544567233 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -183,6 +183,7 @@
|
||||
@@ -182,6 +182,7 @@
|
||||
#include "ui/accessibility/accessibility_switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "ui/display/display_switches.h"
|
||||
@@ -252,7 +252,7 @@ index 0a53d80feb2cdaa599da3ea87a8a6a8f8327ae92..532e82ca5145853b218c1e835d0b71bc
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3375,6 +3376,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3416,6 +3417,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
// Propagate the following switches to the renderer command line (along
|
||||
// with any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -293,7 +293,7 @@ index 94ca8fd75212fa5c7b90823a112309dd7961353b..566393827ef739eb8fc0e24e6ee505e1
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
index 083e7c6d49574ae5d1beeba02b334ae864d60afb..85626cd2354b0c13caceb8a1b4f7d585f400cb2c 100644
|
||||
index 62ff201dae894250b84ad3c32f477ff9324e1906..e53116a55c234f1cbc2d8f05cc8090e931095f1a 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 515d1588c0de8daa503df91338dc3a5c072c5690..b524f3125f955ba065c2d87e992606ec88b95b55 100644
|
||||
index 5aac5fcfe781e282b748630c07341d1b465d99ac..987b0e85ead3a33c8d0a93ac9a6c95782b22af96 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -483,7 +483,11 @@
|
||||
@@ -491,7 +491,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 095ae394b95b07f17295611dc1ade9ae7b4f2c1c..b72e3f6ab2a43e8a7f707e9634fb3a4abb87e993 100644
|
||||
index 3ec7188cc015df085e46d3dac1374af1d92ae4d3..a1632e19959d163eecafef484204aa0dba919897 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -773,6 +773,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -776,6 +776,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
@@ -20,12 +20,12 @@ index 095ae394b95b07f17295611dc1ade9ae7b4f2c1c..b72e3f6ab2a43e8a7f707e9634fb3a4a
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 59b0439a6ba6959b5c37c316fcb955a1486c343d..2b93a57863f4e0e5e41fbf4a640510d70b794830 100644
|
||||
index b7a3b2bc9032934a8537a49b8e1fd895eae721dd..aa864537cf2c3002623427ecd10ff62c88e75aba 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -856,6 +856,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
mojom::CreateFrameWidgetParamsPtr
|
||||
BindAndGenerateCreateFrameWidgetParamsForNewWindow();
|
||||
@@ -864,6 +864,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
void OnLocalSurfaceIdChanged(
|
||||
const cc::RenderFrameMetadata& metadata) override;
|
||||
|
||||
+ // Electron: Prevents the widget from getting hidden.
|
||||
+ bool disable_hidden_ = false;
|
||||
@@ -34,7 +34,7 @@ index 59b0439a6ba6959b5c37c316fcb955a1486c343d..2b93a57863f4e0e5e41fbf4a640510d7
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 2f508cbb53a9d5734c1be40827b5b4794b639056..555937e97250f62d68860ec86026efafe6a5d616 100644
|
||||
index afdd5aa89be899a1176a770c7a4c06f7fa2579ef..0ea6f2ee5bfd41bfb36db6de19a42128b4894dd8 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index cd3055cb99e117868d6b1d2d7a4faedca0a3981f..5f5bf984b28c5f708db632f1771601b08f23a3b1 100644
|
||||
index cb2bde331db92cd29a3af5ca2c065bbf02b39208..46ba89e09cf228bc022142e040763b5a9332764c 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1098,6 +1098,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1105,6 +1105,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index cd3055cb99e117868d6b1d2d7a4faedca0a3981f..5f5bf984b28c5f708db632f1771601b0
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1144,6 +1145,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1151,6 +1152,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
|
||||
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
|
||||
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 395bb615c0a2d5a49cfbc6d8a9e9f3d9a809b595..dcf47a194713764d0ccb588ff07de7fc43e30bdc 100644
|
||||
index ebf2d997f03c36e5242405002c7dce583aec31dc..2cf1ac25f3c4ca0348502a37dbf84111842ced93 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2357,7 +2357,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
|
||||
@@ -2347,7 +2347,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
|
||||
}
|
||||
|
||||
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 17668789847d1a7f7037b9507adb824c02f1cb31..6401d9b00d6c7071c16ca44866a3d53116ddfb89 100644
|
||||
index d8411ddc4fd88a1416181cce366b112df3f48d63..a33ec53b96fec67feacc92e71fa6ed17c5e47d7d 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -527,7 +527,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -525,7 +525,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) {
|
||||
@@ -19,10 +19,10 @@ index 17668789847d1a7f7037b9507adb824c02f1cb31..6401d9b00d6c7071c16ca44866a3d531
|
||||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 21d64ed9c116088fb5f4becad8a5e827ff47f1c4..7f6ab51b2d83a8c555de1d1e19a40b93b438fbd4 100644
|
||||
index 9cac7284aeacda2d877502f97d9e442ae4fdadd3..33c533665589f78425488547b550876c5161f010 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -926,8 +926,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
@@ -929,8 +929,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
}
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
|
||||
@@ -9,26 +9,26 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
|
||||
of the default V8 allocator. This probably can't be usptreamed.
|
||||
|
||||
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
|
||||
index fa0e7faad9296b9be8d662324c52f40e502f2e38..a579b359c684ccd72dcbe43f40b4aa7b4779c36b 100644
|
||||
index e5da06566ffef8d0b394c0d7fde3916ce49da06e..76bbdf35f4751c87a6d25cc5e8db7aebf43bc821 100644
|
||||
--- a/gin/public/v8_platform.h
|
||||
+++ b/gin/public/v8_platform.h
|
||||
@@ -25,6 +25,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
|
||||
// Some configurations do not use page_allocator.
|
||||
#if BUILDFLAG(USE_PARTITION_ALLOC)
|
||||
v8::PageAllocator* GetPageAllocator() override;
|
||||
+ static v8::PageAllocator* PageAllocator();
|
||||
@@ -30,6 +30,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
|
||||
// enabling Arm's Branch Target Instructions for executable pages. This is
|
||||
// verified in the tests for gin::PageAllocator.
|
||||
PageAllocator* GetPageAllocator() override;
|
||||
+ static PageAllocator* PageAllocator();
|
||||
void OnCriticalMemoryPressure() override;
|
||||
#endif
|
||||
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
||||
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index 6acf18c405774774fa9074f1b3d5daeefbda120e..9147b28b0f7f016a26e3d9e346f1eeb72d719a79 100644
|
||||
index 44f8ffeda27cbfebcfc57e1312e9e9f4ca3ab576..356b5a7c8f39fab97ff434850038f8f6cee750c8 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -472,6 +472,10 @@ v8::PageAllocator* V8Platform::GetPageAllocator() {
|
||||
@@ -368,6 +368,10 @@ PageAllocator* V8Platform::GetPageAllocator() {
|
||||
return g_page_allocator.Pointer();
|
||||
}
|
||||
|
||||
+v8::PageAllocator* V8Platform::PageAllocator() {
|
||||
+PageAllocator* V8Platform::PageAllocator() {
|
||||
+ return g_page_allocator.Pointer();
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
|
||||
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 3896a834cbb17bfe6ecfc602886ea7d77d7d5167..4f752b1e961e23cf2f0e07a93dfe3867bbd56737 100644
|
||||
index 7bd73dae3a77cb16cf282d2df7f4ff7a8f412805..3d3795cd1911647f026addf0d6e6bcc18325f641 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1285,6 +1285,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1292,6 +1292,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 3896a834cbb17bfe6ecfc602886ea7d77d7d5167..4f752b1e961e23cf2f0e07a93dfe3867
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 00bcb6e3b31b7e61a36c6df96d39cd0d5cc5e28a..aacda36b0a14beb415592a1f0e478dc1964d82eb 100644
|
||||
index 049c8e5e0e34454f03a823b31a5f7755d67cfb07..d928b8c314f8c3384215a87aacd01a7f570316c9 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -270,6 +270,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -271,6 +271,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -63,10 +63,10 @@ index 00bcb6e3b31b7e61a36c6df96d39cd0d5cc5e28a..aacda36b0a14beb415592a1f0e478dc1
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 9a4ab0a7493688e31acd119b816de69bfb47d9d7..751769a979c0fc8d3cdcded177ee23c227fcd103 100644
|
||||
index d8e7d0d35317fe1124bf81f60faf2b35ae19a3d7..eed5109002dd99a6e65c8882530a5fd2a69ce28c 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -998,6 +998,9 @@ interface NetworkContext {
|
||||
@@ -1029,6 +1029,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
@@ -77,7 +77,7 @@ index 9a4ab0a7493688e31acd119b816de69bfb47d9d7..751769a979c0fc8d3cdcded177ee23c2
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index 6bf98a5e9028cc162aa5493a5dc6910f59aa10d7..48d1f1414894c3ca71de74a7cb5e49eb98a1bf30 100644
|
||||
index f1fbbf10df01876e8ae3418b72cd0f4fcbda542b..780ccbe1a9ff8ab91b39fdcef74cd5805ba8583d 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Raymond Zhao <raymondzhao@microsoft.com>
|
||||
Date: Tue, 7 Sep 2021 14:54:25 -0700
|
||||
Subject: feat: Add data parameter to ProcessSingleton
|
||||
|
||||
This patch adds an additional_data parameter to the constructor of
|
||||
ProcessSingleton, so that the second instance can send additional
|
||||
data over to the first instance while requesting the ProcessSingleton
|
||||
lock.
|
||||
|
||||
On the Electron side, we then expose an extra parameter to the
|
||||
app.requestSingleInstanceLock API so that users can pass in a JSON
|
||||
object for the second instance to send to the first instance.
|
||||
|
||||
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
|
||||
index eec994c4252f17d9c9c41e66d5dae6509ed98a18..e538c9b76da4d4435e10cd3848438446c2cc2cc8 100644
|
||||
--- a/chrome/browser/process_singleton.h
|
||||
+++ b/chrome/browser/process_singleton.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/process/process.h"
|
||||
+#include "base/containers/span.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
@@ -101,21 +102,24 @@ class ProcessSingleton {
|
||||
// should handle it (i.e., because the current process is shutting down).
|
||||
using NotificationCallback =
|
||||
base::RepeatingCallback<bool(const base::CommandLine& command_line,
|
||||
- const base::FilePath& current_directory)>;
|
||||
+ const base::FilePath& current_directory,
|
||||
+ const std::vector<const uint8_t> additional_data)>;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
ProcessSingleton(const std::string& program_name,
|
||||
const base::FilePath& user_data_dir,
|
||||
+ const base::span<const uint8_t> additional_data,
|
||||
bool is_sandboxed,
|
||||
const NotificationCallback& notification_callback);
|
||||
#else
|
||||
ProcessSingleton(const base::FilePath& user_data_dir,
|
||||
+ const base::span<const uint8_t> additional_data,
|
||||
const NotificationCallback& notification_callback);
|
||||
+#endif
|
||||
|
||||
ProcessSingleton(const ProcessSingleton&) = delete;
|
||||
ProcessSingleton& operator=(const ProcessSingleton&) = delete;
|
||||
|
||||
-#endif
|
||||
~ProcessSingleton();
|
||||
|
||||
// Notify another process, if available. Otherwise sets ourselves as the
|
||||
@@ -179,6 +183,8 @@ class ProcessSingleton {
|
||||
|
||||
private:
|
||||
NotificationCallback notification_callback_; // Handler for notifications.
|
||||
+ // Custom data to pass to the other instance during notify.
|
||||
+ base::span<const uint8_t> additional_data_;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
bool EscapeVirtualization(const base::FilePath& user_data_dir);
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index 05c86df6c871ca7d0926836edc2f6137fcf229cb..01627f6b46c64a24870fa05b9efeaf949203c2ac 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -564,6 +564,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
// |reader| is for sending back ACK message.
|
||||
void HandleMessage(const std::string& current_dir,
|
||||
const std::vector<std::string>& argv,
|
||||
+ const std::vector<const uint8_t> additional_data,
|
||||
SocketReader* reader);
|
||||
|
||||
private:
|
||||
@@ -620,13 +621,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) {
|
||||
}
|
||||
|
||||
void ProcessSingleton::LinuxWatcher::HandleMessage(
|
||||
- const std::string& current_dir, const std::vector<std::string>& argv,
|
||||
+ const std::string& current_dir,
|
||||
+ const std::vector<std::string>& argv,
|
||||
+ const std::vector<const uint8_t> additional_data,
|
||||
SocketReader* reader) {
|
||||
DCHECK(ui_task_runner_->BelongsToCurrentThread());
|
||||
DCHECK(reader);
|
||||
|
||||
if (parent_->notification_callback_.Run(base::CommandLine(argv),
|
||||
- base::FilePath(current_dir))) {
|
||||
+ base::FilePath(current_dir),
|
||||
+ std::move(additional_data))) {
|
||||
// Send back "ACK" message to prevent the client process from starting up.
|
||||
reader->FinishWithACK(kACKToken, base::size(kACKToken) - 1);
|
||||
} else {
|
||||
@@ -674,7 +678,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
}
|
||||
}
|
||||
|
||||
- // Validate the message. The shortest message is kStartToken\0x\0x
|
||||
+ // Validate the message. The shortest message kStartToken\0\00
|
||||
+ // The shortest message with additional data is kStartToken\0\00\00\0.
|
||||
const size_t kMinMessageLength = base::size(kStartToken) + 4;
|
||||
if (bytes_read_ < kMinMessageLength) {
|
||||
buf_[bytes_read_] = 0;
|
||||
@@ -704,10 +709,25 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
tokens.erase(tokens.begin());
|
||||
tokens.erase(tokens.begin());
|
||||
|
||||
+ size_t num_args;
|
||||
+ base::StringToSizeT(tokens[0], &num_args);
|
||||
+ std::vector<std::string> command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args);
|
||||
+
|
||||
+ std::vector<const uint8_t> additional_data;
|
||||
+ if (tokens.size() == 3 + num_args) {
|
||||
+ size_t additional_data_size;
|
||||
+ base::StringToSizeT(tokens[1 + num_args], &additional_data_size);
|
||||
+ const uint8_t* additional_data_bits =
|
||||
+ reinterpret_cast<const uint8_t*>(tokens[2 + num_args].c_str());
|
||||
+ additional_data = std::vector<const uint8_t>(additional_data_bits,
|
||||
+ additional_data_bits + additional_data_size);
|
||||
+ }
|
||||
+
|
||||
// Return to the UI thread to handle opening a new browser tab.
|
||||
ui_task_runner_->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ProcessSingleton::LinuxWatcher::HandleMessage,
|
||||
- parent_, current_dir, tokens, this));
|
||||
+ parent_, current_dir, command_line,
|
||||
+ std::move(additional_data), this));
|
||||
fd_watch_controller_.reset();
|
||||
|
||||
// LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader
|
||||
@@ -736,8 +756,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
//
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const base::FilePath& user_data_dir,
|
||||
+ const base::span<const uint8_t> additional_data,
|
||||
const NotificationCallback& notification_callback)
|
||||
: notification_callback_(notification_callback),
|
||||
+ additional_data_(additional_data),
|
||||
current_pid_(base::GetCurrentProcId()),
|
||||
watcher_(new LinuxWatcher(this)) {
|
||||
socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename);
|
||||
@@ -854,7 +876,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
sizeof(socket_timeout));
|
||||
|
||||
// Found another process, prepare our command line
|
||||
- // format is "START\0<current dir>\0<argv[0]>\0...\0<argv[n]>".
|
||||
+ // format is "START\0<current-dir>\0<n-args>\0<argv[0]>\0...\0<argv[n]>
|
||||
+ // \0<additional-data-length>\0<additional-data>".
|
||||
std::string to_send(kStartToken);
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
|
||||
@@ -864,11 +887,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
to_send.append(current_dir.value());
|
||||
|
||||
const std::vector<std::string>& argv = cmd_line.argv();
|
||||
+ to_send.push_back(kTokenDelimiter);
|
||||
+ to_send.append(base::NumberToString(argv.size()));
|
||||
for (auto it = argv.begin(); it != argv.end(); ++it) {
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
to_send.append(*it);
|
||||
}
|
||||
|
||||
+ size_t data_to_send_size = additional_data_.size_bytes();
|
||||
+ if (data_to_send_size) {
|
||||
+ to_send.push_back(kTokenDelimiter);
|
||||
+ to_send.append(base::NumberToString(data_to_send_size));
|
||||
+ to_send.push_back(kTokenDelimiter);
|
||||
+ to_send.append(reinterpret_cast<const char*>(additional_data_.data()), data_to_send_size);
|
||||
+ }
|
||||
+
|
||||
// Send the message
|
||||
if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) {
|
||||
// Try to kill the other process, because it might have been dead.
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e8847df55 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -99,10 +99,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||
|
||||
bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
base::CommandLine* parsed_command_line,
|
||||
- base::FilePath* current_directory) {
|
||||
+ base::FilePath* current_directory,
|
||||
+ std::vector<const uint8_t>* parsed_additional_data) {
|
||||
// We should have enough room for the shortest command (min_message_size)
|
||||
// and also be a multiple of wchar_t bytes. The shortest command
|
||||
- // possible is L"START\0\0" (empty current directory and command line).
|
||||
+ // possible is L"START\0\0" (empty command line, current directory,
|
||||
+ // and additional data).
|
||||
static const int min_message_size = 7;
|
||||
if (cds->cbData < min_message_size * sizeof(wchar_t) ||
|
||||
cds->cbData % sizeof(wchar_t) != 0) {
|
||||
@@ -152,6 +154,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
const std::wstring cmd_line =
|
||||
msg.substr(second_null + 1, third_null - second_null);
|
||||
*parsed_command_line = base::CommandLine::FromString(cmd_line);
|
||||
+
|
||||
+ const std::wstring::size_type fourth_null =
|
||||
+ msg.find_first_of(L'\0', third_null + 1);
|
||||
+ if (fourth_null == std::wstring::npos ||
|
||||
+ fourth_null == msg.length()) {
|
||||
+ // No additional data was provided.
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ // Get length of the additional data.
|
||||
+ const std::wstring additional_data_length_string =
|
||||
+ msg.substr(third_null + 1, fourth_null - third_null);
|
||||
+ size_t additional_data_length;
|
||||
+ base::StringToSizeT(additional_data_length_string, &additional_data_length);
|
||||
+
|
||||
+ const std::wstring::size_type fifth_null =
|
||||
+ msg.find_first_of(L'\0', fourth_null + 1);
|
||||
+ if (fifth_null == std::wstring::npos ||
|
||||
+ fifth_null == msg.length()) {
|
||||
+ LOG(WARNING) << "Invalid format for start command, we need a string in 6 "
|
||||
+ "parts separated by NULLs";
|
||||
+ }
|
||||
+
|
||||
+ // Get the actual additional data.
|
||||
+ const std::wstring additional_data =
|
||||
+ msg.substr(fourth_null + 1, fifth_null - fourth_null);
|
||||
+ const uint8_t* additional_data_bytes =
|
||||
+ reinterpret_cast<const uint8_t*>(additional_data.c_str());
|
||||
+ *parsed_additional_data = std::vector<const uint8_t>(additional_data_bytes,
|
||||
+ additional_data_bytes + additional_data_length);
|
||||
+
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -168,16 +201,16 @@ bool ProcessLaunchNotification(
|
||||
|
||||
// Handle the WM_COPYDATA message from another process.
|
||||
const COPYDATASTRUCT* cds = reinterpret_cast<COPYDATASTRUCT*>(lparam);
|
||||
-
|
||||
base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM);
|
||||
base::FilePath current_directory;
|
||||
- if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) {
|
||||
+ std::vector<const uint8_t> additional_data;
|
||||
+ if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, &additional_data)) {
|
||||
*result = TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
- *result = notification_callback.Run(parsed_command_line, current_directory) ?
|
||||
- TRUE : FALSE;
|
||||
+ *result = notification_callback.Run(parsed_command_line,
|
||||
+ current_directory, std::move(additional_data)) ? TRUE : FALSE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -274,9 +307,11 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const std::string& program_name,
|
||||
const base::FilePath& user_data_dir,
|
||||
+ const base::span<const uint8_t> additional_data,
|
||||
bool is_app_sandboxed,
|
||||
const NotificationCallback& notification_callback)
|
||||
: notification_callback_(notification_callback),
|
||||
+ additional_data_(additional_data),
|
||||
program_name_(program_name),
|
||||
is_app_sandboxed_(is_app_sandboxed),
|
||||
is_virtualized_(false),
|
||||
@@ -301,7 +336,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
return PROCESS_NONE;
|
||||
}
|
||||
|
||||
- switch (chrome::AttemptToNotifyRunningChrome(remote_window_)) {
|
||||
+ switch (chrome::AttemptToNotifyRunningChrome(remote_window_, additional_data_)) {
|
||||
case chrome::NOTIFY_SUCCESS:
|
||||
return PROCESS_NOTIFIED;
|
||||
case chrome::NOTIFY_FAILED:
|
||||
diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc
|
||||
index 788abf9a04f2a3725d67f7f8d84615016b241c8e..6ae6d97708e18c25c59a0b1e3d2d58f27d980ffb 100644
|
||||
--- a/chrome/browser/win/chrome_process_finder.cc
|
||||
+++ b/chrome/browser/win/chrome_process_finder.cc
|
||||
@@ -34,7 +34,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) {
|
||||
return base::win::MessageWindow::FindWindow(user_data_dir.value());
|
||||
}
|
||||
|
||||
-NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
|
||||
+NotifyChromeResult AttemptToNotifyRunningChrome(
|
||||
+ HWND remote_window,
|
||||
+ const base::span<const uint8_t> additional_data) {
|
||||
DCHECK(remote_window);
|
||||
DWORD process_id = 0;
|
||||
DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id);
|
||||
@@ -42,7 +44,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
|
||||
return NOTIFY_FAILED;
|
||||
|
||||
// Send the command line to the remote chrome window.
|
||||
- // Format is "START\0<<<current directory>>>\0<<<commandline>>>".
|
||||
+ // Format is
|
||||
+ // "START\0<current-directory>\0<command-line>\0<additional-data-length>\0<additional-data>".
|
||||
std::wstring to_send(L"START\0", 6); // want the NULL in the string.
|
||||
base::FilePath cur_dir;
|
||||
if (!base::GetCurrentDirectory(&cur_dir))
|
||||
@@ -53,6 +56,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
|
||||
base::CommandLine::ForCurrentProcess()->GetCommandLineString());
|
||||
to_send.append(L"\0", 1); // Null separator.
|
||||
|
||||
+ size_t additional_data_size = additional_data.size_bytes();
|
||||
+ if (additional_data_size) {
|
||||
+ // Send over the size, because the reinterpret cast to wchar_t could
|
||||
+ // add padding.
|
||||
+ to_send.append(base::UTF8ToWide(base::NumberToString(additional_data_size)));
|
||||
+ to_send.append(L"\0", 1); // Null separator.
|
||||
+
|
||||
+ size_t padded_size = additional_data_size / sizeof(wchar_t);
|
||||
+ if (additional_data_size % sizeof(wchar_t) != 0) {
|
||||
+ padded_size++;
|
||||
+ }
|
||||
+ to_send.append(reinterpret_cast<const wchar_t*>(additional_data.data()),
|
||||
+ padded_size);
|
||||
+ to_send.append(L"\0", 1); // Null separator.
|
||||
+ }
|
||||
+
|
||||
// Allow the current running browser window to make itself the foreground
|
||||
// window (otherwise it will just flash in the taskbar).
|
||||
::AllowSetForegroundWindow(process_id);
|
||||
diff --git a/chrome/browser/win/chrome_process_finder.h b/chrome/browser/win/chrome_process_finder.h
|
||||
index 5516673cee019f6060077091e59498bf9038cd6e..8edea5079b46c2cba67833114eb9c21d85cfc22d 100644
|
||||
--- a/chrome/browser/win/chrome_process_finder.h
|
||||
+++ b/chrome/browser/win/chrome_process_finder.h
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
+#include "base/containers/span.h"
|
||||
#include "base/time/time.h"
|
||||
|
||||
namespace base {
|
||||
@@ -27,7 +28,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir);
|
||||
// Attempts to send the current command line to an already running instance of
|
||||
// Chrome via a WM_COPYDATA message.
|
||||
// Returns true if a running Chrome is found and successfully notified.
|
||||
-NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window);
|
||||
+NotifyChromeResult AttemptToNotifyRunningChrome(
|
||||
+ HWND remote_window,
|
||||
+ const base::span<const uint8_t> additional_data);
|
||||
|
||||
// Changes the notification timeout to |new_timeout|, returns the old timeout.
|
||||
base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout);
|
||||
@@ -44,10 +44,10 @@ index 182721f9238683321ef5645d5506d2e88816f45f..31958788b8b2f110ecedcd9f0ba3b8ec
|
||||
"https://redirector.gvt1.com/edgedl/chrome/dict/";
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
index a8acd00dc449812d336364229fade2a16e21ccbc..8d8eca3c7de3080111043dc465ed4316af026c0b 100644
|
||||
index f2eb0abec4d5fb05dee09b51e02619ba47336025..77667a70584c5a102bddbc46cb71aa616b672384 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
@@ -88,6 +88,8 @@ class SpellcheckHunspellDictionary
|
||||
@@ -93,6 +93,8 @@ class SpellcheckHunspellDictionary
|
||||
// Tests use this method to set a custom URL for downloading dictionaries.
|
||||
static void SetDownloadURLForTesting(const GURL url);
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
|
||||
This patch is used by Electron to implement spellchecker events.
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
index 23980dfd5e35ac9160b82bd0d29bd98762897d1f..aece7fe0a4d45a40afbc0339073ffffb2c0d4f5e 100644
|
||||
index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd0431098d37e 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -466,6 +466,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
@@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
std::make_unique<SpellcheckHunspellDictionary>(
|
||||
dictionary, platform_spellcheck_language, context_, this));
|
||||
hunspell_dictionaries_.back()->AddObserver(this);
|
||||
@@ -20,7 +20,7 @@ index 23980dfd5e35ac9160b82bd0d29bd98762897d1f..aece7fe0a4d45a40afbc0339073ffffb
|
||||
hunspell_dictionaries_.back()->Load();
|
||||
}
|
||||
|
||||
@@ -518,6 +521,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
@@ -519,6 +522,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ index 23980dfd5e35ac9160b82bd0d29bd98762897d1f..aece7fe0a4d45a40afbc0339073ffffb
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) {
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
index a810ed516cce5f491ea75ae2d0bbda65e066ad3e..fcfd3f5801a967fdd7b3e99094a35eddb1a31789 100644
|
||||
index b417b23feb1f53c949d8d8c677ff36431cee2a62..bdc67f1de727983a67ea360b502d791af8b22479 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
@@ -134,6 +134,8 @@ class SpellcheckService : public KeyedService,
|
||||
@@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService,
|
||||
// dictionaries available.
|
||||
bool IsSpellcheckEnabled() const;
|
||||
|
||||
@@ -54,7 +54,7 @@ index a810ed516cce5f491ea75ae2d0bbda65e066ad3e..fcfd3f5801a967fdd7b3e99094a35edd
|
||||
// NotificationProfile implementation.
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
@@ -301,6 +303,8 @@ class SpellcheckService : public KeyedService,
|
||||
@@ -305,6 +307,8 @@ class SpellcheckService : public KeyedService,
|
||||
// A pointer to the BrowserContext which this service refers to.
|
||||
content::BrowserContext* context_;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index f0eb025056501c5d87a0ef814ec4070a3df29bcc..148adf8b17209eeb142c02674a2a24312e588e80 100644
|
||||
index 34dad16dac56631dae62e2c38b8ed7bf6ca2eb41..25f114ceb4c18a88bd23975c85fab67a6311f808 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -137,6 +137,8 @@ viz_component("service") {
|
||||
|
||||
@@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide
|
||||
access to these headers for loader clients created on the browser process.
|
||||
|
||||
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
|
||||
index 5fc02ead27db692a54a5b7efd7dd9cde3c8ee20a..0e42c2c51d6c599ccac560890c4499ba70216ffc 100644
|
||||
index b405a82fd2bfed451f86907e66ae3a4ab5838fbb..988aa62b2d78b736b34e947e42f965fd6b2b563f 100644
|
||||
--- a/services/network/public/cpp/resource_request.cc
|
||||
+++ b/services/network/public/cpp/resource_request.cc
|
||||
@@ -227,6 +227,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -231,6 +231,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
do_not_prompt_for_login == request.do_not_prompt_for_login &&
|
||||
is_main_frame == request.is_main_frame &&
|
||||
transition_type == request.transition_type &&
|
||||
@@ -29,10 +29,10 @@ index 5fc02ead27db692a54a5b7efd7dd9cde3c8ee20a..0e42c2c51d6c599ccac560890c4499ba
|
||||
upgrade_if_insecure == request.upgrade_if_insecure &&
|
||||
is_revalidating == request.is_revalidating &&
|
||||
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
|
||||
index 72bc778a6320dba7e453848ab95ddc6bf43181ba..3de6baf98396a2623ca8d5b74840c913d6f5c4b8 100644
|
||||
index 2b7832dd2c2d006bf8ef382cdf3f7f52e0edd385..f872596bc1236323ecdf1de699c513e40c42592c 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -150,6 +150,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
@@ -160,6 +160,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
bool do_not_prompt_for_login = false;
|
||||
bool is_main_frame = false;
|
||||
int transition_type = 0;
|
||||
@@ -41,10 +41,10 @@ index 72bc778a6320dba7e453848ab95ddc6bf43181ba..3de6baf98396a2623ca8d5b74840c913
|
||||
bool upgrade_if_insecure = false;
|
||||
bool is_revalidating = false;
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
index cc75591aa2955525e928f74941049cf6b0f47e17..4deae021c5f00ab018f440a1869db84f40b98579 100644
|
||||
index 0bcf9231f6a20d5b673d601e84e91f5db34274dd..6b3f5169f9495e8d2b9bb63b12e22b20000fe88d 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
@@ -188,6 +188,7 @@ bool StructTraits<
|
||||
@@ -197,6 +197,7 @@ bool StructTraits<
|
||||
out->do_not_prompt_for_login = data.do_not_prompt_for_login();
|
||||
out->is_main_frame = data.is_main_frame();
|
||||
out->transition_type = data.transition_type();
|
||||
@@ -53,10 +53,10 @@ index cc75591aa2955525e928f74941049cf6b0f47e17..4deae021c5f00ab018f440a1869db84f
|
||||
out->upgrade_if_insecure = data.upgrade_if_insecure();
|
||||
out->is_revalidating = data.is_revalidating();
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
index 7390c691d2c7ffd8504aeb94ccb44a3c03c3c103..cda9b2f4ba3c7ed04ba23e46a2dfef8353dfb4a2 100644
|
||||
index 2ad640951ae17588ac98d9cf2ade197786178257..a617132e8db8f059c15ba26438ac3a70382f4cd6 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.h
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
@@ -253,6 +253,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
|
||||
@@ -266,6 +266,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
|
||||
static int32_t transition_type(const network::ResourceRequest& request) {
|
||||
return request.transition_type;
|
||||
}
|
||||
@@ -67,10 +67,10 @@ index 7390c691d2c7ffd8504aeb94ccb44a3c03c3c103..cda9b2f4ba3c7ed04ba23e46a2dfef83
|
||||
return request.previews_state;
|
||||
}
|
||||
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
|
||||
index 4b0ba93acfb6aa61138469801547edebb1c8d91b..8996a1eaf64c2a96181450e486d785bc6b7edf3c 100644
|
||||
index 8ad56cb2ba2195ec5edd9d36a88ebc3f73b720ff..09dfa592e2960cc82541bb8d2dce3522d5d0142e 100644
|
||||
--- a/services/network/public/mojom/url_request.mojom
|
||||
+++ b/services/network/public/mojom/url_request.mojom
|
||||
@@ -303,6 +303,9 @@ struct URLRequest {
|
||||
@@ -313,6 +313,9 @@ struct URLRequest {
|
||||
// about this.
|
||||
int32 transition_type;
|
||||
|
||||
@@ -103,10 +103,10 @@ index cea1fb864ab46b4b0eabf1db11a0392d6cd575c1..df033f65d50b088778268827e506963a
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index c8e3249c79063c001028add6acd3a451074df214..b6cb6ee4ae623e25abeec62b156002eb7b987028 100644
|
||||
index e8d83ecd221e28182be3443fca89ba6a125622a1..9206c91efe2b08d9b2a4c829fa0135d31244b3fc 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -489,6 +489,7 @@ URLLoader::URLLoader(
|
||||
@@ -490,6 +490,7 @@ URLLoader::URLLoader(
|
||||
peer_closed_handle_watcher_(FROM_HERE,
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunnerHandle::Get()),
|
||||
@@ -114,7 +114,7 @@ index c8e3249c79063c001028add6acd3a451074df214..b6cb6ee4ae623e25abeec62b156002eb
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
request_mode_(request.mode),
|
||||
request_credentials_mode_(request.credentials_mode),
|
||||
@@ -626,7 +627,7 @@ URLLoader::URLLoader(
|
||||
@@ -632,7 +633,7 @@ URLLoader::URLLoader(
|
||||
url_request_->SetRequestHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
|
||||
|
||||
@@ -123,7 +123,7 @@ index c8e3249c79063c001028add6acd3a451074df214..b6cb6ee4ae623e25abeec62b156002eb
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1259,6 +1260,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1255,6 +1256,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
response_ = network::mojom::URLResponseHead::New();
|
||||
PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_,
|
||||
options_, response_.get());
|
||||
@@ -144,10 +144,10 @@ index c8e3249c79063c001028add6acd3a451074df214..b6cb6ee4ae623e25abeec62b156002eb
|
||||
// Parse and remove the Trust Tokens response headers, if any are expected,
|
||||
// potentially failing the request if an error occurs.
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index de2d9f23ad3907562445ba2d3c911f76f1376f5b..254e0ca7cca7332a15cedc324e41481e68831bbf 100644
|
||||
index 6d53bc8f9eef1446d764cb92943a3f9723390ed6..171f2015f09040297afba25218292c304a864758 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -466,6 +466,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -467,6 +467,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Chao <hchao@chromium.org>
|
||||
Date: Tue, 31 Aug 2021 23:20:50 +0000
|
||||
Subject: Fix chrome root store codegen for cross-compile builds.
|
||||
|
||||
Assuming that the textproto file was underneath base::DIR_SOURCE_ROOT
|
||||
didn't work for cross-compile builds, so change the build system to
|
||||
pass the absolute path to the root_store_dir.
|
||||
|
||||
Bug: 1244436
|
||||
Change-Id: I06bd6e5729f23e725bfca0c8f0195fcc89d70ba1
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3133701
|
||||
Commit-Queue: Hubert Chao <hchao@chromium.org>
|
||||
Reviewed-by: David Benjamin <davidben@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#917023}
|
||||
|
||||
diff --git a/net/data/ssl/chrome_root_store/BUILD.gn b/net/data/ssl/chrome_root_store/BUILD.gn
|
||||
index 185d53ec0555fe37be208be488ec1626f1d220ac..92ad13431a3addafdc210cd79501c754a539c38d 100644
|
||||
--- a/net/data/ssl/chrome_root_store/BUILD.gn
|
||||
+++ b/net/data/ssl/chrome_root_store/BUILD.gn
|
||||
@@ -135,9 +135,11 @@ compiled_action("gen_root_store_inc") {
|
||||
"store/certs/fd73dad31c644ff1b43bef0ccdda96710b9cd9875eca7e31707af3e96d522bbd.pem",
|
||||
]
|
||||
outputs = [ "${target_gen_dir}/chrome-root-store-inc.cc" ]
|
||||
- args = [ "--write-cpp=" +
|
||||
- rebase_path("${target_gen_dir}/chrome-root-store-inc.cc",
|
||||
- root_build_dir) ]
|
||||
+ args = [
|
||||
+ "--root-store-dir=" + rebase_path("//net/data/ssl/chrome_root_store/store"),
|
||||
+ "--write-cpp=" + rebase_path("${target_gen_dir}/chrome-root-store-inc.cc",
|
||||
+ root_build_dir),
|
||||
+ ]
|
||||
}
|
||||
|
||||
compiled_action("gen_root_store_test_inc") {
|
||||
@@ -153,7 +155,8 @@ compiled_action("gen_root_store_test_inc") {
|
||||
]
|
||||
outputs = [ "${target_gen_dir}/chrome-root-store-test-data-inc.cc" ]
|
||||
args = [
|
||||
- "--root-store-dir=net/data/ssl/chrome_root_store/testdata",
|
||||
+ "--root-store-dir=" +
|
||||
+ rebase_path("//net/data/ssl/chrome_root_store/testdata"),
|
||||
"--write-cpp=" +
|
||||
rebase_path("${target_gen_dir}/chrome-root-store-test-data-inc.cc",
|
||||
root_build_dir),
|
||||
diff --git a/net/tools/root_store_tool/root_store_tool.cc b/net/tools/root_store_tool/root_store_tool.cc
|
||||
index a41379e7a6f83fd2f14e63955337c3fc0ef9f7f3..b16344d9999ed07954f57a88409edc0c69c4e918 100644
|
||||
--- a/net/tools/root_store_tool/root_store_tool.cc
|
||||
+++ b/net/tools/root_store_tool/root_store_tool.cc
|
||||
@@ -123,37 +123,29 @@ int main(int argc, char** argv) {
|
||||
base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
|
||||
base::FilePath proto_path = command_line.GetSwitchValuePath("write-proto");
|
||||
base::FilePath cpp_path = command_line.GetSwitchValuePath("write-cpp");
|
||||
- if ((proto_path.empty() && cpp_path.empty()) ||
|
||||
- command_line.HasSwitch("help")) {
|
||||
- std::cerr << "Usage: root_store_tool "
|
||||
- << "[--root-store-dir=<relative-path>] "
|
||||
- << "[--write-proto=PROTO_FILE] "
|
||||
- << "[--write-cpp=CPP_FILE]" << std::endl;
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
- // Find root store directory. Assumptions:
|
||||
- // - Root store directory is relative to base::DIR_SOURCE_ROOT
|
||||
- //
|
||||
+ // Get root store directory. Assumptions:
|
||||
// - $(ROOT_STORE_DIR)/root_store.textproto contains the textproto definition
|
||||
// of the root store
|
||||
//
|
||||
// - Any certificate files referenced in
|
||||
// $(ROOT_STORE_DIR)/root_store.textproto exist in the
|
||||
// $(ROOT_STORE_DIR)/certs/ subdirectory.
|
||||
+ //
|
||||
+ // We'd like to assume that Root store directory is relative to
|
||||
+ // base::DIR_SOURCE_ROOT, but in cross-compile cases this gives the wrong
|
||||
+ // result leading to broken builds. See https://crbug.com/1244436.
|
||||
base::FilePath root_store_dir =
|
||||
command_line.GetSwitchValuePath("root-store-dir");
|
||||
- base::FilePath source_root;
|
||||
- CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root));
|
||||
- if (root_store_dir.empty()) {
|
||||
- root_store_dir = source_root.AppendASCII("net")
|
||||
- .AppendASCII("data")
|
||||
- .AppendASCII("ssl")
|
||||
- .AppendASCII("chrome_root_store")
|
||||
- .AppendASCII("store");
|
||||
- } else {
|
||||
- root_store_dir = source_root.Append(root_store_dir);
|
||||
+
|
||||
+ if ((proto_path.empty() && cpp_path.empty()) || root_store_dir.empty() ||
|
||||
+ command_line.HasSwitch("help")) {
|
||||
+ std::cerr << "Usage: root_store_tool "
|
||||
+ << "--root-store-dir=<path> "
|
||||
+ << "[--write-proto=PROTO_FILE] "
|
||||
+ << "[--write-cpp=CPP_FILE]" << std::endl;
|
||||
+ return 1;
|
||||
}
|
||||
+
|
||||
absl::optional<RootStore> root_store = ReadTextRootStore(root_store_dir);
|
||||
if (!root_store) {
|
||||
return 1;
|
||||
@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
||||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 4fa272275ba3883d105ddfd8deeb4987071d1b06..7e7fb60540a113b8213a5a1b266b57f18d67b4a4 100644
|
||||
index 97e6ccbfbd58482299a831c63573890d1f7d46f3..1e6b5ed19688993a750af0fd1fee72a4f67eab28 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1773,7 +1773,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1765,7 +1765,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
|
||||
// Called when the base::ScopedClosureRunner returned by
|
||||
// IncrementCapturerCount() is destructed.
|
||||
@@ -21,10 +21,10 @@ index 4fa272275ba3883d105ddfd8deeb4987071d1b06..7e7fb60540a113b8213a5a1b266b57f1
|
||||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||
// state into account.
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 383d0fd95d7e807b83f4cd972c107fa27fefaac6..ae7a7f187b24bb3ec97bea37881f85ede8689936 100644
|
||||
index 95bcea15ea704f11e8daab49de6d958fb2d15127..f2e9a772fe9449fe0e4be55567019c46ef2d8c6a 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -633,6 +633,8 @@ class WebContents : public PageNavigator,
|
||||
@@ -645,6 +645,8 @@ class WebContents : public PageNavigator,
|
||||
bool stay_hidden,
|
||||
bool stay_awake) WARN_UNUSED_RESULT = 0;
|
||||
|
||||
|
||||
@@ -10,33 +10,94 @@ receive remote control events until it begins playing audio. This runs
|
||||
counter to the design of globalShortcuts, and so we need to instead
|
||||
use `ui::MediaKeysListener`.
|
||||
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
index bc009606d01469125052e68a9cdc82aaa697c764..ff18043cb07d748a49adea9874517fb29e3e7f9f 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
+#include "content/public/browser/media_keys_listener_manager.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
@@ -66,6 +67,22 @@ void GlobalShortcutListener::UnregisterAccelerator(
|
||||
StopListening();
|
||||
}
|
||||
|
||||
+// static
|
||||
+void GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(bool should_use) {
|
||||
+ if (content::MediaKeysListenerManager::
|
||||
+ IsMediaKeysListenerManagerEnabled()) {
|
||||
+ content::MediaKeysListenerManager* media_keys_listener_manager =
|
||||
+ content::MediaKeysListenerManager::GetInstance();
|
||||
+ DCHECK(media_keys_listener_manager);
|
||||
+
|
||||
+ if (should_use) {
|
||||
+ media_keys_listener_manager->EnableInternalMediaKeyHandling();
|
||||
+ } else {
|
||||
+ media_keys_listener_manager->DisableInternalMediaKeyHandling();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void GlobalShortcutListener::UnregisterAccelerators(Observer* observer) {
|
||||
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
if (IsShortcutHandlingSuspended())
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
index 554930bc33d87ee88a9bcc5f0cf17cef09c27ef0..8df4f91d3db453afb9f73bcaeb82c919ca8d1841 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.h
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
@@ -34,6 +34,8 @@ class GlobalShortcutListener {
|
||||
|
||||
static GlobalShortcutListener* GetInstance();
|
||||
|
||||
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
|
||||
+
|
||||
// Register an observer for when a certain |accelerator| is struck. Returns
|
||||
// true if register successfully, or false if 1) the specificied |accelerator|
|
||||
// has been registered by another caller or other native applications, or
|
||||
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
index 5938f75742b793868638e693a9a8c8dc686dfc46..bf8782c23095a09dec62c68d7d902df24abcb13e 100644
|
||||
index 5938f75742b793868638e693a9a8c8dc686dfc46..1263d679a5174beb960265989c370dd4a58ae7b4 100644
|
||||
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
@@ -231,7 +231,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
@@ -231,18 +231,24 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
media::AudioManager::GetGlobalAppName());
|
||||
#endif
|
||||
|
||||
- if (system_media_controls_) {
|
||||
+ if (/* DISABLES CODE */ (0)) {
|
||||
system_media_controls_->AddObserver(this);
|
||||
system_media_controls_notifier_ =
|
||||
std::make_unique<SystemMediaControlsNotifier>(
|
||||
@@ -239,8 +239,13 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
} else {
|
||||
// If we can't access system media controls, then directly listen for media
|
||||
// key keypresses instead.
|
||||
+#if defined(OS_MAC)
|
||||
+ media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
+ this, ui::MediaKeysListener::Scope::kGlobalRequiresAccessibility);
|
||||
+#else
|
||||
- system_media_controls_->AddObserver(this);
|
||||
- system_media_controls_notifier_ =
|
||||
- std::make_unique<SystemMediaControlsNotifier>(
|
||||
- system_media_controls_.get());
|
||||
- } else {
|
||||
- // If we can't access system media controls, then directly listen for media
|
||||
- // key keypresses instead.
|
||||
+ // This is required for proper functioning of MediaMetadata.
|
||||
+ system_media_controls_->AddObserver(this);
|
||||
+ system_media_controls_notifier_ =
|
||||
+ std::make_unique<SystemMediaControlsNotifier>(
|
||||
+ system_media_controls_.get());
|
||||
+
|
||||
+ // Directly listen for media key keypresses when using GlobalShortcuts.
|
||||
+#if defined(OS_MACOS)
|
||||
+ auto scope = media_key_handling_enabled_ ?
|
||||
+ ui::MediaKeysListener::Scope::kGlobal :
|
||||
+ ui::MediaKeysListener::Scope::kGlobalRequiresAccessibility;
|
||||
media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
- this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
- DCHECK(media_keys_listener_);
|
||||
- }
|
||||
+ this, scope);
|
||||
+#else
|
||||
+ media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
+ this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
+#endif
|
||||
DCHECK(media_keys_listener_);
|
||||
}
|
||||
+ DCHECK(media_keys_listener_);
|
||||
|
||||
EnsureAuxiliaryServices();
|
||||
}
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.h b/ui/base/accelerators/media_keys_listener.h
|
||||
index c2b03328c0e508995bdc135031500783f500ceba..1b6b14dc2999c99445cef6ffc04d49a7c1728a54 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.h
|
||||
|
||||
@@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
|
||||
to make it usable from Electron by removing Profile references.
|
||||
|
||||
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
index aaf2d7839245b46d60f54bbaa8fd28ade00401f3..0b5efe1b330f7405d88748d80aad189182d408db 100644
|
||||
index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6bebff933 100644
|
||||
--- a/chrome/browser/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
@@ -20,7 +20,10 @@
|
||||
@@ -136,7 +136,7 @@ index aaf2d7839245b46d60f54bbaa8fd28ade00401f3..0b5efe1b330f7405d88748d80aad1891
|
||||
+#endif
|
||||
}
|
||||
diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h
|
||||
index c0453b9f8603ba99a83a747666a1b05b9c36ca14..b0c610de6322177baf5a7ba44b632a9658756ce8 100644
|
||||
index 8343169078d15f697bbf7aea86eb46cc9b991ef8..96665569cebe6f0c3bb0b074db96620773ee2d81 100644
|
||||
--- a/chrome/browser/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/accessibility/accessibility_ui.h
|
||||
@@ -24,6 +24,8 @@ struct AXEventNotificationDetails;
|
||||
@@ -148,7 +148,7 @@ index c0453b9f8603ba99a83a747666a1b05b9c36ca14..b0c610de6322177baf5a7ba44b632a96
|
||||
namespace user_prefs {
|
||||
class PrefRegistrySyncable;
|
||||
} // namespace user_prefs
|
||||
@@ -60,6 +62,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
@@ -65,6 +67,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 680efc8fe2df3b40cf20bc18c396e661f674a55f..c3e1a28ea8df5a20ba735e46bbc4bf749ba553d3 100644
|
||||
index 67bdf4ff62fd59e86df30e083110501f8181dbe6..b435953e8325046370b4d2b3550c9c069653d56a 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -2986,6 +2986,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3035,6 +3035,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ index 680efc8fe2df3b40cf20bc18c396e661f674a55f..c3e1a28ea8df5a20ba735e46bbc4bf74
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index bb30bb3604a793cbe37d20a3a18b21d5abfd6530..24b8927b4224eb890b5377b88dd8060b4dcfd648 100644
|
||||
index 66ff9593b8f3d62c486ef83c4c682edf73081d88..7d0318a137ad2f2b7bc8743bbad419d3f8f9ce12 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
@@ -38,7 +38,7 @@ index f0a7d0c05fa3c68b22b1d36e2c0810fe70f5a8a0..8ecce17b5bb8b5106de913a2d0197fd3
|
||||
// Returns whether `Initialize` has already been invoked in the process.
|
||||
// Initialization is a one-way operation (i.e., this method cannot return
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 941ced089ed7e201d348b58b38d9d0d74bc843b1..9c78e04219e5bcd8d8044e576367833d0891f7d6 100644
|
||||
index 8177563df293ae9b4bb8cc46cfe81402f2bf50e0..f2eb8677c095a6d24202a524991c3d8aea39c406 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -269,7 +269,8 @@ void SetV8FlagsIfOverridden(const base::Feature& feature,
|
||||
|
||||
@@ -40,7 +40,7 @@ index a8c0d59cb825a791c44c54e55ad7f295ad07a309..a1ef53aa46fb0cfc7bcac121244f77af
|
||||
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 569c179aed6ab7b68b484f55d0abf9562044c389..9612ed45ed7d987c5d4e8f7ef348860ab4fc4252 100644
|
||||
index 8ec17755a906ae60a1424b75ee21bd29fb62ab3f..0d8642a1034abe817ea3434359185b2e5d985879 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1219,6 +1219,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 7a0344321c3050ec9a3c7c5346e2f391ab133b36..6f4750bb6bbbd0fde2c03596fba9de2e050aecc3 100644
|
||||
index 509687647e3566f48c89bfb2bebdfb17fa54fbc2..df1d19126456618529c951a70889edde12005a1c 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -850,6 +850,11 @@
|
||||
@@ -851,6 +851,11 @@
|
||||
"includes": [3880],
|
||||
},
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: gtk_visibility.patch
|
||||
Allow electron to depend on GTK in the GN build.
|
||||
|
||||
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
|
||||
index ecf95dda763b4c4515d9af890b93fbe69e300498..81748583fa032c48c11beb97b0d9eea41c1a9679 100644
|
||||
index 659002397184ad5017686585c0a5ad641e3312c5..85fdf6513403e7a713444213883fe3e0c101af42 100644
|
||||
--- a/build/config/linux/gtk/BUILD.gn
|
||||
+++ b/build/config/linux/gtk/BUILD.gn
|
||||
@@ -33,6 +33,7 @@ pkg_config("gtk_internal_config") {
|
||||
@@ -17,7 +17,7 @@ index ecf95dda763b4c4515d9af890b93fbe69e300498..81748583fa032c48c11beb97b0d9eea4
|
||||
# This is the only target that can depend on GTK. Do not add more targets
|
||||
# to this list.
|
||||
"//ui/gtk:gtk_stubs",
|
||||
@@ -63,6 +64,9 @@ pkg_config("gtkprint_internal_config") {
|
||||
@@ -64,6 +65,9 @@ pkg_config("gtkprint_internal_config") {
|
||||
}
|
||||
|
||||
group("gtkprint") {
|
||||
|
||||
@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
||||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 95ba8a59241ed74b0c85ccf1fd480acb0bb9b82d..474f14af183e2fbbed9977b0f1d815fe7bf86889 100755
|
||||
index addc389948378353edb1f24e7416a2a9fbafed14..de2e861859efdcb99a5fd18a6d94efa0d2e17832 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -286,6 +286,8 @@ def main():
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: mas: avoid usage of pthread_fchdir_np
|
||||
Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
|
||||
|
||||
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
|
||||
index a8713e15329431de6445e7935710d727872fd134..8874c300fd1b556a6eab5c6f20f00e5b2db9f3bc 100644
|
||||
index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644
|
||||
--- a/base/process/launch_mac.cc
|
||||
+++ b/base/process/launch_mac.cc
|
||||
@@ -26,8 +26,10 @@ extern "C" {
|
||||
@@ -20,7 +20,7 @@ index a8713e15329431de6445e7935710d727872fd134..8874c300fd1b556a6eab5c6f20f00e5b
|
||||
|
||||
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
|
||||
API_AVAILABLE(macosx(10.14));
|
||||
@@ -95,21 +97,29 @@ class PosixSpawnFileActions {
|
||||
@@ -96,21 +98,29 @@ class PosixSpawnFileActions {
|
||||
};
|
||||
|
||||
int ChangeCurrentThreadDirectory(const char* path) {
|
||||
@@ -50,7 +50,7 @@ index a8713e15329431de6445e7935710d727872fd134..8874c300fd1b556a6eab5c6f20f00e5b
|
||||
}
|
||||
|
||||
struct GetAppOutputOptions {
|
||||
@@ -229,11 +239,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
file_actions.Inherit(STDERR_FILENO);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,10 +87,10 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a
|
||||
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
|
||||
};
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
index 0345506d7ca2a64737109f97524b563dd55ecc3a..3a58d7354feae315fff91ca12339da67f6cf3cfb 100644
|
||||
index e7a1a348280c96a31fac75616d6e3034d1863a06..7631c62e2e799770f6abbb9af158235c00ce6185 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
@@ -48,7 +48,9 @@ class ScopedPasswordInputEnabler;
|
||||
@@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler;
|
||||
|
||||
@protocol RenderWidgetHostViewMacDelegate;
|
||||
|
||||
@@ -100,7 +100,7 @@ index 0345506d7ca2a64737109f97524b563dd55ecc3a..3a58d7354feae315fff91ca12339da67
|
||||
@class RenderWidgetHostViewCocoa;
|
||||
|
||||
namespace content {
|
||||
@@ -653,10 +655,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
@@ -657,10 +659,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
// EnsureSurfaceSynchronizedForWebTest().
|
||||
uint32_t latest_capture_sequence_number_ = 0u;
|
||||
|
||||
@@ -114,10 +114,10 @@ index 0345506d7ca2a64737109f97524b563dd55ecc3a..3a58d7354feae315fff91ca12339da67
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index d5a4cbe5cf985221451488a0440a63818e85dc87..515d1588c0de8daa503df91338dc3a5c072c5690 100644
|
||||
index 922e51e7debac09e5444027c87603d40b972ffc7..5aac5fcfe781e282b748630c07341d1b465d99ac 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -240,8 +240,10 @@
|
||||
@@ -251,8 +251,10 @@
|
||||
void RenderWidgetHostViewMac::MigrateNSViewBridge(
|
||||
remote_cocoa::mojom::Application* remote_cocoa_application,
|
||||
uint64_t parent_ns_view_id) {
|
||||
@@ -128,7 +128,7 @@ index d5a4cbe5cf985221451488a0440a63818e85dc87..515d1588c0de8daa503df91338dc3a5c
|
||||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1439,8 +1441,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1469,8 +1471,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -139,7 +139,7 @@ index d5a4cbe5cf985221451488a0440a63818e85dc87..515d1588c0de8daa503df91338dc3a5c
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1484,9 +1488,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1514,9 +1518,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -151,7 +151,7 @@ index d5a4cbe5cf985221451488a0440a63818e85dc87..515d1588c0de8daa503df91338dc3a5c
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -1980,12 +1986,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2009,12 +2015,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
@@ -167,7 +167,7 @@ index d5a4cbe5cf985221451488a0440a63818e85dc87..515d1588c0de8daa503df91338dc3a5c
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 32d0427d811b2c9b2c2591066c85fdd343850207..f93a10b1e2e37cb0d476ac7bdfa1302cf7864e7b 100644
|
||||
index ae61e09deae53071c3a00d054cde3c57a8ac143a..7f91c46cd437f269b76fda383fd2d6ab990d310c 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -322,6 +322,13 @@ component("base") {
|
||||
@@ -205,7 +205,7 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b
|
||||
+
|
||||
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
index 7277159ea1fae7778b6725bc97278a6721872a7e..787f5e072ea9e615bbd67b83ab0e9cc57d05549a 100644
|
||||
index 2d6816834ac6ca1f487d889e2a2a1715b8047beb..6369db1564d6f48d5290f356725ccfcafbc045c4 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
@@ -30,7 +30,9 @@
|
||||
@@ -218,7 +218,7 @@ index 7277159ea1fae7778b6725bc97278a6721872a7e..787f5e072ea9e615bbd67b83ab0e9cc5
|
||||
@class NSView;
|
||||
|
||||
namespace remote_cocoa {
|
||||
@@ -425,11 +427,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
@@ -430,11 +432,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
|
||||
remote_ns_window_remote_;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ cases where performance improves when disabling remote CoreAnimation (remote
|
||||
CoreAnimation is really only about battery usage).
|
||||
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
index c49b1befb9cd7bdcb5982db014ced3203b4fd561..c2a9347da27bc51cc2216520801d410c467f9b0b 100644
|
||||
index caeaaf96088709486688ba1ca231b928f600c3f1..27024e051cf9e7424c9187f6af5e3b03ca1edaf2 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
|
||||
@@ -20,7 +20,9 @@
|
||||
@@ -29,7 +29,7 @@ index c49b1befb9cd7bdcb5982db014ced3203b4fd561..c2a9347da27bc51cc2216520801d410c
|
||||
@class CALayer;
|
||||
|
||||
namespace ui {
|
||||
@@ -118,7 +120,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass,
|
||||
@@ -119,7 +121,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass,
|
||||
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
|
||||
|
||||
bool use_remote_layer_api_;
|
||||
@@ -40,7 +40,7 @@ index c49b1befb9cd7bdcb5982db014ced3203b4fd561..c2a9347da27bc51cc2216520801d410c
|
||||
|
||||
gfx::Size pixel_size_;
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
index d7d7ab38ed248663bf0bb08a72b591c87e0b9459..07e243419f6d52af992fbdd009dce2d08f8adde2 100644
|
||||
index 54c5b7bcbe4ead3653bcea1f82ac34212d87392e..d7ce7c04e1fcab4949e1340901aacfac14bb383e 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
36
patches/chromium/mas_gate_private_enterprise_APIs
Normal file
36
patches/chromium/mas_gate_private_enterprise_APIs
Normal file
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <khammond@slack-corp.com>
|
||||
Date: Tue, 19 Oct 2021 16:56:25 -0700
|
||||
Subject: fix: mas gate private enterprise APIs
|
||||
|
||||
Beginning in Electron 15.2.0, Chromium moved several formerly public
|
||||
APIs into the AreDeviceAndUserJoinedToDomain method. Using these APIs
|
||||
in a MAS build will result in rejection from the Apple Store. This
|
||||
patch gates those APIs to non-MAS builds to comply with Apple
|
||||
Store requirements, and returns the default state for MAS builds.
|
||||
|
||||
diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm
|
||||
index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9a6d0bacc 100644
|
||||
--- a/base/enterprise_util_mac.mm
|
||||
+++ b/base/enterprise_util_mac.mm
|
||||
@@ -168,6 +168,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() {
|
||||
DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
static DeviceUserDomainJoinState state = [] {
|
||||
DeviceUserDomainJoinState state{false, false};
|
||||
+#if defined(MAS_BUILD)
|
||||
+ return state;
|
||||
+ }();
|
||||
+
|
||||
+ return state;
|
||||
+}
|
||||
+#else
|
||||
|
||||
@autoreleasepool {
|
||||
ODSession* session = [ODSession defaultSession];
|
||||
@@ -274,5 +281,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
|
||||
return state;
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace base
|
||||
@@ -148,10 +148,10 @@ index 4ce4b7ebcf8be625619e6fee0cab4185add42454..eca83c0807e37c36022a29187b1dc1c8
|
||||
OptionalNSObject MakePairArray(const OptionalNSObject& obj1,
|
||||
const OptionalNSObject& obj2) {
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
|
||||
index eb62bcb05aa03a8ff0a09c1a5109af2bdb8c66b7..f14557a9ac49488b345bf64747125e51a3cf8139 100644
|
||||
index b2da63a5831595944b9e12ba8386167bd0bb6c7c..dac074cc081cc12948f0d9b2e2b89ef1b10cbb66 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
|
||||
@@ -161,7 +161,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
@@ -160,7 +160,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
@property(nonatomic, readonly) NSNumber* enabled;
|
||||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with Voiceover.
|
||||
@@ -161,7 +161,7 @@ index eb62bcb05aa03a8ff0a09c1a5109af2bdb8c66b7..f14557a9ac49488b345bf64747125e51
|
||||
@property(nonatomic, readonly) NSNumber* expanded;
|
||||
@property(nonatomic, readonly) NSNumber* focused;
|
||||
@property(nonatomic, readonly) NSNumber* grabbed;
|
||||
@@ -173,7 +175,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
@@ -172,7 +174,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
// Index of a row, column, or tree item.
|
||||
@property(nonatomic, readonly) NSNumber* index;
|
||||
@property(nonatomic, readonly) NSNumber* treeItemRowIndex;
|
||||
@@ -171,7 +171,7 @@ index eb62bcb05aa03a8ff0a09c1a5109af2bdb8c66b7..f14557a9ac49488b345bf64747125e51
|
||||
@property(nonatomic, readonly) NSString* invalid;
|
||||
@property(nonatomic, readonly) NSNumber* isMultiSelectable;
|
||||
@property(nonatomic, readonly) NSString* placeholderValue;
|
||||
@@ -196,14 +200,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
@@ -195,14 +199,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
|
||||
// The object is selected as a whole.
|
||||
@property(nonatomic, readonly) NSNumber* selected;
|
||||
@property(nonatomic, readonly) NSArray* selectedChildren;
|
||||
@@ -191,7 +191,7 @@ index eb62bcb05aa03a8ff0a09c1a5109af2bdb8c66b7..f14557a9ac49488b345bf64747125e51
|
||||
// is concerned.
|
||||
@property(nonatomic, readonly) NSString* subrole;
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f8fb9e36e 100644
|
||||
index 8ed0e510c5a0381c04c80f12d1ab415ffa6770d8..ad59de0943abe8fa856cf787cec917c1c314cbb4 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -206,6 +206,7 @@
|
||||
@@ -281,7 +281,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
{NSAccessibilitySizeAttribute, @"size"},
|
||||
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
||||
{NSAccessibilitySubroleAttribute, @"subrole"},
|
||||
@@ -1408,6 +1422,7 @@ - (NSNumber*)enabled {
|
||||
@@ -1412,6 +1426,7 @@ - (NSNumber*)enabled {
|
||||
ax::mojom::Restriction::kDisabled);
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)endTextMarker {
|
||||
@@ -1416,6 +1431,7 @@ - (id)endTextMarker {
|
||||
@@ -1420,6 +1435,7 @@ - (id)endTextMarker {
|
||||
BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfContent());
|
||||
}
|
||||
@@ -297,7 +297,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
|
||||
- (NSNumber*)expanded {
|
||||
if (![self instanceActive])
|
||||
@@ -1616,6 +1632,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
@@ -1620,6 +1636,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
- (NSNumber*)AXInsertionPointLineNumber {
|
||||
return [self insertionPointLineNumber];
|
||||
}
|
||||
@@ -1645,6 +1662,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
@@ -1649,6 +1666,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
caretPosition->AsTextPosition()->text_offset());
|
||||
return @(std::distance(lineBreaks.begin(), iterator));
|
||||
}
|
||||
@@ -313,7 +313,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
|
||||
// Returns whether or not this node should be ignored in the
|
||||
// accessibility tree.
|
||||
@@ -2012,8 +2030,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
@@ -2016,8 +2034,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
return content::AXTextEdit(newValue, std::u16string(), nil);
|
||||
}
|
||||
}
|
||||
@@ -325,7 +325,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
+#endif
|
||||
}
|
||||
|
||||
- (BOOL)instanceActive {
|
||||
// internal
|
||||
@@ -2346,6 +2368,7 @@ - (NSArray*)selectedChildren {
|
||||
return ret;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -3971,6 +4005,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3968,6 +4002,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
->AsTextSelectionPosition()));
|
||||
}
|
||||
}
|
||||
@@ -423,7 +423,7 @@ index 4ad415b3d71dfb8aa419088ef43436003b16a182..8ad9a55531ed17be240986036e0cf42f
|
||||
if ([attribute
|
||||
isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) {
|
||||
BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value);
|
||||
@@ -3981,6 +4016,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3978,6 +4013,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
range.anchor()->AsTextSelectionPosition(),
|
||||
range.focus()->AsTextSelectionPosition()));
|
||||
}
|
||||
@@ -673,7 +673,7 @@ index e0c31170acd13c9997c6b1d04c6de1420feaf422..0e561f97b33380bfbe52e64c2c4a6988
|
||||
|
||||
} // namespace sandbox
|
||||
diff --git a/sandbox/mac/seatbelt_extension.cc b/sandbox/mac/seatbelt_extension.cc
|
||||
index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595c35cc4dc 100644
|
||||
index d59a16112d27e2696437163483c44eca414c225c..1ccd20fe7efa3cbae48f99d0660b025283dd370e 100644
|
||||
--- a/sandbox/mac/seatbelt_extension.cc
|
||||
+++ b/sandbox/mac/seatbelt_extension.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -684,7 +684,7 @@ index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595
|
||||
// libsandbox private API.
|
||||
extern "C" {
|
||||
extern const char* APP_SANDBOX_READ;
|
||||
@@ -21,6 +22,7 @@ char* sandbox_extension_issue_file(const char* type,
|
||||
@@ -22,6 +23,7 @@ char* sandbox_extension_issue_file(const char* type,
|
||||
const char* path,
|
||||
uint32_t flags);
|
||||
}
|
||||
@@ -692,7 +692,7 @@ index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
@@ -49,7 +51,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
|
||||
@@ -50,7 +52,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
|
||||
|
||||
bool SeatbeltExtension::Consume() {
|
||||
DCHECK(!token_.empty());
|
||||
@@ -704,7 +704,7 @@ index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595
|
||||
return handle_ > 0;
|
||||
}
|
||||
|
||||
@@ -61,7 +67,11 @@ bool SeatbeltExtension::ConsumePermanently() {
|
||||
@@ -62,7 +68,11 @@ bool SeatbeltExtension::ConsumePermanently() {
|
||||
}
|
||||
|
||||
bool SeatbeltExtension::Revoke() {
|
||||
@@ -716,7 +716,7 @@ index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595
|
||||
handle_ = 0;
|
||||
token_.clear();
|
||||
return rv == 0;
|
||||
@@ -79,9 +89,11 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
|
||||
@@ -80,12 +90,14 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
|
||||
char* SeatbeltExtension::IssueToken(SeatbeltExtension::Type type,
|
||||
const std::string& resource) {
|
||||
switch (type) {
|
||||
@@ -724,6 +724,9 @@ index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595
|
||||
case FILE_READ:
|
||||
return sandbox_extension_issue_file(APP_SANDBOX_READ, resource.c_str(),
|
||||
0);
|
||||
case FILE_READ_WRITE:
|
||||
return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE,
|
||||
resource.c_str(), 0);
|
||||
+#endif
|
||||
default:
|
||||
NOTREACHED();
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 13b458774a9b36388e2079231c786e38354974bc..3896a834cbb17bfe6ecfc602886ea7d77d7d5167 100644
|
||||
index 2dda0e753a89fcbf446212f429e90659ca289bf0..7bd73dae3a77cb16cf282d2df7f4ff7a8f412805 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -118,6 +118,11 @@
|
||||
@@ -116,7 +116,7 @@ index 13b458774a9b36388e2079231c786e38354974bc..3896a834cbb17bfe6ecfc602886ea7d7
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2078,6 +2163,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2085,6 +2170,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -127,7 +127,7 @@ index 13b458774a9b36388e2079231c786e38354974bc..3896a834cbb17bfe6ecfc602886ea7d7
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index dedd877897901bec01e1cc55519a3c2ca656cd9b..00bcb6e3b31b7e61a36c6df96d39cd0d5cc5e28a 100644
|
||||
index 9339c55c5e818a2a7bd8800d9b1cb64553369c24..049c8e5e0e34454f03a823b31a5f7755d67cfb07 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -99,6 +99,7 @@ class DomainReliabilityMonitor;
|
||||
@@ -147,7 +147,7 @@ index dedd877897901bec01e1cc55519a3c2ca656cd9b..00bcb6e3b31b7e61a36c6df96d39cd0d
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -741,6 +744,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -743,6 +746,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -157,11 +157,11 @@ index dedd877897901bec01e1cc55519a3c2ca656cd9b..00bcb6e3b31b7e61a36c6df96d39cd0d
|
||||
// CertNetFetcher is not used by the current platform, or if the actual
|
||||
// net::CertVerifier is instantiated outside of the network service.
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 0d84746e3495fd233db239d97d5a71ab8daa43ac..9a4ab0a7493688e31acd119b816de69bfb47d9d7 100644
|
||||
index 6d2ab194fd2330426f56602cd2e586f096750acd..d8e7d0d35317fe1124bf81f60faf2b35ae19a3d7 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -232,6 +232,17 @@ struct NetworkContextFilePaths {
|
||||
mojo_base.mojom.FilePath? reporting_and_nel_store_database_name;
|
||||
@@ -265,6 +265,17 @@ struct NetworkContextFilePaths {
|
||||
bool trigger_migration = false;
|
||||
};
|
||||
|
||||
+interface CertVerifierClient {
|
||||
@@ -177,8 +177,8 @@ index 0d84746e3495fd233db239d97d5a71ab8daa43ac..9a4ab0a7493688e31acd119b816de69b
|
||||
+
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -743,6 +754,9 @@ interface NetworkContext {
|
||||
// The user agent string.
|
||||
@@ -773,6 +784,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Pass RenderProcessHost through to PlatformNotificationService
|
||||
so Electron can identify which renderer a notification came from.
|
||||
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
|
||||
index 3dab156adf61f0bb242fe00a49629d6f8ae4ed31..8e1c173d4bece733711b0bed6b7b9d9d7280508b 100644
|
||||
index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6b45d6b33 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl.cc
|
||||
@@ -89,10 +89,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
|
||||
@@ -81,10 +81,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
|
||||
PlatformNotificationContextImpl* notification_context,
|
||||
BrowserContext* browser_context,
|
||||
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
|
||||
@@ -23,14 +23,13 @@ index 3dab156adf61f0bb242fe00a49629d6f8ae4ed31..8e1c173d4bece733711b0bed6b7b9d9d
|
||||
browser_context_(browser_context),
|
||||
service_worker_context_(std::move(service_worker_context)),
|
||||
origin_(origin),
|
||||
@@ -155,7 +157,8 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
|
||||
@@ -147,7 +149,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
|
||||
notification_id, std::move(event_listener_remote));
|
||||
|
||||
GetNotificationService(browser_context_)
|
||||
- ->DisplayNotification(notification_id, origin_.GetURL(), document_url_,
|
||||
+ ->DisplayNotification(render_frame_host_, notification_id,
|
||||
+ origin_.GetURL(), document_url_,
|
||||
platform_notification_data, notification_resources);
|
||||
browser_context_->GetPlatformNotificationService()->DisplayNotification(
|
||||
- notification_id, origin_.GetURL(), document_url_,
|
||||
+ render_frame_host_, notification_id, origin_.GetURL(), document_url_,
|
||||
platform_notification_data, notification_resources);
|
||||
}
|
||||
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
|
||||
@@ -54,10 +53,10 @@ index 19c2beb1f1949f0dc4466a8728f151c035544b24..f7aa5f94d6dea0e6b2c1107b8ef01600
|
||||
|
||||
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
index 25a35dc7647d8bcb503c9b023bd912a5c0542877..cea756feb06f1b0ee1f7f5bd8b68fd4ddaaedaa6 100644
|
||||
index 740b591e68522f211177f4578d8cd3b9aa49f152..6190edab32f373a8076820eac943afb1c6bebe99 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
@@ -140,7 +140,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
|
||||
@@ -122,7 +122,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
|
||||
|
||||
notification_service_ = std::make_unique<BlinkNotificationServiceImpl>(
|
||||
notification_context_.get(), &browser_context_,
|
||||
@@ -67,10 +66,10 @@ index 25a35dc7647d8bcb503c9b023bd912a5c0542877..cea756feb06f1b0ee1f7f5bd8b68fd4d
|
||||
/*document_url=*/GURL(),
|
||||
notification_service_remote_.BindNewPipeAndPassReceiver());
|
||||
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
index 0a967ad0f3e649e997e596dde2368a2309779874..0e52ad1497b6b787a7db3253083da45ffddb7736 100644
|
||||
index 32f66cfb52ae240f5a8311779421f01920a31bb2..128355a4791ebb68045522627a5a8db183c1c070 100644
|
||||
--- a/content/browser/notifications/platform_notification_context_impl.cc
|
||||
+++ b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
@@ -284,13 +284,14 @@ void PlatformNotificationContextImpl::Shutdown() {
|
||||
@@ -282,13 +282,14 @@ void PlatformNotificationContextImpl::Shutdown() {
|
||||
}
|
||||
|
||||
void PlatformNotificationContextImpl::CreateService(
|
||||
@@ -108,10 +107,10 @@ index 78f9ab684d2eeef9a647d82ccb39c1b208e999d4..d55a4e51a0d263ec07ca115715cccc30
|
||||
const GURL& document_url,
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index b96ad3f8b173d0425069dbb6ec5ea4e3690fd0fb..ca49f2c9de55e95024e5ff680794e09a53061ffd 100644
|
||||
index f788e63de17e478ad749c61a2744747ef59af75a..d64ad2d8d3a9515768d82ff02e7be26383dd5b66 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2270,7 +2270,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2273,7 +2273,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
document_url = rfh->GetLastCommittedURL();
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -213,7 +213,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61
|
||||
return nullptr;
|
||||
}
|
||||
diff --git a/chrome/renderer/pepper/pepper_helper.h b/chrome/renderer/pepper/pepper_helper.h
|
||||
index e021c964da3d467530775164a67d5cadaf6dc741..e035f0fb9e2baa6a9148b43765b09c52bc45599b 100644
|
||||
index 0f67ff54227f1a49314592188d719feeb27ae2cf..14fce2e8f9dcbd5273784aaf561a45cb1df19d42 100644
|
||||
--- a/chrome/renderer/pepper/pepper_helper.h
|
||||
+++ b/chrome/renderer/pepper/pepper_helper.h
|
||||
@@ -6,12 +6,14 @@
|
||||
@@ -231,4 +231,4 @@ index e021c964da3d467530775164a67d5cadaf6dc741..e035f0fb9e2baa6a9148b43765b09c52
|
||||
+ : public content::RenderFrameObserver {
|
||||
public:
|
||||
explicit PepperHelper(content::RenderFrame* render_frame);
|
||||
~PepperHelper() override;
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/paint_vector_icon.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
index 5464e3e8ced91bbeba197d5d31e37b6c3e993076..1e2295b1611df0091cad60ec2bf7371e9536c9b5 100644
|
||||
index 3db862e69264ddf9e850f1354fce402a3e920b75..4a667a2bbd2d36d275438b63c56fa219e79631f6 100644
|
||||
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
@@ -16,9 +16,11 @@
|
||||
@@ -15,9 +15,11 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -76,7 +76,7 @@ index 5464e3e8ced91bbeba197d5d31e37b6c3e993076..1e2295b1611df0091cad60ec2bf7371e
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
||||
@@ -29,7 +31,8 @@
|
||||
@@ -28,7 +30,8 @@
|
||||
#include "chrome/browser/ui/views/overlay/toggle_camera_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/toggle_microphone_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/track_image_button.h"
|
||||
@@ -86,7 +86,7 @@ index 5464e3e8ced91bbeba197d5d31e37b6c3e993076..1e2295b1611df0091cad60ec2bf7371e
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "content/public/browser/picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -57,7 +60,7 @@
|
||||
@@ -56,7 +59,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,7 @@ index 5464e3e8ced91bbeba197d5d31e37b6c3e993076..1e2295b1611df0091cad60ec2bf7371e
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -246,7 +249,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
||||
@@ -249,7 +252,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
||||
overlay_window->Init(std::move(params));
|
||||
overlay_window->OnRootViewReady();
|
||||
|
||||
|
||||
@@ -11,10 +11,26 @@ majority of changes originally come from these PRs:
|
||||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
|
||||
index bca04dcd90921e508fb0e5c8201265532e42e88f..345547f382c8984ea29483b84475c120aa58e19b 100644
|
||||
index 5e44b586937c4100e9cb55f152338a11f24eed8c..879add3dc328cea225b9f4c91bd103939429beeb 100644
|
||||
--- a/chrome/browser/printing/print_job.cc
|
||||
+++ b/chrome/browser/printing/print_job.cc
|
||||
@@ -350,18 +350,25 @@ void PrintJob::StartPdfToEmfConversion(
|
||||
@@ -89,6 +89,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization);
|
||||
}
|
||||
|
||||
+#if 0
|
||||
PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
|
||||
// TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely
|
||||
// because `web_contents` was null. As a result, this section has many more
|
||||
@@ -97,6 +98,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
|
||||
web_contents ? web_contents->GetBrowserContext() : nullptr;
|
||||
return context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr;
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
@@ -381,11 +383,18 @@ void PrintJob::StartPdfToEmfConversion(
|
||||
// seems to work with the fix for this bug applied.
|
||||
const PrintSettings& settings = document()->settings();
|
||||
bool print_text_with_gdi =
|
||||
@@ -27,22 +43,27 @@ index bca04dcd90921e508fb0e5c8201265532e42e88f..345547f382c8984ea29483b84475c120
|
||||
+ && !settings.printer_language_is_xps() &&
|
||||
base::FeatureList::IsEnabled(::features::kGdiTextPrinting);
|
||||
|
||||
// TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely
|
||||
// because `web_contents` was null. As a result, this section has many more
|
||||
// pointer checks to avoid crashing.
|
||||
+#if 0
|
||||
content::WebContents* web_contents = worker_->GetWebContents();
|
||||
content::BrowserContext* context =
|
||||
web_contents ? web_contents->GetBrowserContext() : nullptr;
|
||||
PrefService* prefs =
|
||||
context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr;
|
||||
PrefService* prefs = GetPrefsForWebContents(worker_->GetWebContents());
|
||||
- bool print_with_reduced_rasterization = PrintWithReducedRasterization(prefs);
|
||||
+#endif
|
||||
+ bool print_with_reduced_rasterization = PrintWithReducedRasterization(nullptr);
|
||||
|
||||
using RenderMode = PdfRenderSettings::Mode;
|
||||
RenderMode mode;
|
||||
@@ -499,6 +506,10 @@ void PrintJob::OnNotifyPrintJobEvent(const JobEventDetails& event_details) {
|
||||
@@ -480,8 +489,10 @@ void PrintJob::StartPdfToPostScriptConversion(
|
||||
if (ps_level2) {
|
||||
mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2;
|
||||
} else {
|
||||
+#if 0
|
||||
PrefService* prefs = GetPrefsForWebContents(worker_->GetWebContents());
|
||||
- mode = PrintWithPostScriptType42Fonts(prefs)
|
||||
+#endif
|
||||
+ mode = PrintWithPostScriptType42Fonts(nullptr)
|
||||
? PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
@@ -531,6 +542,10 @@ void PrintJob::OnNotifyPrintJobEvent(const JobEventDetails& event_details) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
switch (event_details.type()) {
|
||||
@@ -68,7 +89,7 @@ index b8b83529be4c7da661032d3b941984c02b978047..98ef6cfad5dc46d9dcb65a0ce506db37
|
||||
NEW_DOC,
|
||||
|
||||
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
||||
index 2824b97e715a493082734d40f62860c8cafa5f34..584d4ef2b73a0f89458224eb134a8d8a2b439995 100644
|
||||
index 4305943435c15275084f0a9bb5490831d893870f..a048c0c11b3a8a06401ddf4d6e15700bf05600c3 100644
|
||||
--- a/chrome/browser/printing/print_job_worker.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker.cc
|
||||
@@ -21,13 +21,13 @@
|
||||
@@ -86,7 +107,7 @@ index 2824b97e715a493082734d40f62860c8cafa5f34..584d4ef2b73a0f89458224eb134a8d8a
|
||||
#include "printing/backend/print_backend.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
@@ -238,16 +238,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
|
||||
@@ -240,16 +240,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
|
||||
#endif // defined(OS_LINUX) && defined(USE_CUPS)
|
||||
}
|
||||
|
||||
@@ -111,7 +132,7 @@ index 2824b97e715a493082734d40f62860c8cafa5f34..584d4ef2b73a0f89458224eb134a8d8a
|
||||
}
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
@@ -263,6 +268,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
|
||||
@@ -265,6 +270,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
|
||||
|
||||
void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
|
||||
PrintingContext::Result result) {
|
||||
@@ -366,7 +387,7 @@ index e4cacbf9a82da8dca062cc33df885a0575e74830..143ee383668965ba04da092e3445fc9f
|
||||
|
||||
if (!cookie) {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index eaa0e162a339ba68d42c920fdd30869d259b4f27..8381f5171970aa89fc5c406d57d2665e16c6678b 100644
|
||||
index 24ffeb0a87b2e324f84260eb4ec65021998ee2c3..872008c7ffd5298dc3cc8d1b52be6113104ce49c 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -38,6 +38,8 @@ class PrintJob;
|
||||
@@ -378,7 +399,7 @@ index eaa0e162a339ba68d42c920fdd30869d259b4f27..8381f5171970aa89fc5c406d57d2665e
|
||||
// Base class for managing the print commands for a WebContents.
|
||||
class PrintViewManagerBase : public content::NotificationObserver,
|
||||
public PrintManager {
|
||||
@@ -47,7 +49,10 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -50,7 +52,10 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// Prints the current document immediately. Since the rendering is
|
||||
// asynchronous, the actual printing will not be completed on the return of
|
||||
// this function. Returns false if printing is impossible at the moment.
|
||||
@@ -390,7 +411,7 @@ index eaa0e162a339ba68d42c920fdd30869d259b4f27..8381f5171970aa89fc5c406d57d2665e
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in |print_data| with settings specified in
|
||||
@@ -234,9 +239,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -237,9 +242,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
content::RenderFrameHost* printing_rfh_ = nullptr;
|
||||
|
||||
@@ -617,7 +638,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
|
||||
index 7f617267b4eefd6d7cf9db6a56aaffad5035bab4..df79c62570f02f581ecb69ab3c03eeebfc43c50e 100644
|
||||
index 744c3acfb9637aa64785dabd041ee416d56c3e43..9dadda9dfecdcf7826a3766064530a10126df66b 100644
|
||||
--- a/printing/printing_context.cc
|
||||
+++ b/printing/printing_context.cc
|
||||
@@ -115,7 +115,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
|
||||
@@ -629,10 +650,10 @@ index 7f617267b4eefd6d7cf9db6a56aaffad5035bab4..df79c62570f02f581ecb69ab3c03eeeb
|
||||
std::unique_ptr<PrintSettings> settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
diff --git a/printing/printing_context.h b/printing/printing_context.h
|
||||
index 3f83f961ca953d1a6fe544a49e3a3d7addaf6c50..7a639e7d2975fa8d033ea32f371e3b6539ea0c7e 100644
|
||||
index 753bc1d564d607b4be671c3c618e1b60f8e7bb3f..c60136097403e9b5930917433064b57ba5771a3b 100644
|
||||
--- a/printing/printing_context.h
|
||||
+++ b/printing/printing_context.h
|
||||
@@ -145,6 +145,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
||||
@@ -149,6 +149,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
||||
|
||||
int job_id() const { return job_id_; }
|
||||
|
||||
@@ -642,7 +663,7 @@ index 3f83f961ca953d1a6fe544a49e3a3d7addaf6c50..7a639e7d2975fa8d033ea32f371e3b65
|
||||
protected:
|
||||
explicit PrintingContext(Delegate* delegate);
|
||||
|
||||
@@ -152,9 +155,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
||||
@@ -156,9 +159,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
||||
// implement this method to create an object of their implementation.
|
||||
static std::unique_ptr<PrintingContext> CreateImpl(Delegate* delegate);
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ This patch adds a few changes to the Chromium code:
|
||||
before the browser thread is ready.
|
||||
|
||||
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
|
||||
index 0291db0f919aa7868d345f4f0712c42c6ad7ee17..9418bbacb11094628c4468d0a7b735a0f742e5f2 100644
|
||||
index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae6509ed98a18 100644
|
||||
--- a/chrome/browser/process_singleton.h
|
||||
+++ b/chrome/browser/process_singleton.h
|
||||
@@ -103,8 +103,15 @@ class ProcessSingleton {
|
||||
@@ -103,12 +103,19 @@ class ProcessSingleton {
|
||||
base::RepeatingCallback<bool(const base::CommandLine& command_line,
|
||||
const base::FilePath& current_directory)>;
|
||||
|
||||
@@ -40,11 +40,15 @@ index 0291db0f919aa7868d345f4f0712c42c6ad7ee17..9418bbacb11094628c4468d0a7b735a0
|
||||
+#else
|
||||
ProcessSingleton(const base::FilePath& user_data_dir,
|
||||
const NotificationCallback& notification_callback);
|
||||
|
||||
ProcessSingleton(const ProcessSingleton&) = delete;
|
||||
ProcessSingleton& operator=(const ProcessSingleton&) = delete;
|
||||
|
||||
+#endif
|
||||
~ProcessSingleton();
|
||||
|
||||
// Notify another process, if available. Otherwise sets ourselves as the
|
||||
@@ -115,6 +122,8 @@ class ProcessSingleton {
|
||||
@@ -119,6 +126,8 @@ class ProcessSingleton {
|
||||
// TODO(brettw): Make the implementation of this method non-platform-specific
|
||||
// by making Linux re-use the Windows implementation.
|
||||
NotifyResult NotifyOtherProcessOrCreate();
|
||||
@@ -53,7 +57,7 @@ index 0291db0f919aa7868d345f4f0712c42c6ad7ee17..9418bbacb11094628c4468d0a7b735a0
|
||||
|
||||
// Sets ourself up as the singleton instance. Returns true on success. If
|
||||
// false is returned, we are not the singleton instance and the caller must
|
||||
@@ -170,6 +179,8 @@ class ProcessSingleton {
|
||||
@@ -174,6 +183,8 @@ class ProcessSingleton {
|
||||
#if defined(OS_WIN)
|
||||
bool EscapeVirtualization(const base::FilePath& user_data_dir);
|
||||
|
||||
@@ -62,7 +66,7 @@ index 0291db0f919aa7868d345f4f0712c42c6ad7ee17..9418bbacb11094628c4468d0a7b735a0
|
||||
HWND remote_window_; // The HWND_MESSAGE of another browser.
|
||||
base::win::MessageWindow window_; // The message-only window.
|
||||
bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment.
|
||||
@@ -219,6 +230,8 @@ class ProcessSingleton {
|
||||
@@ -223,6 +234,8 @@ class ProcessSingleton {
|
||||
// because it posts messages between threads.
|
||||
class LinuxWatcher;
|
||||
scoped_refptr<LinuxWatcher> watcher_;
|
||||
@@ -72,7 +76,7 @@ index 0291db0f919aa7868d345f4f0712c42c6ad7ee17..9418bbacb11094628c4468d0a7b735a0
|
||||
|
||||
#if defined(OS_MAC)
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3dbffe5e0 100644
|
||||
index 6ae3d8b4a2aef0852fa5cec5a8800aa534da06a1..05c86df6c871ca7d0926836edc2f6137fcf229cb 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -135,7 +139,7 @@ index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3
|
||||
bool ConnectSocket(ScopedSocket* socket,
|
||||
const base::FilePath& socket_path,
|
||||
const base::FilePath& cookie_path) {
|
||||
@@ -727,6 +749,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
@@ -728,6 +750,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
|
||||
ProcessSingleton::~ProcessSingleton() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -146,7 +150,7 @@ index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3
|
||||
}
|
||||
|
||||
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -895,6 +921,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
@@ -896,6 +922,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
base::TimeDelta::FromSeconds(kTimeoutInSeconds));
|
||||
}
|
||||
|
||||
@@ -167,7 +171,7 @@ index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3
|
||||
ProcessSingleton::NotifyResult
|
||||
ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate(
|
||||
const base::CommandLine& command_line,
|
||||
@@ -997,12 +1037,26 @@ bool ProcessSingleton::Create() {
|
||||
@@ -998,12 +1038,26 @@ bool ProcessSingleton::Create() {
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -200,7 +204,7 @@ index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3
|
||||
}
|
||||
|
||||
// Check that the directory was created with the correct permissions.
|
||||
@@ -1044,10 +1098,13 @@ bool ProcessSingleton::Create() {
|
||||
@@ -1045,10 +1099,13 @@ bool ProcessSingleton::Create() {
|
||||
if (listen(sock, 5) < 0)
|
||||
NOTREACHED() << "listen failed: " << base::safe_strerror(errno);
|
||||
|
||||
@@ -219,10 +223,10 @@ index dc9c1b76a1c7c8b3fa83fc83788eef36d2cfa4a5..31b387ca3cae53c94d8a7baefaeb17f3
|
||||
return true;
|
||||
}
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406c9608dd3 100644
|
||||
index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da02e0c283b 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -27,7 +27,9 @@
|
||||
@@ -28,7 +28,9 @@
|
||||
#include "base/win/windows_version.h"
|
||||
#include "base/win/wmi.h"
|
||||
#include "chrome/browser/shell_integration.h"
|
||||
@@ -232,7 +236,7 @@ index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406
|
||||
#include "chrome/browser/win/chrome_process_finder.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
@@ -175,10 +177,15 @@ bool ProcessLaunchNotification(
|
||||
@@ -180,10 +182,15 @@ bool ProcessLaunchNotification(
|
||||
}
|
||||
|
||||
bool DisplayShouldKillMessageBox() {
|
||||
@@ -248,7 +252,7 @@ index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406
|
||||
}
|
||||
|
||||
void SendRemoteProcessInteractionResultHistogram(
|
||||
@@ -260,9 +267,13 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
@@ -265,9 +272,13 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
}
|
||||
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
@@ -262,7 +266,7 @@ index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406
|
||||
is_virtualized_(false),
|
||||
lock_file_(INVALID_HANDLE_VALUE),
|
||||
user_data_dir_(user_data_dir),
|
||||
@@ -366,11 +377,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
@@ -372,11 +383,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
return PROFILE_IN_USE;
|
||||
}
|
||||
|
||||
@@ -278,7 +282,7 @@ index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406
|
||||
|
||||
remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_);
|
||||
if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) {
|
||||
@@ -379,7 +393,7 @@ bool ProcessSingleton::Create() {
|
||||
@@ -385,7 +399,7 @@ bool ProcessSingleton::Create() {
|
||||
// access. As documented, it's clearer to NOT request ownership on creation
|
||||
// since it isn't guaranteed we will get it. It is better to create it
|
||||
// without ownership and explicitly get the ownership afterward.
|
||||
@@ -287,7 +291,7 @@ index f1732f042c3bfd9d5d95a4208664f9252b2aab73..875269776e45c96ac43a3430768f1406
|
||||
if (!only_me.IsValid()) {
|
||||
DPLOG(FATAL) << "CreateMutex failed";
|
||||
return false;
|
||||
@@ -418,6 +432,17 @@ bool ProcessSingleton::Create() {
|
||||
@@ -424,6 +438,17 @@ bool ProcessSingleton::Create() {
|
||||
window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification,
|
||||
notification_callback_),
|
||||
user_data_dir_.value());
|
||||
|
||||
@@ -67,7 +67,7 @@ index 55cc762b92193ed3f65b4d0b562202869530e1ac..d4c2a4e49eb469d3e2278fdc972c0aed
|
||||
}
|
||||
#endif
|
||||
diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h
|
||||
index abffb6dbdbf730e2cc4423eaca6a9a8a9f8af582..7fe1badcdebebce9028825ac98d7ab6cfa65dcdd 100644
|
||||
index 920a956bce5a24c511df293f4156e33c2455e911..413f8f17ff98038ee4b5dc5dd085257009e7b6bb 100644
|
||||
--- a/chrome/browser/net/proxy_config_monitor.h
|
||||
+++ b/chrome/browser/net/proxy_config_monitor.h
|
||||
@@ -40,11 +40,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
|
||||
@@ -84,12 +84,12 @@ index abffb6dbdbf730e2cc4423eaca6a9a8a9f8af582..7fe1badcdebebce9028825ac98d7ab6c
|
||||
// Creates a ProxyConfigMonitor that gets proxy settings from the
|
||||
// |local_state|, for use with NetworkContexts not
|
||||
// associated with a profile. Must be destroyed before |local_state|.
|
||||
@@ -91,7 +92,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
|
||||
@@ -94,7 +95,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
mojo::ReceiverSet<network::mojom::ProxyErrorClient> error_receiver_set_;
|
||||
- Profile* profile_ = nullptr;
|
||||
+ // Profile* profile_ = nullptr;
|
||||
#endif
|
||||
};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProxyConfigMonitor);
|
||||
|
||||
@@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `
|
||||
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
index 0abf9abd6a02dd13742148596d4729af8b8d967b..23560bbf3acf688045cc25f1e4289ef4c1f6552b 100644
|
||||
index f540ea381e9b80fd4a8e1e6a4fe4ed577396feb2..b7328fa53fa1c241dc90e9613b33a38cd2810706 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -19,7 +19,7 @@ index 0abf9abd6a02dd13742148596d4729af8b8d967b..23560bbf3acf688045cc25f1e4289ef4
|
||||
#include "content/public/common/drop_data.h"
|
||||
#include "services/metrics/public/cpp/ukm_recorder.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -242,6 +243,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
|
||||
@@ -247,6 +248,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
|
||||
// Returns the associated RenderViewHostDelegateView*, if possible.
|
||||
virtual RenderViewHostDelegateView* GetDelegateView();
|
||||
|
||||
@@ -30,10 +30,10 @@ index 0abf9abd6a02dd13742148596d4729af8b8d967b..23560bbf3acf688045cc25f1e4289ef4
|
||||
// RenderWidgetHost on the main frame, and false otherwise.
|
||||
virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index b72e3f6ab2a43e8a7f707e9634fb3a4abb87e993..68536fc453f85089b6bc8d3c58b24212ed42cc93 100644
|
||||
index a1632e19959d163eecafef484204aa0dba919897..d7189a47e37a5ce2a48ffdb0685016aa0eeb200b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2009,6 +2009,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -2012,6 +2012,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(WebCursor(cursor));
|
||||
@@ -43,10 +43,10 @@ index b72e3f6ab2a43e8a7f707e9634fb3a4abb87e993..68536fc453f85089b6bc8d3c58b24212
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 0ba0990cf02624cc7cf1b304a0d9b63692cd464d..bc84aa5826d4ca8aef8f496acd3569152007b7a8 100644
|
||||
index 5a86229bf1fc52e6cccbf609ed029fe88d35cd8f..ad1b4abe0390215e007ad2db8d972661470e94ed 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4307,6 +4307,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4302,6 +4302,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ index 0ba0990cf02624cc7cf1b304a0d9b63692cd464d..bc84aa5826d4ca8aef8f496acd356915
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 1d749125dba6a4051ff8a147ef7a990d7523707b..4fa272275ba3883d105ddfd8deeb4987071d1b06 100644
|
||||
index 2eaec6f5ddbc04f75207348e0f09e34c57a0c3b7..97e6ccbfbd58482299a831c63573890d1f7d46f3 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -949,6 +949,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -947,6 +947,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
blink::mojom::FrameVisibility visibility) override;
|
||||
void SendScreenRects() override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
@@ -71,7 +71,7 @@ index 1d749125dba6a4051ff8a147ef7a990d7523707b..4fa272275ba3883d105ddfd8deeb4987
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
void DidChangeScreenOrientation() override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index d6f20a6c8d28359b09ee12cb72eb67f89000d141..5d5aec942b04c721361bf6e3649ba88e7fb28cee 100644
|
||||
index 7132de463591a1bb3879be5147b6ecfead77f1b8..f205d4394c5ee5fac79fe7b99e7c54f01895cc73 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -82,7 +82,7 @@ index d6f20a6c8d28359b09ee12cb72eb67f89000d141..5d5aec942b04c721361bf6e3649ba88e
|
||||
#include "content/public/browser/allow_service_worker_result.h"
|
||||
#include "content/public/browser/reload_type.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
@@ -462,6 +463,9 @@ class CONTENT_EXPORT WebContentsObserver {
|
||||
@@ -472,6 +473,9 @@ class CONTENT_EXPORT WebContentsObserver {
|
||||
// Invoked every time the WebContents changes visibility.
|
||||
virtual void OnVisibilityChanged(Visibility visibility) {}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index beaa6476fe5d8ad8718a6e15425cf46561b28ae1..2f0b3eb5056710b09b01ae36f22278118a82e041 100644
|
||||
index 251157d2014be8aecb1a2554794257c43ae78dff..93adaa18da9a7c9d6a40c955c934810bde2394fc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -681,6 +681,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
@@ -661,6 +661,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ index beaa6476fe5d8ad8718a6e15425cf46561b28ae1..2f0b3eb5056710b09b01ae36f2227811
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 5e1fbd03146192f417cb95bb88b44047fd40096a..da57f3a6c863abc9cbf14d2ce5ae99666fd3f37e 100644
|
||||
index b3f79d5b38e10bf660f2a109ee1014ed24c54bbc..4cad83c43010f4d66fe9bc71d186b98b4fc0ffe9 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -25,8 +25,10 @@
|
||||
@@ -50,9 +50,9 @@ index 5e1fbd03146192f417cb95bb88b44047fd40096a..da57f3a6c863abc9cbf14d2ce5ae9966
|
||||
class WebCursor;
|
||||
class WebContentsAccessibility;
|
||||
class DelegatedFrameHost;
|
||||
@@ -142,6 +146,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
void NotifyVirtualKeyboardOverlayRect(
|
||||
@@ -143,6 +147,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
const gfx::Rect& keyboard_rect) override {}
|
||||
bool IsHTMLFormPopup() const override;
|
||||
|
||||
+ virtual void InitAsGuest(RenderWidgetHostView* parent_host_view,
|
||||
+ RenderWidgetHostViewGuest* guest_view) {}
|
||||
@@ -60,7 +60,7 @@ index 5e1fbd03146192f417cb95bb88b44047fd40096a..da57f3a6c863abc9cbf14d2ce5ae9966
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
gfx::PointF TransformPointToRootCoordSpaceF(
|
||||
@@ -304,6 +311,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
@@ -305,6 +312,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
||||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 43019ebb8ee8c165ffc533655fc4d38655606a6c..03230bb4de265cefc46832abbb85fa0bf659dacb 100644
|
||||
index 7a8e4653a0a962730ad5b5895cfbab8d2db92f24..0e139a88b7c6f341e1f7bc60c81378f53de830d8 100644
|
||||
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -150,6 +150,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -39,7 +39,7 @@ index 43019ebb8ee8c165ffc533655fc4d38655606a6c..03230bb4de265cefc46832abbb85fa0b
|
||||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -645,6 +657,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
@@ -646,6 +658,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
// its parent view.
|
||||
BOOL hitSelf = NO;
|
||||
while (view) {
|
||||
@@ -50,7 +50,7 @@ index 43019ebb8ee8c165ffc533655fc4d38655606a6c..03230bb4de265cefc46832abbb85fa0b
|
||||
if (view == self)
|
||||
hitSelf = YES;
|
||||
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
|
||||
@@ -965,6 +981,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
@@ -966,6 +982,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
eventType == NSKeyDown &&
|
||||
!(modifierFlags & NSCommandKeyMask);
|
||||
|
||||
@@ -61,7 +61,7 @@ index 43019ebb8ee8c165ffc533655fc4d38655606a6c..03230bb4de265cefc46832abbb85fa0b
|
||||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1691,9 +1711,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -1692,9 +1712,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
@@ -73,7 +73,7 @@ index 43019ebb8ee8c165ffc533655fc4d38655606a6c..03230bb4de265cefc46832abbb85fa0b
|
||||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1702,7 +1724,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
@@ -1703,7 +1725,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index d7a430eb9911a3a13da807e25204abd58025fdc9..897e473cbb4c3e8b244210706e4e1549b1e71a0c 100644
|
||||
index 8078897ba61cf9da717254727a8f97b6772d1cc6..abab9c8e8c60a6d1690acca5133b3c54d0ccc793 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1536,7 +1536,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1543,7 +1543,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index d7a430eb9911a3a13da807e25204abd58025fdc9..897e473cbb4c3e8b244210706e4e1549
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1564,6 +1564,12 @@ if (!is_android) {
|
||||
@@ -1571,6 +1571,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: chromium-autoroll
|
||||
<chromium-autoroll@skia-public.iam.gserviceaccount.com>
|
||||
Date: Thu, 7 Oct 2021 13:30:21 +0000
|
||||
Subject: Roll Perfetto Trace Processor Linux from b852166f90d5 to e90b9fb93385
|
||||
|
||||
https://android.googlesource.com/platform/external/perfetto.git/+log/b852166f90d5..e90b9fb93385
|
||||
|
||||
If this roll has caused a breakage, revert this CL and stop the roller
|
||||
using the controls here:
|
||||
https://autoroll.skia.org/r/perfetto-trace-processor-linux-chromium
|
||||
Please CC perfetto-bugs@google.com on the revert to ensure that a human
|
||||
is aware of the problem.
|
||||
|
||||
To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry
|
||||
|
||||
To report a problem with the AutoRoller itself, please file a bug:
|
||||
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
|
||||
|
||||
Documentation for the AutoRoller is here:
|
||||
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
||||
|
||||
Tbr: perfetto-bugs@google.com
|
||||
Change-Id: I0d5fd99c7f627b48b55bd7ee738f95791ab36fd6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3212306
|
||||
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
|
||||
Bot-Commit: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#929168}
|
||||
|
||||
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
index ce4dab1bfcc7cd684d66376a3bcbfad37f4e267a..ccf83674522208cf479be6b3d83f4a12b017ed9e 100644
|
||||
--- a/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
+++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
|
||||
@@ -17,8 +17,8 @@
|
||||
"remote_path": "perfetto_binaries/trace_processor_shell/linux_arm64/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell"
|
||||
},
|
||||
"linux": {
|
||||
- "hash": "6606b38d8d3d9becc4c40ce5a28ea142ae044934",
|
||||
- "remote_path": "perfetto_binaries/trace_processor_shell/linux/62ae508a04c805f323639e434bfeae2ac811b06d/trace_processor_shell"
|
||||
+ "hash": "e2f871201662da5da9b77177b62d5fd5dc8fc01b",
|
||||
+ "remote_path": "perfetto_binaries/trace_processor_shell/linux/e90b9fb93385275c6a0db319b28a597ab47300f5/trace_processor_shell"
|
||||
}
|
||||
},
|
||||
"power_profile.sql": {
|
||||
@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 52c02371bf3735dd8a4670c566da13ac6c37a522..7d462cc901050085dbb211f63ffc0bd817b1ba08 100644
|
||||
index c0a004136c09c26fcc2011ee80993ab630c033fb..755ac21653bc1b802d56de76c46bcece75230a18 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1283,7 +1283,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1294,7 +1294,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index ca49f2c9de55e95024e5ff680794e09a53061ffd..0a53d80feb2cdaa599da3ea87a8a6a8f8327ae92 100644
|
||||
index d64ad2d8d3a9515768d82ff02e7be26383dd5b66..3555928a29b3c6022621c4e9b65531edbefa7797 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -398,10 +398,18 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -397,10 +397,18 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
public:
|
||||
RendererSandboxedProcessLauncherDelegate() = default;
|
||||
|
||||
@@ -44,7 +44,7 @@ index ca49f2c9de55e95024e5ff680794e09a53061ffd..0a53d80feb2cdaa599da3ea87a8a6a8f
|
||||
const base::CommandLine& browser_command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
base::CommandLine::StringType renderer_prefix =
|
||||
@@ -419,6 +427,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -418,6 +426,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
sandbox::policy::SandboxType GetSandboxType() override {
|
||||
return sandbox::policy::SandboxType::kRenderer;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ index ca49f2c9de55e95024e5ff680794e09a53061ffd..0a53d80feb2cdaa599da3ea87a8a6a8f
|
||||
};
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -430,6 +443,9 @@ class RendererSandboxedProcessLauncherDelegateWin
|
||||
@@ -429,6 +442,9 @@ class RendererSandboxedProcessLauncherDelegateWin
|
||||
bool is_jit_disabled)
|
||||
: renderer_code_integrity_enabled_(
|
||||
GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) {
|
||||
@@ -66,7 +66,7 @@ index ca49f2c9de55e95024e5ff680794e09a53061ffd..0a53d80feb2cdaa599da3ea87a8a6a8f
|
||||
if (is_jit_disabled) {
|
||||
dynamic_code_can_be_disabled_ = true;
|
||||
return;
|
||||
@@ -1982,9 +1998,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1988,9 +2004,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
cmd_line.get(), IsJitDisabled());
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: ui_gtk_public_header.patch
|
||||
Allow electron to depend on //ui/gtk/gtk_util.h
|
||||
|
||||
diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn
|
||||
index 9adb7d3e20611953974c545bf2d817e8c2c9aef0..51dae290a2b51f86c7735df33f9d34b9f5ea8079 100644
|
||||
index 2d4b2f617d4ffb4e2329dbce8f1de05739c3617f..0f350916b012e04a76d3db8abe199ee693f8abd5 100644
|
||||
--- a/ui/gtk/BUILD.gn
|
||||
+++ b/ui/gtk/BUILD.gn
|
||||
@@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") {
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index b6524566b96a141ba710441ab70d17f46e5b1b9a..6a48e38254024ea721d2f10a9e88aa8ce00f8975 100644
|
||||
index d3593a6f3e9f6cba5823169d36fd93a6f97608ae..4ee081242ecf0725b43c95dfd1032bd3e6ce8771 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2897,6 +2897,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2884,6 +2884,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
|
||||
params.main_frame_name);
|
||||
|
||||
@@ -25,7 +25,7 @@ index b6524566b96a141ba710441ab70d17f46e5b1b9a..6a48e38254024ea721d2f10a9e88aa8c
|
||||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -2907,6 +2913,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2894,6 +2900,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
view_.reset(CreateWebContentsView(this, delegate,
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
@@ -34,7 +34,7 @@ index b6524566b96a141ba710441ab70d17f46e5b1b9a..6a48e38254024ea721d2f10a9e88aa8c
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index ddf33e29d8f06a29a9107fee4c614d288cdbfc3b..383d0fd95d7e807b83f4cd972c107fa27fefaac6 100644
|
||||
index b55e80c0f32ee4cc0e5d168c79d7e480fbb1c6bc..95bcea15ea704f11e8daab49de6d958fb2d15127 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -86,10 +86,13 @@ class BrowserContext;
|
||||
|
||||
@@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 7739e118bacd0de1e51d2a46ff126557d9de960c..7192bbbdafaf1f3825909bfdb3f022c76ea3f31f 100644
|
||||
index c1b09024a3f7d46d91f60a30aecf1ca1f0318030..ff1c59766569053b6d32c49c525d00c829e5abe6 100644
|
||||
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -790,9 +790,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
@@ -802,9 +802,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
|
||||
bool WebContentsViewAura::IsValidDragTarget(
|
||||
RenderWidgetHostImpl* target_rwh) const {
|
||||
|
||||
@@ -14,10 +14,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index ea22c655ae4e5c1e023d68fbedb2a684edabe1fe..0a4be87c33dcd6f6952288ce5f19f2263299e68f 100644
|
||||
index 1a62a9669484980a69d658ca6729e7caf3db96fb..09e0a4549f5d959f15d7a89f4e685246c3e00f56 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -5830,6 +5830,15 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -5944,6 +5944,15 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
notified_instances.insert(parent_site_instance);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ An attempt to upstream this was made, but rejected:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index b62158069f9a1ae7141c8f9ef191bd11660797d2..74846c92e2fdfc4dffe9014a010a0acdf9e3017c 100644
|
||||
index f3852c0eef152176d03922492ca9672498f8f9d0..ef7b6f9ff3e8f899377933a7184d3278d4a9d366 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -358,6 +358,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -26,10 +26,10 @@ index b62158069f9a1ae7141c8f9ef191bd11660797d2..74846c92e2fdfc4dffe9014a010a0acd
|
||||
// An empty URL is returned if the URL is not overriden.
|
||||
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 337c630fc85f33346dccffd51c1fb06db032f1fb..1db3e3674b2b8457f61012565c6103fe1a693929 100644
|
||||
index 0280650b9c9b47c7fc67ace052c04ce4b23c9679..1e864d8c95fc5fb258c6b91c8968b8a986a862ab 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -940,6 +940,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ index 337c630fc85f33346dccffd51c1fb06db032f1fb..1db3e3674b2b8457f61012565c6103fe
|
||||
const v8::Local<v8::Context>& worker) {
|
||||
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index b199c34615f0230b46b6128cccfce75d5c2ccc9c..0b8515b4e8cc86f332d4c5c6950bd4656d88fac4 100644
|
||||
index 577ba7b6773668ccfce9dcbf4dcdc7a753f95ce8..f22c471f7e20fd23307f640fac871120d768ff32 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -205,6 +205,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -207,6 +207,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
|
||||
@@ -19,7 +19,7 @@ that clearly establishes the worker script is ready for evaluation with the scop
|
||||
initialized.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 74846c92e2fdfc4dffe9014a010a0acdf9e3017c..3dfb2f9dadb682265b90ac5520dd20ae819ff2b9 100644
|
||||
index ef7b6f9ff3e8f899377933a7184d3278d4a9d366..8688f1d7f258246901feec75e340c32bf581a2b5 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -358,6 +358,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -35,10 +35,10 @@ index 74846c92e2fdfc4dffe9014a010a0acdf9e3017c..3dfb2f9dadb682265b90ac5520dd20ae
|
||||
// from the worker thread.
|
||||
virtual void WillDestroyWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 1db3e3674b2b8457f61012565c6103fe1a693929..16319411915fb747d234a09185a5d7be1643a4dd 100644
|
||||
index 1e864d8c95fc5fb258c6b91c8968b8a986a862ab..4222234d014f204ffc5e5786a8a973f2c9ef8568 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -948,6 +948,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
@@ -952,6 +952,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
worker);
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ index 1db3e3674b2b8457f61012565c6103fe1a693929..16319411915fb747d234a09185a5d7be
|
||||
const blink::WebSecurityOrigin& script_origin) {
|
||||
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index 0b8515b4e8cc86f332d4c5c6950bd4656d88fac4..0bf0c2a5c364404863af1493d30013b8fd9fba68 100644
|
||||
index f22c471f7e20fd23307f640fac871120d768ff32..d10ad3d4e464d53f50c3bcfc2adf94271ca50682 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -205,6 +205,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -207,6 +207,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
|
||||
@@ -13,7 +13,5 @@
|
||||
|
||||
"src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle",
|
||||
|
||||
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC",
|
||||
|
||||
"src/electron/patches/breakpad": "src/third_party/breakpad/breakpad"
|
||||
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ feat_initialize_asar_support.patch
|
||||
expose_get_builtin_module_function.patch
|
||||
build_add_gn_build_files.patch
|
||||
fix_add_default_values_for_variables_in_common_gypi.patch
|
||||
feat_add_new_built_with_electron_variable_to_config_gypi.patch
|
||||
feat_add_flags_for_low-level_hooks_and_exceptions.patch
|
||||
fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch
|
||||
pass_all_globals_through_require.patch
|
||||
@@ -26,3 +25,4 @@ repl_fix_crash_when_sharedarraybuffer_disabled.patch
|
||||
fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch
|
||||
fix_-wunreachable-code-return.patch
|
||||
fix_crash_creating_private_key_with_unsupported_algorithm.patch
|
||||
fix_event_with_invalid_timestamp_in_trace_log.patch
|
||||
|
||||
@@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..52fb22305bb67c75c9a1cf4bc39cd901420cf7a9
|
||||
index 0000000000000000000000000000000000000000..d0641c5cbc3c527ce7a73d12118fb42db325be01
|
||||
--- /dev/null
|
||||
+++ b/BUILD.gn
|
||||
@@ -0,0 +1,401 @@
|
||||
@@ -0,0 +1,393 @@
|
||||
+import("//electron/build/asar.gni")
|
||||
+import("//v8/gni/v8.gni")
|
||||
+
|
||||
@@ -75,20 +75,12 @@ index 0000000000000000000000000000000000000000..52fb22305bb67c75c9a1cf4bc39cd901
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+action("generate_config_gypi") {
|
||||
+ outputs = [
|
||||
+ "$target_gen_dir/config.gypi",
|
||||
+ ]
|
||||
+ script = "tools/generate_config_gypi.py"
|
||||
+ args = rebase_path(outputs, root_build_dir)
|
||||
+}
|
||||
+
|
||||
+chdir_action("node_js2c") {
|
||||
+ deps = [
|
||||
+ ":generate_config_gypi",
|
||||
+ "//electron:generate_config_gypi",
|
||||
+ ":node_js2c_inputs",
|
||||
+ ]
|
||||
+ config_gypi = [ "$target_gen_dir/config.gypi" ]
|
||||
+ config_gypi = [ "$root_gen_dir/config.gypi" ]
|
||||
+ inputs = library_files + config_gypi
|
||||
+ outputs = [
|
||||
+ "$target_gen_dir/node_javascript.cc",
|
||||
@@ -360,10 +352,10 @@ index 0000000000000000000000000000000000000000..52fb22305bb67c75c9a1cf4bc39cd901
|
||||
+
|
||||
+copy("node_gypi_headers") {
|
||||
+ deps = [
|
||||
+ ":generate_config_gypi",
|
||||
+ "//electron:generate_config_gypi",
|
||||
+ ]
|
||||
+ sources = [
|
||||
+ "$target_gen_dir/config.gypi",
|
||||
+ "$root_gen_dir/config.gypi",
|
||||
+ "common.gypi",
|
||||
+ ]
|
||||
+ outputs = [
|
||||
@@ -1795,23 +1787,6 @@ index 48b8d9f22fb98d0733630eaea3194d746fba8a2f..a7a12564e4dd9320959d07fb4ab1527f
|
||||
|
||||
// The NAPI_VERSION provided by this version of the runtime. This is the version
|
||||
// which the Node binary being built supports.
|
||||
diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..01f62d4ae6e3b9d539444e3dff069f0011353caa
|
||||
--- /dev/null
|
||||
+++ b/tools/generate_config_gypi.py
|
||||
@@ -0,0 +1,11 @@
|
||||
+# TODO: assess which if any of the config variables are important to include in
|
||||
+# the js2c'd config.gypi.
|
||||
+import sys
|
||||
+
|
||||
+def main(args):
|
||||
+ out = args[0]
|
||||
+ with open(out, 'w') as f:
|
||||
+ f.write("{'variables':{}}\n")
|
||||
+
|
||||
+if __name__ == '__main__':
|
||||
+ main(sys.argv[1:])
|
||||
diff --git a/tools/generate_gn_filenames_json.py b/tools/generate_gn_filenames_json.py
|
||||
new file mode 100755
|
||||
index 0000000000000000000000000000000000000000..8f884a41f57630ac432eb85ebfc9b8bc82cddaca
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Tue, 2 Oct 2018 11:39:58 -0700
|
||||
Subject: feat: add new built_with_electron variable to config.gypi
|
||||
|
||||
This allows 3rd-party native modules to know whether they're being built
|
||||
against Electron.
|
||||
|
||||
diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py
|
||||
index 01f62d4ae6e3b9d539444e3dff069f0011353caa..d8b279f590c115108d5dca879747de7b0c9f1934 100644
|
||||
--- a/tools/generate_config_gypi.py
|
||||
+++ b/tools/generate_config_gypi.py
|
||||
@@ -5,7 +5,7 @@ import sys
|
||||
def main(args):
|
||||
out = args[0]
|
||||
with open(out, 'w') as f:
|
||||
- f.write("{'variables':{}}\n")
|
||||
+ f.write("{'variables':{'built_with_electron': 1}}\n")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cezary Kulakowski <cezary@openfin.co>
|
||||
Date: Fri, 8 Oct 2021 11:18:58 +0200
|
||||
Subject: fix: event with invalid timestamp in trace log
|
||||
|
||||
When node is started within Electron's environment it doesn't
|
||||
initialize v8 and time of v8's start is never set. As a result
|
||||
we log v8's start time as 0 and it breaks timestamps in the
|
||||
trace log. With this change we log v8's start time only when
|
||||
it was initialized by node.
|
||||
|
||||
diff --git a/src/env.cc b/src/env.cc
|
||||
index 16af6aec3791df1363682f1ed024c52208b9a8f6..ada0faa93bc223ffbea79a4308796df73ea8ae4e 100644
|
||||
--- a/src/env.cc
|
||||
+++ b/src/env.cc
|
||||
@@ -461,8 +461,10 @@ void Environment::InitializeMainContext(Local<Context> context,
|
||||
environment_start_time_);
|
||||
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START,
|
||||
per_process::node_start_time);
|
||||
- performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
|
||||
- performance::performance_v8_start);
|
||||
+ if (per_process::v8_initialized) {
|
||||
+ performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
|
||||
+ performance::performance_v8_start);
|
||||
+ }
|
||||
}
|
||||
|
||||
Environment::~Environment() {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user