Chromium Embedded Framework (CEF)  114.2.1+gd70a0a8+chromium-114.0.5735.45
CefCommandHandler Class Reference

Implement this interface to handle events related to commands. More...

#include "include/cef_command_handler.h"

Inheritance diagram for CefCommandHandler:
CefBaseRefCounted

Public Member Functions

virtual bool OnChromeCommand (CefRefPtr< CefBrowser > browser, int command_id, cef_window_open_disposition_t disposition)
 Called to execute a Chrome command triggered via menu selection or keyboard shortcut. More...
 
virtual bool IsChromeAppMenuItemVisible (CefRefPtr< CefBrowser > browser, int command_id)
 Called to check if a Chrome app menu item should be visible. More...
 
virtual bool IsChromeAppMenuItemEnabled (CefRefPtr< CefBrowser > browser, int command_id)
 Called to check if a Chrome app menu item should be enabled. More...
 
virtual bool IsChromePageActionIconVisible (cef_chrome_page_action_icon_type_t icon_type)
 Called during browser creation to check if a Chrome page action icon should be visible. More...
 
virtual bool IsChromeToolbarButtonVisible (cef_chrome_toolbar_button_type_t button_type)
 Called during browser creation to check if a Chrome toolbar button should be visible. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Implement this interface to handle events related to commands.

The methods of this class will be called on the UI thread.

Member Function Documentation

◆ IsChromeAppMenuItemEnabled()

virtual bool CefCommandHandler::IsChromeAppMenuItemEnabled ( CefRefPtr< CefBrowser browser,
int  command_id 
)
inlinevirtual

Called to check if a Chrome app menu item should be enabled.

Values for |command_id| can be found in the cef_command_ids.h file. Only called for menu items that would be enabled by default. Only used with the Chrome runtime.

◆ IsChromeAppMenuItemVisible()

virtual bool CefCommandHandler::IsChromeAppMenuItemVisible ( CefRefPtr< CefBrowser browser,
int  command_id 
)
inlinevirtual

Called to check if a Chrome app menu item should be visible.

Values for |command_id| can be found in the cef_command_ids.h file. Only called for menu items that would be visible by default. Only used with the Chrome runtime.

◆ IsChromePageActionIconVisible()

virtual bool CefCommandHandler::IsChromePageActionIconVisible ( cef_chrome_page_action_icon_type_t  icon_type)
inlinevirtual

Called during browser creation to check if a Chrome page action icon should be visible.

Only called for icons that would be visible by default. Only used with the Chrome runtime.

◆ IsChromeToolbarButtonVisible()

virtual bool CefCommandHandler::IsChromeToolbarButtonVisible ( cef_chrome_toolbar_button_type_t  button_type)
inlinevirtual

Called during browser creation to check if a Chrome toolbar button should be visible.

Only called for buttons that would be visible by default. Only used with the Chrome runtime.

◆ OnChromeCommand()

virtual bool CefCommandHandler::OnChromeCommand ( CefRefPtr< CefBrowser browser,
int  command_id,
cef_window_open_disposition_t  disposition 
)
inlinevirtual

Called to execute a Chrome command triggered via menu selection or keyboard shortcut.

Values for |command_id| can be found in the cef_command_ids.h file. |disposition| provides information about the intended command target. Return true if the command was handled or false for the default implementation. For context menu commands this will be called after CefContextMenuHandler::OnContextMenuCommand. Only used with the Chrome runtime.


The documentation for this class was generated from the following file: