'atom/common/draggable_region.cc',
'atom/common/draggable_region.h',
'atom/common/linux/application_info.cc',
+ 'atom/common/native_mate_converters/file_path_converter.h',
+ 'atom/common/native_mate_converters/string16_converter.h',
+ 'atom/common/native_mate_converters/v8_value_converter.cc',
+ 'atom/common/native_mate_converters/v8_value_converter.h',
+ 'atom/common/native_mate_converters/value_converter.cc',
+ 'atom/common/native_mate_converters/value_converter.h',
'atom/common/node_bindings.cc',
'atom/common/node_bindings.h',
'atom/common/node_bindings_linux.cc',
'atom/common/node_bindings_mac.h',
'atom/common/node_bindings_win.cc',
'atom/common/node_bindings_win.h',
+ 'atom/common/node_includes.h',
'atom/common/options_switches.cc',
'atom/common/options_switches.h',
'atom/common/platform_util.h',
'atom/common/platform_util_mac.mm',
'atom/common/platform_util_win.cc',
'atom/common/swap_or_assign.h',
- 'atom/common/v8/node_common.h',
'atom/common/v8/scoped_persistent.h',
'atom/common/v8/native_type_conversions.h',
- 'atom/common/v8/v8_value_converter.cc',
- 'atom/common/v8/v8_value_converter.h',
'atom/renderer/api/atom_api_renderer_ipc.cc',
'atom/renderer/api/atom_renderer_bindings.cc',
'atom/renderer/api/atom_renderer_bindings.h',
#include "atom/browser/browser.h"
#include "atom/common/v8/native_type_conversions.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "atom/browser/auto_updater.h"
#include "atom/common/v8/native_type_conversions.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "atom/browser/api/atom_api_browser_ipc.h"
#include "atom/common/api/api_messages.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#include "atom/common/v8/native_type_conversions.h"
#include "content/public/browser/render_view_host.h"
#include "atom/browser/native_window.h"
#include "atom/browser/ui/file_dialog.h"
#include "atom/browser/ui/message_box.h"
-#include "atom/common/v8_converters/file_path_converter.h"
+#include "atom/common/native_mate_converters/file_path_converter.h"
#include "native_mate/dictionary.h"
#include "native_mate/scoped_persistent.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace mate {
#include "atom/browser/api/atom_api_event.h"
#include "atom/common/api/api_messages.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#include "atom/common/v8/native_type_conversions.h"
#include "content/public/browser/web_contents.h"
#include <string>
#include "atom/browser/ui/accelerator_util.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#include "atom/common/v8/native_type_conversions.h"
#define UNWRAP_MEMNU_AND_CHECK \
#include "ui/gfx/point.h"
#include "ui/gfx/screen.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "base/message_loop/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "atom/browser/native_window.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#include "atom/common/v8/native_type_conversions.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/point.h"
#include "ui/gfx/screen.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "content/public/browser/browser_thread.h"
#include "net/url_request/url_request_context.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "ui/gfx/point.h"
#include "ui/gfx/size.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#include "vendor/node/src/node_buffer.h"
using content::NavigationController;
#include "atom/common/v8/native_type_conversions.h"
#include "content/public/browser/browser_thread.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "ui/gfx/win/dpi.h"
#endif
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "native_mate/dictionary.h"
#include "ui/base/clipboard/clipboard.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace {
#include "base/bind.h"
#include "native_mate/dictionary.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace mate {
#include "atom/common/v8/native_type_conversions.h"
#include "base/logging.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "native_mate/constructor.h"
#include "native_mate/object_template_builder.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "native_mate/dictionary.h"
#include "ui/gfx/screen.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
#if defined(TOOLKIT_GTK)
#include "base/command_line.h"
#include <string>
#include "atom/common/platform_util.h"
-#include "atom/common/v8_converters/file_path_converter.h"
+#include "atom/common/native_mate_converters/file_path_converter.h"
#include "native_mate/dictionary.h"
#include "url/gurl.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace mate {
#include "native_mate/dictionary.h"
#include "v8/include/v8-profiler.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace {
#include "atom/common/v8/native_type_conversions.h"
#include "base/logging.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "base/strings/string_util.h"
#include "vendor/node/src/node_version.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATOM_COMMON_V8_CONVERTERS_FILE_PATH_CONVERTER_H_
-#define ATOM_COMMON_V8_CONVERTERS_FILE_PATH_CONVERTER_H_
+#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_FILE_PATH_CONVERTER_H_
+#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_FILE_PATH_CONVERTER_H_
-#include "atom/common/v8_converters/string16_converter.h"
+#include <string>
+
+#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/files/file_path.h"
namespace mate {
v8::Handle<v8::Value> val,
base::FilePath* out) {
base::FilePath::StringType path;
- if (Converter<std::string>::FromV8(isolate, val, &path)) {
+ if (Converter<base::FilePath::StringType>::FromV8(isolate, val, &path)) {
*out = base::FilePath(path);
return true;
} else {
} // namespace mate
-#endif // ATOM_COMMON_V8_CONVERTERS_FILE_PATH_CONVERTER_H_
+#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_FILE_PATH_CONVERTER_H_
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATOM_COMMON_V8_CONVERTERS_STRING16_CONVERTER_H_
-#define ATOM_COMMON_V8_CONVERTERS_STRING16_CONVERTER_H_
+#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
+#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
#include "base/strings/string16.h"
#include "native_mate/converter.h"
} // namespace mate
-#endif // ATOM_COMMON_V8_CONVERTERS_STRING16_CONVERTER_H_
+#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "atom/common/v8/v8_value_converter.h"
+#include "atom/common/native_mate_converters/v8_value_converter.h"
#include <string>
#include <utility>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATOM_COMMON_V8_V8_VALUE_CONVERTER_H_
-#define ATOM_COMMON_V8_V8_VALUE_CONVERTER_H_
+#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
+#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
#include <map>
} // namespace atom
-#endif // ATOM_COMMON_V8_V8_VALUE_CONVERTER_H_
+#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
--- /dev/null
+// 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 "atom/common/native_mate_converters/value_converter.h"
+
+#include "atom/common/native_mate_converters/v8_value_converter.h"
+#include "base/values.h"
+
+namespace mate {
+
+bool Converter<base::ListValue>::FromV8(v8::Isolate* isolate,
+ v8::Handle<v8::Value> val,
+ base::ListValue* out) {
+ scoped_ptr<atom::V8ValueConverter> converter(new atom::V8ValueConverter);
+ scoped_ptr<base::Value> value(converter->FromV8Value(
+ val, v8::Context::GetCurrent()));
+ if (value->IsType(base::Value::TYPE_LIST)) {
+ out->Swap(static_cast<ListValue*>(value.get()));
+ return true;
+ } else {
+ return false;
+ }
+}
+
+} // namespace mate
--- /dev/null
+// 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_NATIVE_MATE_CONVERTERS_VALUE_CONVERTER_H_
+#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_VALUE_CONVERTER_H_
+
+#include "native_mate/converter.h"
+
+namespace base {
+class ListValue;
+}
+
+namespace mate {
+
+template<>
+struct Converter<base::ListValue> {
+ static bool FromV8(v8::Isolate* isolate,
+ v8::Handle<v8::Value> val,
+ base::ListValue* out);
+};
+
+} // namespace mate
+
+#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_VALUE_CONVERTER_H_
#include "base/strings/utf_string_conversions.h"
#endif
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
using content::BrowserThread;
#include <sys/time.h>
#include <sys/types.h>
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATOM_COMMON_V8_NODE_COMMON_H_
-#define ATOM_COMMON_V8_NODE_COMMON_H_
+#ifndef ATOM_COMMON_NODE_INCLUDES_H_
+#define ATOM_COMMON_NODE_INCLUDES_H_
// Include common headers for using node APIs.
extern node::Environment* global_env;
}
-#endif // ATOM_COMMON_V8_NODE_COMMON_H_
+#endif // ATOM_COMMON_NODE_INCLUDES_H_
#include "atom/browser/api/atom_api_window.h"
#include "atom/common/swap_or_assign.h"
#include "atom/common/v8/scoped_persistent.h"
-#include "atom/common/v8/v8_value_converter.h"
+#include "atom/common/native_mate_converters/v8_value_converter.h"
#include "base/files/file_path.h"
#include "base/strings/string16.h"
#include "base/template_util.h"
// found in the LICENSE file.
#include "atom/common/api/api_messages.h"
-#include "atom/common/v8/v8_value_converter.h"
-#include "atom/common/v8_converters/string16_converter.h"
+#include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/native_mate_converters/value_converter.h"
#include "content/public/renderer/render_view.h"
#include "native_mate/dictionary.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
using content::RenderView;
using WebKit::WebFrame;
using WebKit::WebView;
-namespace mate {
-
-template<>
-struct Converter<base::ListValue> {
- static bool FromV8(v8::Isolate* isolate,
- v8::Handle<v8::Value> val,
- base::ListValue* out) {
- scoped_ptr<atom::V8ValueConverter> converter(new atom::V8ValueConverter);
- scoped_ptr<base::Value> value(converter->FromV8Value(
- val, v8::Context::GetCurrent()));
- if (value->IsType(base::Value::TYPE_LIST)) {
- out->Swap(static_cast<ListValue*>(value.get()));
- return true;
- } else {
- return false;
- }
- }
-};
-
-} // namespace mate
-
namespace {
RenderView* GetCurrentRenderView() {
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
using WebKit::WebFrame;
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
namespace atom {