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:
Marshall Greenblatt
2021-06-17 16:08:01 -04:00
parent 5d438ced79
commit 17fc2b3e3b
141 changed files with 580 additions and 627 deletions

View File

@@ -74,7 +74,7 @@ class MediaRouteCreateCallback : public CefMediaRouteCreateCallback {
} else {
SendFailure(create_callback_, kRequestFailedError + result, error);
}
create_callback_ = NULL;
create_callback_ = nullptr;
}
private:
@@ -257,7 +257,7 @@ class MediaObserver : public CefMediaObserver {
CefRefPtr<CefMediaSource> GetSource(const std::string& source_urn) {
CefRefPtr<CefMediaSource> source = media_router_->GetSource(source_urn);
if (!source)
return NULL;
return nullptr;
return source;
}
@@ -265,7 +265,7 @@ class MediaObserver : public CefMediaObserver {
SinkInfoMap::const_iterator it = sink_info_map_.find(sink_id);
if (it != sink_info_map_.end())
return it->second->sink;
return NULL;
return nullptr;
}
void ClearSinkInfoMap() {
@@ -299,7 +299,7 @@ class MediaObserver : public CefMediaObserver {
RouteMap::const_iterator it = route_map_.find(route_id);
if (it != route_map_.end())
return it->second;
return NULL;
return nullptr;
}
void SendResponse(const std::string& name,
@@ -574,7 +574,7 @@ class Handler : public CefMessageRouterBrowserSide::Handler {
if (it != subscription_state_map_.end()) {
return it->second->observer;
}
return NULL;
return nullptr;
}
// Map of browser ID to SubscriptionState object.