]> khamidou — GitHub mirrors - electron.git/commitdiff
Add a bunch of menu bar related APIs
authorCheng Zhao <zcbenz@gmail.com>
Wed, 12 Nov 2014 09:36:20 +0000 (17:36 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 12 Nov 2014 09:36:20 +0000 (17:36 +0800)
atom/browser/native_window.cc
atom/browser/native_window.h

index 95dc491ed43d601500a675f7e670786e321ea96e..0035ab48b8bfc845c28edfa392514ac10760a4c7 100644 (file)
@@ -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_;
 }
index a57a1a9dbe2b7eb8ad0db3ee8b3e30aa9a4e368f..a434d28175ad115ccfde5b0fa25cb887c2f7f06d 100644 (file)
@@ -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.