Add atom.log (passes message directly to NSLog)

This commit is contained in:
Corey Johnson
2012-11-07 15:42:43 -08:00
parent 19fedbcffc
commit 3860fe1de7
2 changed files with 7 additions and 0 deletions

View File

@@ -62,6 +62,10 @@ bool AtomCefClient::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
else if (name == "exit") {
Exit(argumentList->GetInt(1));
}
else if (name == "log") {
std::string message = argumentList->GetString(1).ToString();
Log(message.c_str());
}
else if (name == "beginTracing") {
BeginTracing();
}

View File

@@ -51,6 +51,9 @@ atom.focus = ->
atom.exit = (status) ->
@sendMessageToBrowserProcess('exit', [status])
atom.log = (message) ->
@sendMessageToBrowserProcess('log', [message])
atom.beginTracing = ->
@sendMessageToBrowserProcess('beginTracing')