예제 #1
0
        /// <summary>
        /// Called before a context menu is displayed. Return false to display
        /// the default context menu or true to cancel the display.
        /// </summary>
        private int on_before_menu(cef_menu_handler_t* self, cef_browser_t* browser, /*const*/ cef_menu_info_t* menuInfo)
        {
            ThrowIfObjectDisposed();

            var m_browser = CefBrowser.From(browser);
            var m_menuInfo = CefMenuInfo.From(menuInfo);

            var handled = this.OnBeforeMenu(m_browser, m_menuInfo);

            //m_menuInfo.Dispose();

            return handled ? 1 : 0;
        }
예제 #2
0
 private CefMenuInfo(cef_menu_info_t* ptr)
 {
     this.ptr = ptr;
 }
예제 #3
0
 internal static CefMenuInfo From(cef_menu_info_t* ptr)
 {
     return new CefMenuInfo(ptr);
 }