diff options
Diffstat (limited to 'chrome_frame/chrome_active_document.h')
-rw-r--r-- | chrome_frame/chrome_active_document.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h index 146f091..370ba32 100644 --- a/chrome_frame/chrome_active_document.h +++ b/chrome_frame/chrome_active_document.h @@ -276,6 +276,7 @@ BEGIN_EXEC_COMMAND_MAP(ChromeActiveDocument) OnDisplayPrivacyInfo) EXEC_COMMAND_HANDLER(NULL, OLECMDID_OPTICAL_GETZOOMRANGE, OnGetZoomRange) EXEC_COMMAND_HANDLER(NULL, OLECMDID_OPTICAL_ZOOM, OnSetZoomRange) + EXEC_COMMAND_HANDLER(NULL, OLECMDID_ONUNLOAD, OnUnload) END_EXEC_COMMAND_MAP() // IPCs from automation server. @@ -390,6 +391,12 @@ END_EXEC_COMMAND_MAP() void OnSetZoomRange(const GUID* cmd_group_guid, DWORD command_id, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args); + // This function handles the OLECMDID_ONUNLOAD command. It enables Chrome to + // invoke before unload and unload handlers on the page if any, thereby + // enabling a webpage to potentially cancel the operation. + void OnUnload(const GUID* cmd_group_guid, DWORD command_id, + DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args); + // Call exec on our site's command target HRESULT IEExec(const GUID* cmd_group_guid, DWORD command_id, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args); |