Chromium Embedded Framework (CEF)  130.1.2+g48f3ef6+chromium-130.0.6723.44
CefDialogHandler Class Reference

Implement this interface to handle dialog events. More...

#include "include/cef_dialog_handler.h"

Inheritance diagram for CefDialogHandler:
CefBaseRefCounted

Public Types

typedef cef_file_dialog_mode_t FileDialogMode
 

Public Member Functions

virtual bool OnFileDialog (CefRefPtr< CefBrowser > browser, FileDialogMode mode, const CefString &title, const CefString &default_file_path, const std::vector< CefString > &accept_filters, const std::vector< CefString > &accept_extensions, const std::vector< CefString > &accept_descriptions, CefRefPtr< CefFileDialogCallback > callback)
 Called to run a file chooser dialog. 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

Implement this interface to handle dialog events.

The methods of this class will be called on the browser process UI thread.

Member Typedef Documentation

◆ FileDialogMode

Member Function Documentation

◆ OnFileDialog()

virtual bool CefDialogHandler::OnFileDialog ( CefRefPtr< CefBrowser browser,
FileDialogMode  mode,
const CefString title,
const CefString default_file_path,
const std::vector< CefString > &  accept_filters,
const std::vector< CefString > &  accept_extensions,
const std::vector< CefString > &  accept_descriptions,
CefRefPtr< CefFileDialogCallback callback 
)
inlinevirtual

Called to run a file chooser dialog.

|mode| represents the type of dialog to display. |title| to the title to be used for the dialog and may be empty to show the default title ("Open" or "Save" depending on the mode). |default_file_path| is the path with optional directory and/or file name component that should be initially selected in the dialog. |accept_filters| are used to restrict the selectable file types and may be any combination of valid lower-cased MIME types (e.g. "text/*" or "image/*") and individual file extensions (e.g. ".txt" or ".png"). |accept_extensions| provides the semicolon-delimited expansion of MIME types to file extensions (if known, or empty string otherwise). |accept_descriptions| provides the descriptions for MIME types (if known, or empty string otherwise). For example, the "image/*" mime type might have extensions ".png;.jpg;.bmp;..." and description "Image Files". |accept_filters|, |accept_extensions| and |accept_descriptions| will all be the same size. To display a custom dialog return true and execute |callback| either inline or at a later time. To display the default dialog return false. If this method returns false it may be called an additional time for the same dialog (both before and after MIME type expansion).


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