OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
bbudge
2011/08/16 22:40:49
2011
| |
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_PROXY_CALLBACK_TRACKER_H_ | 5 #ifndef PPAPI_PROXY_CALLBACK_TRACKER_H_ |
6 #define PPAPI_PROXY_CALLBACK_TRACKER_H_ | 6 #define PPAPI_PROXY_CALLBACK_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
11 #include "ppapi/c/pp_stdint.h" | 11 #include "ppapi/c/pp_stdint.h" |
12 | 12 |
13 namespace pp { | 13 namespace ppapi { |
14 namespace proxy { | 14 namespace proxy { |
15 | 15 |
16 class Dispatcher; | 16 class Dispatcher; |
17 | 17 |
18 // This object tracks cross-process callbacks. When the plugin sends a callback | 18 // This object tracks cross-process callbacks. When the plugin sends a callback |
19 // object to the renderer, we save the information and pass an identifier | 19 // object to the renderer, we save the information and pass an identifier |
20 // instead. | 20 // instead. |
21 // | 21 // |
22 // On the renderer side, this identifier is converted to a new callback in that | 22 // On the renderer side, this identifier is converted to a new callback in that |
23 // process. When executed, this new callback sends an IPC message containing the | 23 // process. When executed, this new callback sends an IPC message containing the |
(...skipping 30 matching lines...) Expand all Loading... | |
54 Dispatcher* dispatcher_; | 54 Dispatcher* dispatcher_; |
55 | 55 |
56 int32_t next_callback_id_; | 56 int32_t next_callback_id_; |
57 | 57 |
58 // Maps callback IDs to the actual callback objects in the plugin process. | 58 // Maps callback IDs to the actual callback objects in the plugin process. |
59 typedef std::map<int32_t, PP_CompletionCallback> CallbackMap; | 59 typedef std::map<int32_t, PP_CompletionCallback> CallbackMap; |
60 CallbackMap callback_map_; | 60 CallbackMap callback_map_; |
61 }; | 61 }; |
62 | 62 |
63 } // namespace proxy | 63 } // namespace proxy |
64 } // namespace pp | 64 } // namespace ppapi |
65 | 65 |
66 #endif // PPAPI_PROXY_CALLBACK_TRACKER_H_ | 66 #endif // PPAPI_PROXY_CALLBACK_TRACKER_H_ |
OLD | NEW |