]> khamidou — GitHub mirrors - electron.git/commitdiff
Add dummny menu implementation for Windows.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 5 Jul 2013 01:44:56 +0000 (09:44 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 5 Jul 2013 01:44:56 +0000 (09:44 +0800)
atom.gyp
browser/api/atom_api_menu_win.cc [new file with mode: 0644]
browser/api/atom_api_menu_win.h [new file with mode: 0644]

index d46e81e0784866151e31d0b59ad02951195d26cb..bc1d427d5a205af5139a09569d0d84c2a28a4ba1 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
@@ -53,6 +53,8 @@
       'browser/api/atom_api_menu.h',
       'browser/api/atom_api_menu_mac.h',
       'browser/api/atom_api_menu_mac.mm',
+      'browser/api/atom_api_menu_win.cc',
+      'browser/api/atom_api_menu_win.h',
       'browser/api/atom_api_window.cc',
       'browser/api/atom_api_window.h',
       'browser/api/atom_browser_bindings.cc',
diff --git a/browser/api/atom_api_menu_win.cc b/browser/api/atom_api_menu_win.cc
new file mode 100644 (file)
index 0000000..8023fb1
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright (c) 2013 GitHub, Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "browser/api/atom_api_menu_win.h"
+
+namespace atom {
+
+namespace api {
+
+MenuWin::MenuWin(v8::Handle<v8::Object> wrapper)
+    : Menu(wrapper) {
+}
+
+MenuWin::~MenuWin() {
+}
+
+void MenuWin::Popup(NativeWindow* native_window) {
+}
+
+// static
+Menu* Menu::Create(v8::Handle<v8::Object> wrapper) {
+  return new MenuWin(wrapper);
+}
+
+}  // namespace api
+
+}  // namespace atom
diff --git a/browser/api/atom_api_menu_win.h b/browser/api/atom_api_menu_win.h
new file mode 100644 (file)
index 0000000..d0f2559
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 GitHub, Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_BROWSER_API_ATOM_API_MENU_WIN_H_
+#define ATOM_BROWSER_API_ATOM_API_MENU_WIN_H_
+
+#include "browser/api/atom_api_menu.h"
+
+namespace atom {
+
+namespace api {
+
+class MenuWin : public Menu {
+ public:
+  explicit MenuWin(v8::Handle<v8::Object> wrapper);
+  virtual ~MenuWin();
+
+ protected:
+  virtual void Popup(NativeWindow* window) OVERRIDE;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MenuWin);
+};
+
+}  // namespace api
+
+}  // namespace atom
+
+#endif  // ATOM_BROWSER_API_ATOM_API_MENU_WIN_H_