mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-04-26 16:38:44 +02:00
Use int64 instead of uint64 for CefURLRequestClient progress notifications (issue #1202).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1968 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
04e072ca40
commit
a2d690a9bd
@ -146,7 +146,7 @@ typedef struct _cef_urlrequest_client_t {
|
|||||||
// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
|
// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
|
||||||
///
|
///
|
||||||
void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self,
|
void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self,
|
||||||
struct _cef_urlrequest_t* request, uint64 current, uint64 total);
|
struct _cef_urlrequest_t* request, int64 current, int64 total);
|
||||||
|
|
||||||
///
|
///
|
||||||
// Notifies the client of download progress. |current| denotes the number of
|
// Notifies the client of download progress. |current| denotes the number of
|
||||||
@ -155,7 +155,7 @@ typedef struct _cef_urlrequest_client_t {
|
|||||||
///
|
///
|
||||||
void (CEF_CALLBACK *on_download_progress)(
|
void (CEF_CALLBACK *on_download_progress)(
|
||||||
struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request,
|
struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request,
|
||||||
uint64 current, uint64 total);
|
int64 current, int64 total);
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when some part of the response is read. |data| contains the current
|
// Called when some part of the response is read. |data| contains the current
|
||||||
|
@ -140,8 +140,8 @@ class CefURLRequestClient : public virtual CefBase {
|
|||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) =0;
|
int64 total) =0;
|
||||||
|
|
||||||
///
|
///
|
||||||
// Notifies the client of download progress. |current| denotes the number of
|
// Notifies the client of download progress. |current| denotes the number of
|
||||||
@ -150,8 +150,8 @@ class CefURLRequestClient : public virtual CefBase {
|
|||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) =0;
|
int64 total) =0;
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when some part of the response is read. |data| contains the current
|
// Called when some part of the response is read. |data| contains the current
|
||||||
|
@ -36,7 +36,7 @@ void CEF_CALLBACK urlrequest_client_on_request_complete(
|
|||||||
|
|
||||||
void CEF_CALLBACK urlrequest_client_on_upload_progress(
|
void CEF_CALLBACK urlrequest_client_on_upload_progress(
|
||||||
struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request,
|
struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request,
|
||||||
uint64 current, uint64 total) {
|
int64 current, int64 total) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||||
|
|
||||||
DCHECK(self);
|
DCHECK(self);
|
||||||
@ -56,7 +56,7 @@ void CEF_CALLBACK urlrequest_client_on_upload_progress(
|
|||||||
|
|
||||||
void CEF_CALLBACK urlrequest_client_on_download_progress(
|
void CEF_CALLBACK urlrequest_client_on_download_progress(
|
||||||
struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request,
|
struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request,
|
||||||
uint64 current, uint64 total) {
|
int64 current, int64 total) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||||
|
|
||||||
DCHECK(self);
|
DCHECK(self);
|
||||||
|
@ -35,7 +35,7 @@ void CefURLRequestClientCToCpp::OnRequestComplete(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefURLRequestClientCToCpp::OnUploadProgress(
|
void CefURLRequestClientCToCpp::OnUploadProgress(
|
||||||
CefRefPtr<CefURLRequest> request, uint64 current, uint64 total) {
|
CefRefPtr<CefURLRequest> request, int64 current, int64 total) {
|
||||||
if (CEF_MEMBER_MISSING(struct_, on_upload_progress))
|
if (CEF_MEMBER_MISSING(struct_, on_upload_progress))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ void CefURLRequestClientCToCpp::OnUploadProgress(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefURLRequestClientCToCpp::OnDownloadProgress(
|
void CefURLRequestClientCToCpp::OnDownloadProgress(
|
||||||
CefRefPtr<CefURLRequest> request, uint64 current, uint64 total) {
|
CefRefPtr<CefURLRequest> request, int64 current, int64 total) {
|
||||||
if (CEF_MEMBER_MISSING(struct_, on_download_progress))
|
if (CEF_MEMBER_MISSING(struct_, on_download_progress))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -34,10 +34,10 @@ class CefURLRequestClientCToCpp
|
|||||||
|
|
||||||
// CefURLRequestClient methods
|
// CefURLRequestClient methods
|
||||||
void OnRequestComplete(CefRefPtr<CefURLRequest> request) override;
|
void OnRequestComplete(CefRefPtr<CefURLRequest> request) override;
|
||||||
void OnUploadProgress(CefRefPtr<CefURLRequest> request, uint64 current,
|
void OnUploadProgress(CefRefPtr<CefURLRequest> request, int64 current,
|
||||||
uint64 total) override;
|
int64 total) override;
|
||||||
void OnDownloadProgress(CefRefPtr<CefURLRequest> request, uint64 current,
|
void OnDownloadProgress(CefRefPtr<CefURLRequest> request, int64 current,
|
||||||
uint64 total) override;
|
int64 total) override;
|
||||||
void OnDownloadData(CefRefPtr<CefURLRequest> request, const void* data,
|
void OnDownloadData(CefRefPtr<CefURLRequest> request, const void* data,
|
||||||
size_t data_length) override;
|
size_t data_length) override;
|
||||||
bool GetAuthCredentials(bool isProxy, const CefString& host, int port,
|
bool GetAuthCredentials(bool isProxy, const CefString& host, int port,
|
||||||
|
@ -445,15 +445,15 @@ class RequestClient : public CefURLRequestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) override {
|
int64 total) override {
|
||||||
upload_progress_ct_++;
|
upload_progress_ct_++;
|
||||||
upload_total_ = total;
|
upload_total_ = total;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) override {
|
int64 total) override {
|
||||||
response_ = request->GetResponse();
|
response_ = request->GetResponse();
|
||||||
EXPECT_TRUE(response_.get());
|
EXPECT_TRUE(response_.get());
|
||||||
EXPECT_TRUE(response_->IsReadOnly());
|
EXPECT_TRUE(response_->IsReadOnly());
|
||||||
@ -1120,14 +1120,14 @@ class InvalidURLTestClient : public CefURLRequestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
void OnUploadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) override {
|
int64 total) override {
|
||||||
EXPECT_TRUE(false); // Not reached.
|
EXPECT_TRUE(false); // Not reached.
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
|
||||||
uint64 current,
|
int64 current,
|
||||||
uint64 total) override {
|
int64 total) override {
|
||||||
EXPECT_TRUE(false); // Not reached.
|
EXPECT_TRUE(false); // Not reached.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user