Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefMessageRouterBrowserSide

base::RefCountedThreadSafe
   |
   +--CefMessageRouterBrowserSide

   in cef_message_router.h

class CefMessageRouterBrowserSide
extends base::RefCountedThreadSafe

Implements the browser side of query routing. The methods of this class may be called on any browser process thread unless otherwise indicated.


Inner Classes, Typedefs, and Enums
class CefMessageRouterBrowserSide::Callback
          Callback associated with a single pending asynchronous query.
class CefMessageRouterBrowserSide::Handler
          Implement this interface to handle queries.
 
Constructor Summary
protected  virtual ~CefMessageRouterBrowserSide()
          
 
Method Summary
 virtual bool AddHandler( CefMessageRouterBrowserSide::Handler* handler, bool first )= 0
          Add a new query handler.
 virtual void CancelPending( CefRefPtr< CefBrowser > browser, CefMessageRouterBrowserSide::Handler* handler )= 0
          Cancel all pending queries associated with either |browser| or |handler|.
 static CefRefPtr< CefMessageRouterBrowserSide > Create( const CefMessageRouterConfig& config )
          Create a new router with the specified configuration.
 virtual int GetPendingCount( CefRefPtr< CefBrowser > browser, CefMessageRouterBrowserSide::Handler* handler )= 0
          Returns the number of queries currently pending for the specified |browser| and/or |handler|.
 virtual void OnBeforeBrowse( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame )= 0
          Call from CefRequestHandler::OnBeforeBrowse only if the navigation is allowed to proceed.
 virtual void OnBeforeClose( CefRefPtr< CefBrowser > browser )= 0
          Call from CefLifeSpanHandler::OnBeforeClose.
 virtual bool OnProcessMessageReceived( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefProcessId source_process, CefRefPtr< CefProcessMessage > message )= 0
          Call from CefClient::OnProcessMessageReceived.
 virtual void OnRenderProcessTerminated( CefRefPtr< CefBrowser > browser )= 0
          Call from CefRequestHandler::OnRenderProcessTerminated.
 virtual bool RemoveHandler( CefMessageRouterBrowserSide::Handler* handler )= 0
          Remove an existing query handler.
 

Constructor Detail

~CefMessageRouterBrowserSide

protected virtual ~CefMessageRouterBrowserSide();


Method Detail

AddHandler

public virtual bool AddHandler( CefMessageRouterBrowserSide::Handler* handler, bool first )= 0;
Add a new query handler. If |first| is true it will be added as the first handler, otherwise it will be added as the last handler. Returns true if the handler is added successfully or false if the handler has already been added. Must be called on the browser process UI thread. The Handler object must either outlive the router or be removed before deletion.

CancelPending

public virtual void CancelPending( CefRefPtr< CefBrowser > browser, CefMessageRouterBrowserSide::Handler* handler )= 0;
Cancel all pending queries associated with either |browser| or |handler|. If both |browser| and |handler| are NULL all pending queries will be canceled. Handler::OnQueryCanceled will be called and the associated JavaScript onFailure callback will be executed in all cases with an error code of -1.

Create

public static CefRefPtr< CefMessageRouterBrowserSide > Create( const CefMessageRouterConfig& config );
Create a new router with the specified configuration.

GetPendingCount

public virtual int GetPendingCount( CefRefPtr< CefBrowser > browser, CefMessageRouterBrowserSide::Handler* handler )= 0;
Returns the number of queries currently pending for the specified |browser| and/or |handler|. Either or both values may be empty. Must be called on the browser process UI thread.

OnBeforeBrowse

public virtual void OnBeforeBrowse( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame )= 0;
Call from CefRequestHandler::OnBeforeBrowse only if the navigation is allowed to proceed. If |frame| is the main frame then any pending queries associated with |browser| will be canceled and Handler::OnQueryCanceled will be called. No JavaScript callbacks will be executed since this indicates destruction of the context.

OnBeforeClose

public virtual void OnBeforeClose( CefRefPtr< CefBrowser > browser )= 0;
Call from CefLifeSpanHandler::OnBeforeClose. Any pending queries associated with |browser| will be canceled and Handler::OnQueryCanceled will be called. No JavaScript callbacks will be executed since this indicates destruction of the browser.

OnProcessMessageReceived

public virtual bool OnProcessMessageReceived( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, CefProcessId source_process, CefRefPtr< CefProcessMessage > message )= 0;
Call from CefClient::OnProcessMessageReceived. Returns true if the message is handled by this router or false otherwise.

OnRenderProcessTerminated

public virtual void OnRenderProcessTerminated( CefRefPtr< CefBrowser > browser )= 0;
Call from CefRequestHandler::OnRenderProcessTerminated. Any pending queries associated with |browser| will be canceled and Handler::OnQueryCanceled will be called. No JavaScript callbacks will be executed since this indicates destruction of the context.

RemoveHandler

public virtual bool RemoveHandler( CefMessageRouterBrowserSide::Handler* handler )= 0;
Remove an existing query handler. Any pending queries associated with the handler will be canceled. Handler::OnQueryCanceled will be called and the associated JavaScript onFailure callback will be executed with an error code of -1. Returns true if the handler is removed successfully or false if the handler is not found. Must be called on the browser process UI thread.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt