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@596 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -155,6 +155,10 @@ void CefMenuCreator::ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
|
||||
}
|
||||
|
||||
void CefMenuCreator::MenuWillShow(CefRefPtr<CefMenuModelImpl> source) {
|
||||
// May be called for sub-menus as well.
|
||||
if (source.get() != model_.get())
|
||||
return;
|
||||
|
||||
// Notify the host before showing the context menu.
|
||||
content::RenderWidgetHostView* view =
|
||||
browser_->GetWebContents()->GetRenderWidgetHostView();
|
||||
@ -163,6 +167,10 @@ void CefMenuCreator::MenuWillShow(CefRefPtr<CefMenuModelImpl> source) {
|
||||
}
|
||||
|
||||
void CefMenuCreator::MenuClosed(CefRefPtr<CefMenuModelImpl> source) {
|
||||
// May be called for sub-menus as well.
|
||||
if (source.get() != model_.get())
|
||||
return;
|
||||
|
||||
// Notify the client.
|
||||
CefRefPtr<CefClient> client = browser_->GetClient();
|
||||
if (client.get()) {
|
||||
|
Reference in New Issue
Block a user