Make the crash reporter available for both browser and renderer.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 13 Nov 2013 09:29:35 +0000 (17:29 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 13 Nov 2013 09:29:35 +0000 (17:29 +0800)
atom.gyp
common/api/atom_api_crash_reporter.cc [moved from browser/api/atom_api_crash_reporter.cc with 87% similarity]
common/api/atom_api_crash_reporter.h [moved from browser/api/atom_api_crash_reporter.h with 80% similarity]
common/api/atom_extensions.h
common/api/lib/crash-reporter.coffee [moved from browser/api/lib/crash-reporter.coffee with 100% similarity]
common/crash_reporter/crash_reporter.h [moved from browser/crash_reporter.h with 76% similarity]
common/crash_reporter/crash_reporter_mac.mm [moved from browser/crash_reporter_mac.mm with 98% similarity]
common/crash_reporter/crash_reporter_win.cc [moved from browser/crash_reporter_win.cc with 89% similarity]

index 6ab9b7d..67047a3 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
@@ -14,7 +14,6 @@
       'browser/api/lib/atom-delegate.coffee',
       'browser/api/lib/auto-updater.coffee',
       'browser/api/lib/browser-window.coffee',
-      'browser/api/lib/crash-reporter.coffee',
       'browser/api/lib/dialog.coffee',
       'browser/api/lib/ipc.coffee',
       'browser/api/lib/menu.coffee',
@@ -26,6 +25,7 @@
       'browser/atom/rpc-server.coffee',
       'common/api/lib/callbacks-registry.coffee',
       'common/api/lib/clipboard.coffee',
+      'common/api/lib/crash-reporter.coffee',
       'common/api/lib/id-weak-map.coffee',
       'common/api/lib/shell.coffee',
       'renderer/api/lib/ipc.coffee',
@@ -41,8 +41,6 @@
       'browser/api/atom_api_auto_updater.h',
       'browser/api/atom_api_browser_ipc.cc',
       'browser/api/atom_api_browser_ipc.h',
-      'browser/api/atom_api_crash_reporter.h',
-      'browser/api/atom_api_crash_reporter.cc',
       'browser/api/atom_api_dialog.cc',
       'browser/api/atom_api_dialog.h',
       'browser/api/atom_api_event.cc',
@@ -87,9 +85,6 @@
       'browser/browser_mac.mm',
       'browser/browser_win.cc',
       'browser/browser_observer.h',
-      'browser/crash_reporter.h',
-      'browser/crash_reporter_mac.mm',
-      'browser/crash_reporter_win.cc',
       'browser/native_window.cc',
       'browser/native_window.h',
       'browser/native_window_mac.h',
       'common/api/api_messages.h',
       'common/api/atom_api_clipboard.cc',
       'common/api/atom_api_clipboard.h',
+      'common/api/atom_api_crash_reporter.cc',
+      'common/api/atom_api_crash_reporter.h',
       'common/api/atom_api_id_weak_map.cc',
       'common/api/atom_api_id_weak_map.h',
       'common/api/atom_api_shell.cc',
       'common/api/atom_extensions.h',
       'common/api/object_life_monitor.cc',
       'common/api/object_life_monitor.h',
+      'common/crash_reporter/crash_reporter.h',
+      'common/crash_reporter/crash_reporter_mac.mm',
+      'common/crash_reporter/crash_reporter_win.cc',
       'common/draggable_region.cc',
       'common/draggable_region.h',
       'common/node_bindings.cc',
similarity index 87%
rename from browser/api/atom_api_crash_reporter.cc
rename to common/api/atom_api_crash_reporter.cc
index 1c5d85d..b849f6e 100644 (file)
@@ -2,9 +2,9 @@
 // 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_crash_reporter.h"
+#include "common/api/atom_api_crash_reporter.h"
 
-#include "browser/crash_reporter.h"
+#include "common/crash_reporter/crash_reporter.h"
 #include "common/v8_conversions.h"
 #include "vendor/node/src/node.h"
 #include "vendor/node/src/node_internals.h"
@@ -43,4 +43,4 @@ void CrashReporter::Initialize(v8::Handle<v8::Object> target) {
 
 }  // namespace atom
 
-NODE_MODULE(atom_browser_crash_reporter, atom::api::CrashReporter::Initialize)
+NODE_MODULE(atom_common_crash_reporter, atom::api::CrashReporter::Initialize)
similarity index 80%
rename from browser/api/atom_api_crash_reporter.h
rename to common/api/atom_api_crash_reporter.h
index 7b42a0d..95ab0c0 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_BROWSER_API_ATOM_API_CRASH_REPORTER_H_
-#define ATOM_BROWSER_API_ATOM_API_CRASH_REPORTER_H_
+#ifndef ATOM_COMMON_API_ATOM_API_CRASH_REPORTER_H_
+#define ATOM_COMMON_API_ATOM_API_CRASH_REPORTER_H_
 
 #include "base/basictypes.h"
 #include "v8/include/v8.h"
@@ -28,4 +28,4 @@ class CrashReporter {
 
 }  // namespace atom
 
-#endif  // ATOM_BROWSER_API_ATOM_API_CRASH_REPORTER_H_
+#endif  // ATOM_COMMON_API_ATOM_API_CRASH_REPORTER_H_
index edf2cfd..c373d49 100644 (file)
@@ -11,7 +11,6 @@ NODE_EXT_LIST_START
 // Module names start with `atom_browser_` can only be used by browser process.
 NODE_EXT_LIST_ITEM(atom_browser_app)
 NODE_EXT_LIST_ITEM(atom_browser_auto_updater)
-NODE_EXT_LIST_ITEM(atom_browser_crash_reporter)
 NODE_EXT_LIST_ITEM(atom_browser_dialog)
 NODE_EXT_LIST_ITEM(atom_browser_ipc)
 NODE_EXT_LIST_ITEM(atom_browser_menu)
@@ -26,6 +25,7 @@ NODE_EXT_LIST_ITEM(atom_renderer_ipc)
 // Module names start with `atom_common_` can be used by both browser and
 // renderer processes.
 NODE_EXT_LIST_ITEM(atom_common_clipboard)
+NODE_EXT_LIST_ITEM(atom_common_crash_reporter)
 NODE_EXT_LIST_ITEM(atom_common_id_weak_map)
 NODE_EXT_LIST_ITEM(atom_common_shell)
 NODE_EXT_LIST_ITEM(atom_common_v8_util)
similarity index 76%
rename from browser/crash_reporter.h
rename to common/crash_reporter/crash_reporter.h
index 14b6c7a..dbb7bb5 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_BROWSER_CRASH_REPORTER_H_
-#define ATOM_BROWSER_CRASH_REPORTER_H_
+#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
+#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
 
 #include <string>
 
@@ -23,4 +23,4 @@ class CrashReporter {
 
 }  // namespace crash_reporter
 
-#endif  // ATOM_BROWSER_CRASH_REPORTER_H_
+#endif  // ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
similarity index 98%
rename from browser/crash_reporter_mac.mm
rename to common/crash_reporter/crash_reporter_mac.mm
index 46bdd7b..5c27936 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 "browser/crash_reporter.h"
+#include "common/crash_reporter/crash_reporter.h"
 
 #include "browser/browser.h"
 #include "base/mac/mac_util.h"
similarity index 89%
rename from browser/crash_reporter_win.cc
rename to common/crash_reporter/crash_reporter_win.cc
index ca3c7e6..e5187f0 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 "browser/crash_reporter.h"
+#include "common/crash_reporter/crash_reporter.h"
 
 namespace crash_reporter {