| 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 | 5 |
| 6 /** | 6 /** |
| 7 * PP_ArrayOutput_GetDataBuffer is a callback function to allocate plugin | 7 * PP_ArrayOutput_GetDataBuffer is a callback function to allocate plugin |
| 8 * memory for an array. It returns the allocated memory or null on failure. | 8 * memory for an array. It returns the allocated memory or null on failure. |
| 9 * | 9 * |
| 10 * This function will be called reentrantly. This means that if you call a | 10 * This function will be called reentrantly. This means that if you call a |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 * } | 68 * } |
| 69 * return output->data; | 69 * return output->data; |
| 70 * } | 70 * } |
| 71 * void MyFunction() { | 71 * void MyFunction() { |
| 72 * MyArrayOutput array = { NULL, 0 }; | 72 * MyArrayOutput array = { NULL, 0 }; |
| 73 * PP_ArrayOutput output = { &MyGetDataBuffer, &array }; | 73 * PP_ArrayOutput output = { &MyGetDataBuffer, &array }; |
| 74 * ppb_foo->GetData(&output); | 74 * ppb_foo->GetData(&output); |
| 75 * } | 75 * } |
| 76 * @endcode | 76 * @endcode |
| 77 */ | 77 */ |
| 78 [passByValue] |
| 78 struct PP_ArrayOutput { | 79 struct PP_ArrayOutput { |
| 79 /** | 80 /** |
| 80 * A pointer to the allocation function that the browser implements. | 81 * A pointer to the allocation function that the browser implements. |
| 81 */ | 82 */ |
| 82 PP_ArrayOutput_GetDataBuffer GetDataBuffer; | 83 PP_ArrayOutput_GetDataBuffer GetDataBuffer; |
| 83 | 84 |
| 84 /** | 85 /** |
| 85 * Data that is passed to the allocation function. Typically, this is used | 86 * Data that is passed to the allocation function. Typically, this is used |
| 86 * to communicate how the data should be stored. | 87 * to communicate how the data should be stored. |
| 87 */ | 88 */ |
| 88 mem_t user_data; | 89 mem_t user_data; |
| 89 }; | 90 }; |
| OLD | NEW |