diff options
author | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 20:14:40 +0000 |
---|---|---|
committer | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 20:14:40 +0000 |
commit | efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9 (patch) | |
tree | 5255c711b087d6a261d247d16e07ca23c6c62651 /chrome_frame/chrome_frame_activex.cc | |
parent | 71cbdf4801cec5193cec3fe813ad5d20009bd042 (diff) | |
download | chromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.zip chromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.tar.gz chromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.tar.bz2 |
Added the propagation of the OnChannelError notification.
So that automation tests can tell when the communication between Chrome and Chrome Frame was cut.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1237003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex.cc')
-rw-r--r-- | chrome_frame/chrome_frame_activex.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc index f982072..a46d294 100644 --- a/chrome_frame/chrome_frame_activex.cc +++ b/chrome_frame/chrome_frame_activex.cc @@ -126,11 +126,11 @@ HRESULT ChromeFrameActivex::FinalConstruct() { ChromeFrameActivex::~ChromeFrameActivex() { // We expect these to be released during a call to SetClientSite(NULL). - DCHECK(onmessage_.size() == 0); - DCHECK(onloaderror_.size() == 0); - DCHECK(onload_.size() == 0); - DCHECK(onreadystatechanged_.size() == 0); - DCHECK(onextensionready_.size() == 0); + DCHECK_EQ(0, onmessage_.size()); + DCHECK_EQ(0, onloaderror_.size()); + DCHECK_EQ(0, onload_.size()); + DCHECK_EQ(0, onreadystatechanged_.size()); + DCHECK_EQ(0, onextensionready_.size()); if (chrome_wndproc_hook_) { BOOL unhook_success = ::UnhookWindowsHookEx(chrome_wndproc_hook_); @@ -274,7 +274,11 @@ void ChromeFrameActivex::OnGetEnabledExtensionsComplete( ::SafeArrayDestroy(sa); } -HRESULT ChromeFrameActivex::OnDraw(ATL_DRAWINFO& draw_info) { // NO_LINT +void ChromeFrameActivex::OnChannelError() { + Fire_onchannelerror(); +} + +HRESULT ChromeFrameActivex::OnDraw(ATL_DRAWINFO& draw_info) { // NOLINT HRESULT hr = S_OK; int dc_type = ::GetObjectType(draw_info.hicTargetDev); if (dc_type == OBJ_ENHMETADC) { @@ -496,7 +500,7 @@ HRESULT ChromeFrameActivex::CreateScriptBlockForEvent( IHTMLElement2* insert_after, BSTR instance_id, BSTR script, BSTR event_name) { DCHECK(insert_after); - DCHECK(::SysStringLen(event_name) > 0); // should always have this + DCHECK_GT(::SysStringLen(event_name), 0UL); // should always have this // This might be 0 if not specified in the HTML document. if (!::SysStringLen(instance_id)) { |