NSDockTile* dock_tile = [NSApp dockTile];
// For the first time API invoked, we need to create a ContentView in DockTile.
- if (dock_tile.contentView == NULL) {
+ if (dock_tile.contentView == nullptr) {
NSImageView* image_view = [[NSImageView alloc] init];
[image_view setImage:[NSApp applicationIconImage]];
[dock_tile setContentView:image_view];
NSWindow* window = settings.parent_window ?
settings.parent_window->GetNativeWindow() :
- NULL;
+ nullptr;
[dialog beginSheetModalForWindow:window
completionHandler:^(NSInteger chosen) {
if (chosen == NSFileHandlingPanelCancelButton) {
NSWindow* window = settings.parent_window ?
settings.parent_window->GetNativeWindow() :
- NULL;
+ nullptr;
[dialog beginSheetModalForWindow:window
completionHandler:^(NSInteger chosen) {
if (chosen == NSFileHandlingPanelCancelButton) {
// thread safe, including LSGetApplicationForURL (> 10.2) and
// NSWorkspace#openURLs.
std::string OpenURL(NSURL* ns_url, bool activate) {
- CFURLRef openingApp = NULL;
+ CFURLRef openingApp = nullptr;
OSStatus status = LSGetApplicationForURL((CFURLRef)ns_url,
kLSRolesAll,
- NULL,
+ nullptr,
&openingApp);
if (status != noErr)
return MessageForOSStatus(status, "Failed to open");
// Create the list of files (only ever one) to open.
base::mac::ScopedAEDesc<AEDescList> fileList;
- status = AECreateList(NULL, // factoringPtr
+ status = AECreateList(nullptr, // factoringPtr
0, // factoredSize
false, // isRecord
fileList.OutPointer()); // resultList
kAENoReply + kAEAlwaysInteract, // sendMode
kAENormalPriority, // sendPriority
kAEDefaultTimeout, // timeOutInTicks
- NULL, // idleProc
- NULL); // filterProc
+ nullptr, // idleProc
+ nullptr); // filterProc
if (status != noErr) {
OSSTATUS_LOG(WARNING, status)
<< "Could not send AE to Finder in OpenItem()";