OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /// This file defines the C++ wrapper for an instance. | 9 /// This file defines the C++ wrapper for an instance. |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 /// @param[in] has_focus Indicates the new focused state of the instance. | 167 /// @param[in] has_focus Indicates the new focused state of the instance. |
168 virtual void DidChangeFocus(bool has_focus); | 168 virtual void DidChangeFocus(bool has_focus); |
169 | 169 |
170 /// HandleInputEvent() handles input events from the browser. The default | 170 /// HandleInputEvent() handles input events from the browser. The default |
171 /// implementation does nothing and returns false. | 171 /// implementation does nothing and returns false. |
172 /// | 172 /// |
173 /// In order to receive input events, you must register for them by calling | 173 /// In order to receive input events, you must register for them by calling |
174 /// RequestInputEvents() or RequestFilteringInputEvents(). By | 174 /// RequestInputEvents() or RequestFilteringInputEvents(). By |
175 /// default, no events are delivered. | 175 /// default, no events are delivered. |
176 /// | 176 /// |
177 /// If the event was handled, it will not be forwarded to the web page or | 177 /// If the event was handled, it will not be forwarded to any default |
178 /// browser. If it was not handled, it will bubble according to the normal | 178 /// handlers. If it was not handled, it may be dispatched to a default |
179 /// rules. So it is important that an instance respond accurately with whether | 179 /// handler. So it is important that an instance respond accurately with |
180 /// event propagation should continue. | 180 /// whether event propagation should continue. |
181 /// | 181 /// |
182 /// Event propagation also controls focus. If you handle an event like a mouse | 182 /// Event propagation also controls focus. If you handle an event like a mouse |
183 /// event, typically the instance will be given focus. Returning false from | 183 /// event, typically the instance will be given focus. Returning false from |
184 /// a filtered event handler or not registering for an event type means that | 184 /// a filtered event handler or not registering for an event type means that |
185 /// the click will be given to a lower part of the page and your instance will | 185 /// the click will be given to a lower part of the page and your instance will |
186 /// not receive focus. This allows an instance to be partially transparent, | 186 /// not receive focus. This allows an instance to be partially transparent, |
187 /// where clicks on the transparent areas will behave like clicks to the | 187 /// where clicks on the transparent areas will behave like clicks to the |
188 /// underlying page. | 188 /// underlying page. |
189 /// | 189 /// |
190 /// In general, you should try to keep input event handling short. Especially | 190 /// In general, you should try to keep input event handling short. Especially |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 private: | 569 private: |
570 PP_Instance pp_instance_; | 570 PP_Instance pp_instance_; |
571 | 571 |
572 typedef std::map<std::string, void*> InterfaceNameToObjectMap; | 572 typedef std::map<std::string, void*> InterfaceNameToObjectMap; |
573 InterfaceNameToObjectMap interface_name_to_objects_; | 573 InterfaceNameToObjectMap interface_name_to_objects_; |
574 }; | 574 }; |
575 | 575 |
576 } // namespace pp | 576 } // namespace pp |
577 | 577 |
578 #endif // PPAPI_CPP_INSTANCE_H_ | 578 #endif // PPAPI_CPP_INSTANCE_H_ |
OLD | NEW |