Add JavaScript binding example to cefclient.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@591 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-04-12 21:58:35 +00:00
parent 647c74cf96
commit c7d9fb4abe
6 changed files with 48 additions and 17 deletions

View File

@ -35,7 +35,7 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
std::string result;
CefRefPtr<CefListValue> args = message->GetArgumentList();
if (args->GetSize() >= 0 && args->GetType(0) == VTYPE_STRING) {
if (args->GetSize() > 0 && args->GetType(0) == VTYPE_STRING) {
// Our result is a reverse of the original message.
result = args->GetString(0);
std::reverse(result.begin(), result.end());