| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGER_H_ | 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ |
| 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_H_ | 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "chrome/browser/infobars/infobar_delegate.h" | 12 #include "components/infobars/core/infobar_delegate.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class WebContents; | 15 class WebContents; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace infobars { |
| 19 |
| 18 class InfoBar; | 20 class InfoBar; |
| 19 | 21 |
| 20 // Provides access to creating, removing and enumerating info bars | 22 // Provides access to creating, removing and enumerating info bars |
| 21 // attached to a tab. | 23 // attached to a tab. |
| 22 class InfoBarManager { | 24 class InfoBarManager { |
| 23 public: | 25 public: |
| 24 // Observer class for infobar events. | 26 // Observer class for infobar events. |
| 25 class Observer { | 27 class Observer { |
| 26 public: | 28 public: |
| 27 virtual void OnInfoBarAdded(InfoBar* infobar) = 0; | 29 virtual void OnInfoBarAdded(InfoBar* infobar) = 0; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void RemoveInfoBarInternal(InfoBar* infobar, bool animate); | 112 void RemoveInfoBarInternal(InfoBar* infobar, bool animate); |
| 111 | 113 |
| 112 InfoBars infobars_; | 114 InfoBars infobars_; |
| 113 bool infobars_enabled_; | 115 bool infobars_enabled_; |
| 114 | 116 |
| 115 ObserverList<Observer, true> observer_list_; | 117 ObserverList<Observer, true> observer_list_; |
| 116 | 118 |
| 117 DISALLOW_COPY_AND_ASSIGN(InfoBarManager); | 119 DISALLOW_COPY_AND_ASSIGN(InfoBarManager); |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_H_ | 122 } // namespace infobars |
| 123 |
| 124 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ |
| OLD | NEW |