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:
@ -934,6 +934,7 @@ class ScopedGLContext {
|
||||
} // namespace
|
||||
|
||||
BrowserWindowOsrGtk::BrowserWindowOsrGtk(BrowserWindow::Delegate* delegate,
|
||||
bool with_controls,
|
||||
const std::string& startup_url,
|
||||
const OsrRendererSettings& settings)
|
||||
: BrowserWindow(delegate),
|
||||
@ -951,7 +952,8 @@ BrowserWindowOsrGtk::BrowserWindowOsrGtk(BrowserWindow::Delegate* delegate,
|
||||
drag_leave_(false),
|
||||
drag_drop_(false),
|
||||
device_scale_factor_(1.0f) {
|
||||
client_handler_ = new ClientHandlerOsr(this, this, startup_url);
|
||||
client_handler_ =
|
||||
new ClientHandlerOsr(this, this, with_controls, startup_url);
|
||||
g_browser_windows.push_back(this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user