Small cleanups
authorCheng Zhao <zcbenz@gmail.com>
Fri, 26 Jun 2015 03:20:12 +0000 (11:20 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 26 Jun 2015 03:20:12 +0000 (11:20 +0800)
atom/browser/native_window.cc
atom/browser/native_window_views.cc
docs/api/browser-window.md

index 399b493..df717c8 100644 (file)
@@ -580,7 +580,6 @@ void NativeWindow::NotifyWindowUnresponsive() {
                       OnRendererUnresponsive());
 }
 
-
 void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback,
                                      const SkBitmap& bitmap,
                                      content::ReadbackResponse response) {
index 35cee10..9699722 100644 (file)
@@ -925,7 +925,6 @@ bool NativeWindowViews::ExecuteWindowsCommand(int command_id) {
                       observers_,
                       OnExecuteWindowsCommand(command));
   }
-
   return false;
 }
 #endif
index 81649eb..ca6e9b9 100644 (file)
@@ -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()