Implemented DialogAPI.