WIP: pushing message id to front of message data so browser process can reply

This commit is contained in:
Nathan Sobo
2012-08-28 17:20:49 -05:00
parent 7bfc97c4c4
commit 74bf4db5fc
2 changed files with 22 additions and 1 deletions

View File

@@ -22,7 +22,10 @@ bool AtomCefClient::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) {
std::string name = message->GetName().ToString();
CefRefPtr<CefListValue> argumentList = message->GetArgumentList();
int messageId = argumentList->GetInt(0);
message->GetArgumentList()->Remove(0);
if (name == "open") {
if (message->GetArgumentList()->GetSize() == 1) {
Open(message->GetArgumentList()->GetString(0));