mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add ability to handle chrome menu/keyboard commands (fixes issue #3280)
This change adds a CefCommandHandler::OnChromeCommand callback for optionally handling Chrome commands triggered via menus or keyboard shortcuts. Supported command IDs are listed in a new cef_command_ids.h header file. To test: Run `cefclient --enable-chrome-runtime --hide-controls`. Most commands will blocked and removed from context menus.
This commit is contained in:
@ -40,6 +40,7 @@
|
||||
|
||||
#include "include/cef_audio_handler.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_command_handler.h"
|
||||
#include "include/cef_context_menu_handler.h"
|
||||
#include "include/cef_dialog_handler.h"
|
||||
#include "include/cef_display_handler.h"
|
||||
@ -69,6 +70,13 @@ class CefClient : public virtual CefBaseRefCounted {
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefAudioHandler> GetAudioHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for commands. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefCommandHandler> GetCommandHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for context menus. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
|
Reference in New Issue
Block a user