]> khamidou — GitHub mirrors - electron.git/commitdiff
linux: Add dummy implementation of node bindings.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 14 Feb 2014 14:39:57 +0000 (14:39 +0000)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 14 Feb 2014 14:39:57 +0000 (14:39 +0000)
atom.gyp
common/node_bindings_linux.cc [new file with mode: 0644]
common/node_bindings_linux.h [new file with mode: 0644]

index 190662789369ff648cd31dc21868985a3e1fc5f9..6a96bd840c3be13ddad5e7a3cc71c0165ccd35cf 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       'common/linux/application_info.cc',
       'common/node_bindings.cc',
       'common/node_bindings.h',
+      'common/node_bindings_linux.cc',
+      'common/node_bindings_linux.h',
       'common/node_bindings_mac.cc',
       'common/node_bindings_mac.h',
       'common/node_bindings_win.cc',
             },
           ],
         }],  # OS=="win"
+        ['OS=="linux"', {
+          'copies': [
+            {
+              'destination': '<(PRODUCT_DIR)',
+              'files': [
+                '<(libchromiumcontent_library_dir)/libchromiumcontent.so',
+                '<(libchromiumcontent_library_dir)/libffmpegsumo.so',
+                '<(libchromiumcontent_resources_dir)/content_shell.pak',
+              ],
+            },
+            {
+              'destination': '<(PRODUCT_DIR)/resources/browser',
+              'files': [
+                'browser/default_app',
+              ]
+            },
+          ],
+        }],  # OS=="linux"
       ],
     },  # target <(project_name)
     {
diff --git a/common/node_bindings_linux.cc b/common/node_bindings_linux.cc
new file mode 100644 (file)
index 0000000..16e1e9b
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright (c) 2014 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 "common/node_bindings_linux.h"
+
+namespace atom {
+
+NodeBindingsLinux::NodeBindingsLinux(bool is_browser)
+    : NodeBindings(is_browser) {
+}
+
+NodeBindingsLinux::~NodeBindingsLinux() {
+}
+
+void NodeBindingsLinux::PollEvents() {
+}
+
+// static
+NodeBindings* NodeBindings::Create(bool is_browser) {
+  return new NodeBindingsLinux(is_browser);
+}
+
+}  // namespace at
diff --git a/common/node_bindings_linux.h b/common/node_bindings_linux.h
new file mode 100644 (file)
index 0000000..b4a2941
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright (c) 2014 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_COMMON_NODE_BINDINGS_LINUX_H_
+#define ATOM_COMMON_NODE_BINDINGS_LINUX_H_
+
+#include "base/compiler_specific.h"
+#include "common/node_bindings.h"
+
+namespace atom {
+
+class NodeBindingsLinux : public NodeBindings {
+ public:
+  explicit NodeBindingsLinux(bool is_browser);
+  virtual ~NodeBindingsLinux();
+
+ private:
+  virtual void PollEvents() OVERRIDE;
+
+  DISALLOW_COPY_AND_ASSIGN(NodeBindingsLinux);
+};
+
+}  // namespace atom
+
+#endif  // ATOM_COMMON_NODE_BINDINGS_LINUX_H_