| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 /// | 412 /// |
| 413 /// <strong>Example:</strong> | 413 /// <strong>Example:</strong> |
| 414 /// | 414 /// |
| 415 /// <code> | 415 /// <code> |
| 416 /// | 416 /// |
| 417 /// <body> | 417 /// <body> |
| 418 /// <object id="plugin" | 418 /// <object id="plugin" |
| 419 /// type="application/x-ppapi-postMessage-example"/> | 419 /// type="application/x-ppapi-postMessage-example"/> |
| 420 /// <script type="text/javascript"> | 420 /// <script type="text/javascript"> |
| 421 /// var plugin = document.getElementById('plugin'); | 421 /// var plugin = document.getElementById('plugin'); |
| 422 /// plugin.AddEventListener("message", | 422 /// plugin.addEventListener("message", |
| 423 /// function(message) { alert(message.data); }, | 423 /// function(message) { alert(message.data); }, |
| 424 /// false); | 424 /// false); |
| 425 /// </script> | 425 /// </script> |
| 426 /// </body> | 426 /// </body> |
| 427 /// | 427 /// |
| 428 /// </code> | 428 /// </code> |
| 429 /// | 429 /// |
| 430 /// The instance then invokes PostMessage() as follows: | 430 /// The instance then invokes PostMessage() as follows: |
| 431 /// | 431 /// |
| 432 /// <code> | 432 /// <code> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 private: | 518 private: |
| 519 PP_Instance pp_instance_; | 519 PP_Instance pp_instance_; |
| 520 | 520 |
| 521 typedef std::map<std::string, void*> InterfaceNameToObjectMap; | 521 typedef std::map<std::string, void*> InterfaceNameToObjectMap; |
| 522 InterfaceNameToObjectMap interface_name_to_objects_; | 522 InterfaceNameToObjectMap interface_name_to_objects_; |
| 523 }; | 523 }; |
| 524 | 524 |
| 525 } // namespace pp | 525 } // namespace pp |
| 526 | 526 |
| 527 #endif // PPAPI_CPP_INSTANCE_H_ | 527 #endif // PPAPI_CPP_INSTANCE_H_ |
| OLD | NEW |