| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 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/c/dev/ppb_testing_dev.h" | 5 #include "ppapi/c/dev/ppb_testing_dev.h" |
| 6 #include "ppapi/c/pp_errors.h" | 6 #include "ppapi/c/pp_errors.h" |
| 7 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" | 7 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" |
| 8 #include "native_client/tests/ppapi_test_lib/testable_callback.h" | 8 #include "native_client/tests/ppapi_test_lib/testable_callback.h" |
| 9 | 9 |
| 10 TestableCallback::TestableCallback(PP_Instance instance, bool force_async) | 10 TestableCallback::TestableCallback(PP_Instance instance, bool force_async) |
| 11 : have_result_(false), | 11 : have_result_(false), |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void TestableCallback::Handler(void* user_data, int32_t result) { | 44 void TestableCallback::Handler(void* user_data, int32_t result) { |
| 45 TestableCallback* callback = static_cast<TestableCallback*>(user_data); | 45 TestableCallback* callback = static_cast<TestableCallback*>(user_data); |
| 46 callback->result_ = result; | 46 callback->result_ = result; |
| 47 callback->have_result_ = true; | 47 callback->have_result_ = true; |
| 48 ++callback->run_count_; | 48 ++callback->run_count_; |
| 49 if (callback->post_quit_task_) { | 49 if (callback->post_quit_task_) { |
| 50 callback->post_quit_task_ = false; | 50 callback->post_quit_task_ = false; |
| 51 PPBTestingDev()->QuitMessageLoop(callback->instance_); | 51 PPBTestingDev()->QuitMessageLoop(callback->instance_); |
| 52 } | 52 } |
| 53 } | 53 } |
| OLD | NEW |