| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium 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 #ifndef PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 5 #ifndef PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 
| 6 #define PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 6 #define PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <set> | 9 #include <set> | 
| 10 | 10 | 
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" | 
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" | 
| 13 #include "base/task.h" |  | 
| 14 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" | 
| 15 #include "ppapi/shared_impl/ppapi_shared_export.h" | 14 #include "ppapi/shared_impl/ppapi_shared_export.h" | 
| 16 | 15 | 
| 17 namespace ppapi { | 16 namespace ppapi { | 
| 18 | 17 | 
| 19 class TrackedCallback; | 18 class TrackedCallback; | 
| 20 | 19 | 
| 21 // Pepper callbacks have the following semantics (unless otherwise specified; | 20 // Pepper callbacks have the following semantics (unless otherwise specified; | 
| 22 // in particular, the below apply to all completion callbacks): | 21 // in particular, the below apply to all completion callbacks): | 
| 23 //  - Callbacks are always run on the main thread. | 22 //  - Callbacks are always run on the main thread. | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 92   typedef std::set<scoped_refptr<TrackedCallback> > CallbackSet; | 91   typedef std::set<scoped_refptr<TrackedCallback> > CallbackSet; | 
| 93   typedef std::map<PP_Resource, CallbackSet> CallbackSetMap; | 92   typedef std::map<PP_Resource, CallbackSet> CallbackSetMap; | 
| 94   CallbackSetMap pending_callbacks_; | 93   CallbackSetMap pending_callbacks_; | 
| 95 | 94 | 
| 96   DISALLOW_COPY_AND_ASSIGN(CallbackTracker); | 95   DISALLOW_COPY_AND_ASSIGN(CallbackTracker); | 
| 97 }; | 96 }; | 
| 98 | 97 | 
| 99 }  // namespace ppapi | 98 }  // namespace ppapi | 
| 100 | 99 | 
| 101 #endif  // PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 100 #endif  // PPAPI_SHARED_IMPL_CALLBACK_TRACKER_H_ | 
| OLD | NEW | 
|---|