Small cleanups
This commit is contained in:
parent
bff66caaa6
commit
b5ff77ef0d
3 changed files with 3 additions and 9 deletions
|
@ -580,7 +580,6 @@ void NativeWindow::NotifyWindowUnresponsive() {
|
||||||
OnRendererUnresponsive());
|
OnRendererUnresponsive());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback,
|
void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback,
|
||||||
const SkBitmap& bitmap,
|
const SkBitmap& bitmap,
|
||||||
content::ReadbackResponse response) {
|
content::ReadbackResponse response) {
|
||||||
|
|
|
@ -925,7 +925,6 @@ bool NativeWindowViews::ExecuteWindowsCommand(int command_id) {
|
||||||
observers_,
|
observers_,
|
||||||
OnExecuteWindowsCommand(command));
|
OnExecuteWindowsCommand(command));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -223,20 +223,16 @@ Emitted when devtools is focused / opened.
|
||||||
|
|
||||||
Emitted when an [App Command](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx) is invoked. These are typically related to keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows.
|
Emitted when an [App Command](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx) is invoked. These are typically related to keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows.
|
||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
AppCommands = require('app-command');
|
someWindow.on('app-command', function(e, cmd) {
|
||||||
|
|
||||||
someWindow.on('app-command', function(e, cmd) => {
|
|
||||||
// Navigate the window back when the user hits their mouse back button
|
// Navigate the window back when the user hits their mouse back button
|
||||||
if (cmd === AppCommands.APPCOMMAND_BROWSER_BACKWARD &&
|
if (cmd === 'browser-backward' && someWindow.webContents.canGoBack()) {
|
||||||
someWindow.webContents.canGoBack()) {
|
|
||||||
someWindow.webContents.goBack();
|
someWindow.webContents.goBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
__Note__: This event is only fired on Windows
|
__Note__: This event is only fired on Windows.
|
||||||
|
|
||||||
### Class Method: BrowserWindow.getAllWindows()
|
### Class Method: BrowserWindow.getAllWindows()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue