Esempio n. 1
0
 public unsafe int OnSetFocus(cef_browser_t *browser, CefFocusSource source)
 {
     fixed(cef_focus_handler_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_focus_handler_t *, cef_browser_t *, CefFocusSource, int >)on_set_focus)(self, browser, source));
     }
 }
Esempio n. 2
0
 protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     if (source == CefFocusSource.Navigation)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 3
0
        private int on_set_focus(cef_focus_handler_t* self, cef_browser_t* browser, CefFocusSource source)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);

            return OnSetFocus(m_browser, source) ? 1 : 0;
        }
Esempio n. 4
0
        private int on_set_focus(cef_focus_handler_t *self, cef_browser_t *browser, CefFocusSource source)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);

            return(OnSetFocus(m_browser, source) ? 1 : 0);
        }
Esempio n. 5
0
        protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
        {
            var e = new SetFocusEventArgs(source);

            _owner.OnSetFocus(e);


            return(!e.Cancel);
        }
Esempio n. 6
0
 /// <summary>
 /// Called when the browser component is requesting focus. |source| indicates
 /// where the focus request is originating from. Return false (0) to allow the
 /// focus to be set or true (1) to cancel setting the focus.
 /// </summary>
 public unsafe virtual bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(default);
Esempio n. 7
0
 public virtual bool OnSetFocus(CefFocusSource source)
 {
     // Do not let the browser take focus when a Load method has been called
     return source == CefFocusSource.FocusSourceNavigation;
 }
Esempio n. 8
0
 protected override Boolean OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     Log.Trace("FocusHandler.OnSetFocus( browser: {0}, source: {1} )", browser.Identifier, Enum.GetName(typeof(CefFocusSource), source));
     return(base.OnSetFocus(browser, source));
 }
Esempio n. 9
0
 /// <summary>
 /// Called when the browser component is requesting focus. |source| indicates
 /// where the focus request is originating from. Return false (0) to allow the
 /// focus to be set or true (1) to cancel setting the focus.
 /// </summary>
 protected internal unsafe virtual bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(default);
Esempio n. 10
0
 /// <summary>
 /// Called when the browser component is requesting focus.
 /// </summary>
 /// <param name="chromiumWebBrowser">the ChromiumWebBrowser control</param>
 /// <param name="browser">the browser object, do not keep a reference to this object outside of this method</param>
 /// <param name="source">Indicates where the focus request is originating from.</param>
 /// <returns>Return false to allow the focus to be set or true to cancel setting the focus.</returns>
 protected virtual bool OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source)
 {
     return(false);
 }
Esempio n. 11
0
 protected internal unsafe override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(_implementation.OnSetFocus(browser, source));
 }
 protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(OwnerWebView.OnSetFocus(source == CefFocusSource.System));
 }
Esempio n. 13
0
 public unsafe extern int OnSetFocus(cef_browser_t *browser, CefFocusSource source);
 protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(base.OnSetFocus(browser, source));
 }
Esempio n. 15
0
 public override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(_implementation.OnSetFocus(browser, source));
 }
Esempio n. 16
0
 public bool OnSetFocus(CefFocusSource source)
 {
     // Returning false means that we allow Chromium to take the focus away from our WinForms control.
     // You could also return true to keep focus in the address bar.
     return false;
 }
Esempio n. 17
0
        /// <summary>
        /// Called when the browser component is about to loose focus. For instance, if
        /// focus was on the last HTML element and the user pressed the TAB key. |next|
        /// will be true if the browser is giving focus to the next component and false
        /// if the browser is giving focus to the previous component.
        /// </summary>
        // protected abstract void OnTakeFocus(cef_browser_t* browser, int next);

        private int on_set_focus(cef_focus_handler_t *self, cef_browser_t *browser, CefFocusSource source)
        {
            CheckSelf(self);
            throw new NotImplementedException(); // TODO: CefFocusHandler.OnSetFocus
        }
Esempio n. 18
0
 public SetFocusEventArgs(CefFocusSource source)
 {
     Source = source;
 }
Esempio n. 19
0
        bool IFocusHandler.OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source)
        {
            if (browser.IsPopup)
            {
                return(false);
            }

            //Don't take focus
            return(true);
        }
        /// <summary>
        /// Called when the browser component is requesting focus.
        /// </summary>
        /// <param name="chromiumWebBrowser">the ChromiumWebBrowser control</param>
        /// <param name="browser">the browser object</param>
        /// <param name="source">Indicates where the focus request is originating from.</param>
        /// <returns>Return false to allow the focus to be set or true to cancel setting the focus.</returns>
        public virtual bool OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source)
        {
            //We don't deal with popups as they're rendered by default entirely by CEF
            if (browser.IsPopup)
            {
                return(false);
            }

            var focusSourceNavigation = source == CefFocusSource.FocusSourceNavigation;

            var winFormsBrowser = (ChromiumWebBrowser)chromiumWebBrowser;

            //The default behaviour when browser is activated by default
            //This was the default prior to version 73
            if (winFormsBrowser.ActivateBrowserOnCreation)
            {
                // Do not let the browser take focus when a Load method has been called
                return(focusSourceNavigation);
            }

            //For the very first navigation we let the browser
            //take focus so touch screens work correctly.
            //See https://github.com/cefsharp/CefSharp/issues/2776
            if (!initialFocusOnNavigation && focusSourceNavigation)
            {
                initialFocusOnNavigation = true;

                return(false);
            }

            // Do not let the browser take focus when a Load method has been called
            return(focusSourceNavigation);
        }
 public bool OnSetFocus(CefFocusSource source)
 {
     // Returning false means that we allow Chromium to take the focus away from our WinForms control.
     // You could also return true to keep focus in the address bar.
     return(false);
 }
Esempio n. 22
0
		public bool OnSetFocus(CefFocusSource source)
		{
			return false;
		}
Esempio n. 23
0
 public virtual bool OnSetFocus(CefFocusSource source)
 {
     // Do not let the browser take focus when a Load method has been called
     return(source == CefFocusSource.FocusSourceNavigation);
 }
Esempio n. 24
0
 bool IFocusHandler.OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source)
 {
     return(OnSetFocus(chromiumWebBrowser, browser, source));
 }
Esempio n. 25
0
 /// <summary>
 /// Called when the browser component is requesting focus. |source| indicates
 /// where the focus request is originating from. Return false to allow the
 /// focus to be set or true to cancel setting the focus.
 /// </summary>
 protected virtual bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return false;
 }
Esempio n. 26
0
 /// <summary>
 /// Called when the browser component is requesting focus.
 /// </summary>
 /// <param name="chromiumWebBrowser">the ChromiumWebBrowser control</param>
 /// <param name="browser">the browser object, do not keep a reference to this object outside of this method</param>
 /// <param name="source">Indicates where the focus request is originating from.</param>
 /// <returns>Return false to allow the focus to be set or true to cancel setting the focus.</returns>
 protected virtual bool OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source)
 {
     //We don't deal with popups as they're rendered by default entirely by CEF
     if (browser.IsPopup)
     {
         return(false);
     }
     // Do not let the browser take focus when a Load method has been called
     return(source == CefFocusSource.FocusSourceNavigation);
 }
 /// <summary>
 /// Called when the browser component is requesting focus. Return false to allow
 /// the focus to be set or true to cancel setting the focus.
 /// </summary>
 /// <param name="browser"></param>
 /// <param name="source">
 /// Indicates where the focus request is originating from.
 /// </param>
 /// <returns>Return false to allow the focus to be set or true to cancel setting the focus.</returns>
 internal protected virtual bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     return(false);
 }
Esempio n. 28
0
 public bool OnSetFocus(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFocusSource source) => false;
Esempio n. 29
0
 public bool OnSetFocus(CefFocusSource source)
 {
     return(false);
 }
Esempio n. 30
0
 protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source)
 {
     //Console.WriteLine ("OnSetFocus");
     //System.Diagnostics.Debug.WriteLine(", OnSetFocus: " + source.ToString());
     return(base.OnSetFocus(browser, source));
 }