mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Various fixes related to the C++11/14 update (see issue #3140)
- Convert scoped_ptr to std::unique_ptr from <memory> - Convert arraysize to base::size from include/base/cef_cxx17_backports.h - Convert NULL to nullptr - Include include/base/cef_callback.h instead of include/base/cef_bind.h - Implicit conversion of CefRefPtr<T> or scoped_refptr<T> to T* is gone; use .get() instead See the issue for additional details.
This commit is contained in:
@@ -38,11 +38,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
#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"
|
||||
#include "include/base/cef_weak_ptr.h"
|
||||
#include "include/cef_request_handler.h"
|
||||
#include "include/wrapper/cef_closure_task.h"
|
||||
@@ -160,18 +160,18 @@ class CefResourceManager
|
||||
|
||||
// The below methods are called on the browser process IO thread.
|
||||
|
||||
explicit Request(scoped_ptr<RequestState> state);
|
||||
explicit Request(std::unique_ptr<RequestState> state);
|
||||
|
||||
scoped_ptr<RequestState> SendRequest();
|
||||
std::unique_ptr<RequestState> SendRequest();
|
||||
bool HasState();
|
||||
|
||||
static void ContinueOnIOThread(scoped_ptr<RequestState> state,
|
||||
static void ContinueOnIOThread(std::unique_ptr<RequestState> state,
|
||||
CefRefPtr<CefResourceHandler> handler);
|
||||
static void StopOnIOThread(scoped_ptr<RequestState> state);
|
||||
static void StopOnIOThread(std::unique_ptr<RequestState> state);
|
||||
|
||||
// Will be non-NULL while the request is pending. Only accessed on the
|
||||
// browser process IO thread.
|
||||
scoped_ptr<RequestState> state_;
|
||||
std::unique_ptr<RequestState> state_;
|
||||
|
||||
// Params that stay with this request object. Safe to access on any thread.
|
||||
RequestParams params_;
|
||||
@@ -342,10 +342,10 @@ class CefResourceManager
|
||||
|
||||
// Methods that manage request state between requests. Called on the browser
|
||||
// process IO thread.
|
||||
bool SendRequest(scoped_ptr<RequestState> state);
|
||||
void ContinueRequest(scoped_ptr<RequestState> state,
|
||||
bool SendRequest(std::unique_ptr<RequestState> state);
|
||||
void ContinueRequest(std::unique_ptr<RequestState> state,
|
||||
CefRefPtr<CefResourceHandler> handler);
|
||||
void StopRequest(scoped_ptr<RequestState> state);
|
||||
void StopRequest(std::unique_ptr<RequestState> state);
|
||||
bool IncrementProvider(RequestState* state);
|
||||
void DetachRequestFromProvider(RequestState* state);
|
||||
void GetNextValidProvider(ProviderEntryList::iterator& iterator);
|
||||
@@ -364,7 +364,7 @@ class CefResourceManager
|
||||
MimeTypeResolver mime_type_resolver_;
|
||||
|
||||
// Must be the last member. Created and accessed on the IO thread.
|
||||
scoped_ptr<base::WeakPtrFactory<CefResourceManager>> weak_ptr_factory_;
|
||||
std::unique_ptr<base::WeakPtrFactory<CefResourceManager>> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefResourceManager);
|
||||
};
|
||||
|
Reference in New Issue
Block a user