OLD | NEW |
---|---|
1 // Copyright (c) 2010 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 /** | 8 /** |
9 * @file | 9 * @file |
10 * Defines the API ... | 10 * Defines the API ... |
11 * | 11 * |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 | 65 |
66 /** See PPP_Instance.HandleInputEvent. */ | 66 /** See PPP_Instance.HandleInputEvent. */ |
67 virtual bool HandleInputEvent(const PP_InputEvent& event); | 67 virtual bool HandleInputEvent(const PP_InputEvent& event); |
68 | 68 |
69 /** See PPP_Instance.HandleDocumentLoad. */ | 69 /** See PPP_Instance.HandleDocumentLoad. */ |
70 virtual bool HandleDocumentLoad(const URLLoader& url_loader); | 70 virtual bool HandleDocumentLoad(const URLLoader& url_loader); |
71 | 71 |
72 /** See PPP_Instance.GetInstanceObject. */ | 72 /** See PPP_Instance.GetInstanceObject. */ |
73 virtual Var GetInstanceObject(); | 73 virtual Var GetInstanceObject(); |
74 | 74 |
75 /** See PPP_Instance.HandleEvent. */ | |
sehr (please use chromium)
2011/03/14 23:47:46
s/Event/Message/
dmichael(do not use this one)
2011/03/16 21:08:48
Done.
| |
76 virtual void HandleMessage(const Var& message_data); | |
77 | |
75 /** See PPP_Instance.GetSelectedText. */ | 78 /** See PPP_Instance.GetSelectedText. */ |
76 virtual Var GetSelectedText(bool html); | 79 virtual Var GetSelectedText(bool html); |
77 // @} | 80 // @} |
78 | 81 |
79 // @{ | 82 // @{ |
80 /** @name PPB_Instance methods for querying the browser: */ | 83 /** @name PPB_Instance methods for querying the browser: */ |
81 | 84 |
82 /** See PPB_Instance.GetWindowObject. */ | 85 /** See PPB_Instance.GetWindowObject. */ |
83 Var GetWindowObject(); | 86 Var GetWindowObject(); |
84 | 87 |
85 /** See PPB_Instance.GetOwnerElementObject. */ | 88 /** See PPB_Instance.GetOwnerElementObject. */ |
86 Var GetOwnerElementObject(); | 89 Var GetOwnerElementObject(); |
87 | 90 |
88 /** See PPB_Instance.BindGraphics. */ | 91 /** See PPB_Instance.BindGraphics. */ |
89 bool BindGraphics(const Graphics2D& graphics); | 92 bool BindGraphics(const Graphics2D& graphics); |
90 | 93 |
91 /** See PPB_Instance.BindGraphics. */ | 94 /** See PPB_Instance.BindGraphics. */ |
92 bool BindGraphics(const Surface3D_Dev& graphics); | 95 bool BindGraphics(const Surface3D_Dev& graphics); |
93 | 96 |
94 /** See PPB_Instance.IsFullFrame. */ | 97 /** See PPB_Instance.IsFullFrame. */ |
95 bool IsFullFrame(); | 98 bool IsFullFrame(); |
96 | 99 |
97 /** See PPB_Instance.ExecuteScript. */ | 100 /** See PPB_Instance.ExecuteScript. */ |
98 Var ExecuteScript(const Var& script, Var* exception = NULL); | 101 Var ExecuteScript(const Var& script, Var* exception = NULL); |
102 | |
103 /** See PPB_Instance.PostMessage. */ | |
104 void PostMessage(const Var& message); | |
99 // @} | 105 // @} |
100 | 106 |
101 /** | 107 /** |
102 * Associates a plugin instance with an interface, | 108 * Associates a plugin instance with an interface, |
103 * creating an object... {PENDING: clarify!} | 109 * creating an object... {PENDING: clarify!} |
104 * | 110 * |
105 * Many optional interfaces are associated with a plugin instance. For | 111 * Many optional interfaces are associated with a plugin instance. For |
106 * example, the find in PPP_Find interface receives updates on a per-instance | 112 * example, the find in PPP_Find interface receives updates on a per-instance |
107 * basis. This "per-instance" tracking allows such objects to associate | 113 * basis. This "per-instance" tracking allows such objects to associate |
108 * themselves with an instance as "the" handler for that interface name. | 114 * 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_; | 156 InterfaceNameToObjectMap interface_name_to_objects_; |
151 }; | 157 }; |
152 | 158 |
153 } // namespace pp | 159 } // namespace pp |
154 | 160 |
155 /** | 161 /** |
156 * @} | 162 * @} |
157 * End addtogroup CPP | 163 * End addtogroup CPP |
158 */ | 164 */ |
159 #endif // PPAPI_CPP_INSTANCE_H_ | 165 #endif // PPAPI_CPP_INSTANCE_H_ |
OLD | NEW |