コード例 #1
0
        /// <summary>
        /// Returns the frame with the specified name, or NULL if not found.
        /// </summary>
        public CefFrame GetFrame(string name)
        {
            fixed(char *name_str = name)
            {
                var n_name = new cef_string_t(name_str, name.Length);

                return(CefFrame.FromNativeOrNull(
                           cef_browser_t.get_frame(_self, &n_name)
                           ));
            }
        }
コード例 #2
0
        private cef_resource_handler_t *create(cef_scheme_handler_factory_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_string_t *scheme_name, cef_request_t *request)
        {
            CheckSelf(self);

            var m_browser    = CefBrowser.FromNativeOrNull(browser);
            var m_frame      = CefFrame.FromNativeOrNull(frame);
            var m_schemeName = cef_string_t.ToString(scheme_name);
            var m_request    = CefRequest.FromNative(request);

            var handler = Create(m_browser, m_frame, m_schemeName, m_request);

            // TODO: [ApiUsage] method can return null, only when schemeName is built-in scheme, in other cases it is incorrect.
            return(handler != null?handler.ToNative() : null);
        }
コード例 #3
0
 /// <summary>
 /// Returns the frame with the specified identifier, or NULL if not found.
 /// </summary>
 public CefFrame GetFrame(long identifier)
 {
     return(CefFrame.FromNativeOrNull(
                cef_browser_t.get_frame_byident(_self, identifier)
                ));
 }
コード例 #4
0
ファイル: CefV8Context.cs プロジェクト: gaojinbo010/Cef3Demo
 /// <summary>
 /// Returns the frame for this context. This method will return an empty
 /// reference for WebWorker contexts.
 /// </summary>
 public CefFrame GetFrame()
 {
     return(CefFrame.FromNativeOrNull(
                cef_v8context_t.get_frame(_self)
                ));
 }