Add a delegate for close button.