Chromium Code Reviews| 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_API_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
| 10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
| 11 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
| 12 | 12 |
| 13 class InfoBarDelegate; | 13 class InfoBarDelegate; |
| 14 | 14 |
| 15 // Per-tab info bar manager. | 15 // Per-tab info bar manager. |
| 16 class InfoBarTabHelper : public content::WebContentsObserver, | 16 class InfoBarTabHelper : public content::WebContentsObserver, |
|
jam
2012/08/08 16:29:58
i'm confused, this doesn't seem like an api of inf
| |
| 17 public content::NotificationObserver { | 17 public content::NotificationObserver { |
| 18 public: | 18 public: |
| 19 explicit InfoBarTabHelper(content::WebContents* web_contents); | 19 explicit InfoBarTabHelper(content::WebContents* web_contents); |
| 20 virtual ~InfoBarTabHelper(); | 20 virtual ~InfoBarTabHelper(); |
| 21 | 21 |
| 22 // Adds an InfoBar for the specified |delegate|. | 22 // Adds an InfoBar for the specified |delegate|. |
| 23 // | 23 // |
| 24 // If infobars are disabled for this tab or the tab already has a delegate | 24 // If infobars are disabled for this tab or the tab already has a delegate |
| 25 // which returns true for InfoBarDelegate::EqualsDelegate(delegate), | 25 // which returns true for InfoBarDelegate::EqualsDelegate(delegate), |
| 26 // |delegate| is closed immediately without being added. | 26 // |delegate| is closed immediately without being added. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 | 78 |
| 79 // Delegates for InfoBars associated with this InfoBarTabHelper. | 79 // Delegates for InfoBars associated with this InfoBarTabHelper. |
| 80 InfoBars infobars_; | 80 InfoBars infobars_; |
| 81 bool infobars_enabled_; | 81 bool infobars_enabled_; |
| 82 | 82 |
| 83 content::NotificationRegistrar registrar_; | 83 content::NotificationRegistrar registrar_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); | 85 DISALLOW_COPY_AND_ASSIGN(InfoBarTabHelper); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_TAB_HELPER_H_ | 88 #endif // CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_HELPER_H_ |
| OLD | NEW |