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_CPP_INSTANCE_H_ | 5 #ifndef PPAPI_CPP_INSTANCE_H_ |
6 #define PPAPI_CPP_INSTANCE_H_ | 6 #define PPAPI_CPP_INSTANCE_H_ |
7 | 7 |
8 /// @file | 8 /// @file |
9 /// Defines the C++ wrapper for a plugin instance. | 9 /// Defines the C++ wrapper for a plugin instance. |
10 /// | 10 /// |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 /// will be deleted. You should never delete the Instance object yourself | 51 /// will be deleted. You should never delete the Instance object yourself |
52 /// since the lifetime is handled by the C++ wrapper and is controlled by the | 52 /// since the lifetime is handled by the C++ wrapper and is controlled by the |
53 /// browser's calls to the PPP_Instance interface. | 53 /// browser's calls to the PPP_Instance interface. |
54 /// | 54 /// |
55 /// The PP_Instance identifier will still be valid during this call so the | 55 /// The PP_Instance identifier will still be valid during this call so the |
56 /// plugin can perform cleanup-related tasks. Once this function returns, the | 56 /// plugin can perform cleanup-related tasks. Once this function returns, the |
57 /// PP_Instance handle will be invalid. This means that you can't do any | 57 /// PP_Instance handle will be invalid. This means that you can't do any |
58 /// asynchronous operations like network requests or file writes from this | 58 /// asynchronous operations like network requests or file writes from this |
59 /// destructor since they will be immediately canceled. | 59 /// destructor since they will be immediately canceled. |
60 /// | 60 /// |
61 /// <strong>Important note:</strong> This function may be skipped in certain | 61 /// <strong>Important note:</strong> This function will always be skipped on |
62 /// circumstances when Chrome does "fast shutdown". Fast shutdown will happen | 62 /// untrusted (Native Client) implementations. This function may be skipped |
63 /// in some cases when all plugin instances are being deleted, and no cleanup | 63 /// in certain circumstances when Chrome does "fast shutdown". Fast shutdown |
64 /// functions will be called. The module will just be unloaded and the process | 64 /// will happen in some cases when all plugin instances are being deleted, |
65 /// terminated. | 65 /// and no cleanup functions will be called. The module will just be unloaded |
| 66 /// and the process terminated. |
66 virtual ~Instance(); | 67 virtual ~Instance(); |
67 | 68 |
68 /// Returns the PP_Instance identifying this object. When using the PPAPI C++ | 69 /// Returns the PP_Instance identifying this object. When using the PPAPI C++ |
69 /// wrappers this is not normally necessary, but is required when using the | 70 /// wrappers this is not normally necessary, but is required when using the |
70 /// lower-level C APIs. | 71 /// lower-level C APIs. |
71 PP_Instance pp_instance() const { return pp_instance_; } | 72 PP_Instance pp_instance() const { return pp_instance_; } |
72 | 73 |
73 /// Initializes this plugin with the given arguments. This will be called | 74 /// Initializes this plugin with the given arguments. This will be called |
74 /// immediately after the instance object is constructed. | 75 /// immediately after the instance object is constructed. |
75 /// | 76 /// |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 typedef std::map<std::string, void*> InterfaceNameToObjectMap; | 468 typedef std::map<std::string, void*> InterfaceNameToObjectMap; |
468 InterfaceNameToObjectMap interface_name_to_objects_; | 469 InterfaceNameToObjectMap interface_name_to_objects_; |
469 }; | 470 }; |
470 | 471 |
471 } // namespace pp | 472 } // namespace pp |
472 | 473 |
473 /// @} | 474 /// @} |
474 /// End addtogroup CPP | 475 /// End addtogroup CPP |
475 | 476 |
476 #endif // PPAPI_CPP_INSTANCE_H_ | 477 #endif // PPAPI_CPP_INSTANCE_H_ |
OLD | NEW |