diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 17:32:51 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 17:32:51 +0000 |
commit | 2f1793eafae6419d8f0e776f441bcbe262e207d3 (patch) | |
tree | c5286986c7fa7bd007eaf2d3e1bcca57141c20c6 /chrome_frame/chrome_frame_activex_base.h | |
parent | 6f1dbc0060967d9ad7c214315f1ca843777d5c7f (diff) | |
download | chromium_src-2f1793eafae6419d8f0e776f441bcbe262e207d3.zip chromium_src-2f1793eafae6419d8f0e776f441bcbe262e207d3.tar.gz chromium_src-2f1793eafae6419d8f0e776f441bcbe262e207d3.tar.bz2 |
Add support for OnClose event in ActiveX and NPAPI
Provide event notification for window.close called within
ActiveX and NPAPI. Currently this is handled in ActiveDocument
to close the popups. In ActiveX and NPAPI plugin we just fire
an event as it is upto the container to decide what's the right
thing to do.
BUG=59664
TEST=New tests ChromeFrameTestWithWebServer.FullTabModeIE_WindowClose, ChromeFrameTestWithWebServer.FullTabModeFF_WindowClose
Review URL: http://codereview.chromium.org/4152005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index 4c0879b..def29b8 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -140,6 +140,10 @@ class ATL_NO_VTABLE ProxyDIChromeFrameEvents void Fire_onchannelerror() { // NOLINT FireMethodWithParams(CF_EVENT_DISPID_ONCHANNELERROR, NULL, 0); } + + void Fire_onclose() { // NOLINT + FireMethodWithParams(CF_EVENT_DISPID_ONCLOSE, NULL, 0); + } }; extern bool g_first_launch_by_process_; @@ -337,7 +341,6 @@ END_MSG_MAP() return S_OK; } - // Used to setup the document_url_ member needed for completing navigation. // Create external tab (possibly in incognito mode). HRESULT IOleObject_SetClientSite(IOleClientSite* client_site) { @@ -415,7 +418,6 @@ END_MSG_MAP() DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); } - void OnLoad(int tab_handle, const GURL& url) { if (ready_state_ < READYSTATE_COMPLETE) { ready_state_ = READYSTATE_COMPLETE; @@ -567,6 +569,10 @@ END_MSG_MAP() FireOnChanged(DISPID_READYSTATE); } + virtual void OnCloseTab(int tab_handle) { + Fire_onclose(); + } + // Overridden to take advantage of readystate prop changes and send those // to potential listeners. HRESULT FireOnChanged(DISPID dispid) { |