mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef: Convert NULL to nullptr (see issue #2861)
This commit is contained in:
@@ -178,7 +178,7 @@ class CefApp : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -187,7 +187,7 @@ class CefApp : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -196,7 +196,7 @@ class CefApp : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -84,7 +84,7 @@ class CefBrowserProcessHandler : public virtual CefBaseRefCounted {
|
||||
// provided then printing will not be supported on the Linux platform.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPrintHandler> GetPrintHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefPrintHandler> GetPrintHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Called from any thread when work has been scheduled for the browser process
|
||||
|
@@ -66,7 +66,7 @@ class CefClient : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -74,75 +74,75 @@ class CefClient : public virtual CefBaseRefCounted {
|
||||
// implementation will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDialogHandler> GetDialogHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefDialogHandler> GetDialogHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for browser display state events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for download events. If no handler is returned downloads
|
||||
// will not be allowed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for drag events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDragHandler> GetDragHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefDragHandler> GetDragHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for find result events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFindHandler> GetFindHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefFindHandler> GetFindHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for focus events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFocusHandler> GetFocusHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefFocusHandler> GetFocusHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for JavaScript dialogs. If no handler is provided the
|
||||
// default implementation will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for keyboard events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for browser life span events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for browser load status events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for off-screen rendering events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefRenderHandler> GetRenderHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefRenderHandler> GetRenderHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for browser request events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Called when a new message is received from a different process. Return true
|
||||
|
@@ -157,7 +157,7 @@ class CefExtensionHandler : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefExtension> extension,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool include_incognito) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -65,7 +65,7 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefAccessibilityHandler> GetAccessibilityHandler() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -93,7 +93,7 @@ class CefRenderProcessHandler : public virtual CefBaseRefCounted {
|
||||
// Return the handler for browser load status events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() { return NULL; }
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Called immediately after the V8 context for a frame has been created. To
|
||||
|
@@ -119,7 +119,7 @@ class CefRequestContextHandler : public virtual CefBaseRefCounted {
|
||||
bool is_download,
|
||||
const CefString& request_initiator,
|
||||
bool& disable_default_handling) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -145,7 +145,7 @@ class CefRequestHandler : public virtual CefBaseRefCounted {
|
||||
bool is_download,
|
||||
const CefString& request_initiator,
|
||||
bool& disable_default_handling) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -72,7 +72,7 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -109,7 +109,7 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -163,7 +163,7 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefResponse> response) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -75,7 +75,7 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
virtual CefRefPtr<CefWindow> GetParentWindow(CefRefPtr<CefWindow> window,
|
||||
bool* is_menu,
|
||||
bool* can_activate_menu) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
///
|
||||
|
@@ -927,7 +927,7 @@ void CefBrowserHostImpl::GetNavigationEntries(
|
||||
CefRefPtr<CefNavigationEntryImpl> entry =
|
||||
new CefNavigationEntryImpl(controller.GetEntryAtIndex(current));
|
||||
visitor->Visit(entry.get(), true, current, total);
|
||||
entry->Detach(NULL);
|
||||
entry->Detach(nullptr);
|
||||
} else {
|
||||
// Visit all entries.
|
||||
bool cont = true;
|
||||
@@ -935,7 +935,7 @@ void CefBrowserHostImpl::GetNavigationEntries(
|
||||
CefRefPtr<CefNavigationEntryImpl> entry =
|
||||
new CefNavigationEntryImpl(controller.GetEntryAtIndex(i));
|
||||
cont = visitor->Visit(entry.get(), (i == current), i, total);
|
||||
entry->Detach(NULL);
|
||||
entry->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1554,19 +1554,19 @@ void CefBrowserHostImpl::DestroyBrowser() {
|
||||
// Disassociate the platform delegate from this browser.
|
||||
platform_delegate_->BrowserDestroyed(this);
|
||||
|
||||
registrar_.reset(NULL);
|
||||
content::WebContentsObserver::Observe(NULL);
|
||||
registrar_.reset(nullptr);
|
||||
content::WebContentsObserver::Observe(nullptr);
|
||||
if (owned_web_contents_)
|
||||
owned_web_contents_.reset(NULL);
|
||||
owned_web_contents_.reset(nullptr);
|
||||
|
||||
// Delete objects created by the platform delegate that may be referenced by
|
||||
// the WebContents.
|
||||
file_dialog_manager_.reset(NULL);
|
||||
javascript_dialog_manager_.reset(NULL);
|
||||
menu_manager_.reset(NULL);
|
||||
file_dialog_manager_.reset(nullptr);
|
||||
javascript_dialog_manager_.reset(nullptr);
|
||||
menu_manager_.reset(nullptr);
|
||||
|
||||
// Delete the platform delegate.
|
||||
platform_delegate_.reset(NULL);
|
||||
platform_delegate_.reset(nullptr);
|
||||
|
||||
CefBrowserInfoManager::GetInstance()->RemoveBrowserInfo(browser_info_);
|
||||
browser_info_->SetBrowser(nullptr);
|
||||
@@ -2869,7 +2869,7 @@ CefBrowserHostImpl::CefBrowserHostImpl(
|
||||
is_in_onsetfocus_(false),
|
||||
focus_on_editable_field_(false),
|
||||
mouse_cursor_change_disabled_(false),
|
||||
devtools_frontend_(NULL),
|
||||
devtools_frontend_(nullptr),
|
||||
extension_(extension) {
|
||||
if (opener.get() && !platform_delegate_->IsViewsHosted()) {
|
||||
// GetOpenerWindowHandle() only returns a value for non-views-hosted
|
||||
@@ -3082,7 +3082,7 @@ void CefBrowserHostImpl::OnTitleChange(const base::string16& title) {
|
||||
|
||||
void CefBrowserHostImpl::OnDevToolsWebContentsDestroyed() {
|
||||
devtools_observer_.reset();
|
||||
devtools_frontend_ = NULL;
|
||||
devtools_frontend_ = nullptr;
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::EnsureFileDialogManager() {
|
||||
|
@@ -139,7 +139,7 @@ bool CefBrowserInfoManager::CanCreateWindow(
|
||||
std::unique_ptr<CefWindowInfo> window_info(new CefWindowInfo);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
window_info->SetAsPopup(NULL, CefString());
|
||||
window_info->SetAsPopup(nullptr, CefString());
|
||||
#endif
|
||||
|
||||
auto pending_popup = std::make_unique<CefBrowserInfoManager::PendingPopup>();
|
||||
|
@@ -78,7 +78,7 @@
|
||||
|
||||
CefBrowserMainParts::CefBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters)
|
||||
: BrowserMainParts(), devtools_delegate_(NULL) {}
|
||||
: BrowserMainParts(), devtools_delegate_(nullptr) {}
|
||||
|
||||
CefBrowserMainParts::~CefBrowserMainParts() {
|
||||
constrained_window::SetConstrainedWindowViewsClient(nullptr);
|
||||
@@ -213,12 +213,12 @@ void CefBrowserMainParts::PostMainMessageLoopRun() {
|
||||
// There should be no additional references to the global CefRequestContext
|
||||
// during shutdown. Did you forget to release a CefBrowser reference?
|
||||
DCHECK(global_request_context_->HasOneRef());
|
||||
global_request_context_ = NULL;
|
||||
global_request_context_ = nullptr;
|
||||
}
|
||||
|
||||
void CefBrowserMainParts::PostDestroyThreads() {
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions::ExtensionsBrowserClient::Set(NULL);
|
||||
extensions::ExtensionsBrowserClient::Set(nullptr);
|
||||
extensions_browser_client_.reset();
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ void CefBrowserMainParts::PlatformInitialize() {
|
||||
HRESULT res;
|
||||
|
||||
// Initialize common controls.
|
||||
res = CoInitialize(NULL);
|
||||
res = CoInitialize(nullptr);
|
||||
DCHECK(SUCCEEDED(res));
|
||||
INITCOMMONCONTROLSEX InitCtrlEx;
|
||||
InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
|
||||
@@ -22,6 +22,6 @@ void CefBrowserMainParts::PlatformInitialize() {
|
||||
InitCommonControlsEx(&InitCtrlEx);
|
||||
|
||||
// Start COM stuff.
|
||||
res = OleInitialize(NULL);
|
||||
res = OleInitialize(nullptr);
|
||||
DCHECK(SUCCEEDED(res));
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ void CefBrowserMessageFilter::OnGetNewRenderThreadInfo(
|
||||
CefRefPtr<CefListValueImpl> listValuePtr(
|
||||
new CefListValueImpl(¶ms->extra_info, false, false));
|
||||
handler->OnRenderProcessThreadCreated(listValuePtr.get());
|
||||
listValuePtr->Detach(NULL);
|
||||
listValuePtr->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -72,8 +72,8 @@ void ChromeBrowserProcessStub::Shutdown() {
|
||||
// this might cause a nested message loop to run, and we don't want pending
|
||||
// tasks to run once teardown has started.
|
||||
print_job_manager_->Shutdown();
|
||||
print_job_manager_.reset(NULL);
|
||||
print_preview_dialog_controller_ = NULL;
|
||||
print_job_manager_.reset(nullptr);
|
||||
print_preview_dialog_controller_ = nullptr;
|
||||
|
||||
profile_manager_.reset();
|
||||
event_router_forwarder_ = nullptr;
|
||||
@@ -119,17 +119,17 @@ void ChromeBrowserProcessStub::FlushLocalStateAndReply(
|
||||
metrics_services_manager::MetricsServicesManager*
|
||||
ChromeBrowserProcessStub::GetMetricsServicesManager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
metrics::MetricsService* ChromeBrowserProcessStub::metrics_service() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
rappor::RapporServiceImpl* ChromeBrowserProcessStub::rappor_service() {
|
||||
// Called from PluginInfoHostImpl::ReportMetrics.
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SystemNetworkContextManager*
|
||||
@@ -141,12 +141,12 @@ ChromeBrowserProcessStub::system_network_context_manager() {
|
||||
network::NetworkQualityTracker*
|
||||
ChromeBrowserProcessStub::network_quality_tracker() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ProfileManager* ChromeBrowserProcessStub::profile_manager() {
|
||||
@@ -171,17 +171,17 @@ PrefService* ChromeBrowserProcessStub::local_state() {
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
ChromeBrowserProcessStub::shared_url_loader_factory() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
variations::VariationsService* ChromeBrowserProcessStub::variations_service() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BrowserProcessPlatformPart* ChromeBrowserProcessStub::platform_part() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
extensions::EventRouterForwarder*
|
||||
@@ -192,13 +192,13 @@ ChromeBrowserProcessStub::extension_event_router_forwarder() {
|
||||
|
||||
NotificationUIManager* ChromeBrowserProcessStub::notification_ui_manager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NotificationPlatformBridge*
|
||||
ChromeBrowserProcessStub::notification_platform_bridge() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
policy::ChromeBrowserPolicyConnector*
|
||||
@@ -216,12 +216,12 @@ policy::PolicyService* ChromeBrowserProcessStub::policy_service() {
|
||||
|
||||
IconManager* ChromeBrowserProcessStub::icon_manager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ChromeBrowserProcessStub::CreateDevToolsProtocolHandler() {
|
||||
@@ -263,7 +263,7 @@ ChromeBrowserProcessStub::background_printing_manager() {
|
||||
IntranetRedirectDetector*
|
||||
ChromeBrowserProcessStub::intranet_redirect_detector() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string& ChromeBrowserProcessStub::GetApplicationLocale() {
|
||||
@@ -277,17 +277,17 @@ void ChromeBrowserProcessStub::SetApplicationLocale(const std::string& locale) {
|
||||
|
||||
DownloadStatusUpdater* ChromeBrowserProcessStub::download_status_updater() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DownloadRequestLimiter* ChromeBrowserProcessStub::download_request_limiter() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BackgroundModeManager* ChromeBrowserProcessStub::background_mode_manager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ChromeBrowserProcessStub::set_background_mode_manager_for_test(
|
||||
@@ -297,35 +297,35 @@ void ChromeBrowserProcessStub::set_background_mode_manager_for_test(
|
||||
|
||||
StatusTray* ChromeBrowserProcessStub::status_tray() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
safe_browsing::SafeBrowsingService*
|
||||
ChromeBrowserProcessStub::safe_browsing_service() {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
safe_browsing::ClientSideDetectionService*
|
||||
ChromeBrowserProcessStub::safe_browsing_detection_service() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
subresource_filter::RulesetService*
|
||||
ChromeBrowserProcessStub::subresource_filter_ruleset_service() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
optimization_guide::OptimizationGuideService*
|
||||
ChromeBrowserProcessStub::optimization_guide_service() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
StartupData* ChromeBrowserProcessStub::startup_data() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
@@ -335,38 +335,38 @@ void ChromeBrowserProcessStub::StartAutoupdateTimer() {}
|
||||
component_updater::ComponentUpdateService*
|
||||
ChromeBrowserProcessStub::component_updater() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MediaFileSystemRegistry*
|
||||
ChromeBrowserProcessStub::media_file_system_registry() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
WebRtcLogUploader* ChromeBrowserProcessStub::webrtc_log_uploader() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
network_time::NetworkTimeTracker*
|
||||
ChromeBrowserProcessStub::network_time_tracker() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
gcm::GCMDriver* ChromeBrowserProcessStub::gcm_driver() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
resource_coordinator::TabManager* ChromeBrowserProcessStub::GetTabManager() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
resource_coordinator::ResourceCoordinatorParts*
|
||||
ChromeBrowserProcessStub::resource_coordinator_parts() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ Profile::ProfileType ChromeProfileStub::GetProfileType() const {
|
||||
|
||||
Profile* ChromeProfileStub::GetOffTheRecordProfile() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ChromeProfileStub::DestroyOffTheRecordProfile() {
|
||||
@@ -70,12 +70,12 @@ bool ChromeProfileStub::IsLegacySupervised() const {
|
||||
ExtensionSpecialStoragePolicy*
|
||||
ChromeProfileStub::GetExtensionSpecialStoragePolicy() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PrefService* ChromeProfileStub::GetOffTheRecordPrefs() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ChromeProfileStub::IsSameProfile(Profile* profile) {
|
||||
|
@@ -264,7 +264,7 @@ class CefSelectClientCertificateCallbackImpl
|
||||
// If Select has not been called, call it with NULL to continue without any
|
||||
// client certificate.
|
||||
if (delegate_)
|
||||
DoSelect(NULL);
|
||||
DoSelect(nullptr);
|
||||
}
|
||||
|
||||
void Select(CefRefPtr<CefX509Certificate> cert) override {
|
||||
@@ -393,7 +393,7 @@ int GetCrashSignalFD(const base::CommandLine& command_line) {
|
||||
|
||||
// Extensions have the same process type as renderers.
|
||||
if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost("extension");
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
@@ -403,21 +403,21 @@ int GetCrashSignalFD(const base::CommandLine& command_line) {
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
if (process_type == switches::kRendererProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
if (process_type == switches::kPpapiPluginProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
if (process_type == switches::kGpuProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
@@ -501,7 +501,8 @@ void BindPluginInfoHost(
|
||||
|
||||
} // namespace
|
||||
|
||||
CefContentBrowserClient::CefContentBrowserClient() : browser_main_parts_(NULL) {
|
||||
CefContentBrowserClient::CefContentBrowserClient()
|
||||
: browser_main_parts_(nullptr) {
|
||||
plugin_service_filter_.reset(new CefPluginServiceFilter);
|
||||
content::PluginServiceImpl::GetInstance()->SetFilter(
|
||||
plugin_service_filter_.get());
|
||||
@@ -835,7 +836,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
CefRefPtr<CefCommandLineImpl> commandLinePtr(
|
||||
new CefCommandLineImpl(command_line, false, false));
|
||||
handler->OnBeforeChildProcessLaunch(commandLinePtr.get());
|
||||
commandLinePtr->Detach(NULL);
|
||||
commandLinePtr->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -902,7 +903,7 @@ CefContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
|
||||
if (command_line->HasSwitch(switches::kEnableSpeechInput))
|
||||
return new CefSpeechRecognitionManagerDelegate();
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
content::GeneratedCodeCacheSettings
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
CefContext* g_context = NULL;
|
||||
CefContext* g_context = nullptr;
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
// When the process terminates check if CefShutdown() has been called.
|
||||
@@ -201,7 +201,7 @@ int CefExecuteProcess(const CefMainArgs& args,
|
||||
// Execute the secondary process.
|
||||
#if defined(OS_WIN)
|
||||
sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
||||
if (windows_sandbox_info == NULL) {
|
||||
if (windows_sandbox_info == nullptr) {
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
windows_sandbox_info = &sandbox_info;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ void CefShutdown() {
|
||||
|
||||
// Delete the global context object.
|
||||
delete g_context;
|
||||
g_context = NULL;
|
||||
g_context = nullptr;
|
||||
}
|
||||
|
||||
void CefDoMessageLoopWork() {
|
||||
@@ -391,7 +391,7 @@ bool CefContext::Initialize(const CefMainArgs& args,
|
||||
content::ContentMainParams params(main_delegate_.get());
|
||||
#if defined(OS_WIN)
|
||||
sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
||||
if (windows_sandbox_info == NULL) {
|
||||
if (windows_sandbox_info == nullptr) {
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
windows_sandbox_info = &sandbox_info;
|
||||
settings_.no_sandbox = true;
|
||||
@@ -481,7 +481,7 @@ void CefContext::Shutdown() {
|
||||
FinalizeShutdown();
|
||||
} else {
|
||||
// Finish shutdown on the current thread, which should be the UI thread.
|
||||
FinishShutdownOnUIThread(NULL);
|
||||
FinishShutdownOnUIThread(nullptr);
|
||||
|
||||
FinalizeShutdown();
|
||||
}
|
||||
@@ -513,7 +513,7 @@ SkColor CefContext::GetBackgroundColor(
|
||||
CefTraceSubscriber* CefContext::GetTraceSubscriber() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (shutting_down_)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
if (!trace_subscriber_.get())
|
||||
trace_subscriber_.reset(new CefTraceSubscriber());
|
||||
return trace_subscriber_.get();
|
||||
@@ -607,7 +607,7 @@ void CefContext::FinishShutdownOnUIThread(
|
||||
observer.OnContextDestroyed();
|
||||
|
||||
if (trace_subscriber_.get())
|
||||
trace_subscriber_.reset(NULL);
|
||||
trace_subscriber_.reset(nullptr);
|
||||
|
||||
static_cast<ChromeBrowserProcessStub*>(g_browser_process)->Shutdown();
|
||||
|
||||
@@ -631,11 +631,11 @@ void CefContext::FinalizeShutdown() {
|
||||
// Shut down the content runner.
|
||||
service_manager::MainShutdown(*sm_main_params_);
|
||||
|
||||
browser_info_manager_.reset(NULL);
|
||||
sm_main_params_.reset(NULL);
|
||||
sm_main_delegate_.reset(NULL);
|
||||
main_delegate_.reset(NULL);
|
||||
browser_info_manager_.reset(nullptr);
|
||||
sm_main_params_.reset(nullptr);
|
||||
sm_main_delegate_.reset(nullptr);
|
||||
main_delegate_.reset(nullptr);
|
||||
|
||||
delete g_browser_process;
|
||||
g_browser_process = NULL;
|
||||
g_browser_process = nullptr;
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ CefContextMenuParamsImpl::CefContextMenuParamsImpl(
|
||||
content::ContextMenuParams* value)
|
||||
: CefValueBase<CefContextMenuParams, content::ContextMenuParams>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
kOwnerNoDelete,
|
||||
true,
|
||||
new CefValueControllerNonThreadSafe()) {
|
||||
|
@@ -154,12 +154,13 @@ void CefDevToolsFileManager::FileSavedAs(const std::string& url,
|
||||
base::Value url_value(url);
|
||||
base::Value file_system_path_value(file_system_path);
|
||||
CallClientFunction("DevToolsAPI.savedURL", &url_value,
|
||||
&file_system_path_value, NULL);
|
||||
&file_system_path_value, nullptr);
|
||||
}
|
||||
|
||||
void CefDevToolsFileManager::CanceledFileSaveAs(const std::string& url) {
|
||||
base::Value url_value(url);
|
||||
CallClientFunction("DevToolsAPI.canceledSaveURL", &url_value, NULL, NULL);
|
||||
CallClientFunction("DevToolsAPI.canceledSaveURL", &url_value, nullptr,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void CefDevToolsFileManager::Append(const std::string& url,
|
||||
@@ -175,7 +176,7 @@ void CefDevToolsFileManager::Append(const std::string& url,
|
||||
|
||||
void CefDevToolsFileManager::AppendedTo(const std::string& url) {
|
||||
base::Value url_value(url);
|
||||
CallClientFunction("DevToolsAPI.appendedToURL", &url_value, NULL, NULL);
|
||||
CallClientFunction("DevToolsAPI.appendedToURL", &url_value, nullptr, nullptr);
|
||||
}
|
||||
|
||||
void CefDevToolsFileManager::CallClientFunction(
|
||||
|
@@ -209,7 +209,7 @@ void CefDevToolsFrontend::DisconnectFromTarget() {
|
||||
if (!agent_host_)
|
||||
return;
|
||||
agent_host_->DetachClient(this);
|
||||
agent_host_ = NULL;
|
||||
agent_host_ = nullptr;
|
||||
}
|
||||
|
||||
CefDevToolsFrontend::CefDevToolsFrontend(
|
||||
@@ -274,8 +274,8 @@ void CefDevToolsFrontend::WebContentsDestroyed() {
|
||||
void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) {
|
||||
std::string method;
|
||||
base::ListValue* params = NULL;
|
||||
base::DictionaryValue* dict = NULL;
|
||||
base::ListValue* params = nullptr;
|
||||
base::DictionaryValue* dict = nullptr;
|
||||
base::Optional<base::Value> parsed_message = base::JSONReader::Read(message);
|
||||
if (!parsed_message || !parsed_message->GetAsDictionary(&dict) ||
|
||||
!dict->GetString("method", &method)) {
|
||||
|
@@ -12,7 +12,7 @@
|
||||
CefDownloadItemImpl::CefDownloadItemImpl(download::DownloadItem* value)
|
||||
: CefValueBase<CefDownloadItem, download::DownloadItem>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
kOwnerNoDelete,
|
||||
true,
|
||||
new CefValueControllerNonThreadSafe()) {
|
||||
|
@@ -34,7 +34,7 @@ CefRefPtr<CefDownloadHandler> GetDownloadHandler(
|
||||
CefRefPtr<CefClient> client = browser->GetClient();
|
||||
if (client.get())
|
||||
return client->GetDownloadHandler();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// CefBeforeDownloadCallback implementation.
|
||||
@@ -262,7 +262,7 @@ CefDownloadManagerDelegate::CefDownloadManagerDelegate(DownloadManager* manager)
|
||||
|
||||
CefDownloadManagerDelegate::~CefDownloadManagerDelegate() {
|
||||
if (manager_) {
|
||||
manager_->SetDelegate(NULL);
|
||||
manager_->SetDelegate(nullptr);
|
||||
manager_->RemoveObserver(this);
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ void CefDownloadManagerDelegate::OnDownloadUpdated(DownloadItem* download) {
|
||||
|
||||
handler->OnDownloadUpdated(browser.get(), download_item.get(), callback);
|
||||
|
||||
download_item->Detach(NULL);
|
||||
download_item->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,10 +339,10 @@ void CefDownloadManagerDelegate::OnDownloadCreated(DownloadManager* manager,
|
||||
|
||||
void CefDownloadManagerDelegate::ManagerGoingDown(DownloadManager* manager) {
|
||||
DCHECK_EQ(manager, manager_);
|
||||
manager->SetDelegate(NULL);
|
||||
manager->SetDelegate(nullptr);
|
||||
manager->RemoveObserver(this);
|
||||
manager_ptr_factory_.InvalidateWeakPtrs();
|
||||
manager_ = NULL;
|
||||
manager_ = nullptr;
|
||||
}
|
||||
|
||||
bool CefDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
@@ -377,7 +377,7 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
handler->OnBeforeDownload(browser.get(), download_item.get(),
|
||||
suggested_name.value(), callbackObj);
|
||||
|
||||
download_item->Detach(NULL);
|
||||
download_item->Detach(nullptr);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -110,7 +110,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
|
||||
return set_init_result(VALIDATION_FAILURE);
|
||||
|
||||
// |details| are not optional.
|
||||
base::DictionaryValue* details_value = NULL;
|
||||
base::DictionaryValue* details_value = nullptr;
|
||||
if (!args_->GetDictionary(1, &details_value))
|
||||
return set_init_result(VALIDATION_FAILURE);
|
||||
std::unique_ptr<InjectDetails> details(new InjectDetails());
|
||||
@@ -282,7 +282,8 @@ bool TabsSetZoomFunction::RunAsync() {
|
||||
|
||||
zoom::ZoomController* zoom_controller =
|
||||
zoom::ZoomController::FromWebContents(web_contents);
|
||||
double zoom_level = params->zoom_factor > 0
|
||||
double zoom_level =
|
||||
params->zoom_factor > 0
|
||||
? blink::PageZoomFactorToZoomLevel(params->zoom_factor)
|
||||
: zoom_controller->GetDefaultZoomLevel();
|
||||
|
||||
@@ -384,8 +385,9 @@ bool TabsGetZoomSettingsFunction::RunAsync() {
|
||||
zoom::ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode();
|
||||
api::tabs::ZoomSettings zoom_settings;
|
||||
ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
|
||||
zoom_settings.default_zoom_factor.reset(new double(
|
||||
blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
|
||||
zoom_settings.default_zoom_factor.reset(
|
||||
new double(blink::PageZoomLevelToZoomFactor(
|
||||
zoom_controller->GetDefaultZoomLevel())));
|
||||
|
||||
results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
|
||||
SendResponse(true);
|
||||
|
@@ -42,7 +42,7 @@ content::WebContents* GetFullPageGuestForOwnerContents(
|
||||
if (plugin_guest)
|
||||
return plugin_guest->web_contents();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GetAllGuestsForOwnerContents(content::WebContents* owner,
|
||||
@@ -77,7 +77,7 @@ CefRefPtr<CefBrowserHostImpl> GetOwnerBrowserForFrameRoute(
|
||||
content::RenderFrameHost::FromID(render_process_id, render_routing_id);
|
||||
if (host)
|
||||
return GetOwnerBrowserForHost(host, is_guest_view);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} else {
|
||||
// Use the thread-safe approach.
|
||||
scoped_refptr<CefBrowserInfo> info =
|
||||
@@ -93,7 +93,7 @@ CefRefPtr<CefBrowserHostImpl> GetOwnerBrowserForFrameRoute(
|
||||
}
|
||||
return browser;
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -373,7 +373,7 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab(
|
||||
create_params.window_info.reset(new CefWindowInfo);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
create_params.window_info->SetAsPopup(NULL, CefString());
|
||||
create_params.window_info->SetAsPopup(nullptr, CefString());
|
||||
#endif
|
||||
|
||||
// Start with the active browser's settings.
|
||||
|
@@ -27,7 +27,7 @@ content::JavaScriptDialogManager*
|
||||
CefExtensionHostDelegate::GetJavaScriptDialogManager() {
|
||||
// Never routed here from CefBrowserHostImpl.
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefExtensionHostDelegate::CreateTab(
|
||||
|
@@ -63,11 +63,12 @@ namespace {
|
||||
std::unique_ptr<base::DictionaryValue> ParseManifest(
|
||||
const std::string& manifest_contents) {
|
||||
JSONStringValueDeserializer deserializer(manifest_contents);
|
||||
std::unique_ptr<base::Value> manifest(deserializer.Deserialize(NULL, NULL));
|
||||
std::unique_ptr<base::Value> manifest(
|
||||
deserializer.Deserialize(nullptr, nullptr));
|
||||
|
||||
if (!manifest.get() || !manifest->is_dict()) {
|
||||
LOG(ERROR) << "Failed to parse extension manifest.";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
// Transfer ownership to the caller.
|
||||
return base::WrapUnique(
|
||||
|
@@ -27,7 +27,7 @@ AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate()
|
||||
const {
|
||||
// TODO(extensions): Implement to support Apps.
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<guest_view::GuestViewManagerDelegate>
|
||||
|
@@ -65,7 +65,7 @@ bool CefExtensionsBrowserClient::AreExtensionsDisabled(
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
|
||||
return GetOriginalContext(context) != NULL;
|
||||
return GetOriginalContext(context) != nullptr;
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsSameContext(BrowserContext* first,
|
||||
@@ -83,7 +83,7 @@ bool CefExtensionsBrowserClient::HasOffTheRecordContext(
|
||||
|
||||
BrowserContext* CefExtensionsBrowserClient::GetOffTheRecordContext(
|
||||
BrowserContext* context) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BrowserContext* CefExtensionsBrowserClient::GetOriginalContext(
|
||||
@@ -159,7 +159,7 @@ void CefExtensionsBrowserClient::GetEarlyExtensionPrefsObservers(
|
||||
|
||||
ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
|
||||
const {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<ExtensionHostDelegate>
|
||||
@@ -291,7 +291,7 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
|
||||
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
|
||||
// Only used by Chrome via ExtensionService.
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsBackgroundUpdateAllowed() {
|
||||
@@ -311,7 +311,7 @@ CefExtensionsBrowserClient::GetExtensionWebContentsObserver(
|
||||
|
||||
KioskDelegate* CefExtensionsBrowserClient::GetKioskDelegate() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsLockScreenContext(
|
||||
|
@@ -61,7 +61,7 @@ ValueStore::ReadResult CefValueStore::Get(
|
||||
auto settings = std::make_unique<base::DictionaryValue>();
|
||||
for (std::vector<std::string>::const_iterator it = keys.begin();
|
||||
it != keys.end(); ++it) {
|
||||
base::Value* value = NULL;
|
||||
base::Value* value = nullptr;
|
||||
if (storage_.GetWithoutPathExpansion(*it, &value)) {
|
||||
settings->SetWithoutPathExpansion(*it, value->CreateDeepCopy());
|
||||
}
|
||||
@@ -94,7 +94,7 @@ ValueStore::WriteResult CefValueStore::Set(
|
||||
std::unique_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
|
||||
for (base::DictionaryValue::Iterator it(settings); !it.IsAtEnd();
|
||||
it.Advance()) {
|
||||
base::Value* old_value = NULL;
|
||||
base::Value* old_value = nullptr;
|
||||
if (!storage_.GetWithoutPathExpansion(it.key(), &old_value) ||
|
||||
!old_value->Equals(&it.value())) {
|
||||
changes->push_back(ValueStoreChange(
|
||||
|
@@ -156,7 +156,7 @@ CefFileDialogManager::~CefFileDialogManager() {}
|
||||
|
||||
void CefFileDialogManager::Destroy() {
|
||||
DCHECK(!file_chooser_pending_);
|
||||
runner_.reset(NULL);
|
||||
runner_.reset(nullptr);
|
||||
}
|
||||
|
||||
void CefFileDialogManager::RunFileDialog(
|
||||
|
@@ -72,7 +72,7 @@ CefJavaScriptDialogManager::~CefJavaScriptDialogManager() {}
|
||||
|
||||
void CefJavaScriptDialogManager::Destroy() {
|
||||
if (runner_.get()) {
|
||||
runner_.reset(NULL);
|
||||
runner_.reset(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ const blink::MediaStreamDevice* FindDefaultDeviceWithId(
|
||||
const blink::MediaStreamDevices& devices,
|
||||
const std::string& device_id) {
|
||||
if (devices.empty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
blink::MediaStreamDevices::const_iterator iter = devices.begin();
|
||||
for (; iter != devices.end(); ++iter) {
|
||||
|
@@ -91,7 +91,7 @@ CefMenuManager::CefMenuManager(CefBrowserHostImpl* browser,
|
||||
: content::WebContentsObserver(browser->web_contents()),
|
||||
browser_(browser),
|
||||
runner_(std::move(runner)),
|
||||
custom_menu_callback_(NULL),
|
||||
custom_menu_callback_(nullptr),
|
||||
weak_ptr_factory_(this) {
|
||||
DCHECK(web_contents());
|
||||
model_ = new CefMenuModelImpl(this, nullptr, false);
|
||||
@@ -100,13 +100,13 @@ CefMenuManager::CefMenuManager(CefBrowserHostImpl* browser,
|
||||
CefMenuManager::~CefMenuManager() {
|
||||
// The model may outlive the delegate if the context menu is visible when the
|
||||
// application is closed.
|
||||
model_->set_delegate(NULL);
|
||||
model_->set_delegate(nullptr);
|
||||
}
|
||||
|
||||
void CefMenuManager::Destroy() {
|
||||
CancelContextMenu();
|
||||
if (runner_)
|
||||
runner_.reset(NULL);
|
||||
runner_.reset(nullptr);
|
||||
}
|
||||
|
||||
bool CefMenuManager::IsShowingContextMenu() {
|
||||
@@ -166,13 +166,13 @@ bool CefMenuManager::CreateContextMenu(
|
||||
} else {
|
||||
// Callback should not be executed if the handler returns false.
|
||||
DCHECK(custom_menu_callback_);
|
||||
custom_menu_callback_ = NULL;
|
||||
custom_menu_callback_ = nullptr;
|
||||
callbackImpl->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// Do not keep references to the parameters in the callback.
|
||||
paramsPtr->Detach(NULL);
|
||||
paramsPtr->Detach(nullptr);
|
||||
DCHECK(paramsPtr->HasOneRef());
|
||||
DCHECK(model_->VerifyRefCount());
|
||||
|
||||
@@ -214,7 +214,7 @@ void CefMenuManager::ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
|
||||
event_flags);
|
||||
|
||||
// Do not keep references to the parameters in the callback.
|
||||
paramsPtr->Detach(NULL);
|
||||
paramsPtr->Detach(nullptr);
|
||||
DCHECK(paramsPtr->HasOneRef());
|
||||
|
||||
if (handled)
|
||||
@@ -280,7 +280,7 @@ void CefMenuManager::ExecuteCommandCallback(int command_id,
|
||||
if (command_id != kInvalidCommandId)
|
||||
ExecuteCommand(model_, command_id, event_flags);
|
||||
MenuClosed(model_);
|
||||
custom_menu_callback_ = NULL;
|
||||
custom_menu_callback_ = nullptr;
|
||||
}
|
||||
|
||||
void CefMenuManager::CreateDefaultModel() {
|
||||
|
@@ -107,7 +107,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
||||
bool GetIconAt(int index, gfx::Image* icon) const override { return false; }
|
||||
|
||||
ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const override {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool IsEnabledAt(int index) const override {
|
||||
@@ -128,7 +128,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
||||
CefRefPtr<CefMenuModel> submenu = impl_->GetSubMenuAt(index);
|
||||
if (submenu.get())
|
||||
return static_cast<CefMenuModelImpl*>(submenu.get())->model();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void MouseOutsideMenu(const gfx::Point& screen_point) override {
|
||||
@@ -304,7 +304,7 @@ bool CefMenuModelImpl::AddRadioItem(int command_id,
|
||||
CefRefPtr<CefMenuModel> CefMenuModelImpl::AddSubMenu(int command_id,
|
||||
const CefString& label) {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Item item(MENUITEMTYPE_SUBMENU, command_id, label, kInvalidGroupId);
|
||||
item.submenu_ = new CefMenuModelImpl(delegate_, menu_model_delegate_, true);
|
||||
@@ -360,7 +360,7 @@ CefRefPtr<CefMenuModel> CefMenuModelImpl::InsertSubMenuAt(
|
||||
int command_id,
|
||||
const CefString& label) {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Item item(MENUITEMTYPE_SUBMENU, command_id, label, kInvalidGroupId);
|
||||
item.submenu_ = new CefMenuModelImpl(delegate_, menu_model_delegate_, true);
|
||||
@@ -490,11 +490,11 @@ CefRefPtr<CefMenuModel> CefMenuModelImpl::GetSubMenu(int command_id) {
|
||||
|
||||
CefRefPtr<CefMenuModel> CefMenuModelImpl::GetSubMenuAt(int index) {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (index >= 0 && index < static_cast<int>(items_.size()))
|
||||
return items_[index].submenu_.get();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefMenuModelImpl::IsVisible(int command_id) {
|
||||
|
@@ -382,7 +382,7 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateWheelEvent(
|
||||
CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const {
|
||||
if (!event.os_event)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return const_cast<CefEventHandle>(
|
||||
static_cast<CefEventHandle>(event.os_event->native_event()));
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ void Menu2::CancelMenu() {
|
||||
}
|
||||
|
||||
void Menu2::Rebuild() {
|
||||
wrapper_->Rebuild(NULL);
|
||||
wrapper_->Rebuild(nullptr);
|
||||
}
|
||||
|
||||
void Menu2::UpdateStates() {
|
||||
|
@@ -26,7 +26,7 @@ bool CefMenuRunnerLinux::RunContextMenu(
|
||||
if (!browser->IsWindowless())
|
||||
parent_widget = browser->GetWindowWidget();
|
||||
|
||||
menu_->RunMenuAt(parent_widget, NULL, gfx::Rect(screen_point, gfx::Size()),
|
||||
menu_->RunMenuAt(parent_widget, nullptr, gfx::Rect(screen_point, gfx::Size()),
|
||||
views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE);
|
||||
|
||||
return true;
|
||||
|
@@ -18,8 +18,8 @@ bool CefMenuRunnerWin::RunContextMenu(
|
||||
CefMenuModelImpl* model,
|
||||
const content::ContextMenuParams& params) {
|
||||
// Create a menu based on the model.
|
||||
menu_.reset(new views::CefNativeMenuWin(model->model(), NULL));
|
||||
menu_->Rebuild(NULL);
|
||||
menu_.reset(new views::CefNativeMenuWin(model->model(), nullptr));
|
||||
menu_->Rebuild(nullptr);
|
||||
|
||||
// Make sure events can be pumped while the menu is up.
|
||||
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
|
||||
|
@@ -401,7 +401,7 @@ class CefNativeMenuWin::MenuHostWindow {
|
||||
|
||||
struct CefNativeMenuWin::HighlightedMenuItemInfo {
|
||||
HighlightedMenuItemInfo()
|
||||
: has_parent(false), has_submenu(false), menu(NULL), position(-1) {}
|
||||
: has_parent(false), has_submenu(false), menu(nullptr), position(-1) {}
|
||||
|
||||
bool has_parent;
|
||||
bool has_submenu;
|
||||
@@ -420,16 +420,16 @@ const wchar_t* CefNativeMenuWin::MenuHostWindow::kWindowClassName =
|
||||
|
||||
CefNativeMenuWin::CefNativeMenuWin(ui::MenuModel* model, HWND system_menu_for)
|
||||
: model_(model),
|
||||
menu_(NULL),
|
||||
menu_(nullptr),
|
||||
owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL) &&
|
||||
!system_menu_for),
|
||||
system_menu_for_(system_menu_for),
|
||||
first_item_index_(0),
|
||||
menu_action_(MENU_ACTION_NONE),
|
||||
menu_to_select_(NULL),
|
||||
menu_to_select_(nullptr),
|
||||
position_to_select_(-1),
|
||||
parent_(NULL),
|
||||
destroyed_flag_(NULL),
|
||||
parent_(nullptr),
|
||||
destroyed_flag_(nullptr),
|
||||
menu_to_select_factory_(this) {}
|
||||
|
||||
CefNativeMenuWin::~CefNativeMenuWin() {
|
||||
@@ -458,7 +458,7 @@ void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
||||
|
||||
// Command dispatch is done through WM_MENUCOMMAND, handled by the host
|
||||
// window.
|
||||
menu_to_select_ = NULL;
|
||||
menu_to_select_ = nullptr;
|
||||
position_to_select_ = -1;
|
||||
menu_to_select_factory_.InvalidateWeakPtrs();
|
||||
bool destroyed = false;
|
||||
@@ -467,10 +467,10 @@ void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
||||
TrackPopupMenu(menu_, flags, point.x(), point.y(), 0, host_window_->hwnd(),
|
||||
NULL);
|
||||
UnhookWindowsHookEx(hhook);
|
||||
open_native_menu_win_ = NULL;
|
||||
open_native_menu_win_ = nullptr;
|
||||
if (destroyed)
|
||||
return;
|
||||
destroyed_flag_ = NULL;
|
||||
destroyed_flag_ = nullptr;
|
||||
if (menu_to_select_) {
|
||||
// Folks aren't too happy if we notify immediately. In particular, notifying
|
||||
// the delegate can cause destruction leaving the stack in a weird
|
||||
@@ -542,7 +542,7 @@ void CefNativeMenuWin::SetMinimumWidth(int width) {
|
||||
// CefNativeMenuWin, private:
|
||||
|
||||
// static
|
||||
CefNativeMenuWin* CefNativeMenuWin::open_native_menu_win_ = NULL;
|
||||
CefNativeMenuWin* CefNativeMenuWin::open_native_menu_win_ = nullptr;
|
||||
|
||||
void CefNativeMenuWin::DelayedSelect() {
|
||||
if (menu_to_select_)
|
||||
|
@@ -17,7 +17,7 @@ CefWindowDelegateView::CefWindowDelegateView(
|
||||
bool always_on_top,
|
||||
base::RepeatingClosure on_bounds_changed)
|
||||
: background_color_(background_color),
|
||||
web_view_(NULL),
|
||||
web_view_(nullptr),
|
||||
always_on_top_(always_on_top),
|
||||
on_bounds_changed_(on_bounds_changed) {}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ const char kUTF8String[] = "UTF8_STRING";
|
||||
::Window top_level_window = window;
|
||||
::Window root = x11::None;
|
||||
::Window parent = x11::None;
|
||||
::Window* children = NULL;
|
||||
::Window* children = nullptr;
|
||||
unsigned int nchildren = 0;
|
||||
// Enumerate all parents of "window" to find the highest level window
|
||||
// that either:
|
||||
@@ -77,7 +77,7 @@ const char kUTF8String[] = "UTF8_STRING";
|
||||
|
||||
CEF_EXPORT XDisplay* cef_get_xdisplay() {
|
||||
if (!CEF_CURRENTLY_ON(CEF_UIT))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return gfx::GetXDisplay();
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() {
|
||||
views::DesktopWindowTreeHostLinux::GetHostForWidget(child));
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefWindowX11::CanDispatchEvent(const ui::PlatformEvent& event) {
|
||||
|
@@ -13,7 +13,7 @@
|
||||
CefNavigationEntryImpl::CefNavigationEntryImpl(content::NavigationEntry* value)
|
||||
: CefValueBase<CefNavigationEntry, content::NavigationEntry>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
kOwnerNoDelete,
|
||||
false,
|
||||
new CefValueControllerNonThreadSafe()) {
|
||||
|
@@ -163,7 +163,7 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
|
||||
if (action.string_piece.empty()) {
|
||||
NOTREACHED() << "Failed to load internal resource for id: "
|
||||
<< action.resource_id << " URL: " << url.spec().c_str();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -588,13 +588,13 @@ bool CefBrowserURLRequest::Start() {
|
||||
|
||||
CefRefPtr<CefRequest> CefBrowserURLRequest::GetRequest() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->request();
|
||||
}
|
||||
|
||||
CefRefPtr<CefURLRequestClient> CefBrowserURLRequest::GetClient() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->client();
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ CefURLRequest::ErrorCode CefBrowserURLRequest::GetRequestError() {
|
||||
|
||||
CefRefPtr<CefResponse> CefBrowserURLRequest::GetResponse() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->response();
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ class AuthCallbackImpl : public CefAuthCallback {
|
||||
|
||||
if (delegate_) {
|
||||
delegate_->Continue(username, password);
|
||||
delegate_ = NULL;
|
||||
delegate_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class AuthCallbackImpl : public CefAuthCallback {
|
||||
|
||||
if (delegate_) {
|
||||
delegate_->Cancel();
|
||||
delegate_ = NULL;
|
||||
delegate_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -167,10 +167,10 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
pending_resize_(false),
|
||||
pending_resize_force_(false),
|
||||
render_widget_host_(content::RenderWidgetHostImpl::From(widget)),
|
||||
has_parent_(parent_host_view != NULL),
|
||||
has_parent_(parent_host_view != nullptr),
|
||||
parent_host_view_(parent_host_view),
|
||||
popup_host_view_(NULL),
|
||||
child_host_view_(NULL),
|
||||
popup_host_view_(nullptr),
|
||||
child_host_view_(nullptr),
|
||||
is_showing_(false),
|
||||
is_destroyed_(false),
|
||||
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
|
||||
@@ -728,7 +728,7 @@ content::BrowserAccessibilityManager*
|
||||
CefRenderWidgetHostViewOSR::CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate,
|
||||
bool for_root_frame) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ImeSetComposition(
|
||||
@@ -1473,21 +1473,21 @@ void CefRenderWidgetHostViewOSR::CancelWidget() {
|
||||
browser_impl_->client()->GetRenderHandler();
|
||||
CHECK(handler);
|
||||
handler->OnPopupShow(browser_impl_.get(), false);
|
||||
browser_impl_ = NULL;
|
||||
browser_impl_ = nullptr;
|
||||
}
|
||||
|
||||
if (parent_host_view_) {
|
||||
if (parent_host_view_->popup_host_view_ == this) {
|
||||
parent_host_view_->set_popup_host_view(NULL);
|
||||
parent_host_view_->set_popup_host_view(nullptr);
|
||||
} else if (parent_host_view_->child_host_view_ == this) {
|
||||
parent_host_view_->set_child_host_view(NULL);
|
||||
parent_host_view_->set_child_host_view(nullptr);
|
||||
|
||||
// Start rendering the parent view again.
|
||||
parent_host_view_->Show();
|
||||
} else {
|
||||
parent_host_view_->RemoveGuestHostView(this);
|
||||
}
|
||||
parent_host_view_ = NULL;
|
||||
parent_host_view_ = nullptr;
|
||||
}
|
||||
|
||||
if (render_widget_host_ && !is_destroyed_) {
|
||||
|
@@ -21,7 +21,7 @@ CefWebContentsViewOSR::CefWebContentsViewOSR(SkColor background_color,
|
||||
: background_color_(background_color),
|
||||
use_shared_texture_(use_shared_texture),
|
||||
use_external_begin_frame_(use_external_begin_frame),
|
||||
web_contents_(NULL) {}
|
||||
web_contents_(nullptr) {}
|
||||
|
||||
CefWebContentsViewOSR::~CefWebContentsViewOSR() {}
|
||||
|
||||
@@ -88,7 +88,7 @@ void CefWebContentsViewOSR::TakeFocus(bool reverse) {
|
||||
}
|
||||
|
||||
content::DropData* CefWebContentsViewOSR::GetDropData() const {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
gfx::Rect CefWebContentsViewOSR::GetViewBounds() const {
|
||||
|
@@ -327,7 +327,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
void PopulateWebPreferences(content::RenderViewHost* rvh,
|
||||
content::WebPreferences& web) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
extensions::GetOwnerBrowserForHost(rvh, NULL);
|
||||
extensions::GetOwnerBrowserForHost(rvh, nullptr);
|
||||
|
||||
// Set defaults for preferences that are not handled by PrefService.
|
||||
SetDefaultPrefs(web);
|
||||
|
@@ -36,7 +36,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnPrintContinue(settings);
|
||||
dialog_ = NULL;
|
||||
dialog_ = nullptr;
|
||||
}
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT, base::Bind(&CefPrintDialogCallbackImpl::Continue,
|
||||
@@ -48,7 +48,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnPrintCancel();
|
||||
dialog_ = NULL;
|
||||
dialog_ = nullptr;
|
||||
}
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
@@ -56,7 +56,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
|
||||
}
|
||||
}
|
||||
|
||||
void Disconnect() { dialog_ = NULL; }
|
||||
void Disconnect() { dialog_ = nullptr; }
|
||||
|
||||
private:
|
||||
CefRefPtr<CefPrintDialogLinux> dialog_;
|
||||
@@ -74,7 +74,7 @@ class CefPrintJobCallbackImpl : public CefPrintJobCallback {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnJobCompleted();
|
||||
dialog_ = NULL;
|
||||
dialog_ = nullptr;
|
||||
}
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
@@ -82,7 +82,7 @@ class CefPrintJobCallbackImpl : public CefPrintJobCallback {
|
||||
}
|
||||
}
|
||||
|
||||
void Disconnect() { dialog_ = NULL; }
|
||||
void Disconnect() { dialog_ = nullptr; }
|
||||
|
||||
private:
|
||||
CefRefPtr<CefPrintDialogLinux> dialog_;
|
||||
@@ -151,7 +151,7 @@ void CefPrintDialogLinux::OnPrintStart(int render_process_id,
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
extensions::GetOwnerBrowserForFrameRoute(render_process_id,
|
||||
render_routing_id, NULL);
|
||||
render_routing_id, nullptr);
|
||||
if (browser.get())
|
||||
handler->OnPrintStart(browser.get());
|
||||
}
|
||||
@@ -160,7 +160,7 @@ CefPrintDialogLinux::CefPrintDialogLinux(PrintingContextLinux* context)
|
||||
: context_(context) {
|
||||
DCHECK(context_);
|
||||
browser_ = extensions::GetOwnerBrowserForFrameRoute(
|
||||
context_->render_process_id(), context_->render_frame_id(), NULL);
|
||||
context_->render_process_id(), context_->render_frame_id(), nullptr);
|
||||
DCHECK(browser_);
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ void CefPrintDialogLinux::SetHandler() {
|
||||
void CefPrintDialogLinux::ReleaseHandler() {
|
||||
if (handler_.get()) {
|
||||
handler_->OnPrintReset(browser_.get());
|
||||
handler_ = NULL;
|
||||
handler_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -144,7 +144,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::GetGlobalContext() {
|
||||
// Verify that the context is in a valid state.
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
NOTREACHED() << "context not valid";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRequestContextImpl::Config config;
|
||||
@@ -159,7 +159,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
|
||||
// Verify that the context is in a valid state.
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
NOTREACHED() << "context not valid";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRequestContextImpl::Config config;
|
||||
@@ -176,11 +176,11 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
|
||||
// Verify that the context is in a valid state.
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
NOTREACHED() << "context not valid";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!other.get())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
CefRequestContextImpl::Config config;
|
||||
config.other = static_cast<CefRequestContextImpl*>(other.get());
|
||||
@@ -373,7 +373,7 @@ bool CefRequestContextImpl::HasPreference(const CefString& name) {
|
||||
EnsureBrowserContext();
|
||||
|
||||
PrefService* pref_service = browser_context()->GetPrefs();
|
||||
return (pref_service->FindPreference(name) != NULL);
|
||||
return (pref_service->FindPreference(name) != nullptr);
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefRequestContextImpl::GetPreference(
|
||||
@@ -381,7 +381,7 @@ CefRefPtr<CefValue> CefRequestContextImpl::GetPreference(
|
||||
// Verify that this method is being called on the UI thread.
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
NOTREACHED() << "called on invalid thread";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Make sure the browser context exists.
|
||||
@@ -390,7 +390,7 @@ CefRefPtr<CefValue> CefRequestContextImpl::GetPreference(
|
||||
PrefService* pref_service = browser_context()->GetPrefs();
|
||||
const PrefService::Preference* pref = pref_service->FindPreference(name);
|
||||
if (!pref)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return new CefValueImpl(pref->GetValue()->DeepCopy());
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ CefRefPtr<CefDictionaryValue> CefRequestContextImpl::GetAllPreferences(
|
||||
// Verify that this method is being called on the UI thread.
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
NOTREACHED() << "called on invalid thread";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Make sure the browser context exists.
|
||||
@@ -669,7 +669,7 @@ void CefRequestContextImpl::Initialize() {
|
||||
// Clear the reference to |config_.other| after setting
|
||||
// |request_context_getter_|. This is the reverse order of checks in
|
||||
// IsSharedWith().
|
||||
config_.other = NULL;
|
||||
config_.other = nullptr;
|
||||
}
|
||||
|
||||
if (config_.handler)
|
||||
|
@@ -26,7 +26,7 @@ CefRefPtr<CefStreamReader> CefStreamReader::CreateForFile(
|
||||
|
||||
CefRefPtr<CefStreamReader> CefStreamReader::CreateForData(void* data,
|
||||
size_t size) {
|
||||
DCHECK(data != NULL);
|
||||
DCHECK(data != nullptr);
|
||||
DCHECK(size > 0);
|
||||
CefRefPtr<CefStreamReader> reader;
|
||||
if (data && size > 0)
|
||||
@@ -139,12 +139,12 @@ int CefFileWriter::Flush() {
|
||||
// CefBytesReader
|
||||
|
||||
CefBytesReader::CefBytesReader(void* data, int64 datasize, bool copy)
|
||||
: data_(NULL), datasize_(0), copy_(false), offset_(0) {
|
||||
: data_(nullptr), datasize_(0), copy_(false), offset_(0) {
|
||||
SetData(data, datasize, copy);
|
||||
}
|
||||
|
||||
CefBytesReader::~CefBytesReader() {
|
||||
SetData(NULL, 0, false);
|
||||
SetData(nullptr, 0, false);
|
||||
}
|
||||
|
||||
size_t CefBytesReader::Read(void* ptr, size_t size, size_t n) {
|
||||
@@ -206,7 +206,7 @@ void CefBytesReader::SetData(void* data, int64 datasize, bool copy) {
|
||||
|
||||
if (copy) {
|
||||
data_ = malloc(datasize);
|
||||
DCHECK(data_ != NULL);
|
||||
DCHECK(data_ != nullptr);
|
||||
if (data_)
|
||||
memcpy(data_, data, datasize);
|
||||
} else {
|
||||
@@ -220,7 +220,7 @@ CefBytesWriter::CefBytesWriter(size_t grow)
|
||||
: grow_(grow), datasize_(grow), offset_(0) {
|
||||
DCHECK(grow > 0);
|
||||
data_ = malloc(grow);
|
||||
DCHECK(data_ != NULL);
|
||||
DCHECK(data_ != nullptr);
|
||||
}
|
||||
|
||||
CefBytesWriter::~CefBytesWriter() {
|
||||
@@ -293,7 +293,7 @@ size_t CefBytesWriter::Grow(size_t size) {
|
||||
size_t rv;
|
||||
size_t s = (size > grow_ ? size : grow_);
|
||||
void* tmp = realloc(data_, datasize_ + s);
|
||||
DCHECK(tmp != NULL);
|
||||
DCHECK(tmp != nullptr);
|
||||
if (tmp) {
|
||||
data_ = tmp;
|
||||
datasize_ += s;
|
||||
|
@@ -58,7 +58,7 @@ CefTraceSubscriber::CefTraceSubscriber()
|
||||
CefTraceSubscriber::~CefTraceSubscriber() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (collecting_trace_data_)
|
||||
TracingController::GetInstance()->StopTracing(NULL);
|
||||
TracingController::GetInstance()->StopTracing(nullptr);
|
||||
}
|
||||
|
||||
bool CefTraceSubscriber::BeginTracing(
|
||||
@@ -95,7 +95,7 @@ bool CefTraceSubscriber::EndTracing(const base::FilePath& tracing_file,
|
||||
if (!callback.get()) {
|
||||
// Discard the trace data.
|
||||
collecting_trace_data_ = false;
|
||||
TracingController::GetInstance()->StopTracing(NULL);
|
||||
TracingController::GetInstance()->StopTracing(nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,8 @@ void InitializeUITesting() {
|
||||
ui_controls::InstallUIControlsAura(
|
||||
views::test::CreateUIControlsDesktopAura());
|
||||
#else
|
||||
ui_controls::InstallUIControlsAura(aura::test::CreateUIControlsAura(NULL));
|
||||
ui_controls::InstallUIControlsAura(
|
||||
aura::test::CreateUIControlsAura(nullptr));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -14,7 +14,7 @@ CefRefPtr<CefXmlReader> CefXmlReader::Create(CefRefPtr<CefStreamReader> stream,
|
||||
const CefString& URI) {
|
||||
CefRefPtr<CefXmlReaderImpl> impl(new CefXmlReaderImpl());
|
||||
if (!impl->Initialize(stream, encodingType, URI))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return impl.get();
|
||||
}
|
||||
|
||||
@@ -107,10 +107,11 @@ CefString xmlCharToString(const xmlChar* xmlStr, bool free) {
|
||||
} // namespace
|
||||
|
||||
CefXmlReaderImpl::CefXmlReaderImpl()
|
||||
: supported_thread_id_(base::PlatformThread::CurrentId()), reader_(NULL) {}
|
||||
: supported_thread_id_(base::PlatformThread::CurrentId()),
|
||||
reader_(nullptr) {}
|
||||
|
||||
CefXmlReaderImpl::~CefXmlReaderImpl() {
|
||||
if (reader_ != NULL) {
|
||||
if (reader_ != nullptr) {
|
||||
if (!VerifyContext()) {
|
||||
// Close() is supposed to be called directly. We'll try to free the reader
|
||||
// now on the wrong thread but there's no guarantee this call won't crash.
|
||||
@@ -183,7 +184,7 @@ bool CefXmlReaderImpl::Close() {
|
||||
|
||||
// The input buffer will be freed automatically.
|
||||
xmlFreeTextReader(reader_);
|
||||
reader_ = NULL;
|
||||
reader_ = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -309,7 +310,7 @@ CefString CefXmlReaderImpl::GetValue() {
|
||||
if (xmlTextReaderNodeType(reader_) == XML_READER_TYPE_ENTITY_REFERENCE) {
|
||||
// Provide special handling to return entity reference values.
|
||||
xmlNodePtr node = xmlTextReaderCurrentNode(reader_);
|
||||
if (node->content != NULL)
|
||||
if (node->content != nullptr)
|
||||
return xmlCharToString(node->content, false);
|
||||
return CefString();
|
||||
} else {
|
||||
@@ -447,5 +448,5 @@ bool CefXmlReaderImpl::VerifyContext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (reader_ != NULL);
|
||||
return (reader_ != nullptr);
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ CefRefPtr<CefZipReader> CefZipReader::Create(
|
||||
CefRefPtr<CefStreamReader> stream) {
|
||||
CefRefPtr<CefZipReaderImpl> impl(new CefZipReaderImpl());
|
||||
if (!impl->Initialize(stream))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return impl.get();
|
||||
}
|
||||
|
||||
@@ -76,14 +76,14 @@ int ZCALLBACK zlib_error_callback OF((voidpf opaque, voidpf stream)) {
|
||||
|
||||
CefZipReaderImpl::CefZipReaderImpl()
|
||||
: supported_thread_id_(base::PlatformThread::CurrentId()),
|
||||
reader_(NULL),
|
||||
reader_(nullptr),
|
||||
has_fileopen_(false),
|
||||
has_fileinfo_(false),
|
||||
filesize_(0),
|
||||
filemodified_(0) {}
|
||||
|
||||
CefZipReaderImpl::~CefZipReaderImpl() {
|
||||
if (reader_ != NULL) {
|
||||
if (reader_ != nullptr) {
|
||||
if (!VerifyContext()) {
|
||||
// Close() is supposed to be called directly. We'll try to free the reader
|
||||
// now on the wrong thread but there's no guarantee this call won't crash.
|
||||
@@ -100,7 +100,7 @@ bool CefZipReaderImpl::Initialize(CefRefPtr<CefStreamReader> stream) {
|
||||
zlib_filefunc64_def filefunc_def;
|
||||
filefunc_def.zopen64_file = zlib_open_callback;
|
||||
filefunc_def.zread_file = zlib_read_callback;
|
||||
filefunc_def.zwrite_file = NULL;
|
||||
filefunc_def.zwrite_file = nullptr;
|
||||
filefunc_def.ztell64_file = zlib_tell_callback;
|
||||
filefunc_def.zseek64_file = zlib_seek_callback;
|
||||
filefunc_def.zclose_file = zlib_close_callback;
|
||||
@@ -111,7 +111,7 @@ bool CefZipReaderImpl::Initialize(CefRefPtr<CefStreamReader> stream) {
|
||||
stream->AddRef();
|
||||
|
||||
reader_ = unzOpen2_64("", &filefunc_def);
|
||||
return (reader_ != NULL);
|
||||
return (reader_ != nullptr);
|
||||
}
|
||||
|
||||
bool CefZipReaderImpl::MoveToFirstFile() {
|
||||
@@ -161,7 +161,7 @@ bool CefZipReaderImpl::Close() {
|
||||
CloseFile();
|
||||
|
||||
int result = unzClose(reader_);
|
||||
reader_ = NULL;
|
||||
reader_ = nullptr;
|
||||
return (result == UNZ_OK);
|
||||
}
|
||||
|
||||
@@ -278,5 +278,5 @@ bool CefZipReaderImpl::VerifyContext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (reader_ != NULL);
|
||||
return (reader_ != nullptr);
|
||||
}
|
||||
|
@@ -47,9 +47,9 @@ CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_INSTANT0(kCategory, name, TRACE_EVENT_SCOPE_THREAD);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_INSTANT1(kCategory, name, TRACE_EVENT_SCOPE_THREAD,
|
||||
arg1_name, arg1_val);
|
||||
} else {
|
||||
@@ -57,9 +57,9 @@ CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
|
||||
arg1_name, arg1_val, arg2_name, arg2_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_INSTANT0(kCategory, name, TRACE_EVENT_SCOPE_THREAD);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_INSTANT1(kCategory, name, TRACE_EVENT_SCOPE_THREAD, arg1_name,
|
||||
arg1_val);
|
||||
} else {
|
||||
@@ -81,9 +81,9 @@ CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_BEGIN_WITH_FLAGS0(kCategory, name, TRACE_EVENT_FLAG_COPY);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_BEGIN_WITH_FLAGS1(kCategory, name, TRACE_EVENT_FLAG_COPY,
|
||||
arg1_name, arg1_val);
|
||||
} else {
|
||||
@@ -91,9 +91,9 @@ CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
|
||||
arg2_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_BEGIN0(kCategory, name);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_BEGIN1(kCategory, name, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_BEGIN2(kCategory, name, arg1_name, arg1_val, arg2_name,
|
||||
@@ -114,9 +114,9 @@ CEF_EXPORT void cef_trace_event_end(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_END_WITH_FLAGS0(kCategory, name, TRACE_EVENT_FLAG_COPY);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_END_WITH_FLAGS1(kCategory, name, TRACE_EVENT_FLAG_COPY,
|
||||
arg1_name, arg1_val);
|
||||
} else {
|
||||
@@ -124,9 +124,9 @@ CEF_EXPORT void cef_trace_event_end(const char* /* category */,
|
||||
arg2_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_END0(kCategory, name);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_END1(kCategory, name, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_END2(kCategory, name, arg1_name, arg1_val, arg2_name,
|
||||
@@ -147,14 +147,14 @@ CEF_EXPORT void cef_trace_counter(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (value1_name == NULL && value2_name == NULL) {
|
||||
if (value1_name == nullptr && value2_name == nullptr) {
|
||||
TRACE_COPY_COUNTER1(kCategory, name, value1_val);
|
||||
} else {
|
||||
TRACE_COPY_COUNTER2(kCategory, name, value1_name, value1_val, value2_name,
|
||||
value2_val);
|
||||
}
|
||||
} else {
|
||||
if (value1_name == NULL && value2_name == NULL) {
|
||||
if (value1_name == nullptr && value2_name == nullptr) {
|
||||
TRACE_COUNTER1(kCategory, name, value1_val);
|
||||
} else {
|
||||
TRACE_COUNTER2(kCategory, name, value1_name, value1_val, value2_name,
|
||||
@@ -176,14 +176,14 @@ CEF_EXPORT void cef_trace_counter_id(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (value1_name == NULL && value2_name == NULL) {
|
||||
if (value1_name == nullptr && value2_name == nullptr) {
|
||||
TRACE_COPY_COUNTER_ID1(kCategory, name, id, value1_val);
|
||||
} else {
|
||||
TRACE_COPY_COUNTER_ID2(kCategory, name, id, value1_name, value1_val,
|
||||
value2_name, value2_val);
|
||||
}
|
||||
} else {
|
||||
if (value1_name == NULL && value2_name == NULL) {
|
||||
if (value1_name == nullptr && value2_name == nullptr) {
|
||||
TRACE_COUNTER_ID1(kCategory, name, id, value1_val);
|
||||
} else {
|
||||
TRACE_COUNTER_ID2(kCategory, name, id, value1_name, value1_val,
|
||||
@@ -205,18 +205,18 @@ CEF_EXPORT void cef_trace_event_async_begin(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_ASYNC_BEGIN0(kCategory, name, id);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_ASYNC_BEGIN1(kCategory, name, id, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_COPY_ASYNC_BEGIN2(kCategory, name, id, arg1_name, arg1_val,
|
||||
arg2_name, arg2_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_BEGIN0(kCategory, name, id);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_BEGIN1(kCategory, name, id, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_ASYNC_BEGIN2(kCategory, name, id, arg1_name, arg1_val,
|
||||
@@ -237,7 +237,7 @@ CEF_EXPORT void cef_trace_event_async_step_into(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL) {
|
||||
if (arg1_name == nullptr) {
|
||||
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO,
|
||||
kCategory, name, id,
|
||||
TRACE_EVENT_FLAG_COPY, "step", step);
|
||||
@@ -247,7 +247,7 @@ CEF_EXPORT void cef_trace_event_async_step_into(const char* /* category */,
|
||||
TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL) {
|
||||
if (arg1_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_STEP_INTO0(kCategory, name, id, step);
|
||||
} else {
|
||||
TRACE_EVENT_ASYNC_STEP_INTO1(kCategory, name, id, step, arg1_name,
|
||||
@@ -268,7 +268,7 @@ CEF_EXPORT void cef_trace_event_async_step_past(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL) {
|
||||
if (arg1_name == nullptr) {
|
||||
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST,
|
||||
kCategory, name, id,
|
||||
TRACE_EVENT_FLAG_COPY, "step", step);
|
||||
@@ -278,7 +278,7 @@ CEF_EXPORT void cef_trace_event_async_step_past(const char* /* category */,
|
||||
TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL) {
|
||||
if (arg1_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_STEP_PAST0(kCategory, name, id, step);
|
||||
} else {
|
||||
TRACE_EVENT_ASYNC_STEP_PAST1(kCategory, name, id, step, arg1_name,
|
||||
@@ -300,18 +300,18 @@ CEF_EXPORT void cef_trace_event_async_end(const char* /* category */,
|
||||
return;
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_ASYNC_END0(kCategory, name, id);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_COPY_ASYNC_END1(kCategory, name, id, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_COPY_ASYNC_END2(kCategory, name, id, arg1_name, arg1_val,
|
||||
arg2_name, arg2_val);
|
||||
}
|
||||
} else {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
if (arg1_name == nullptr && arg2_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_END0(kCategory, name, id);
|
||||
} else if (arg2_name == NULL) {
|
||||
} else if (arg2_name == nullptr) {
|
||||
TRACE_EVENT_ASYNC_END1(kCategory, name, id, arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_ASYNC_END2(kCategory, name, id, arg1_name, arg1_val,
|
||||
|
@@ -73,7 +73,7 @@ struct ParamTraits<net::UploadElement> {
|
||||
|
||||
void ParamTraits<scoped_refptr<net::UploadData>>::Write(base::Pickle* m,
|
||||
const param_type& p) {
|
||||
WriteParam(m, p.get() != NULL);
|
||||
WriteParam(m, p.get() != nullptr);
|
||||
if (p.get()) {
|
||||
WriteParam(m, p->elements());
|
||||
WriteParam(m, p->identifier());
|
||||
|
@@ -12,10 +12,10 @@ CefCommandLineImpl::CefCommandLineImpl(base::CommandLine* value,
|
||||
bool read_only)
|
||||
: CefValueBase<CefCommandLine, base::CommandLine>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
bool CefCommandLineImpl::IsValid() {
|
||||
return !detached();
|
||||
@@ -26,7 +26,7 @@ bool CefCommandLineImpl::IsReadOnly() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefCommandLine> CefCommandLineImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return new CefCommandLineImpl(new base::CommandLine(const_value().argv()),
|
||||
true, false);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
CefContentClient* g_content_client = NULL;
|
||||
CefContentClient* g_content_client = nullptr;
|
||||
|
||||
// The following plugin-related methods are from
|
||||
// chrome/common/chrome_content_client.cc
|
||||
@@ -168,7 +168,7 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) {
|
||||
.value())));
|
||||
if (!manifest_value.get())
|
||||
return false;
|
||||
base::DictionaryValue* manifest = NULL;
|
||||
base::DictionaryValue* manifest = nullptr;
|
||||
if (!manifest_value->GetAsDictionary(&manifest))
|
||||
return false;
|
||||
|
||||
@@ -195,7 +195,7 @@ CefContentClient::CefContentClient(CefRefPtr<CefApp> application)
|
||||
}
|
||||
|
||||
CefContentClient::~CefContentClient() {
|
||||
g_content_client = NULL;
|
||||
g_content_client = nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
|
@@ -380,7 +380,7 @@ bool CefCrashReporterClient::ReadCrashConfigFile() {
|
||||
kCrashKeysSection,
|
||||
} current_section = kNoSection;
|
||||
|
||||
while (fgets(line, sizeof(line) - 1, fp) != NULL) {
|
||||
while (fgets(line, sizeof(line) - 1, fp) != nullptr) {
|
||||
std::string str = line;
|
||||
base::TrimString(str, base::kWhitespaceASCII, &str);
|
||||
if (str.empty() || str[0] == '#')
|
||||
|
@@ -32,7 +32,7 @@ CefRefPtr<CefDragData> CefDragData::Create() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefDragData> CefDragDataImpl::Clone() {
|
||||
CefDragDataImpl* drag_data = NULL;
|
||||
CefDragDataImpl* drag_data = nullptr;
|
||||
{
|
||||
base::AutoLock lock_scope(lock_);
|
||||
drag_data = new CefDragDataImpl(data_, image_, image_hotspot_);
|
||||
|
@@ -41,7 +41,7 @@ CefRefPtr<CefValue> CefParseJSON(const CefString& json_string,
|
||||
base::Value::ToUniquePtrValue(std::move(parse_result.value()))
|
||||
.release());
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefParseJSONAndReturnError(
|
||||
@@ -64,7 +64,7 @@ CefRefPtr<CefValue> CefParseJSONAndReturnError(
|
||||
error_code_out =
|
||||
static_cast<cef_json_parser_error_t>(value_and_error.error_code);
|
||||
error_msg_out = value_and_error.error_message;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefString CefWriteJSON(CefRefPtr<CefValue> node,
|
||||
|
@@ -381,7 +381,7 @@ class CefUIThread : public base::PlatformThread::Delegate {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Initializes the COM library on the current thread.
|
||||
CoInitialize(NULL);
|
||||
CoInitialize(nullptr);
|
||||
#endif
|
||||
|
||||
start_event_.Signal();
|
||||
@@ -393,7 +393,7 @@ class CefUIThread : public base::PlatformThread::Delegate {
|
||||
run_loop.Run();
|
||||
|
||||
browser_runner_->Shutdown();
|
||||
browser_runner_.reset(NULL);
|
||||
browser_runner_.reset(nullptr);
|
||||
|
||||
content::BrowserTaskExecutor::Shutdown();
|
||||
|
||||
@@ -651,7 +651,7 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
new CefCommandLineImpl(command_line, false, false));
|
||||
content_client_.application()->OnBeforeCommandLineProcessing(
|
||||
CefString(process_type), commandLinePtr.get());
|
||||
commandLinePtr->Detach(NULL);
|
||||
commandLinePtr->Detach(nullptr);
|
||||
}
|
||||
|
||||
// Initialize logging.
|
||||
@@ -841,7 +841,7 @@ content::ContentUtilityClient* CefMainDelegate::CreateContentUtilityClient() {
|
||||
void CefMainDelegate::ShutdownBrowser() {
|
||||
if (browser_runner_.get()) {
|
||||
browser_runner_->Shutdown();
|
||||
browser_runner_.reset(NULL);
|
||||
browser_runner_.reset(nullptr);
|
||||
}
|
||||
|
||||
if (ui_thread_.get()) {
|
||||
|
@@ -11,7 +11,7 @@ namespace net {
|
||||
|
||||
UploadElement::UploadElement()
|
||||
: type_(TYPE_BYTES),
|
||||
bytes_start_(NULL),
|
||||
bytes_start_(nullptr),
|
||||
bytes_length_(0),
|
||||
file_range_offset_(0),
|
||||
file_range_length_(std::numeric_limits<uint64_t>::max()) {}
|
||||
|
@@ -111,13 +111,13 @@ CefString CefBase64Encode(const void* data, size_t data_size) {
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefBase64Decode(const CefString& data) {
|
||||
if (data.size() == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
const std::string& input = data;
|
||||
std::string output;
|
||||
if (base::Base64Decode(input, &output))
|
||||
return CefBinaryValue::Create(output.data(), output.size());
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefString CefURIEncode(const CefString& text, bool use_plus) {
|
||||
@@ -131,7 +131,7 @@ CefString CefURIDecode(const CefString& text,
|
||||
static_cast<net::UnescapeRule::Type>(unescape_rule);
|
||||
if (convert_to_utf8)
|
||||
return net::UnescapeAndDecodeUTF8URLComponentWithAdjustments(
|
||||
text.ToString(), type, NULL);
|
||||
text.ToString(), type, nullptr);
|
||||
else
|
||||
return net::UnescapeURLComponent(text.ToString(), type);
|
||||
}
|
||||
|
@@ -30,10 +30,10 @@ CefProcessMessageImpl::CefProcessMessageImpl(Cef_Request_Params* value,
|
||||
bool read_only)
|
||||
: CefValueBase<CefProcessMessage, Cef_Request_Params>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
bool CefProcessMessageImpl::CopyTo(Cef_Request_Params& target) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
@@ -50,7 +50,7 @@ bool CefProcessMessageImpl::IsReadOnly() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefProcessMessage> CefProcessMessageImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
Cef_Request_Params* params = new Cef_Request_Params();
|
||||
CopyValue(const_value(), *params);
|
||||
return new CefProcessMessageImpl(params, true, false);
|
||||
@@ -62,7 +62,7 @@ CefString CefProcessMessageImpl::GetName() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefProcessMessageImpl::GetArgumentList() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return CefListValueImpl::GetOrCreateRef(
|
||||
const_cast<base::ListValue*>(&(const_value().arguments)),
|
||||
const_cast<Cef_Request_Params*>(&const_value()), read_only(),
|
||||
|
@@ -982,7 +982,7 @@ void CefRequestImpl::Reset() {
|
||||
method_ = "GET";
|
||||
referrer_url_ = GURL();
|
||||
referrer_policy_ = REFERRER_POLICY_DEFAULT;
|
||||
postdata_ = NULL;
|
||||
postdata_ = nullptr;
|
||||
headermap_.clear();
|
||||
resource_type_ = RT_SUB_RESOURCE;
|
||||
transition_type_ = TT_EXPLICIT;
|
||||
@@ -1306,8 +1306,8 @@ void CefPostDataElementImpl::SetToBytes(size_t size, const void* bytes) {
|
||||
|
||||
// Assign the new data
|
||||
void* data = malloc(size);
|
||||
DCHECK(data != NULL);
|
||||
if (data == NULL)
|
||||
DCHECK(data != nullptr);
|
||||
if (data == nullptr)
|
||||
return;
|
||||
|
||||
memcpy(data, bytes, size);
|
||||
|
@@ -32,7 +32,7 @@ gfx::Image CefResourceBundleDelegate::GetNativeImageNamed(int resource_id) {
|
||||
base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefResourceBundleDelegate::GetRawDataResource(int resource_id,
|
||||
@@ -42,7 +42,7 @@ bool CefResourceBundleDelegate::GetRawDataResource(int resource_id,
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
content_client_->application()->GetResourceBundleHandler();
|
||||
if (handler.get()) {
|
||||
void* data = NULL;
|
||||
void* data = nullptr;
|
||||
size_t data_size = 0;
|
||||
if (scale_factor != ui::SCALE_FACTOR_NONE) {
|
||||
if (handler->GetDataResourceForScale(
|
||||
|
@@ -54,7 +54,7 @@ CEF_EXPORT int cef_string_wide_set(const wchar_t* src,
|
||||
} else {
|
||||
output->str = const_cast<wchar_t*>(src);
|
||||
output->length = src_len;
|
||||
output->dtor = NULL;
|
||||
output->dtor = nullptr;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ CEF_EXPORT int cef_string_utf8_set(const char* src,
|
||||
} else {
|
||||
output->str = const_cast<char*>(src);
|
||||
output->length = src_len;
|
||||
output->dtor = NULL;
|
||||
output->dtor = nullptr;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -103,39 +103,39 @@ CEF_EXPORT int cef_string_utf16_set(const char16* src,
|
||||
} else {
|
||||
output->str = const_cast<char16*>(src);
|
||||
output->length = src_len;
|
||||
output->dtor = NULL;
|
||||
output->dtor = nullptr;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_string_wide_clear(cef_string_wide_t* str) {
|
||||
DCHECK(str != NULL);
|
||||
DCHECK(str != nullptr);
|
||||
if (str->dtor && str->str)
|
||||
str->dtor(str->str);
|
||||
|
||||
str->str = NULL;
|
||||
str->str = nullptr;
|
||||
str->length = 0;
|
||||
str->dtor = NULL;
|
||||
str->dtor = nullptr;
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_string_utf8_clear(cef_string_utf8_t* str) {
|
||||
DCHECK(str != NULL);
|
||||
DCHECK(str != nullptr);
|
||||
if (str->dtor && str->str)
|
||||
str->dtor(str->str);
|
||||
|
||||
str->str = NULL;
|
||||
str->str = nullptr;
|
||||
str->length = 0;
|
||||
str->dtor = NULL;
|
||||
str->dtor = nullptr;
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_string_utf16_clear(cef_string_utf16_t* str) {
|
||||
DCHECK(str != NULL);
|
||||
DCHECK(str != nullptr);
|
||||
if (str->dtor && str->str)
|
||||
str->dtor(str->str);
|
||||
|
||||
str->str = NULL;
|
||||
str->str = nullptr;
|
||||
str->length = 0;
|
||||
str->dtor = NULL;
|
||||
str->dtor = nullptr;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_wide_cmp(const cef_string_wide_t* str1,
|
||||
|
@@ -26,7 +26,7 @@ CefRefPtr<CefTaskRunner> CefTaskRunner::GetForCurrentThread() {
|
||||
CefTaskRunnerImpl::GetCurrentTaskRunner();
|
||||
if (task_runner.get())
|
||||
return new CefTaskRunnerImpl(task_runner);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -37,7 +37,7 @@ CefRefPtr<CefTaskRunner> CefTaskRunner::GetForThread(CefThreadId threadId) {
|
||||
return new CefTaskRunnerImpl(task_runner);
|
||||
|
||||
LOG(WARNING) << "Invalid thread id " << threadId;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// CefTaskRunnerImpl
|
||||
@@ -56,13 +56,13 @@ scoped_refptr<base::SingleThreadTaskRunner> CefTaskRunnerImpl::GetTaskRunner(
|
||||
CefContentRendererClient* client = CefContentRendererClient::Get();
|
||||
if (client)
|
||||
return client->render_task_runner();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Browser process.
|
||||
CefContentBrowserClient* client = CefContentBrowserClient::Get();
|
||||
if (!client)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
int id = -1;
|
||||
switch (threadId) {
|
||||
@@ -93,7 +93,7 @@ scoped_refptr<base::SingleThreadTaskRunner> CefTaskRunnerImpl::GetTaskRunner(
|
||||
base::TaskPriority::USER_BLOCKING});
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
// CefTrackNode implementation.
|
||||
|
||||
CefTrackNode::CefTrackNode() : track_next_(NULL), track_prev_(NULL) {}
|
||||
CefTrackNode::CefTrackNode() : track_next_(nullptr), track_prev_(nullptr) {}
|
||||
|
||||
CefTrackNode::~CefTrackNode() {}
|
||||
|
||||
@@ -31,8 +31,8 @@ void CefTrackNode::RemoveTracking() {
|
||||
track_next_->SetTrackPrev(track_prev_);
|
||||
if (track_prev_)
|
||||
track_prev_->SetTrackNext(track_next_);
|
||||
track_next_ = NULL;
|
||||
track_prev_ = NULL;
|
||||
track_next_ = nullptr;
|
||||
track_prev_ = nullptr;
|
||||
}
|
||||
|
||||
// CefTrackManager implementation.
|
||||
@@ -71,6 +71,6 @@ void CefTrackManager::DeleteAll() {
|
||||
next->RemoveTracking();
|
||||
delete next;
|
||||
}
|
||||
} while (next != NULL);
|
||||
} while (next != nullptr);
|
||||
object_count_ = 0;
|
||||
}
|
||||
|
@@ -19,12 +19,12 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
|
||||
CefRefPtr<CefRequestContext> request_context) {
|
||||
if (!request.get() || !client.get()) {
|
||||
NOTREACHED() << "called with invalid parameters";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
|
||||
NOTREACHED() << "called on invalid thread";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (CefContentClient::Get()->browser()) {
|
||||
@@ -33,16 +33,16 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
|
||||
new CefBrowserURLRequest(nullptr, request, client, request_context);
|
||||
if (impl->Start())
|
||||
return impl.get();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} else if (CefContentClient::Get()->renderer()) {
|
||||
// In the render process.
|
||||
CefRefPtr<CefRenderURLRequest> impl =
|
||||
new CefRenderURLRequest(nullptr, request, client);
|
||||
if (impl->Start())
|
||||
return impl.get();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} else {
|
||||
NOTREACHED() << "called in unsupported process";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include "libcef/common/value_base.h"
|
||||
|
||||
CefValueController::CefValueController()
|
||||
: owner_value_(NULL), owner_object_(NULL) {}
|
||||
: owner_value_(nullptr), owner_object_(nullptr) {}
|
||||
|
||||
CefValueController::~CefValueController() {
|
||||
// Everything should already have been removed.
|
||||
@@ -56,8 +56,8 @@ void CefValueController::Remove(void* value, bool notify_object) {
|
||||
// Should never notify when removing the owner object.
|
||||
DCHECK(!notify_object);
|
||||
|
||||
owner_value_ = NULL;
|
||||
owner_object_ = NULL;
|
||||
owner_value_ = nullptr;
|
||||
owner_object_ = nullptr;
|
||||
|
||||
// Remove all references.
|
||||
if (reference_map_.size() > 0) {
|
||||
@@ -92,7 +92,7 @@ CefValueController::Object* CefValueController::Get(void* value) {
|
||||
ReferenceMap::iterator it = reference_map_.find(value);
|
||||
if (it != reference_map_.end())
|
||||
return it->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -301,15 +301,15 @@ class CefValueBase : public CefType, public CefValueController::Object {
|
||||
DeleteValue(value_);
|
||||
}
|
||||
|
||||
controller_ = NULL;
|
||||
value_ = NULL;
|
||||
controller_ = nullptr;
|
||||
value_ = nullptr;
|
||||
}
|
||||
|
||||
// Detaches the underlying value and returns a pointer to it. If this is an
|
||||
// owner and a |new_controller| value is specified any existing references
|
||||
// will be passed to the new controller.
|
||||
ValueType* Detach(CefValueController* new_controller) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
// A |new_controller| value is required for mode kOwnerWillDelete.
|
||||
DCHECK(!will_delete() || new_controller);
|
||||
@@ -323,11 +323,11 @@ class CefValueBase : public CefType, public CefValueController::Object {
|
||||
// Remove the object from the controller. If this is the owner object any
|
||||
// references will be detached.
|
||||
controller()->Remove(value_, false);
|
||||
controller_ = NULL;
|
||||
controller_ = nullptr;
|
||||
|
||||
// Return the old value.
|
||||
ValueType* old_val = value_;
|
||||
value_ = NULL;
|
||||
value_ = nullptr;
|
||||
return old_val;
|
||||
}
|
||||
|
||||
@@ -349,8 +349,8 @@ class CefValueBase : public CefType, public CefValueController::Object {
|
||||
// Only references should be removed in this manner.
|
||||
DCHECK(reference());
|
||||
|
||||
controller_ = NULL;
|
||||
value_ = NULL;
|
||||
controller_ = nullptr;
|
||||
value_ = nullptr;
|
||||
}
|
||||
|
||||
// Override to customize value deletion.
|
||||
|
@@ -118,7 +118,7 @@ bool CefValueImpl::IsValid() {
|
||||
if (list_value_)
|
||||
return list_value_->IsValid();
|
||||
|
||||
return (value_ != NULL);
|
||||
return (value_ != nullptr);
|
||||
}
|
||||
|
||||
bool CefValueImpl::IsOwned() {
|
||||
@@ -317,21 +317,21 @@ bool CefValueImpl::SetString(const CefString& value) {
|
||||
|
||||
bool CefValueImpl::SetBinary(CefRefPtr<CefBinaryValue> value) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
SetValueInternal(NULL);
|
||||
SetValueInternal(nullptr);
|
||||
binary_value_ = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefValueImpl::SetDictionary(CefRefPtr<CefDictionaryValue> value) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
SetValueInternal(NULL);
|
||||
SetValueInternal(nullptr);
|
||||
dictionary_value_ = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefValueImpl::SetList(CefRefPtr<CefListValue> value) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
SetValueInternal(NULL);
|
||||
SetValueInternal(nullptr);
|
||||
list_value_ = value;
|
||||
return true;
|
||||
}
|
||||
@@ -339,10 +339,10 @@ bool CefValueImpl::SetList(CefRefPtr<CefListValue> value) {
|
||||
void CefValueImpl::SetValueInternal(base::Value* value) {
|
||||
lock_.AssertAcquired();
|
||||
|
||||
value_.reset(NULL);
|
||||
binary_value_ = NULL;
|
||||
dictionary_value_ = NULL;
|
||||
list_value_ = NULL;
|
||||
value_.reset(nullptr);
|
||||
binary_value_ = nullptr;
|
||||
dictionary_value_ = nullptr;
|
||||
list_value_ = nullptr;
|
||||
|
||||
if (value) {
|
||||
switch (value->type()) {
|
||||
@@ -375,7 +375,7 @@ CefValueController* CefValueImpl::GetValueController() const {
|
||||
return static_cast<CefListValueImpl*>(list_value_.get())->controller();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefValueImpl::AcquireLock() {
|
||||
@@ -419,7 +419,7 @@ CefRefPtr<CefBinaryValue> CefBinaryValue::Create(const void* data,
|
||||
DCHECK(data);
|
||||
DCHECK_GT(data_size, (size_t)0);
|
||||
if (!data || data_size == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return new CefBinaryValueImpl(static_cast<char*>(const_cast<void*>(data)),
|
||||
data_size);
|
||||
@@ -445,21 +445,21 @@ CefRefPtr<CefBinaryValue> CefBinaryValueImpl::GetOrCreateRef(
|
||||
CefBinaryValueImpl::CefBinaryValueImpl(base::Value* value, bool will_delete)
|
||||
: CefValueBase<CefBinaryValue, base::Value>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
true,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
CefBinaryValueImpl::CefBinaryValueImpl(char* data, size_t data_size)
|
||||
: CefValueBase<CefBinaryValue, base::Value>(
|
||||
new base::Value(std::vector<char>(data, data + data_size)),
|
||||
NULL,
|
||||
nullptr,
|
||||
kOwnerWillDelete,
|
||||
true,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
base::Value* CefBinaryValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return const_value().DeepCopy();
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ bool CefBinaryValueImpl::IsEqualValue(const base::Value* that) {
|
||||
|
||||
base::Value* CefBinaryValueImpl::GetValueUnsafe() {
|
||||
if (!VerifyAttached())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
controller()->AssertLockAcquired();
|
||||
return const_cast<base::Value*>(&const_value());
|
||||
}
|
||||
@@ -527,9 +527,9 @@ bool CefBinaryValueImpl::IsEqual(CefRefPtr<CefBinaryValue> that) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefBinaryValueImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
return new CefBinaryValueImpl(const_value().DeepCopy(), NULL,
|
||||
CefBinaryValueImpl::kOwnerWillDelete, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return new CefBinaryValueImpl(const_value().DeepCopy(), nullptr,
|
||||
CefBinaryValueImpl::kOwnerWillDelete, nullptr);
|
||||
}
|
||||
|
||||
size_t CefBinaryValueImpl::GetSize() {
|
||||
@@ -595,13 +595,13 @@ CefDictionaryValueImpl::CefDictionaryValueImpl(base::DictionaryValue* value,
|
||||
bool read_only)
|
||||
: CefValueBase<CefDictionaryValue, base::DictionaryValue>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
base::DictionaryValue* CefDictionaryValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return const_value().DeepCopy();
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ bool CefDictionaryValueImpl::IsEqualValue(const base::DictionaryValue* that) {
|
||||
|
||||
base::DictionaryValue* CefDictionaryValueImpl::GetValueUnsafe() {
|
||||
if (!VerifyAttached())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
controller()->AssertLockAcquired();
|
||||
return const_cast<base::DictionaryValue*>(&const_value());
|
||||
}
|
||||
@@ -674,7 +674,7 @@ bool CefDictionaryValueImpl::IsEqual(CefRefPtr<CefDictionaryValue> that) {
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::Copy(
|
||||
bool exclude_empty_children) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
base::DictionaryValue* value;
|
||||
if (exclude_empty_children) {
|
||||
@@ -686,7 +686,7 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::Copy(
|
||||
}
|
||||
|
||||
return new CefDictionaryValueImpl(
|
||||
value, NULL, CefDictionaryValueImpl::kOwnerWillDelete, false, NULL);
|
||||
value, nullptr, CefDictionaryValueImpl::kOwnerWillDelete, false, nullptr);
|
||||
}
|
||||
|
||||
size_t CefDictionaryValueImpl::GetSize() {
|
||||
@@ -728,7 +728,7 @@ bool CefDictionaryValueImpl::Remove(const CefString& key) {
|
||||
CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
|
||||
&out_value)) {
|
||||
switch (out_value->type()) {
|
||||
@@ -757,9 +757,9 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefDictionaryValueImpl::GetValue(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
|
||||
&out_value)) {
|
||||
return CefValueImpl::GetOrCreateRefOrCopy(
|
||||
@@ -768,13 +768,13 @@ CefRefPtr<CefValue> CefDictionaryValueImpl::GetValue(const CefString& key) {
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
bool ret_value = false;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
|
||||
@@ -786,7 +786,7 @@ bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
int ret_value = 0;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
|
||||
@@ -798,7 +798,7 @@ int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
double ret_value = 0;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
|
||||
@@ -810,7 +810,7 @@ double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
CefString CefDictionaryValueImpl::GetString(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
std::string ret_value;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
|
||||
@@ -821,9 +821,9 @@ CefString CefDictionaryValueImpl::GetString(const CefString& key) {
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
|
||||
const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
|
||||
&out_value) &&
|
||||
@@ -834,14 +834,14 @@ CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
|
||||
&out_value) &&
|
||||
@@ -853,13 +853,13 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
read_only(), controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
|
||||
&out_value) &&
|
||||
@@ -871,7 +871,7 @@ CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
|
||||
read_only(), controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefDictionaryValueImpl::SetValue(const CefString& key,
|
||||
@@ -1017,13 +1017,13 @@ CefListValueImpl::CefListValueImpl(base::ListValue* value,
|
||||
bool read_only)
|
||||
: CefValueBase<CefListValue, base::ListValue>(
|
||||
value,
|
||||
NULL,
|
||||
nullptr,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only,
|
||||
NULL) {}
|
||||
nullptr) {}
|
||||
|
||||
base::ListValue* CefListValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return const_value().DeepCopy();
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,7 @@ bool CefListValueImpl::IsEqualValue(const base::ListValue* that) {
|
||||
|
||||
base::ListValue* CefListValueImpl::GetValueUnsafe() {
|
||||
if (!VerifyAttached())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
controller()->AssertLockAcquired();
|
||||
return const_cast<base::ListValue*>(&const_value());
|
||||
}
|
||||
@@ -1095,10 +1095,11 @@ bool CefListValueImpl::IsEqual(CefRefPtr<CefListValue> that) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
return new CefListValueImpl(const_value().DeepCopy(), NULL,
|
||||
CefListValueImpl::kOwnerWillDelete, false, NULL);
|
||||
return new CefListValueImpl(const_value().DeepCopy(), nullptr,
|
||||
CefListValueImpl::kOwnerWillDelete, false,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetSize(size_t size) {
|
||||
@@ -1139,7 +1140,7 @@ bool CefListValueImpl::Remove(size_t index) {
|
||||
CefValueType CefListValueImpl::GetType(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
if (const_value().Get(index, &out_value)) {
|
||||
switch (out_value->type()) {
|
||||
case base::Value::Type::NONE:
|
||||
@@ -1167,9 +1168,9 @@ CefValueType CefListValueImpl::GetType(size_t index) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefValue> CefListValueImpl::GetValue(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
if (const_value().Get(index, &out_value)) {
|
||||
return CefValueImpl::GetOrCreateRefOrCopy(
|
||||
const_cast<base::Value*>(out_value),
|
||||
@@ -1177,13 +1178,13 @@ CefRefPtr<CefValue> CefListValueImpl::GetValue(size_t index) {
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::GetBool(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
bool ret_value = false;
|
||||
|
||||
if (const_value().Get(index, &out_value))
|
||||
@@ -1195,7 +1196,7 @@ bool CefListValueImpl::GetBool(size_t index) {
|
||||
int CefListValueImpl::GetInt(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
int ret_value = 0;
|
||||
|
||||
if (const_value().Get(index, &out_value))
|
||||
@@ -1207,7 +1208,7 @@ int CefListValueImpl::GetInt(size_t index) {
|
||||
double CefListValueImpl::GetDouble(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
double ret_value = 0;
|
||||
|
||||
if (const_value().Get(index, &out_value))
|
||||
@@ -1219,7 +1220,7 @@ double CefListValueImpl::GetDouble(size_t index) {
|
||||
CefString CefListValueImpl::GetString(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
std::string ret_value;
|
||||
|
||||
if (const_value().Get(index, &out_value))
|
||||
@@ -1229,9 +1230,9 @@ CefString CefListValueImpl::GetString(size_t index) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefListValueImpl::GetBinary(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().Get(index, &out_value) && out_value->is_blob()) {
|
||||
base::Value* binary_value = const_cast<base::Value*>(out_value);
|
||||
@@ -1240,13 +1241,13 @@ CefRefPtr<CefBinaryValue> CefListValueImpl::GetBinary(size_t index) {
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefDictionaryValue> CefListValueImpl::GetDictionary(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().Get(index, &out_value) && out_value->is_dict()) {
|
||||
base::DictionaryValue* dict_value = static_cast<base::DictionaryValue*>(
|
||||
@@ -1256,13 +1257,13 @@ CefRefPtr<CefDictionaryValue> CefListValueImpl::GetDictionary(size_t index) {
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> CefListValueImpl::GetList(size_t index) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* out_value = NULL;
|
||||
const base::Value* out_value = nullptr;
|
||||
|
||||
if (const_value().Get(index, &out_value) && out_value->is_list()) {
|
||||
base::ListValue* list_value =
|
||||
@@ -1272,7 +1273,7 @@ CefRefPtr<CefListValue> CefListValueImpl::GetList(size_t index) {
|
||||
controller());
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetValue(size_t index, CefRefPtr<CefValue> value) {
|
||||
|
@@ -130,10 +130,10 @@ class CefBinaryValueImpl : public CefValueBase<CefBinaryValue, base::Value> {
|
||||
|
||||
// Reference an existing value (set |will_delete| to false) or take ownership
|
||||
// of an existing value (set |will_delete| to true). When referencing an
|
||||
// existing value you must explicitly call Detach(NULL) when |value| is no
|
||||
// existing value you must explicitly call Detach(nullptr) when |value| is no
|
||||
// longer valid. Use GetOrCreateRef instead of this constructor if |value| is
|
||||
// owned by some other object and you do not plan to explicitly call
|
||||
// Detach(NULL).
|
||||
// Detach(nullptr).
|
||||
CefBinaryValueImpl(base::Value* value, bool will_delete);
|
||||
|
||||
// The data will always be copied.
|
||||
@@ -186,10 +186,10 @@ class CefDictionaryValueImpl
|
||||
|
||||
// Reference an existing value (set |will_delete| to false) or take ownership
|
||||
// of an existing value (set |will_delete| to true). When referencing an
|
||||
// existing value you must explicitly call Detach(NULL) when |value| is no
|
||||
// existing value you must explicitly call Detach(nullptr) when |value| is no
|
||||
// longer valid. Use GetOrCreateRef instead of this constructor if |value| is
|
||||
// owned by some other object and you do not plan to explicitly call
|
||||
// Detach(NULL).
|
||||
// Detach(nullptr).
|
||||
CefDictionaryValueImpl(base::DictionaryValue* value,
|
||||
bool will_delete,
|
||||
bool read_only);
|
||||
@@ -266,10 +266,10 @@ class CefListValueImpl : public CefValueBase<CefListValue, base::ListValue> {
|
||||
|
||||
// Reference an existing value (set |will_delete| to false) or take ownership
|
||||
// of an existing value (set |will_delete| to true). When referencing an
|
||||
// existing value you must explicitly call Detach(NULL) when |value| is no
|
||||
// existing value you must explicitly call Detach(nullptr) when |value| is no
|
||||
// longer valid. Use GetOrCreateRef instead of this constructor if |value| is
|
||||
// owned by some other object and you do not plan to explicitly call
|
||||
// Detach(NULL).
|
||||
// Detach(nullptr).
|
||||
CefListValueImpl(base::ListValue* value, bool will_delete, bool read_only);
|
||||
|
||||
// Return a copy of the value.
|
||||
|
@@ -120,7 +120,8 @@ std::unique_ptr<base::DictionaryValue> ParseManifestFile(
|
||||
}
|
||||
|
||||
JSONStringValueDeserializer deserializer(manifest_contents);
|
||||
std::unique_ptr<base::Value> manifest(deserializer.Deserialize(NULL, NULL));
|
||||
std::unique_ptr<base::Value> manifest(
|
||||
deserializer.Deserialize(nullptr, nullptr));
|
||||
|
||||
if (!manifest.get() || !manifest->is_dict())
|
||||
return nullptr;
|
||||
|
@@ -194,17 +194,17 @@ CefContentRendererClient* CefContentRendererClient::Get() {
|
||||
|
||||
CefRefPtr<CefBrowserImpl> CefContentRendererClient::GetBrowserForView(
|
||||
content::RenderView* view) {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
BrowserMap::const_iterator it = browsers_.find(view);
|
||||
if (it != browsers_.end())
|
||||
return it->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserImpl> CefContentRendererClient::GetBrowserForMainFrame(
|
||||
blink::WebFrame* frame) {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
BrowserMap::const_iterator it = browsers_.begin();
|
||||
for (; it != browsers_.end(); ++it) {
|
||||
@@ -215,7 +215,7 @@ CefRefPtr<CefBrowserImpl> CefContentRendererClient::GetBrowserForMainFrame(
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefContentRendererClient::OnBrowserDestroyed(CefBrowserImpl* browser) {
|
||||
@@ -341,7 +341,7 @@ CefContentRendererClient::GetCurrentTaskRunner() {
|
||||
// Check if currently on the render thread.
|
||||
if (CEF_CURRENTLY_ON_RT())
|
||||
return render_task_runner_;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefContentRendererClient::RunSingleProcessCleanup() {
|
||||
@@ -462,7 +462,7 @@ void CefContentRendererClient::RenderThreadConnected() {
|
||||
CefRefPtr<CefListValueImpl> listValuePtr(
|
||||
new CefListValueImpl(¶ms.extra_info, false, true));
|
||||
handler->OnRenderThreadCreated(listValuePtr.get());
|
||||
listValuePtr->Detach(NULL);
|
||||
listValuePtr->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ CefRefPtr<CefBrowserImpl> CefContentRendererClient::MaybeCreateBrowser(
|
||||
CefRefPtr<CefDictionaryValueImpl> dictValuePtr(
|
||||
new CefDictionaryValueImpl(¶ms.extra_info, false, true));
|
||||
handler->OnBrowserCreated(browser.get(), dictValuePtr.get());
|
||||
dictValuePtr->Detach(NULL);
|
||||
dictValuePtr->Detach(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ void CefContentRendererClient::RunSingleProcessCleanupOnUIThread() {
|
||||
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
||||
|
||||
// Clean up the single existing RenderProcessHost.
|
||||
content::RenderProcessHost* host = NULL;
|
||||
content::RenderProcessHost* host = nullptr;
|
||||
content::RenderProcessHost::iterator iterator(
|
||||
content::RenderProcessHost::AllHostsIterator());
|
||||
if (!iterator.IsAtEnd()) {
|
||||
|
@@ -34,7 +34,7 @@ CefDOMDocumentImpl::~CefDOMDocumentImpl() {
|
||||
CEF_REQUIRE_RT();
|
||||
|
||||
// Verify that the Detach() method has been called.
|
||||
DCHECK(frame_ == NULL);
|
||||
DCHECK(frame_ == nullptr);
|
||||
}
|
||||
|
||||
CefDOMDocumentImpl::Type CefDOMDocumentImpl::GetType() {
|
||||
@@ -189,11 +189,11 @@ CefString CefDOMDocumentImpl::GetCompleteURL(const CefString& partialURL) {
|
||||
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetOrCreateNode(
|
||||
const blink::WebNode& node) {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Nodes may potentially be null.
|
||||
if (node.IsNull())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (!node_map_.empty()) {
|
||||
// Locate the existing node, if any.
|
||||
@@ -238,11 +238,11 @@ void CefDOMDocumentImpl::Detach() {
|
||||
node_map_.clear();
|
||||
}
|
||||
|
||||
frame_ = NULL;
|
||||
frame_ = nullptr;
|
||||
}
|
||||
|
||||
bool CefDOMDocumentImpl::VerifyContext() {
|
||||
if (!CEF_CURRENTLY_ON_RT() || frame_ == NULL) {
|
||||
if (!CEF_CURRENTLY_ON_RT() || frame_ == nullptr) {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
@@ -214,28 +214,28 @@ CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||
|
||||
CefRefPtr<CefDOMDocument> CefDOMNodeImpl::GetDocument() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_.get();
|
||||
}
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMNodeImpl::GetParent() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_->GetOrCreateNode(node_.ParentNode());
|
||||
}
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMNodeImpl::GetPreviousSibling() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_->GetOrCreateNode(node_.PreviousSibling());
|
||||
}
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMNodeImpl::GetNextSibling() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_->GetOrCreateNode(node_.NextSibling());
|
||||
}
|
||||
@@ -249,14 +249,14 @@ bool CefDOMNodeImpl::HasChildren() {
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMNodeImpl::GetFirstChild() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_->GetOrCreateNode(node_.FirstChild());
|
||||
}
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMNodeImpl::GetLastChild() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return document_->GetOrCreateNode(node_.LastChild());
|
||||
}
|
||||
@@ -397,7 +397,7 @@ CefRect CefDOMNodeImpl::GetElementBounds() {
|
||||
}
|
||||
|
||||
void CefDOMNodeImpl::Detach() {
|
||||
document_ = NULL;
|
||||
document_ = nullptr;
|
||||
node_.Assign(WebNode());
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ CefFrameImpl::~CefFrameImpl() {}
|
||||
bool CefFrameImpl::IsValid() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
return (frame_ != NULL);
|
||||
return (frame_ != nullptr);
|
||||
}
|
||||
|
||||
void CefFrameImpl::Undo() {
|
||||
@@ -174,7 +174,7 @@ bool CefFrameImpl::IsMain() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
if (frame_)
|
||||
return (frame_->Parent() == NULL);
|
||||
return (frame_->Parent() == nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ int64 CefFrameImpl::GetIdentifier() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefFrameImpl::GetParent() {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
if (frame_) {
|
||||
blink::WebFrame* parent = frame_->Parent();
|
||||
@@ -210,7 +210,7 @@ CefRefPtr<CefFrame> CefFrameImpl::GetParent() {
|
||||
return browser_->GetWebFrameImpl(parent->ToWebLocalFrame()).get();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefString CefFrameImpl::GetURL() {
|
||||
@@ -225,20 +225,20 @@ CefString CefFrameImpl::GetURL() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefFrameImpl::GetBrowser() {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
return browser_;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Context> CefFrameImpl::GetV8Context() {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
if (frame_) {
|
||||
v8::Isolate* isolate = blink::MainThreadIsolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
return new CefV8ContextImpl(isolate, frame_->MainWorldScriptContext());
|
||||
} else {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,16 +264,16 @@ void CefFrameImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
|
||||
CefRefPtr<CefURLRequest> CefFrameImpl::CreateURLRequest(
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefURLRequestClient> client) {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
CEF_REQUIRE_RT_RETURN(nullptr);
|
||||
|
||||
if (!request || !client || !frame_)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
CefRefPtr<CefRenderURLRequest> impl =
|
||||
new CefRenderURLRequest(this, request, client);
|
||||
if (impl->Start())
|
||||
return impl.get();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefFrameImpl::SendProcessMessage(CefProcessId target_process,
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
CefRenderMessageFilter::CefRenderMessageFilter() : channel_(NULL) {}
|
||||
CefRenderMessageFilter::CefRenderMessageFilter() : channel_(nullptr) {}
|
||||
|
||||
CefRenderMessageFilter::~CefRenderMessageFilter() {}
|
||||
|
||||
|
@@ -210,13 +210,13 @@ class CefRenderURLRequest::Context
|
||||
}
|
||||
|
||||
if (loader_.get())
|
||||
loader_.reset(NULL);
|
||||
loader_.reset(nullptr);
|
||||
|
||||
DCHECK(url_request_.get());
|
||||
client_->OnRequestComplete(url_request_.get());
|
||||
|
||||
// This may result in the Context object being deleted.
|
||||
url_request_ = NULL;
|
||||
url_request_ = nullptr;
|
||||
}
|
||||
|
||||
void OnBodyReadable(MojoResult, const mojo::HandleSignalsState&) {
|
||||
@@ -426,13 +426,13 @@ bool CefRenderURLRequest::Start() {
|
||||
|
||||
CefRefPtr<CefRequest> CefRenderURLRequest::GetRequest() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->request();
|
||||
}
|
||||
|
||||
CefRefPtr<CefURLRequestClient> CefRenderURLRequest::GetClient() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->client();
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ CefURLRequest::ErrorCode CefRenderURLRequest::GetRequestError() {
|
||||
|
||||
CefRefPtr<CefResponse> CefRenderURLRequest::GetResponse() {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return context_->response();
|
||||
}
|
||||
|
||||
|
@@ -206,7 +206,7 @@ class CefV8StateManager {
|
||||
void DestroyIsolateManager() {
|
||||
DCHECK(current_tls_.Get());
|
||||
delete current_tls_.Get();
|
||||
current_tls_.Set(NULL);
|
||||
current_tls_.Set(nullptr);
|
||||
}
|
||||
|
||||
CefV8IsolateManager* GetIsolateManager() {
|
||||
@@ -293,7 +293,7 @@ class V8TrackObject : public CefTrackNode {
|
||||
if (GetPrivate(context, object, kCefTrackObject, &value))
|
||||
return static_cast<V8TrackObject*>(v8::External::Cast(*value)->Value());
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -999,7 +999,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(nullptr);
|
||||
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return nullptr;
|
||||
@@ -1072,8 +1072,8 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
||||
int start_line,
|
||||
CefRefPtr<CefV8Value>& retval,
|
||||
CefRefPtr<CefV8Exception>& exception) {
|
||||
retval = NULL;
|
||||
exception = NULL;
|
||||
retval = nullptr;
|
||||
exception = nullptr;
|
||||
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||
|
||||
@@ -1240,7 +1240,7 @@ void CefV8ValueImpl::Handle::SecondWeakCallback(
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitUndefined();
|
||||
@@ -1249,7 +1249,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateNull() {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitNull();
|
||||
@@ -1258,7 +1258,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateNull() {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitBool(value);
|
||||
@@ -1267,7 +1267,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitInt(value);
|
||||
@@ -1276,7 +1276,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitUInt(value);
|
||||
@@ -1285,7 +1285,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitDouble(value);
|
||||
@@ -1294,7 +1294,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateDate(const CefTime& value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitDate(value);
|
||||
@@ -1303,7 +1303,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateDate(const CefTime& value) {
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateString(const CefString& value) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
CefString str(value);
|
||||
@@ -1315,7 +1315,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateString(const CefString& value) {
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
CefRefPtr<CefV8Accessor> accessor,
|
||||
CefRefPtr<CefV8Interceptor> interceptor) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -1323,7 +1323,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Create the new V8 object. If an interceptor is passed, create object from
|
||||
@@ -1343,7 +1343,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
v8::MaybeLocal<v8::Object> maybe_object = tmpl->NewInstance(context);
|
||||
if (!maybe_object.ToLocal<v8::Object>(&obj)) {
|
||||
NOTREACHED() << "Failed to create V8 Object with interceptor";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
obj = v8::Object::New(isolate);
|
||||
@@ -1366,7 +1366,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -1374,7 +1374,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Create a tracker object that will cause the user data reference to be
|
||||
@@ -1397,14 +1397,14 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArrayBuffer(
|
||||
void* buffer,
|
||||
size_t length,
|
||||
CefRefPtr<CefV8ArrayBufferReleaseCallback> release_callback) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Create a tracker object that will cause the user data reference to be
|
||||
@@ -1425,11 +1425,11 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArrayBuffer(
|
||||
CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefV8Handler> handler) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
|
||||
if (!handler.get()) {
|
||||
NOTREACHED() << "invalid parameter";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
@@ -1438,7 +1438,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::External> function_data =
|
||||
@@ -1453,7 +1453,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
||||
v8::Local<v8::Function> func;
|
||||
if (!maybe_func.ToLocal(&func)) {
|
||||
NOTREACHED() << "failed to create V8 function";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
func->SetName(GetV8String(isolate, name));
|
||||
@@ -1523,7 +1523,7 @@ void CefV8ValueImpl::InitFromV8Value(v8::Local<v8::Context> context,
|
||||
value->ToString(context).ToLocalChecked(), rv);
|
||||
InitString(rv);
|
||||
} else if (value->IsObject()) {
|
||||
InitObject(value, NULL);
|
||||
InitObject(value, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1575,10 +1575,10 @@ void CefV8ValueImpl::InitString(CefString& value) {
|
||||
if (str) {
|
||||
string_value_ = *str;
|
||||
cef_string_t* writable_struct = value.GetWritableStruct();
|
||||
writable_struct->str = NULL;
|
||||
writable_struct->str = nullptr;
|
||||
writable_struct->length = 0;
|
||||
} else {
|
||||
string_value_.str = NULL;
|
||||
string_value_.str = nullptr;
|
||||
string_value_.length = 0;
|
||||
}
|
||||
}
|
||||
@@ -1804,17 +1804,17 @@ bool CefV8ValueImpl::IsUserCreated() {
|
||||
v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
return (tracker != NULL);
|
||||
return (tracker != nullptr);
|
||||
}
|
||||
|
||||
bool CefV8ValueImpl::HasException() {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(false);
|
||||
|
||||
return (last_exception_.get() != NULL);
|
||||
return (last_exception_.get() != nullptr);
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Exception> CefV8ValueImpl::GetException() {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
return last_exception_;
|
||||
}
|
||||
@@ -1822,7 +1822,7 @@ CefRefPtr<CefV8Exception> CefV8ValueImpl::GetException() {
|
||||
bool CefV8ValueImpl::ClearException() {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(false);
|
||||
|
||||
last_exception_ = NULL;
|
||||
last_exception_ = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1926,7 +1926,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -1934,7 +1934,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
@@ -1947,15 +1947,15 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty()) {
|
||||
return new CefV8ValueImpl(isolate, context, ret_value.ToLocalChecked());
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
if (index < 0) {
|
||||
NOTREACHED() << "invalid input parameter";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
@@ -1964,7 +1964,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
@@ -1977,7 +1977,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty()) {
|
||||
return new CefV8ValueImpl(isolate, context, ret_value.ToLocalChecked());
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefV8ValueImpl::SetValue(const CefString& key,
|
||||
@@ -2083,7 +2083,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
|
||||
v8::AccessorNameGetterCallback getter = AccessorNameGetterCallbackImpl;
|
||||
v8::AccessorNameSetterCallback setter =
|
||||
(attribute & V8_PROPERTY_ATTRIBUTE_READONLY)
|
||||
? NULL
|
||||
? nullptr
|
||||
: AccessorNameSetterCallbackImpl;
|
||||
|
||||
v8::TryCatch try_catch(isolate);
|
||||
@@ -2148,7 +2148,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBaseRefCounted> user_data) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefBaseRefCounted> CefV8ValueImpl::GetUserData() {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -2156,7 +2156,7 @@ CefRefPtr<CefBaseRefCounted> CefV8ValueImpl::GetUserData() {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
@@ -2166,7 +2166,7 @@ CefRefPtr<CefBaseRefCounted> CefV8ValueImpl::GetUserData() {
|
||||
if (tracker)
|
||||
return tracker->GetUserData();
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int CefV8ValueImpl::GetExternallyAllocatedMemory() {
|
||||
@@ -2246,13 +2246,13 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
if (!value->IsArrayBuffer()) {
|
||||
NOTREACHED() << "V8 value is not an array buffer";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
|
||||
@@ -2261,7 +2261,7 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() {
|
||||
if (tracker)
|
||||
return tracker->GetReleaseCallback();
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefV8ValueImpl::NeuterArrayBuffer() {
|
||||
@@ -2320,7 +2320,7 @@ CefString CefV8ValueImpl::GetFunctionName() {
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -2328,13 +2328,13 @@ CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
if (!value->IsFunction()) {
|
||||
NOTREACHED() << "V8 value is not a function";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
|
||||
@@ -2342,7 +2342,7 @@ CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
|
||||
if (tracker)
|
||||
return tracker->GetHandler();
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunction(
|
||||
@@ -2357,7 +2357,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
CefRefPtr<CefV8Context> context,
|
||||
CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) {
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
@@ -2369,11 +2369,11 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
|
||||
if (context.get() && !context->IsValid()) {
|
||||
NOTREACHED() << "invalid V8 context parameter";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if (object.get() && (!object->IsValid() || !object->IsObject())) {
|
||||
NOTREACHED() << "invalid V8 object parameter";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int argc = arguments.size();
|
||||
@@ -2381,7 +2381,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (!arguments[i].get() || !arguments[i]->IsValid()) {
|
||||
NOTREACHED() << "invalid V8 arguments parameter";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2409,7 +2409,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
recv = context_local->Global();
|
||||
}
|
||||
|
||||
v8::Local<v8::Value>* argv = NULL;
|
||||
v8::Local<v8::Value>* argv = nullptr;
|
||||
if (argc > 0) {
|
||||
argv = new v8::Local<v8::Value>[argc];
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
@@ -2448,7 +2448,7 @@ bool CefV8ValueImpl::HasCaught(v8::Local<v8::Context> context,
|
||||
return true;
|
||||
} else {
|
||||
if (last_exception_.get())
|
||||
last_exception_ = NULL;
|
||||
last_exception_ = nullptr;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2457,14 +2457,14 @@ bool CefV8ValueImpl::HasCaught(v8::Local<v8::Context> context,
|
||||
|
||||
// static
|
||||
CefRefPtr<CefV8StackTrace> CefV8StackTrace::GetCurrent(int frame_limit) {
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
|
||||
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
|
||||
|
||||
v8::Isolate* isolate = GetIsolateManager()->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(
|
||||
isolate, frame_limit, v8::StackTrace::kDetailed);
|
||||
if (stackTrace.IsEmpty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return new CefV8StackTraceImpl(isolate, stackTrace);
|
||||
}
|
||||
|
||||
@@ -2495,7 +2495,7 @@ int CefV8StackTraceImpl::GetFrameCount() {
|
||||
|
||||
CefRefPtr<CefV8StackFrame> CefV8StackTraceImpl::GetFrame(int index) {
|
||||
if (index < 0 || index >= static_cast<int>(frames_.size()))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return frames_[index];
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ CefRefPtr<CefBaseRefCounted> CefCppToCRefCounted<
|
||||
cef_base_ref_counted_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_base_ref_counted_t* s) {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@@ -19,7 +19,7 @@ CefRawPtr<CefBaseScoped>
|
||||
CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped, cef_base_scoped_t>::
|
||||
UnwrapDerivedRaw(CefWrapperType type, cef_base_scoped_t* s) {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@@ -22,7 +22,7 @@ class CefCppToCRefCounted : public CefBaseRefCounted {
|
||||
// passing an object instance the other side.
|
||||
static StructName* Wrap(CefRefPtr<BaseName> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Wrap our object with the CefCppToCRefCounted class.
|
||||
ClassName* wrapper = new ClassName();
|
||||
@@ -38,7 +38,7 @@ class CefCppToCRefCounted : public CefBaseRefCounted {
|
||||
// back from the other side.
|
||||
static CefRefPtr<BaseName> Unwrap(StructName* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
|
||||
|
@@ -34,7 +34,7 @@ class CefCppToCScoped : public CefBaseScoped {
|
||||
// }
|
||||
static StructName* WrapOwn(CefOwnPtr<BaseName> c) {
|
||||
if (!c)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Wrap our object with the CefCppToC class.
|
||||
ClassName* wrapper = new ClassName();
|
||||
@@ -97,7 +97,7 @@ class CefCppToCScoped : public CefBaseScoped {
|
||||
// We're giving up ownership of the underlying object. Clear the pointer so
|
||||
// it doesn't get deleted.
|
||||
BaseName* object = wrapperStruct->object_;
|
||||
wrapperStruct->object_ = NULL;
|
||||
wrapperStruct->object_ = nullptr;
|
||||
|
||||
delete wrapperStruct->wrapper_;
|
||||
|
||||
@@ -114,7 +114,7 @@ class CefCppToCScoped : public CefBaseScoped {
|
||||
// }
|
||||
static CefRawPtr<BaseName> UnwrapRaw(StructName* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Cast our structure to the wrapper structure type.
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
|
||||
|
@@ -112,7 +112,7 @@ template <class ClassName, class BaseName, class StructName>
|
||||
CefRefPtr<BaseName> CefCToCppRefCounted<ClassName, BaseName, StructName>::Wrap(
|
||||
StructName* s) {
|
||||
if (!s)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Wrap their structure with the CefCToCppRefCounted object.
|
||||
WrapperStruct* wrapperStruct = new WrapperStruct;
|
||||
@@ -132,7 +132,7 @@ template <class ClassName, class BaseName, class StructName>
|
||||
StructName* CefCToCppRefCounted<ClassName, BaseName, StructName>::Unwrap(
|
||||
CefRefPtr<BaseName> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(c.get());
|
||||
|
||||
|
@@ -122,7 +122,7 @@ template <class ClassName, class BaseName, class StructName>
|
||||
StructName* CefCToCppScoped<ClassName, BaseName, StructName>::UnwrapOwn(
|
||||
CefOwnPtr<BaseName> c) {
|
||||
if (!c.get())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(c.get());
|
||||
|
||||
@@ -140,7 +140,7 @@ StructName* CefCToCppScoped<ClassName, BaseName, StructName>::UnwrapOwn(
|
||||
#endif
|
||||
|
||||
// Don't delete the original object when the wrapper is deleted.
|
||||
wrapperStruct->struct_ = NULL;
|
||||
wrapperStruct->struct_ = nullptr;
|
||||
|
||||
// Return the original structure.
|
||||
return orig_struct;
|
||||
@@ -151,7 +151,7 @@ template <class ClassName, class BaseName, class StructName>
|
||||
StructName* CefCToCppScoped<ClassName, BaseName, StructName>::UnwrapRaw(
|
||||
CefRawPtr<BaseName> c) {
|
||||
if (!c)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
WrapperStruct* wrapperStruct = GetWrapperStruct(c);
|
||||
|
||||
|
@@ -48,7 +48,7 @@ class CefBrowserInfoMap {
|
||||
|
||||
// Add an object associated with the specified ID values.
|
||||
void Add(int browser_id, IdType info_id, ObjectType info) {
|
||||
InfoMap* info_map = NULL;
|
||||
InfoMap* info_map = nullptr;
|
||||
typename BrowserInfoMap::const_iterator it_browser =
|
||||
browser_info_map_.find(browser_id);
|
||||
if (it_browser == browser_info_map_.end()) {
|
||||
|
@@ -97,7 +97,7 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide {
|
||||
|
||||
if (!persistent_) {
|
||||
// Non-persistent callbacks are only good for a single use.
|
||||
router_ = NULL;
|
||||
router_ = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,13 +118,13 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide {
|
||||
error_message));
|
||||
|
||||
// Failure always invalidates the callback.
|
||||
router_ = NULL;
|
||||
router_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Detach() {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
router_ = NULL;
|
||||
router_ = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -161,7 +161,7 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide {
|
||||
bool RemoveHandler(Handler* handler) OVERRIDE {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
if (handler_set_.erase(handler) > 0) {
|
||||
CancelPendingFor(NULL, handler, true);
|
||||
CancelPendingFor(nullptr, handler, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -222,17 +222,17 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide {
|
||||
}
|
||||
|
||||
void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE {
|
||||
CancelPendingFor(browser, NULL, false);
|
||||
CancelPendingFor(browser, nullptr, false);
|
||||
}
|
||||
|
||||
void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser) OVERRIDE {
|
||||
CancelPendingFor(browser, NULL, false);
|
||||
CancelPendingFor(browser, nullptr, false);
|
||||
}
|
||||
|
||||
void OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame) OVERRIDE {
|
||||
if (frame->IsMain())
|
||||
CancelPendingFor(browser, NULL, false);
|
||||
CancelPendingFor(browser, nullptr, false);
|
||||
}
|
||||
|
||||
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
@@ -616,7 +616,7 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
return true;
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> successVal = NULL;
|
||||
CefRefPtr<CefV8Value> successVal = nullptr;
|
||||
if (arg->HasValue(kMemberOnSuccess)) {
|
||||
successVal = arg->GetValue(kMemberOnSuccess);
|
||||
if (!successVal->IsFunction()) {
|
||||
@@ -627,7 +627,7 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> failureVal = NULL;
|
||||
CefRefPtr<CefV8Value> failureVal = nullptr;
|
||||
if (arg->HasValue(kMemberOnFailure)) {
|
||||
failureVal = arg->GetValue(kMemberOnFailure);
|
||||
if (!failureVal->IsFunction()) {
|
||||
@@ -638,7 +638,7 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefV8Value> persistentVal = NULL;
|
||||
CefRefPtr<CefV8Value> persistentVal = nullptr;
|
||||
if (arg->HasValue(kMemberPersistent)) {
|
||||
persistentVal = arg->GetValue(kMemberPersistent);
|
||||
if (!persistentVal->IsBool()) {
|
||||
@@ -1008,7 +1008,8 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
if (context && info->success_callback) {
|
||||
CefV8ValueList args;
|
||||
args.push_back(CefV8Value::CreateString(response));
|
||||
info->success_callback->ExecuteFunctionWithContext(context, NULL, args);
|
||||
info->success_callback->ExecuteFunctionWithContext(context, nullptr,
|
||||
args);
|
||||
}
|
||||
|
||||
if (removed)
|
||||
@@ -1034,7 +1035,8 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
CefV8ValueList args;
|
||||
args.push_back(CefV8Value::CreateInt(error_code));
|
||||
args.push_back(CefV8Value::CreateString(error_message));
|
||||
info->failure_callback->ExecuteFunctionWithContext(context, NULL, args);
|
||||
info->failure_callback->ExecuteFunctionWithContext(context, nullptr,
|
||||
args);
|
||||
}
|
||||
|
||||
DCHECK(removed);
|
||||
@@ -1076,7 +1078,7 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
|
||||
ContextMap::const_iterator it = context_map_.find(context_id);
|
||||
if (it != context_map_.end())
|
||||
return it->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const CefMessageRouterConfig config_;
|
||||
@@ -1113,7 +1115,7 @@ CefRefPtr<CefMessageRouterBrowserSide> CefMessageRouterBrowserSide::Create(
|
||||
const CefMessageRouterConfig& config) {
|
||||
CefMessageRouterConfig validated_config = config;
|
||||
if (!ValidateConfig(validated_config))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return new CefMessageRouterBrowserSideImpl(validated_config);
|
||||
}
|
||||
|
||||
@@ -1122,6 +1124,6 @@ CefRefPtr<CefMessageRouterRendererSide> CefMessageRouterRendererSide::Create(
|
||||
const CefMessageRouterConfig& config) {
|
||||
CefMessageRouterConfig validated_config = config;
|
||||
if (!ValidateConfig(validated_config))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return new CefMessageRouterRendererSideImpl(validated_config);
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ class ArchiveProvider : public CefResourceManager::Provider {
|
||||
archive = new CefZipArchive;
|
||||
if (archive->Load(stream, password, true) == 0) {
|
||||
DLOG(WARNING) << "Empty archive file: " << archive_path;
|
||||
archive = NULL;
|
||||
archive = nullptr;
|
||||
}
|
||||
} else {
|
||||
DLOG(WARNING) << "Failed to load archive file: " << archive_path;
|
||||
@@ -388,7 +388,7 @@ CefResourceManager::Request::SendRequest() {
|
||||
|
||||
bool CefResourceManager::Request::HasState() {
|
||||
CEF_REQUIRE_IO_THREAD();
|
||||
return (state_.get() != NULL);
|
||||
return (state_.get() != nullptr);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -598,7 +598,7 @@ CefRefPtr<CefResourceHandler> CefResourceManager::GetResourceHandler(
|
||||
CEF_REQUIRE_IO_THREAD();
|
||||
|
||||
if (pending_handlers_.empty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
CefRefPtr<CefResourceHandler> handler;
|
||||
|
||||
@@ -734,7 +734,7 @@ void CefResourceManager::DeleteProvider(ProviderEntryList::iterator& iterator,
|
||||
if (stop)
|
||||
request->Stop();
|
||||
else
|
||||
request->Continue(NULL);
|
||||
request->Continue(nullptr);
|
||||
current_entry->provider_->OnRequestCanceled(request);
|
||||
}
|
||||
}
|
||||
|
@@ -158,7 +158,7 @@ class CefXmlObjectLoader {
|
||||
} // namespace
|
||||
|
||||
CefXmlObject::CefXmlObject(const CefString& name)
|
||||
: name_(name), parent_(NULL) {}
|
||||
: name_(name), parent_(nullptr) {}
|
||||
|
||||
CefXmlObject::~CefXmlObject() {}
|
||||
|
||||
@@ -245,7 +245,7 @@ bool CefXmlObject::SetName(const CefString& name) {
|
||||
|
||||
bool CefXmlObject::HasParent() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return (parent_ != NULL);
|
||||
return (parent_ != nullptr);
|
||||
}
|
||||
|
||||
CefRefPtr<CefXmlObject> CefXmlObject::GetParent() {
|
||||
@@ -385,7 +385,7 @@ bool CefXmlObject::RemoveChild(CefRefPtr<CefXmlObject> child) {
|
||||
for (; it != children_.end(); ++it) {
|
||||
if ((*it).get() == child.get()) {
|
||||
children_.erase(it);
|
||||
child->SetParent(NULL);
|
||||
child->SetParent(nullptr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -402,14 +402,14 @@ void CefXmlObject::ClearChildren() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
ObjectVector::iterator it = children_.begin();
|
||||
for (; it != children_.end(); ++it)
|
||||
(*it)->SetParent(NULL);
|
||||
(*it)->SetParent(nullptr);
|
||||
children_.clear();
|
||||
}
|
||||
|
||||
CefRefPtr<CefXmlObject> CefXmlObject::FindChild(const CefString& name) {
|
||||
DCHECK(!name.empty());
|
||||
if (name.empty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
base::AutoLock lock_scope(lock_);
|
||||
ObjectVector::const_iterator it = children_.begin();
|
||||
@@ -417,7 +417,7 @@ CefRefPtr<CefXmlObject> CefXmlObject::FindChild(const CefString& name) {
|
||||
if ((*it)->GetName() == name)
|
||||
return (*it);
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t CefXmlObject::FindChildren(const CefString& name,
|
||||
@@ -442,10 +442,10 @@ size_t CefXmlObject::FindChildren(const CefString& name,
|
||||
void CefXmlObject::SetParent(CefXmlObject* parent) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
if (parent) {
|
||||
DCHECK(parent_ == NULL);
|
||||
DCHECK(parent_ == nullptr);
|
||||
parent_ = parent;
|
||||
} else {
|
||||
DCHECK(parent_ != NULL);
|
||||
parent_ = NULL;
|
||||
DCHECK(parent_ != nullptr);
|
||||
parent_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ CefRefPtr<CefZipArchive::File> CefZipArchive::GetFile(
|
||||
FileMap::const_iterator it = contents_.find(ToLower(fileName));
|
||||
if (it != contents_.end())
|
||||
return it->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefZipArchive::RemoveFile(const CefString& fileName) {
|
||||
|
Reference in New Issue
Block a user