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/browser/tab_contents/tab_contents_observer.h" | 10 #include "content/browser/tab_contents/tab_contents_observer.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void ReplaceInfoBar(InfoBarDelegate* old_delegate, | 43 void ReplaceInfoBar(InfoBarDelegate* old_delegate, |
44 InfoBarDelegate* new_delegate); | 44 InfoBarDelegate* new_delegate); |
45 | 45 |
46 // Enumeration and access functions. | 46 // Enumeration and access functions. |
47 size_t infobar_count() const { return infobars_.size(); } | 47 size_t infobar_count() const { return infobars_.size(); } |
48 // WARNING: This does not sanity-check |index|! | 48 // WARNING: This does not sanity-check |index|! |
49 InfoBarDelegate* GetInfoBarDelegateAt(size_t index); | 49 InfoBarDelegate* GetInfoBarDelegateAt(size_t index); |
50 void set_infobars_enabled(bool value) { infobars_enabled_ = value; } | 50 void set_infobars_enabled(bool value) { infobars_enabled_ = value; } |
51 | 51 |
52 // TabContentsObserver overrides: | 52 // TabContentsObserver overrides: |
53 virtual void RenderViewGone() OVERRIDE; | 53 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
55 | 55 |
56 // content::NotificationObserver overrides: | 56 // content::NotificationObserver overrides: |
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 TabContents* tab_contents() { | 62 TabContents* tab_contents() { |
63 return TabContentsObserver::tab_contents(); | 63 return TabContentsObserver::tab_contents(); |
(...skipping 10 matching lines...) Expand all Loading... |
74 // Delegates for InfoBars associated with this InfoBarTabHelper. | 74 // Delegates for InfoBars associated with this InfoBarTabHelper. |
75 std::vector<InfoBarDelegate*> infobars_; | 75 std::vector<InfoBarDelegate*> infobars_; |
76 bool infobars_enabled_; | 76 bool infobars_enabled_; |
77 | 77 |
78 content::NotificationRegistrar registrar_; | 78 content::NotificationRegistrar registrar_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); | 80 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); |
81 }; | 81 }; |
82 | 82 |
83 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 83 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ |
OLD | NEW |