diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index be615c9ad111..9e8076fe8c91 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -162,7 +162,7 @@ void Window::OnDevToolsClosed() { devtools_web_contents_.Reset(); } -void Window::OnExecuteWindowsCommand(std::string& command_name) { +void Window::OnExecuteWindowsCommand(const std::string& command_name) { Emit("app-command", command_name); } diff --git a/atom/browser/api/atom_api_window.h b/atom/browser/api/atom_api_window.h index 248abf6f4300..5867b1e6281a 100644 --- a/atom/browser/api/atom_api_window.h +++ b/atom/browser/api/atom_api_window.h @@ -71,7 +71,7 @@ class Window : public mate::TrackableObject, void OnDevToolsFocus() override; void OnDevToolsOpened() override; void OnDevToolsClosed() override; - void OnExecuteWindowsCommand(std::string& command_name) override; + void OnExecuteWindowsCommand(const std::string& command_name) override; private: // APIs for NativeWindow. diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 308a4842d139..38bbedf39d5f 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -596,7 +596,7 @@ void NativeWindow::OnCapturePageDone(const CapturePageCallback& callback, } const char* NativeWindow::AppCommandToString(int command_id) { - switch(command_id) { + switch (command_id) { case APPCOMMAND_BROWSER_BACKWARD: return "browser-backward"; case APPCOMMAND_BROWSER_FORWARD: diff --git a/atom/browser/native_window_observer.h b/atom/browser/native_window_observer.h index c8a2c5e3c703..5b0a0c56b3de 100644 --- a/atom/browser/native_window_observer.h +++ b/atom/browser/native_window_observer.h @@ -67,7 +67,7 @@ class NativeWindowObserver { virtual void OnRendererResponsive() {} // Called on Windows when App Commands arrive (WM_APPCOMMAND) - virtual void OnExecuteWindowsCommand(std::string& command_name) {} + virtual void OnExecuteWindowsCommand(const std::string& command_name) {} }; } // namespace atom