summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_active_document.cc
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 17:32:51 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 17:32:51 +0000
commit2f1793eafae6419d8f0e776f441bcbe262e207d3 (patch)
treec5286986c7fa7bd007eaf2d3e1bcca57141c20c6 /chrome_frame/chrome_active_document.cc
parent6f1dbc0060967d9ad7c214315f1ca843777d5c7f (diff)
downloadchromium_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_active_document.cc')
-rw-r--r--chrome_frame/chrome_active_document.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index c949c21..9dfe739 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -683,6 +683,10 @@ void ChromeActiveDocument::OnDidNavigate(int tab_handle,
}
void ChromeActiveDocument::OnCloseTab(int tab_handle) {
+ // Base class will fire DIChromeFrameEvents::onclose.
+ BaseActiveX::OnCloseTab(tab_handle);
+
+ // Close the container window.
ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
if (web_browser2)