| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.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/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 InfoBarManager::NotifyInfoBarRemoved(infobar, animate); | 88 InfoBarManager::NotifyInfoBarRemoved(infobar, animate); |
| 89 // TODO(droger): Remove the notifications and have listeners change to be | 89 // TODO(droger): Remove the notifications and have listeners change to be |
| 90 // InfoBarManager::Observers instead. See http://crbug.com/354380 | 90 // InfoBarManager::Observers instead. See http://crbug.com/354380 |
| 91 InfoBar::RemovedDetails removed_details(infobar, animate); | 91 InfoBar::RemovedDetails removed_details(infobar, animate); |
| 92 content::NotificationService::current()->Notify( | 92 content::NotificationService::current()->Notify( |
| 93 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 93 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 94 content::Source<InfoBarService>(this), | 94 content::Source<InfoBarService>(this), |
| 95 content::Details<InfoBar::RemovedDetails>(&removed_details)); | 95 content::Details<InfoBar::RemovedDetails>(&removed_details)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // InfoBarService::CreateConfirmInfoBar() is implemented in platform-specific |
| 99 // files. |
| 100 |
| 98 void InfoBarService::RenderProcessGone(base::TerminationStatus status) { | 101 void InfoBarService::RenderProcessGone(base::TerminationStatus status) { |
| 99 RemoveAllInfoBars(true); | 102 RemoveAllInfoBars(true); |
| 100 } | 103 } |
| 101 | 104 |
| 102 void InfoBarService::DidStartNavigationToPendingEntry( | 105 void InfoBarService::DidStartNavigationToPendingEntry( |
| 103 const GURL& url, | 106 const GURL& url, |
| 104 content::NavigationController::ReloadType reload_type) { | 107 content::NavigationController::ReloadType reload_type) { |
| 105 ignore_next_reload_ = false; | 108 ignore_next_reload_ = false; |
| 106 } | 109 } |
| 107 | 110 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 136 | 139 |
| 137 void InfoBarService::OnDidBlockDisplayingInsecureContent() { | 140 void InfoBarService::OnDidBlockDisplayingInsecureContent() { |
| 138 InsecureContentInfoBarDelegate::Create( | 141 InsecureContentInfoBarDelegate::Create( |
| 139 this, InsecureContentInfoBarDelegate::DISPLAY); | 142 this, InsecureContentInfoBarDelegate::DISPLAY); |
| 140 } | 143 } |
| 141 | 144 |
| 142 void InfoBarService::OnDidBlockRunningInsecureContent() { | 145 void InfoBarService::OnDidBlockRunningInsecureContent() { |
| 143 InsecureContentInfoBarDelegate::Create(this, | 146 InsecureContentInfoBarDelegate::Create(this, |
| 144 InsecureContentInfoBarDelegate::RUN); | 147 InsecureContentInfoBarDelegate::RUN); |
| 145 } | 148 } |
| OLD | NEW |