Chromium Embedded Framework (CEF)  131.2.1+ge081753+chromium-131.0.6778.13
CefFrame Class Referenceabstract

Class used to represent a frame in the browser window. More...

#include "include/cef_frame.h"

Inheritance diagram for CefFrame:
CefBaseRefCounted

Public Member Functions

virtual bool IsValid ()=0
 True if this object is currently attached to a valid frame. More...
 
virtual void Undo ()=0
 Execute undo in this frame. More...
 
virtual void Redo ()=0
 Execute redo in this frame. More...
 
virtual void Cut ()=0
 Execute cut in this frame. More...
 
virtual void Copy ()=0
 Execute copy in this frame. More...
 
virtual void Paste ()=0
 Execute paste in this frame. More...
 
virtual void PasteAndMatchStyle ()=0
 Execute paste and match style in this frame. More...
 
virtual void Delete ()=0
 Execute delete in this frame. More...
 
virtual void SelectAll ()=0
 Execute select all in this frame. More...
 
virtual void ViewSource ()=0
 Save this frame's HTML source to a temporary file and open it in the default text viewing application. More...
 
virtual void GetSource (CefRefPtr< CefStringVisitor > visitor)=0
 Retrieve this frame's HTML source as a string sent to the specified visitor. More...
 
virtual void GetText (CefRefPtr< CefStringVisitor > visitor)=0
 Retrieve this frame's display text as a string sent to the specified visitor. More...
 
virtual void LoadRequest (CefRefPtr< CefRequest > request)=0
 Load the request represented by the |request| object. More...
 
virtual void LoadURL (const CefString &url)=0
 Load the specified |url|. More...
 
virtual void ExecuteJavaScript (const CefString &code, const CefString &script_url, int start_line)=0
 Execute a string of JavaScript code in this frame. More...
 
virtual bool IsMain ()=0
 Returns true if this is the main (top-level) frame. More...
 
virtual bool IsFocused ()=0
 Returns true if this is the focused frame. More...
 
virtual CefString GetName ()=0
 Returns the name for this frame. More...
 
virtual CefString GetIdentifier ()=0
 Returns the globally unique identifier for this frame or empty if the underlying frame does not yet exist. More...
 
virtual CefRefPtr< CefFrameGetParent ()=0
 Returns the parent of this frame or NULL if this is the main (top-level) frame. More...
 
virtual CefString GetURL ()=0
 Returns the URL currently loaded in this frame. More...
 
virtual CefRefPtr< CefBrowserGetBrowser ()=0
 Returns the browser that this frame belongs to. More...
 
virtual CefRefPtr< CefV8ContextGetV8Context ()=0
 Get the V8 context associated with the frame. More...
 
virtual void VisitDOM (CefRefPtr< CefDOMVisitor > visitor)=0
 Visit the DOM document. More...
 
virtual CefRefPtr< CefURLRequestCreateURLRequest (CefRefPtr< CefRequest > request, CefRefPtr< CefURLRequestClient > client)=0
 Create a new URL request that will be treated as originating from this frame and the associated browser. More...
 
virtual void SendProcessMessage (CefProcessId target_process, CefRefPtr< CefProcessMessage > message)=0
 Send a message to the specified |target_process|. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class used to represent a frame in the browser window.

When used in the browser process the methods of this class may be called on any thread unless otherwise indicated in the comments. When used in the render process the methods of this class may only be called on the main thread.

Member Function Documentation

◆ Copy()

virtual void CefFrame::Copy ( )
pure virtual

Execute copy in this frame.

◆ CreateURLRequest()

virtual CefRefPtr<CefURLRequest> CefFrame::CreateURLRequest ( CefRefPtr< CefRequest request,
CefRefPtr< CefURLRequestClient client 
)
pure virtual

Create a new URL request that will be treated as originating from this frame and the associated browser.

Use CefURLRequest::Create instead if you do not want the request to have this association, in which case it may be handled differently (see documentation on that method). A request created with this method may only originate from the browser process, and will behave as follows:

The |request| object will be marked as read-only after calling this method.

◆ Cut()

virtual void CefFrame::Cut ( )
pure virtual

Execute cut in this frame.

◆ Delete()

