| OLD | NEW |
| (Empty) |
| 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 | |
| 3 * found in the LICENSE file. | |
| 4 */ | |
| 5 | |
| 6 /* PPB_Flash */ | |
| 7 | |
| 8 /* Menu item type. | |
| 9 * | |
| 10 * TODO(viettrungluu): Radio items not supported yet. Will also probably want | |
| 11 * special menu items tied to clipboard access. | |
| 12 */ | |
| 13 enum PP_Flash_MenuItem_Type { | |
| 14 PP_FLASH_MENUITEM_TYPE_NORMAL = 0, | |
| 15 PP_FLASH_MENUITEM_TYPE_CHECKBOX = 1, | |
| 16 PP_FLASH_MENUITEM_TYPE_SEPARATOR = 2, | |
| 17 PP_FLASH_MENUITEM_TYPE_SUBMENU = 3 | |
| 18 }; | |
| 19 | |
| 20 struct PP_Flash_MenuItem { | |
| 21 PP_Flash_MenuItem_Type type; | |
| 22 str_t name; | |
| 23 int32_t id; | |
| 24 PP_Bool enabled; | |
| 25 PP_Bool checked; | |
| 26 PP_Flash_Menu submenu; | |
| 27 }; | |
| 28 | |
| 29 struct PP_Flash_Menu { | |
| 30 uint32_t count; | |
| 31 [size_is(count)] PP_Flash_MenuItem[] items; | |
| 32 }; | |
| 33 | |
| 34 interface PPB_Flash_Menu_0_1 { | |
| 35 PP_Resource Create( | |
| 36 [in] PP_Instance instance_id, | |
| 37 [in] PP_Flash_Menu menu_data); | |
| 38 | |
| 39 PP_Bool IsFlashMenu( | |
| 40 [in] PP_Resource resource_id); | |
| 41 | |
| 42 /* Display a context menu at the given location. If the user selects an item, | |
| 43 * |selected_id| will be set to its |id| and the callback called with |PP_OK|. | |
| 44 * If the user dismisses the menu without selecting an item, | |
| 45 * |PP_ERROR_USERCANCEL| will be indicated. | |
| 46 */ | |
| 47 int32_t Show( | |
| 48 [in] PP_Resource menu_id, | |
| 49 [in] PP_Point location, | |
| 50 [out] int32_t selected_id, | |
| 51 [in] PP_CompletionCallback callback); | |
| 52 }; | |
| OLD | NEW |