| 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 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual void Observe(int type, | 57 virtual void Observe(int type, |
| 58 const content::NotificationSource& source, | 58 const content::NotificationSource& source, |
| 59 const content::NotificationDetails& details) OVERRIDE; | 59 const content::NotificationDetails& details) OVERRIDE; |
| 60 | 60 |
| 61 // Helper functions for infobars: | 61 // Helper functions for infobars: |
| 62 content::WebContents* web_contents() { | 62 content::WebContents* web_contents() { |
| 63 return content::WebContentsObserver::web_contents(); | 63 return content::WebContentsObserver::web_contents(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 typedef std::vector<InfoBarDelegate*> InfoBars; |
| 68 |
| 67 void RemoveInfoBarInternal(InfoBarDelegate* delegate, bool animate); | 69 void RemoveInfoBarInternal(InfoBarDelegate* delegate, bool animate); |
| 68 void RemoveAllInfoBars(bool animate); | 70 void RemoveAllInfoBars(bool animate); |
| 69 | 71 |
| 70 // Message handlers. | 72 // Message handlers. |
| 71 void OnDidBlockDisplayingInsecureContent(); | 73 void OnDidBlockDisplayingInsecureContent(); |
| 72 void OnDidBlockRunningInsecureContent(); | 74 void OnDidBlockRunningInsecureContent(); |
| 73 | 75 |
| 74 // Delegates for InfoBars associated with this InfoBarTabHelper. | 76 // Delegates for InfoBars associated with this InfoBarTabHelper. |
| 75 std::vector<InfoBarDelegate*> infobars_; | 77 InfoBars infobars_; |
| 76 bool infobars_enabled_; | 78 bool infobars_enabled_; |
| 77 | 79 |
| 78 content::NotificationRegistrar registrar_; | 80 content::NotificationRegistrar registrar_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); | 82 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 85 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| OLD | NEW |