virtual void CefFrame::Delete ( )
pure virtual

Execute delete in this frame.

◆ ExecuteJavaScript()

virtual void CefFrame::ExecuteJavaScript ( const CefString code,
const CefString script_url,
int  start_line 
)
pure virtual

Execute a string of JavaScript code in this frame.

The |script_url| parameter is the URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error. The |start_line| parameter is the base line number to use for error reporting.

◆ GetBrowser()

virtual CefRefPtr<CefBrowser> CefFrame::GetBrowser ( )
pure virtual

Returns the browser that this frame belongs to.

◆ GetIdentifier()

virtual CefString CefFrame::GetIdentifier ( )
pure virtual

Returns the globally unique identifier for this frame or empty if the underlying frame does not yet exist.

◆ GetName()

virtual CefString CefFrame::GetName ( )
pure virtual

Returns the name for this frame.

If the frame has an assigned name (for example, set via the iframe "name" attribute) then that value will be returned. Otherwise a unique name will be constructed based on the frame parent hierarchy. The main (top-level) frame will always have an empty name value.

◆ GetParent()

virtual CefRefPtr<CefFrame> CefFrame::GetParent ( )
pure virtual

Returns the parent of this frame or NULL if this is the main (top-level) frame.

◆ GetSource()

virtual void CefFrame::GetSource ( CefRefPtr< CefStringVisitor visitor)
pure virtual

Retrieve this frame's HTML source as a string sent to the specified visitor.

◆ GetText()

virtual void CefFrame::GetText ( CefRefPtr< CefStringVisitor visitor)
pure virtual

Retrieve this frame's display text as a string sent to the specified visitor.

◆ GetURL()

virtual CefString CefFrame::GetURL ( )
pure virtual

Returns the URL currently loaded in this frame.

◆ GetV8Context()

virtual CefRefPtr<CefV8Context> CefFrame::GetV8Context ( )
pure virtual

Get the V8 context associated with the frame.

This method can only be called from the render process.

◆ IsFocused()

virtual bool CefFrame::IsFocused ( )
pure virtual

Returns true if this is the focused frame.

◆ IsMain()

virtual bool CefFrame::IsMain ( )
pure virtual

Returns true if this is the main (top-level) frame.

◆ IsValid()

virtual bool CefFrame::IsValid ( )
pure virtual

True if this object is currently attached to a valid frame.

◆ LoadRequest()

virtual void CefFrame::LoadRequest ( CefRefPtr< CefRequest request)
pure virtual

Load the request represented by the |request| object.

WARNING: This method will fail with "bad IPC message" reason INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request origin using some other mechanism (LoadURL, link click, etc).

◆ LoadURL()

virtual void CefFrame::LoadURL ( const CefString url)
pure virtual

Load the specified |url|.

◆ Paste()

virtual void CefFrame::Paste ( )
pure virtual

Execute paste in this frame.

◆ PasteAndMatchStyle()

virtual void CefFrame::PasteAndMatchStyle ( )
pure virtual

Execute paste and match style in this frame.

◆ Redo()

virtual void CefFrame::Redo ( )
pure virtual

Execute redo in this frame.

◆ SelectAll()

virtual void CefFrame::SelectAll ( )
pure virtual

Execute select all in this frame.

◆ SendProcessMessage()

virtual void CefFrame::SendProcessMessage ( CefProcessId  target_process,
CefRefPtr< CefProcessMessage message 
)
pure virtual

Send a message to the specified |target_process|.

Ownership of the message contents will be transferred and the |message| reference will be invalidated. Message delivery is not guaranteed in all cases (for example, if the browser is closing, navigating, or if the target process crashes). Send an ACK message back from the target process if confirmation is required.

◆ Undo()

virtual void CefFrame::Undo ( )
pure virtual

Execute undo in this frame.

◆ ViewSource()

virtual void CefFrame::ViewSource ( )
pure virtual

Save this frame's HTML source to a temporary file and open it in the default text viewing application.

This method can only be called from the browser process.

◆ VisitDOM()

virtual void CefFrame::VisitDOM ( CefRefPtr< CefDOMVisitor visitor)
pure virtual

Visit the DOM document.

This method can only be called from the render process.


The documentation for this class was generated from the following file: