mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add context menu support (issue #509):
- Add new CefContextMenuHandler, CefContextMenuParams and CefMenuModel classes. - Add cef_strings.grd and related infrastructure for supporting translation of CEF strings. - Generate include/cef_pack_resources.h and include/cef_pack_strings.h files at build time that include all IDs used by CEF pack files. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@595 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/client_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h"
|
||||
@ -119,6 +120,22 @@ struct _cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler(
|
||||
return CefJSDialogHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_context_menu_handler_t* CEF_CALLBACK client_get_context_menu_handler(
|
||||
struct _cef_client_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefContextMenuHandler> _retval = CefClientCppToC::Get(
|
||||
self)->GetContextMenuHandler();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefContextMenuHandlerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK client_on_process_message_recieved(struct _cef_client_t* self,
|
||||
cef_browser_t* browser, enum cef_process_id_t source_process,
|
||||
struct _cef_process_message_t* message) {
|
||||
@ -157,6 +174,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls)
|
||||
struct_.struct_.get_display_handler = client_get_display_handler;
|
||||
struct_.struct_.get_geolocation_handler = client_get_geolocation_handler;
|
||||
struct_.struct_.get_jsdialog_handler = client_get_jsdialog_handler;
|
||||
struct_.struct_.get_context_menu_handler = client_get_context_menu_handler;
|
||||
struct_.struct_.on_process_message_recieved =
|
||||
client_on_process_message_recieved;
|
||||
}
|
||||
|
Reference in New Issue
Block a user