'lib_sources': [
'app/atom_main_delegate.cc',
'app/atom_main_delegate.h',
+ 'browser/api/atom_api_extensions.cc',
+ 'browser/api/atom_api_extensions.h',
+ 'browser/api/atom_api_window.cc',
+ 'browser/api/atom_api_window.h',
'browser/api/atom_bindings.cc',
'browser/api/atom_bindings.h',
- 'browser/api/atom_extensions.cc',
- 'browser/api/atom_extensions.h',
- 'browser/api/atom_window.cc',
- 'browser/api/atom_window.h',
'browser/atom_browser_client.cc',
'browser/atom_browser_client.h',
'browser/atom_browser_main_parts.cc',
namespace atom {
+namespace api {
+
#undef NODE_EXT_LIST_START
#undef NODE_EXT_LIST_ITEM
#undef NODE_EXT_LIST_END
#define NODE_EXT_LIST_ITEM NODE_MODULE_DECL
#define NODE_EXT_LIST_END
-#include "browser/api/atom_extensions.h"
+#include "browser/api/atom_api_extensions.h"
#undef NODE_EXT_LIST_START
#undef NODE_EXT_LIST_ITEM
#define NODE_EXT_LIST_ITEM NODE_EXT_STRING
#define NODE_EXT_LIST_END NULL};
-#include "browser/api/atom_extensions.h" // NOLINT
+#include "browser/api/atom_api_extensions.h" // NOLINT
node::node_module_struct* get_builtin_module(const char *name) {
char buf[128];
node::node_module_struct *cur = NULL;
- snprintf(buf, sizeof(buf), "atom_%s", name);
+ snprintf(buf, sizeof(buf), "atom_api_%s", name);
/* TODO: you could look these up in a hash, but there are only
* a few, and once loaded they are cached. */
for (int i = 0; node_module_list[i] != NULL; i++) {
return NULL;
}
+} // namespace api
+
} // namespace atom
NODE_EXT_LIST_START
-NODE_EXT_LIST_ITEM(atom_window)
+NODE_EXT_LIST_ITEM(atom_api_window)
NODE_EXT_LIST_END
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "browser/api/atom_window.h"
+#include "browser/api/atom_api_window.h"
namespace atom {
} // namespace atom
-NODE_MODULE(atom_window, atom::Initialize)
+NODE_MODULE(atom_api_window, atom::Initialize)
// 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_WINDOW_H_
-#define ATOM_BROWSER_API_ATOM_WINDOW_H_
+#ifndef ATOM_BROWSER_API_ATOM_API_WINDOW_H_
+#define ATOM_BROWSER_API_ATOM_API_WINDOW_H_
#include "vendor/node/src/node.h"
#include "vendor/node/src/node_object_wrap.h"
} // namespace atom
-#endif // ATOM_BROWSER_API_ATOM_WINDOW_H_
+#endif // ATOM_BROWSER_API_ATOM_API_WINDOW_H_
namespace atom {
-// Defined in atom_extensions.cc.
+// Defined in atom_api_extensions.cc.
+namespace api {
node::node_module_struct* get_builtin_module(const char *name);
+}
v8::Persistent<v8::Object> AtomBindings::binding_cache_;
return scope.Close(exports);
}
- if ((modp = get_builtin_module(*module_v)) != NULL) {
+ if ((modp = api::get_builtin_module(*module_v)) != NULL) {
exports = v8::Object::New();
// Internal bindings don't have a "module" object,
// only exports.