diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 16:20:04 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 16:20:04 +0000 |
commit | 53c7ce4f0ad213cfe239e35851aff3a460e0e1c0 (patch) | |
tree | 3a464e602982f74a6dd7a5232df3d99669feda0f /base | |
parent | 3263fe62569d29312a2891ab1edaaf2ad2095d47 (diff) | |
download | chromium_src-53c7ce4f0ad213cfe239e35851aff3a460e0e1c0.zip chromium_src-53c7ce4f0ad213cfe239e35851aff3a460e0e1c0.tar.gz chromium_src-53c7ce4f0ad213cfe239e35851aff3a460e0e1c0.tar.bz2 |
Add Debug Message Dialog Support for Mac OS
BUG=37026
TEST=NONE
Review URL: http://codereview.chromium.org/5804004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/logging.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/base/logging.cc b/base/logging.cc index 40497bf..70616c3 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -51,14 +51,18 @@ typedef pthread_mutex_t* MutexHandle; #include "base/debug/stack_trace.h" #include "base/eintr_wrapper.h" #include "base/lock_impl.h" -#if defined(OS_POSIX) -#include "base/safe_strerror_posix.h" -#endif #include "base/process_util.h" #include "base/string_piece.h" #include "base/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "base/vlog.h" +#if defined(OS_POSIX) +#include "base/safe_strerror_posix.h" +#endif +#if defined(OS_MACOSX) +#include "base/mac/scoped_cftyperef.h" +#include "base/sys_string_conversions.h" +#endif namespace logging { @@ -511,6 +515,12 @@ void DisplayDebugMessageInDialog(const std::string& str) { argv.push_back(str); base::LaunchApp(argv, base::file_handle_mapping_vector(), true /* wait */, NULL); +#elif defined(OS_MACOSX) + base::mac::ScopedCFTypeRef<CFStringRef> message( + base::SysUTF8ToCFStringRef(str)); + CFUserNotificationDisplayNotice(0, kCFUserNotificationStopAlertLevel, + NULL, NULL, NULL, CFSTR("Fatal Error"), + message, NULL); #else // http://code.google.com/p/chromium/issues/detail?id=37026 NOTIMPLEMENTED(); |