public interface CefContextMenuHandler
限定符和类型 | 方法和说明 |
---|---|
void |
onBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model)
Called before a context menu is displayed.
(在显示上下文菜单之前调用。)
|
boolean |
onContextMenuCommand(CefBrowser browser, CefFrame frame, CefContextMenuParams params, int commandId, int eventFlags)
Called to execute a command selected from the context menu.
(调用以执行从上下文菜单中选择的命令。)
|
void |
onContextMenuDismissed(CefBrowser browser, CefFrame frame)
Called when the context menu is dismissed irregardless of whether the menu was empty or a command was selected.
(无论上下文菜单为空还是选择了命令,均关闭上下文菜单时调用。)
|
void onBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model)
browser
- The browser generating the event.
(-浏览器生成事件。)
frame
- The frame generating the event. Instance only valid within the scope of this method.
(-生成事件的框架。实例仅在此方法的范围内有效。)
params
- Provides information about the context menu state. Instance only valid within the scope of this method.
(-提供有关上下文菜单状态的信息。实例仅在此方法的范围内有效。)
model
- Can be cleared to show no context menu or modified to show a custom menu. Instance only valid within the scope of this method.
(-可以清除为不显示上下文菜单,也可以修改为显示自定义菜单。实例仅在此方法的范围内有效。)
boolean onContextMenuCommand(CefBrowser browser, CefFrame frame, CefContextMenuParams params, int commandId, int eventFlags)
browser
- The browser generating the event.
(-浏览器生成事件。)
frame
- The frame generating the event. Instance only valid within the scope of this method.
(-生成事件的框架。实例仅在此方法的范围内有效。)
params
- Will have the same values that were passed to onBeforeContextMenu(). Instance only valid within the scope of this method.
(-具有与onBeforeContextMenu()相同的值。实例仅在此方法的范围内有效。)
commandId
- The id of the command.
(-命令的ID。)
eventFlags
- A combination of event flags defined in EventFlags
(-EventFlags中定义的事件标志的组合)
void onContextMenuDismissed(CefBrowser browser, CefFrame frame)
browser
- The browser generating the event.
(-浏览器生成事件。)
frame
- The corresponding frame. Instance only valid within the scope of this method.
(-相应的框架。实例仅在此方法的范围内有效。)