| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shared_impl/tracked_callback.h" | 5 #include "ppapi/shared_impl/tracked_callback.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "ppapi/c/pp_completion_callback.h" | 14 #include "ppapi/c/pp_completion_callback.h" |
| 15 #include "ppapi/c/pp_errors.h" | 15 #include "ppapi/c/pp_errors.h" |
| 16 #include "ppapi/c/ppb_message_loop.h" | 16 #include "ppapi/c/ppb_message_loop.h" |
| 17 #include "ppapi/shared_impl/callback_tracker.h" | 17 #include "ppapi/shared_impl/callback_tracker.h" |
| 18 #include "ppapi/shared_impl/ppapi_globals.h" | 18 #include "ppapi/shared_impl/ppapi_globals.h" |
| 19 #include "ppapi/shared_impl/ppb_message_loop_shared.h" | 19 #include "ppapi/shared_impl/ppb_message_loop_shared.h" |
| 20 #include "ppapi/shared_impl/proxy_lock.h" | 20 #include "ppapi/shared_impl/proxy_lock.h" |
| 21 #include "ppapi/shared_impl/resource.h" | 21 #include "ppapi/shared_impl/resource.h" |
| 22 | 22 |
| 23 namespace ppapi { | 23 namespace ppapi { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // tracker. Then MarkAsCompleted before waking up the blocked thread, | 281 // tracker. Then MarkAsCompleted before waking up the blocked thread, |
| 282 // which could potentially re-enter. | 282 // which could potentially re-enter. |
| 283 scoped_refptr<TrackedCallback> thiz(this); | 283 scoped_refptr<TrackedCallback> thiz(this); |
| 284 MarkAsCompletedWithLock(); | 284 MarkAsCompletedWithLock(); |
| 285 // Wake up the blocked thread. See BlockUntilComplete for where the thread | 285 // Wake up the blocked thread. See BlockUntilComplete for where the thread |
| 286 // Wait()s. | 286 // Wait()s. |
| 287 operation_completed_condvar_->Signal(); | 287 operation_completed_condvar_->Signal(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace ppapi | 290 } // namespace ppapi |
| OLD | NEW |