Chromium Embedded Framework (CEF)  116.0.6+gc182ee2+chromium-116.0.5845.10
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, 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,
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 any combination of (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). To display a custom dialog return true and execute |callback| either inline or at a later time. To display the default dialog return false.


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