| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ | 5 #ifndef IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ |
| 6 #define IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ | 6 #define IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // than once. The caller retains the ownership of the observer object. | 41 // than once. The caller retains the ownership of the observer object. |
| 42 void AddObserver(Observer* obs); | 42 void AddObserver(Observer* obs); |
| 43 // Removes an observer. | 43 // Removes an observer. |
| 44 void RemoveObserver(Observer* obs); | 44 void RemoveObserver(Observer* obs); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 BrowserState* browser_state_; // weak, owns this object. | 47 BrowserState* browser_state_; // weak, owns this object. |
| 48 // true if the ActiveStateManager is active. | 48 // true if the ActiveStateManager is active. |
| 49 bool active_; | 49 bool active_; |
| 50 // The list of observers. | 50 // The list of observers. |
| 51 ObserverList<Observer> observer_list_; | 51 base::ObserverList<Observer> observer_list_; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(ActiveStateManagerImpl); | 53 DISALLOW_COPY_AND_ASSIGN(ActiveStateManagerImpl); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace web | 56 } // namespace web |
| 57 | 57 |
| 58 #endif // IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ | 58 #endif // IOS_WEB_ACTIVE_STATE_MANAGER_IMPL_H_ |
| OLD | NEW |