| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 12 #include "ppapi/c/dev/ppb_message_loop_dev.h" | |
| 13 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 14 #include "ppapi/c/pp_errors.h" | 13 #include "ppapi/c/pp_errors.h" |
| 14 #include "ppapi/c/ppb_message_loop.h" |
| 15 #include "ppapi/shared_impl/callback_tracker.h" | 15 #include "ppapi/shared_impl/callback_tracker.h" |
| 16 #include "ppapi/shared_impl/ppapi_globals.h" | 16 #include "ppapi/shared_impl/ppapi_globals.h" |
| 17 #include "ppapi/shared_impl/ppb_message_loop_shared.h" | 17 #include "ppapi/shared_impl/ppb_message_loop_shared.h" |
| 18 #include "ppapi/shared_impl/proxy_lock.h" | 18 #include "ppapi/shared_impl/proxy_lock.h" |
| 19 #include "ppapi/shared_impl/resource.h" | 19 #include "ppapi/shared_impl/resource.h" |
| 20 | 20 |
| 21 namespace ppapi { | 21 namespace ppapi { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // until we're done. | 197 // until we're done. |
| 198 scoped_refptr<TrackedCallback> thiz = this; | 198 scoped_refptr<TrackedCallback> thiz = this; |
| 199 completed_ = true; | 199 completed_ = true; |
| 200 // We may not have a valid resource, in which case we're not in the tracker. | 200 // We may not have a valid resource, in which case we're not in the tracker. |
| 201 if (resource_id_) | 201 if (resource_id_) |
| 202 tracker_->Remove(thiz); | 202 tracker_->Remove(thiz); |
| 203 tracker_ = NULL; | 203 tracker_ = NULL; |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace ppapi | 206 } // namespace ppapi |
| OLD | NEW |