| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/tests/test_message_handler.h" | 5 #include "ppapi/tests/test_message_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 7 #include <string.h> | 9 #include <string.h> |
| 8 #include <algorithm> | 10 #include <algorithm> |
| 9 #include <map> | 11 #include <map> |
| 10 #include <sstream> | 12 #include <sstream> |
| 11 | 13 |
| 12 #include "ppapi/c/pp_var.h" | 14 #include "ppapi/c/pp_var.h" |
| 13 #include "ppapi/c/ppb_file_io.h" | 15 #include "ppapi/c/ppb_file_io.h" |
| 14 #include "ppapi/c/ppb_messaging.h" | 16 #include "ppapi/c/ppb_messaging.h" |
| 15 #include "ppapi/c/ppp_message_handler.h" | 17 #include "ppapi/c/ppp_message_handler.h" |
| 16 #include "ppapi/cpp/completion_callback.h" | 18 #include "ppapi/cpp/completion_callback.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 363 } |
| 362 | 364 |
| 363 pp::Var TestMessageHandler::WaitForMessage() { | 365 pp::Var TestMessageHandler::WaitForMessage() { |
| 364 message_received_.Wait(); | 366 message_received_.Wait(); |
| 365 pp::Var var_to_return = last_message_; | 367 pp::Var var_to_return = last_message_; |
| 366 last_message_ = pp::Var(); | 368 last_message_ = pp::Var(); |
| 367 message_received_.Reset(); | 369 message_received_.Reset(); |
| 368 return var_to_return; | 370 return var_to_return; |
| 369 } | 371 } |
| 370 | 372 |
| OLD | NEW |