Add a new CefBrowserHost::StartDownload method for starting a download that can then be handled via CefDownloadHandler (issue #883).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1100 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-02-13 22:47:04 +00:00
parent d65179c135
commit 7f3d1ccf78
10 changed files with 356 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ class TrackCallback {
class TestHandler : public CefClient,
public CefDialogHandler,
public CefDisplayHandler,
public CefDownloadHandler,
public CefGeolocationHandler,
public CefJSDialogHandler,
public CefLifeSpanHandler,
@@ -52,6 +53,9 @@ class TestHandler : public CefClient,
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() OVERRIDE {
return this;
}
@@ -68,6 +72,13 @@ class TestHandler : public CefClient,
return this;
}
// CefDownloadHandler methods
virtual void OnBeforeDownload(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
const CefString& suggested_name,
CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE {}
// CefLifeSpanHandler methods
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;