mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update include/base headers for C++11/14 (see issue #3140)
See the issue for update guidelines.
This commit is contained in:
@@ -58,11 +58,11 @@ class CefByteReadHandler : public CefReadHandler {
|
||||
CefRefPtr<CefBaseRefCounted> source);
|
||||
|
||||
// CefReadHandler methods.
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Eof() OVERRIDE;
|
||||
virtual bool MayBlock() OVERRIDE { return false; }
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) override;
|
||||
virtual int Seek(int64 offset, int whence) override;
|
||||
virtual int64 Tell() override;
|
||||
virtual int Eof() override;
|
||||
virtual bool MayBlock() override { return false; }
|
||||
|
||||
private:
|
||||
const unsigned char* bytes_;
|
||||
|
@@ -83,8 +83,8 @@ struct CefDeleteOnThread {
|
||||
if (CefCurrentlyOn(thread)) {
|
||||
delete x;
|
||||
} else {
|
||||
CefPostTask(thread,
|
||||
base::Bind(&CefDeleteOnThread<thread>::Destruct<T>, x));
|
||||
CefPostTask(thread, base::Bind(&CefDeleteOnThread<thread>::Destruct<T>,
|
||||
base::Unretained(x)));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -102,16 +102,16 @@ struct CefDeleteOnRendererThread : public CefDeleteOnThread<TID_RENDERER> {};
|
||||
// Same as IMPLEMENT_REFCOUNTING() but using the specified Destructor.
|
||||
#define IMPLEMENT_REFCOUNTING_EX(ClassName, Destructor) \
|
||||
public: \
|
||||
void AddRef() const OVERRIDE { ref_count_.AddRef(); } \
|
||||
bool Release() const OVERRIDE { \
|
||||
void AddRef() const override { ref_count_.AddRef(); } \
|
||||
bool Release() const override { \
|
||||
if (ref_count_.Release()) { \
|
||||
Destructor::Destruct(this); \
|
||||
return true; \
|
||||
} \
|
||||
return false; \
|
||||
} \
|
||||
bool HasOneRef() const OVERRIDE { return ref_count_.HasOneRef(); } \
|
||||
bool HasAtLeastOneRef() const OVERRIDE { \
|
||||
bool HasOneRef() const override { return ref_count_.HasOneRef(); } \
|
||||
bool HasAtLeastOneRef() const override { \
|
||||
return ref_count_.HasAtLeastOneRef(); \
|
||||
} \
|
||||
\
|
||||
|
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/base/cef_scoped_ptr.h"
|
||||
|
@@ -64,15 +64,15 @@ class CefStreamResourceHandler : public CefResourceHandler {
|
||||
// CefResourceHandler methods.
|
||||
bool Open(CefRefPtr<CefRequest> request,
|
||||
bool& handle_request,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE;
|
||||
CefRefPtr<CefCallback> callback) override;
|
||||
void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) OVERRIDE;
|
||||
CefString& redirectUrl) override;
|
||||
bool Read(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefResourceReadCallback> callback) OVERRIDE;
|
||||
void Cancel() OVERRIDE;
|
||||
CefRefPtr<CefResourceReadCallback> callback) override;
|
||||
void Cancel() override;
|
||||
|
||||
private:
|
||||
const int status_code_;
|
||||
|
Reference in New Issue
Block a user