OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 private: | 24 private: |
25 friend class content::WebContentsUserData<InfoBarTabHelper>; | 25 friend class content::WebContentsUserData<InfoBarTabHelper>; |
26 | 26 |
27 typedef std::vector<InfoBarDelegate*> InfoBars; | 27 typedef std::vector<InfoBarDelegate*> InfoBars; |
28 | 28 |
29 explicit InfoBarTabHelper(content::WebContents* web_contents); | 29 explicit InfoBarTabHelper(content::WebContents* web_contents); |
30 virtual ~InfoBarTabHelper(); | 30 virtual ~InfoBarTabHelper(); |
31 | 31 |
32 // InfoBarService: | 32 // InfoBarService: |
33 virtual void SetInfoBarsEnabled(bool enabled) OVERRIDE; | 33 virtual void SetInfoBarsEnabled(bool enabled) OVERRIDE; |
34 virtual bool AddInfoBar(InfoBarDelegate* delegate) OVERRIDE; | 34 virtual InfoBarDelegate* AddInfoBar( |
| 35 scoped_ptr<InfoBarDelegate> delegate) OVERRIDE; |
35 virtual void RemoveInfoBar(InfoBarDelegate* delegate) OVERRIDE; | 36 virtual void RemoveInfoBar(InfoBarDelegate* delegate) OVERRIDE; |
36 virtual bool ReplaceInfoBar(InfoBarDelegate* old_delegate, | 37 virtual InfoBarDelegate* ReplaceInfoBar( |
37 InfoBarDelegate* new_delegate) OVERRIDE; | 38 InfoBarDelegate* old_delegate, |
| 39 scoped_ptr<InfoBarDelegate> new_delegate) OVERRIDE; |
38 virtual size_t GetInfoBarCount() const OVERRIDE; | 40 virtual size_t GetInfoBarCount() const OVERRIDE; |
39 virtual InfoBarDelegate* GetInfoBarDelegateAt(size_t index) OVERRIDE; | 41 virtual InfoBarDelegate* GetInfoBarDelegateAt(size_t index) OVERRIDE; |
40 virtual content::WebContents* GetWebContents() OVERRIDE; | 42 virtual content::WebContents* GetWebContents() OVERRIDE; |
41 | 43 |
42 // content::WebContentsObserver: | 44 // content::WebContentsObserver: |
43 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 45 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
45 | 47 |
46 // content::NotificationObserver: | 48 // content::NotificationObserver: |
47 virtual void Observe(int type, | 49 virtual void Observe(int type, |
(...skipping 10 matching lines...) Expand all Loading... |
58 // Delegates for InfoBars associated with this InfoBarTabHelper. | 60 // Delegates for InfoBars associated with this InfoBarTabHelper. |
59 InfoBars infobars_; | 61 InfoBars infobars_; |
60 bool infobars_enabled_; | 62 bool infobars_enabled_; |
61 | 63 |
62 content::NotificationRegistrar registrar_; | 64 content::NotificationRegistrar registrar_; |
63 | 65 |
64 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); | 66 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); |
65 }; | 67 }; |
66 | 68 |
67 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 69 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ |
OLD | NEW |