-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome: Add ability to block/handle chrome commands (menus & keyboard shortcuts) #3280
Comments
See issue #2969 for background on the Chrome runtime. |
Most commands are routed through BrowserCommandController::ExecuteCommandWithDisposition with IDs defined in chrome_command_ids.h. Keyboard shortcuts are delivered to this method via call stacks like (at M100 on Windows):
The translation of accelerator to command ID is performed by BrowserView::FindCommandIdForAccelerator using the mapping from accelerator_table.cc. |
We should probably include the contents of chrome_command_ids.h in the CEF binary distribution, and allow the client to block/handle any command via a callback from ExecuteCommandWithDisposition. |
|
For this issue we’ll limit functionality to blocking or handling commands that are otherwise enabled. Overriding the current enable/disable state (in a menu, for example) will be left for another time/issue. That would likely require changing the registrations in BrowserCommandController::InitCommandState and possibly other places. |
|
chrome: Add ability to handle chrome menu/keyboard commands (fixes issue #3280) This change adds a CefCommandHandler::OnChromeCommand callback for optionally To test: Run → <<cset 2f5838eaaaee (bb)>> |
|
Adding additional support for customizing the Chrome toolbar contents.
Visibility of the back, forward, reload, site information, experiments, media controls, extensions, profile and app menu toolbar buttons will not be configurable at this time (each hidden button will require custom code in ToolbarView, and verification that the app doesn’t crash as a result). Return |
chrome: Add ability to hide toolbar and app menu contents (see issue #3280) This change adds new CefCommandHandler callbacks for optionally hiding To test: Run → <<cset 14dd0c0d0616 (bb)>> |
chrome: Add ability to hide toolbar and app menu contents (see issue #3280) This change adds new CefCommandHandler callbacks for optionally hiding To test: Run → <<cset f8b9812cb40d (bb)>> |
…hromiumembedded#3280) This change adds new CefCommandHandler callbacks for optionally hiding specific Chrome toolbar icons, buttons and app menu items. To test: Run `cefclient --enable-chrome-runtime --filter-chrome-commands`. Most icons, buttons and app/context menu items will be hidden.
…sue chromiumembedded#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.
…hromiumembedded#3280) This change adds new CefCommandHandler callbacks for optionally hiding specific Chrome toolbar icons, buttons and app menu items. To test: Run `cefclient --enable-chrome-runtime --filter-chrome-commands`. Most icons, buttons and app/context menu items will be hidden.
Original report by me.
Some applications won’t want default handling of Chrome keyboard shortcuts.
The text was updated successfully, but these errors were encountered: