]> khamidou — GitHub mirrors - electron.git/commitdiff
Put converters under atom/common/native_mate_converters.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 17 Apr 2014 05:45:14 +0000 (13:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 17 Apr 2014 05:45:14 +0000 (13:45 +0800)
38 files changed:
atom.gyp
atom/browser/api/atom_api_app.cc
atom/browser/api/atom_api_auto_updater.cc
atom/browser/api/atom_api_browser_ipc.cc
atom/browser/api/atom_api_dialog.cc
atom/browser/api/atom_api_event.cc
atom/browser/api/atom_api_menu.cc
atom/browser/api/atom_api_menu_gtk.cc
atom/browser/api/atom_api_menu_mac.mm
atom/browser/api/atom_api_menu_win.cc
atom/browser/api/atom_api_power_monitor.cc
atom/browser/api/atom_api_protocol.cc
atom/browser/api/atom_api_window.cc
atom/browser/api/atom_browser_bindings.cc
atom/browser/atom_browser_main_parts.cc
atom/common/api/atom_api_clipboard.cc
atom/common/api/atom_api_crash_reporter.cc
atom/common/api/atom_api_event_emitter.cc
atom/common/api/atom_api_id_weak_map.cc
atom/common/api/atom_api_screen.cc
atom/common/api/atom_api_shell.cc
atom/common/api/atom_api_v8_util.cc
atom/common/api/atom_bindings.cc
atom/common/api/atom_extensions.cc
atom/common/native_mate_converters/file_path_converter.h [moved from atom/common/v8_converters/file_path_converter.h with 67% similarity]
atom/common/native_mate_converters/string16_converter.h [moved from atom/common/v8_converters/string16_converter.h with 80% similarity]
atom/common/native_mate_converters/v8_value_converter.cc [moved from atom/common/v8/v8_value_converter.cc with 99% similarity]
atom/common/native_mate_converters/v8_value_converter.h [moved from atom/common/v8/v8_value_converter.h with 92% similarity]
atom/common/native_mate_converters/value_converter.cc [new file with mode: 0644]
atom/common/native_mate_converters/value_converter.h [new file with mode: 0644]
atom/common/node_bindings.cc
atom/common/node_bindings_mac.cc
atom/common/node_includes.h [moved from atom/common/v8/node_common.h with 85% similarity]
atom/common/v8/native_type_conversions.h
atom/renderer/api/atom_api_renderer_ipc.cc
atom/renderer/api/atom_renderer_bindings.cc
atom/renderer/atom_render_view_observer.cc
atom/renderer/atom_renderer_client.cc

index e2fde27ef4cae6746b65dd23c5eca4715945db81..09bb7cdb52d1a7395675e5d2d507345fd0e3adf2 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       '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',
index 71ce4730f0bc5891bd46ff996da80a07ff30b3da..66332d309a6632feec2ab417a30429de3fb12a22 100644 (file)
@@ -11,7 +11,7 @@
 #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 {
 
index 1ed8588e41d722001bf2c276f8816a716506493d..54dbde83b6cef26cb4bd3fc85418d103fda836f4 100644 (file)
@@ -9,7 +9,7 @@
 #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 {
 
index 2d062421444f5fde900a05a64a790414375ab8b7..71da2c7cccfd9a686d096ded23800aa4542121e0 100644 (file)
@@ -5,7 +5,7 @@
 #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"
 
index 4cc5b4bab5f792b61719cd08170c8e39f449997c..b4d120f065e27b2449bae65b700e15b023410143 100644 (file)
 #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 {
 
index b1f14066770f480294acf01bcf6c42817794653e..f1d305d0e90b9a09571c0ebd445cf7b60938b5c0 100644 (file)
@@ -5,7 +5,7 @@
 #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"
 
index ea89ce5b6646cbba7afe96c87917b4b2df375122..f1088be1387dfb6ac61313f0021c6acaeab4af94 100644 (file)
@@ -7,7 +7,7 @@
 #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 \
index 0265ac74a3240b1e54d9395fc56fe14100230eb8..4f27ed94ae5a9dce4ea730ee3179a0af92ed9b1b 100644 (file)
@@ -10,7 +10,7 @@
 #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 {
 
index be8a9f5f86960ce5dd088eec97cbc2a793d37e8b..65db434110ab9b854f4d398eaeba0ffd08a3c64f 100644 (file)
@@ -7,7 +7,7 @@
 #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"
index d5d820e09db3f106aa7636cfdb79de9789685303..1943e45fa677cfa3d89e532fd4a4b81ada6e899c 100644 (file)
@@ -10,7 +10,7 @@
 #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 {
 
index d045c1866c2ee1bae8e6003f244014876adfc6dd..73c8c9dc8e215ba1e69371dbf91a6ea287e011c3 100644 (file)
@@ -7,7 +7,7 @@
 #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 {
 
index 60c7b8cb620667d58ad35ea57b1da436c95d3f4c..6bb487503d590fe1658d89a885680e327eceed63 100644 (file)
@@ -13,7 +13,7 @@
 #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 {
 
index 12aa099ee3909503412ca3317cc3eb544aaede58..ecbb606256094146921c1596daf79ed7f9070cce 100644 (file)
@@ -16,7 +16,7 @@
 #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;
index 94c925f8a0b76768dad66607302c5a013bc27e5b..1d25fa19fe1cb3c1ad77305211cac3210d4d1b50 100644 (file)
@@ -11,7 +11,7 @@
 #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 {
 
index 84f15d6202713d191b9132f79d5a8e7063b39243..139b158014249103ff084a689f81adc1b4323b8a 100644 (file)
@@ -15,7 +15,7 @@
 #include "ui/gfx/win/dpi.h"
 #endif
 
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
 
 namespace atom {
 
index 3bb3758608303763eea97441d14b3036d954328c..e26f2a310cae888e4d1af9ceea1a10ec4f0def32 100644 (file)
@@ -8,7 +8,7 @@
 #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 {
 
index a3338e7ed3cda5af5d6b1605b756717948eb7c97..06d2f8b49b6b5dc30239db7384b04aedbf0b19d3 100644 (file)
@@ -9,7 +9,7 @@
 #include "base/bind.h"
 #include "native_mate/dictionary.h"
 
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
 
 namespace mate {
 
index 9588a3b5c9e1767b1a45ad98e3822a22bb7b82fa..899ee3cd884e3ab7de48516f35baa25a1f88a237 100644 (file)
@@ -10,7 +10,7 @@
 #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 {
 
index 43df9b5e43cfe4f9b23508f7f1d7d58a43b7722a..e6b6d0e7667845aa25b6ad6c95edbcfb81a72856 100644 (file)
@@ -10,7 +10,7 @@
 #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 {
 
index 1b244cde281b7b657c506dc59f8e9cf7c15c6479..980183bc30326e071c4ee825b368a6a5230d0945 100644 (file)
@@ -5,7 +5,7 @@
 #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"
index edb90997a34806c4c34e391b53a0b2ad18e0bb08..9109b9c3c10e9d56a9fbaff2c0eba7a341c7189a 100644 (file)
@@ -5,11 +5,11 @@
 #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 {
 
index 8889591f0b26ebd62076d7377df80b8650215cf7..f6e2e6d89a4540d8cabfc8ea934e010f1be4f312 100644 (file)
@@ -6,7 +6,7 @@
 #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 {
 
index 26c5daf301e485a0313fef74b36f1747225600c1..f3ba3da3b54618f0dd20ff587332dcd2da8a36de 100644 (file)
@@ -10,7 +10,7 @@
 #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 {
 
index 16cd74e7846c0fcde5f4f6fcff165f62edf5a8fc..18c8a24d4d19538090456739a4df6b474cb8b5cb 100644 (file)
@@ -8,7 +8,7 @@
 #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 {
 
similarity index 67%
rename from atom/common/v8_converters/file_path_converter.h
rename to atom/common/native_mate_converters/file_path_converter.h
index 2606ed46c5d5013f479bdde3356c8ba20c8fe044..91e33d92c773076b4156d1beff2db5a2c73cdf20 100644 (file)
@@ -2,10 +2,12 @@
 // 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 {
@@ -20,7 +22,7 @@ struct Converter<base::FilePath> {
                      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 {
@@ -31,4 +33,4 @@ struct Converter<base::FilePath> {
 
 }  // namespace mate
 
-#endif  // ATOM_COMMON_V8_CONVERTERS_FILE_PATH_CONVERTER_H_
+#endif  // ATOM_COMMON_NATIVE_MATE_CONVERTERS_FILE_PATH_CONVERTER_H_
similarity index 80%
rename from atom/common/v8_converters/string16_converter.h
rename to atom/common/native_mate_converters/string16_converter.h
index d891dc00c992a51b8e67232c6a6dfd2ef60c376e..a3b360fd674467be9b24cbc552d2fda920e86b61 100644 (file)
@@ -2,8 +2,8 @@
 // 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"
@@ -28,4 +28,4 @@ struct Converter<string16> {
 
 }  // namespace mate
 
-#endif  // ATOM_COMMON_V8_CONVERTERS_STRING16_CONVERTER_H_
+#endif  // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
similarity index 99%
rename from atom/common/v8/v8_value_converter.cc
rename to atom/common/native_mate_converters/v8_value_converter.cc
index 7aaef694dadcc930d10f93194d214fd38f7fdbcc..2a879155a8be1efff4c388a95e62795874a23592 100644 (file)
@@ -2,7 +2,7 @@
 // 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>
similarity index 92%
rename from atom/common/v8/v8_value_converter.h
rename to atom/common/native_mate_converters/v8_value_converter.h
index bd25a5880307d7efbd5748298863be82a213cdb8..06f69b13e41a6bc9bc9e1fbddf243b285286795b 100644 (file)
@@ -2,8 +2,8 @@
 // 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>
 
@@ -77,4 +77,4 @@ class V8ValueConverter {
 
 }  // namespace atom
 
-#endif  // ATOM_COMMON_V8_V8_VALUE_CONVERTER_H_
+#endif  // ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
diff --git a/atom/common/native_mate_converters/value_converter.cc b/atom/common/native_mate_converters/value_converter.cc
new file mode 100644 (file)
index 0000000..4833630
--- /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.
+
+#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
diff --git a/atom/common/native_mate_converters/value_converter.h b/atom/common/native_mate_converters/value_converter.h
new file mode 100644 (file)
index 0000000..55a2d76
--- /dev/null
@@ -0,0 +1,25 @@
+// 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_
index a138273c71057aeb2a1b912066b219aecd294346..380419b6b7f04b6c487e1567a7d4eea8b5ea9f37 100644 (file)
@@ -18,7 +18,7 @@
 #include "base/strings/utf_string_conversions.h"
 #endif
 
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
 
 using content::BrowserThread;
 
index d918b8e761c8c47bfb679264dab54d546c64e3c6..c791118e0258f6401f369030027126f173e7d8fe 100644 (file)
@@ -9,7 +9,7 @@
 #include <sys/time.h>
 #include <sys/types.h>
 
-#include "atom/common/v8/node_common.h"
+#include "atom/common/node_includes.h"
 
 namespace atom {
 
similarity index 85%
rename from atom/common/v8/node_common.h
rename to atom/common/node_includes.h
index 88a7505f37ce43cf716a0d244dfb4e52e70de397..8dc395703eded405a4c42a59ba521b6668046e06 100644 (file)
@@ -2,8 +2,8 @@
 // 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.
 
@@ -24,4 +24,4 @@ namespace atom {
 extern node::Environment* global_env;
 }
 
-#endif  // ATOM_COMMON_V8_NODE_COMMON_H_
+#endif  // ATOM_COMMON_NODE_INCLUDES_H_
index fbe615b3f9011121d40fef54b3b95dcb3b5136ff..e7c4c73a4e63f436158e3ade7115aa31b9e71132 100644 (file)
@@ -12,7 +12,7 @@
 #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"
index c93d8a0a3bbc374c3cdb543a6525e0a96ecd0e5c..885a764bf944ebe790490e96f7dd6b3e820318da 100644 (file)
@@ -3,40 +3,19 @@
 // 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() {
index c35b64f6d5f8e6a0029c9cbef8a1802f126684bd..1e2926ea96c6eb2b4e2dcd8dd6279ecbc1389844 100644 (file)
@@ -11,7 +11,7 @@
 #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 {
 
index 734a6033605c9878411a097d433c7396b5da8b1c..6541f7c235b6e04fbef9a1d403c15b79105fc45a 100644 (file)
@@ -16,7 +16,7 @@
 #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;
 
index 0b8c474076f2a2658c552608b2c5d8443d68f41b..e7e29ecf67eab046a947c50e5810257605c81fd1 100644 (file)
@@ -15,7 +15,7 @@
 #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 {