Update context menu type enums to match Chromium (fixes issue #3257)

This commit is contained in:
Marshall Greenblatt
2022-02-18 16:44:37 -05:00
parent 28c7f04001
commit bee82b6ac3
2 changed files with 26 additions and 13 deletions

View File

@ -1023,7 +1023,8 @@ typedef enum {
} cef_postdataelement_type_t;
///
// Resource type for a request.
// Resource type for a request. These constants match their equivalents in
// Chromium's ResourceType and should not be renumbered.
///
typedef enum {
///
@ -1611,8 +1612,7 @@ typedef enum {
MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
MENU_ID_ADD_TO_DICTIONARY = 206,
// Custom menu items originating from the renderer process. For example,
// plugin placeholder menu items.
// Custom menu items originating from the renderer process.
MENU_ID_CUSTOM_FIRST = 220,
MENU_ID_CUSTOM_LAST = 250,
@ -1814,7 +1814,8 @@ typedef enum {
} cef_context_menu_type_flags_t;
///
// Supported context menu media types.
// Supported context menu media types. These constants match their equivalents
// in Chromium's ContextMenuDataMediaType and should not be renumbered.
///
typedef enum {
///
@ -1834,6 +1835,10 @@ typedef enum {
///
CM_MEDIATYPE_AUDIO,
///
// An canvas node is selected.
///
CM_MEDIATYPE_CANVAS,
///
// A file node is selected.
///
CM_MEDIATYPE_FILE,
@ -1844,24 +1849,31 @@ typedef enum {
} cef_context_menu_media_type_t;
///
// Supported context menu media state bit flags.
// Supported context menu media state bit flags. These constants match their
// equivalents in Chromium's ContextMenuData::MediaFlags and should not be
// renumbered.
///
typedef enum {
CM_MEDIAFLAG_NONE = 0,
CM_MEDIAFLAG_ERROR = 1 << 0,
CM_MEDIAFLAG_IN_ERROR = 1 << 0,
CM_MEDIAFLAG_PAUSED = 1 << 1,
CM_MEDIAFLAG_MUTED = 1 << 2,
CM_MEDIAFLAG_LOOP = 1 << 3,
CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
CM_MEDIAFLAG_HAS_VIDEO = 1 << 6,
CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7,
CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6,
CM_MEDIAFLAG_CONTROLS = 1 << 7,
CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10,
CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11,
CM_MEDIAFLAG_CAN_LOOP = 1 << 12,
} cef_context_menu_media_state_flags_t;
///
// Supported context menu edit state bit flags.
// Supported context menu edit state bit flags. These constants match their
// equivalents in Chromium's ContextMenuDataEditFlags and should not be
// renumbered.
///
typedef enum {
CM_EDITFLAG_NONE = 0,
@ -1873,6 +1885,7 @@ typedef enum {
CM_EDITFLAG_CAN_DELETE = 1 << 5,
CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8,
} cef_context_menu_edit_state_flags_t;
///