From b5ff77ef0d7623aea10015c14268c0d9e038e256 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 26 Jun 2015 11:20:12 +0800 Subject: [PATCH] Small cleanups --- atom/browser/native_window.cc | 1 - atom/browser/native_window_views.cc | 1 - docs/api/browser-window.md | 10 +++------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 399b49349de7..df717c8dec98 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -580,7 +580,6 @@ void NativeWindow::NotifyWindowUnresponsive() { OnRendererUnresponsive()); } - void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback, const SkBitmap& bitmap, content::ReadbackResponse response) { diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 35cee1054f1b..96997222e27e 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -925,7 +925,6 @@ bool NativeWindowViews::ExecuteWindowsCommand(int command_id) { observers_, OnExecuteWindowsCommand(command)); } - return false; } #endif diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 81649ebdd3b6..ca6e9b99b283 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -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. - ```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 - if (cmd === AppCommands.APPCOMMAND_BROWSER_BACKWARD && - someWindow.webContents.canGoBack()) { + if (cmd === 'browser-backward' && someWindow.webContents.canGoBack()) { someWindow.webContents.goBack(); } }); ``` -__Note__: This event is only fired on Windows +__Note__: This event is only fired on Windows. ### Class Method: BrowserWindow.getAllWindows()