internal static cef_geolocation_handler_t* Alloc()
 {
     var ptr = (cef_geolocation_handler_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_geolocation_handler_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
        internal static cef_geolocation_handler_t *Alloc()
        {
            var ptr = (cef_geolocation_handler_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_geolocation_handler_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
        private void on_cancel_geolocation_permission(cef_geolocation_handler_t* self, cef_browser_t* browser, cef_string_t* requesting_url, int request_id)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_requesting_url = cef_string_t.ToString(requesting_url);

            OnCancelGeolocationPermission(m_browser, m_requesting_url, request_id);
        }
        private void on_request_geolocation_permission(cef_geolocation_handler_t* self, cef_browser_t* browser, cef_string_t* requesting_url, int request_id, cef_geolocation_callback_t* callback)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_requesting_url = cef_string_t.ToString(requesting_url);
            var m_callback = CefGeolocationCallback.FromNative(callback);

            OnRequestGeolocationPermission(m_browser, m_requesting_url, request_id, m_callback);
        }
 private int release(cef_geolocation_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return result;
     }
 }
 private int add_ref(cef_geolocation_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
         return result;
     }
 }
 internal static void Free(cef_geolocation_handler_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
 private void CheckSelf(cef_geolocation_handler_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 private int get_refct(cef_geolocation_handler_t* self)
 {
     return _refct;
 }