Significant API changes for issue #218:

- Replace CefHandler with a new CefClient interface and separate handler interfaces.
- Add support for virtual inheritance to allow multiple CefBase parented interfaces to be implemented in the same class.
- Replace CefThreadSafeBase with IMPLEMENT_* macros to support virtual inheritance and to only provide locking implementations when needed.
- Move the CefBrowserSettings parameter from CefInitialize to CreateBrowser.
- Add a new cef_build.h header that provides platform-specific and OS_* defines.
- Introduce the use of OVERRIDE to generate compiler errors on Windows if a child virtual method declaration doesn't match the parent declaration.
- Use NDEBUG instead of _DEBUG because _DEBUG is not defined on Mac. (issue #240).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@235 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-05-20 14:42:25 +00:00
parent 9a69e96950
commit dbe8de277f
251 changed files with 7127 additions and 4945 deletions

View File

@ -58,7 +58,7 @@ public:
virtual ~CefUrlRequestJob(){}
virtual void Start()
virtual void Start() OVERRIDE
{
handler_->Cancel();
// Continue asynchronously.
@ -70,7 +70,7 @@ public:
return;
}
virtual void Kill()
virtual void Kill() OVERRIDE
{
if (async_resolver_) {
async_resolver_->Cancel();
@ -81,6 +81,7 @@ public:
}
virtual bool ReadRawData(net::IOBuffer* dest, int dest_size, int *bytes_read)
OVERRIDE
{
DCHECK_NE(dest_size, 0);
DCHECK(bytes_read);
@ -119,7 +120,7 @@ public:
}
}
virtual void GetResponseInfo(net::HttpResponseInfo* info) {
virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE {
CefResponseImpl* responseImpl =
static_cast<CefResponseImpl*>(response_.get());
scoped_refptr<net::HttpResponseHeaders> headers(
@ -128,6 +129,7 @@ public:
}
virtual bool IsRedirectResponse(GURL* location, int* http_status_code)
OVERRIDE
{
if (redirect_url_.is_valid()) {
// Redirect to the new URL.
@ -138,7 +140,7 @@ public:
return false;
}
virtual bool GetMimeType(std::string* mime_type) const
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE
{
DCHECK(request_);
// call handler to get mime type
@ -146,10 +148,6 @@ public:
return true;
}
virtual void SetExtraRequestHeaders(const std::string& headers)
{
}
CefRefPtr<CefSchemeHandler> handler_;
CefRefPtr<CefResponse> response_;
int response_length_;
@ -376,7 +374,7 @@ private:
CefUrlRequestFilter* CefUrlRequestFilter::shared_instance_ = NULL;
class SchemeRequestJobWrapper : public CefThreadSafeBase<CefBase> {
class SchemeRequestJobWrapper : public CefBase {
public:
SchemeRequestJobWrapper(const std::string& scheme_name,
const std::string& host_name,
@ -411,6 +409,8 @@ private:
std::string host_name_;
bool is_standard_;
CefSchemeHandlerFactory* factory_;
IMPLEMENT_REFCOUNTING(SchemeRequestJobWrapper);
};
bool CefRegisterScheme(const CefString& scheme_name,