OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/infobars/infobar_tab_helper.h" | 5 #include "chrome/browser/infobars/infobar_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/infobars/infobar.h" | 7 #include "chrome/browser/infobars/infobar.h" |
8 #include "chrome/browser/infobars/infobar_delegate.h" | 8 #include "chrome/browser/infobars/infobar_delegate.h" |
9 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" | 9 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 ReplaceInfoBar(delegate, new InsecureContentInfoBarDelegate( | 148 ReplaceInfoBar(delegate, new InsecureContentInfoBarDelegate( |
149 this, InsecureContentInfoBarDelegate::RUN)); | 149 this, InsecureContentInfoBarDelegate::RUN)); |
150 } | 150 } |
151 return; | 151 return; |
152 } | 152 } |
153 } | 153 } |
154 AddInfoBar(new InsecureContentInfoBarDelegate(this, | 154 AddInfoBar(new InsecureContentInfoBarDelegate(this, |
155 InsecureContentInfoBarDelegate::RUN)); | 155 InsecureContentInfoBarDelegate::RUN)); |
156 } | 156 } |
157 | 157 |
158 void InfoBarTabHelper::RenderViewGone() { | 158 void InfoBarTabHelper::RenderViewGone(base::TerminationStatus status) { |
159 RemoveAllInfoBars(true); | 159 RemoveAllInfoBars(true); |
160 } | 160 } |
161 | 161 |
162 bool InfoBarTabHelper::OnMessageReceived(const IPC::Message& message) { | 162 bool InfoBarTabHelper::OnMessageReceived(const IPC::Message& message) { |
163 bool handled = true; | 163 bool handled = true; |
164 IPC_BEGIN_MESSAGE_MAP(InfoBarTabHelper, message) | 164 IPC_BEGIN_MESSAGE_MAP(InfoBarTabHelper, message) |
165 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockDisplayingInsecureContent, | 165 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockDisplayingInsecureContent, |
166 OnDidBlockDisplayingInsecureContent) | 166 OnDidBlockDisplayingInsecureContent) |
167 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockRunningInsecureContent, | 167 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockRunningInsecureContent, |
168 OnDidBlockRunningInsecureContent) | 168 OnDidBlockRunningInsecureContent) |
(...skipping 21 matching lines...) Expand all Loading... |
190 if (delegate->ShouldExpire(committed_details)) | 190 if (delegate->ShouldExpire(committed_details)) |
191 RemoveInfoBar(delegate); | 191 RemoveInfoBar(delegate); |
192 } | 192 } |
193 | 193 |
194 break; | 194 break; |
195 } | 195 } |
196 default: | 196 default: |
197 NOTREACHED(); | 197 NOTREACHED(); |
198 } | 198 } |
199 } | 199 } |
OLD | NEW |