OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 /** | 8 /** |
9 * @file | 9 * @file |
10 * Defines the API ... | 10 * Defines the API ... |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 bool BindGraphics(const Graphics2D& graphics); | 89 bool BindGraphics(const Graphics2D& graphics); |
90 | 90 |
91 /** See PPB_Instance.BindGraphics. */ | 91 /** See PPB_Instance.BindGraphics. */ |
92 bool BindGraphics(const Surface3D_Dev& graphics); | 92 bool BindGraphics(const Surface3D_Dev& graphics); |
93 | 93 |
94 /** See PPB_Instance.IsFullFrame. */ | 94 /** See PPB_Instance.IsFullFrame. */ |
95 bool IsFullFrame(); | 95 bool IsFullFrame(); |
96 | 96 |
97 /** See PPB_Instance.ExecuteScript. */ | 97 /** See PPB_Instance.ExecuteScript. */ |
98 Var ExecuteScript(const Var& script, Var* exception = NULL); | 98 Var ExecuteScript(const Var& script, Var* exception = NULL); |
99 | |
100 // These functions use the PPP_Messaging and PPB_Messaging interfaces, so that | |
101 // messaging can be done conveniently for a pp::Instance without using a | |
102 // separate C++ class. | |
103 | |
104 /** See PPP_Messaging.HandleMessage. */ | |
105 virtual void HandleMessage(const Var& message_data); | |
polina
2011/03/24 05:42:33
Seeing "message_data" next to "message" in this se
dmichael(do not use this one)
2011/03/25 20:21:05
Good point. Renamed in: http://codereview.chromi
| |
106 /** See PPB_Messaging.PostMessage. */ | |
107 void PostMessage(const Var& message); | |
108 | |
99 // @} | 109 // @} |
100 | 110 |
101 /** | 111 /** |
102 * Associates a plugin instance with an interface, | 112 * Associates a plugin instance with an interface, |
103 * creating an object... {PENDING: clarify!} | 113 * creating an object... {PENDING: clarify!} |
104 * | 114 * |
105 * Many optional interfaces are associated with a plugin instance. For | 115 * Many optional interfaces are associated with a plugin instance. For |
106 * example, the find in PPP_Find interface receives updates on a per-instance | 116 * example, the find in PPP_Find interface receives updates on a per-instance |
107 * basis. This "per-instance" tracking allows such objects to associate | 117 * basis. This "per-instance" tracking allows such objects to associate |
108 * themselves with an instance as "the" handler for that interface name. | 118 * themselves with an instance as "the" handler for that interface name. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 InterfaceNameToObjectMap interface_name_to_objects_; | 160 InterfaceNameToObjectMap interface_name_to_objects_; |
151 }; | 161 }; |
152 | 162 |
153 } // namespace pp | 163 } // namespace pp |
154 | 164 |
155 /** | 165 /** |
156 * @} | 166 * @} |
157 * End addtogroup CPP | 167 * End addtogroup CPP |
158 */ | 168 */ |
159 #endif // PPAPI_CPP_INSTANCE_H_ | 169 #endif // PPAPI_CPP_INSTANCE_H_ |
OLD | NEW |