Support for message function in confirmCloseWindow

Change-Id: Iffe106cfc5430aaeb2c56b83316116b2c5dd5835
Merge "Support for message function in confirmCloseWindow"