| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_service.h" | 5 #include "chrome/browser/infobars/infobar_service.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/infobars/insecure_content_infobar_delegate.h" | 9 #include "chrome/browser/infobars/insecure_content_infobar_delegate.h" |
| 10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 InfoBarService::~InfoBarService() { | 91 InfoBarService::~InfoBarService() { |
| 92 // Destroy all remaining InfoBars. It's important to not animate here so that | 92 // Destroy all remaining InfoBars. It's important to not animate here so that |
| 93 // we guarantee that we'll delete all delegates before we do anything else. | 93 // we guarantee that we'll delete all delegates before we do anything else. |
| 94 // | 94 // |
| 95 // TODO(pkasting): If there is no InfoBarContainer, this leaks all the | 95 // TODO(pkasting): If there is no InfoBarContainer, this leaks all the |
| 96 // InfoBarDelegates. This will be fixed once we call CloseSoon() directly on | 96 // InfoBarDelegates. This will be fixed once we call CloseSoon() directly on |
| 97 // Infobars. | 97 // Infobars. |
| 98 RemoveAllInfoBars(false); | 98 RemoveAllInfoBars(false); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void InfoBarService::RenderViewGone(base::TerminationStatus status) { | 101 void InfoBarService::RenderProcessGone(base::TerminationStatus status) { |
| 102 RemoveAllInfoBars(true); | 102 RemoveAllInfoBars(true); |
| 103 } | 103 } |
| 104 | 104 |
| 105 bool InfoBarService::OnMessageReceived(const IPC::Message& message) { | 105 bool InfoBarService::OnMessageReceived(const IPC::Message& message) { |
| 106 bool handled = true; | 106 bool handled = true; |
| 107 IPC_BEGIN_MESSAGE_MAP(InfoBarService, message) | 107 IPC_BEGIN_MESSAGE_MAP(InfoBarService, message) |
| 108 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockDisplayingInsecureContent, | 108 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockDisplayingInsecureContent, |
| 109 OnDidBlockDisplayingInsecureContent) | 109 OnDidBlockDisplayingInsecureContent) |
| 110 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockRunningInsecureContent, | 110 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockRunningInsecureContent, |
| 111 OnDidBlockRunningInsecureContent) | 111 OnDidBlockRunningInsecureContent) |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 void InfoBarService::OnDidBlockDisplayingInsecureContent() { | 185 void InfoBarService::OnDidBlockDisplayingInsecureContent() { |
| 186 InsecureContentInfoBarDelegate::Create( | 186 InsecureContentInfoBarDelegate::Create( |
| 187 this, InsecureContentInfoBarDelegate::DISPLAY); | 187 this, InsecureContentInfoBarDelegate::DISPLAY); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void InfoBarService::OnDidBlockRunningInsecureContent() { | 190 void InfoBarService::OnDidBlockRunningInsecureContent() { |
| 191 InsecureContentInfoBarDelegate::Create(this, | 191 InsecureContentInfoBarDelegate::Create(this, |
| 192 InsecureContentInfoBarDelegate::RUN); | 192 InsecureContentInfoBarDelegate::RUN); |
| 193 } | 193 } |
| OLD | NEW |