# Class TCefDownloadHandlerOwn

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFDownloadHandler

## Declaration

`type TCefDownloadHandlerOwn = class(TCefBaseRefCountedOwn, ICefDownloadHandler)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefDownloadHandlerOwn

## Overview

### Methods

| `function CanDownload(const browser: ICefBrowser; const url, request_method: ustring): boolean; virtual;`
| `function OnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback): boolean; virtual;`
| `procedure OnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback); virtual;`
| `procedure RemoveReferences; virtual;`
| `constructor Create; virtual;`

## Description

### Methods

| `function CanDownload(const browser: ICefBrowser; const url, request_method: ustring): boolean; virtual;`

This item has no description. Showing description inherited from ICefDownloadHandler.CanDownload.

Called before a download begins in response to a user-initiated action (e.g. alt + link click or link click that returns a `Content-Disposition: attachment` response from the server). |url| is the target download URL and |request_function| is the target function (GET, POST, etc). Return true (1) to proceed with the download or false (0) to cancel the download.

| `function OnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback): boolean; virtual;`

This item has no description. Showing description inherited from ICefDownloadHandler.OnBeforeDownload.

Called before a download begins. |suggested_name| is the suggested name for the download file. Return true (1) and execute |callback| either asynchronously or in this function to continue or cancel the download. Return false (0) to proceed with default handling (cancel with Alloy style, download shelf with Chrome style). Do not keep a reference to |download_item| outside of this function.

| `procedure OnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback); virtual;`

This item has no description. Showing description inherited from ICefDownloadHandler.OnDownloadUpdated.

Called when a download's status or progress information has been updated. This may be called multiple times before and after OnBeforeDownload. Execute |callback| either asynchronously or in this function to cancel the download if desired. Do not keep a reference to |download_item| outside of this function.

| `procedure RemoveReferences; virtual;`
This item has no description. Showing description inherited from ICefDownloadHandler.RemoveReferences. Custom procedure to clear all references.

| `constructor Create; virtual;`
This item has no description.

Generated by PasDoc 0.17.0.snapshot.