From: Cheng Zhao Date: Wed, 12 Nov 2014 09:36:20 +0000 (+0800) Subject: Add a bunch of menu bar related APIs X-Git-Tag: v0.19.2~11^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=79d4724a15667f4abb396726a38159aa148cc43e;p=electron.git Add a bunch of menu bar related APIs --- diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 95dc491e..0035ab48 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -243,6 +243,20 @@ void NativeWindow::Print(bool silent, bool print_background) { PrintNow(silent, print_background); } +void NativeWindow::SetAutoHideMenuBar(bool auto_hide) { +} + +bool NativeWindow::IsMenuBarAutoHide() { + return false; +} + +void NativeWindow::SetMenuBarVisibility(bool visible) { +} + +bool NativeWindow::IsMenuBarVisible() { + return true; +} + bool NativeWindow::HasModalDialog() { return has_dialog_attached_; } diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index a57a1a9d..a434d281 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -161,6 +161,12 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate, // Print current page. virtual void Print(bool silent, bool print_background); + // Toggle the menu bar. + virtual void SetAutoHideMenuBar(bool auto_hide); + virtual bool IsMenuBarAutoHide(); + virtual void SetMenuBarVisibility(bool visible); + virtual bool IsMenuBarVisible(); + // The same with closing a tab in a real browser. // // Should be called by platform code when user want to close the window.