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 EXTENSIONS_BROWSER_WARNING_SERVICE_H_ | 5 #ifndef EXTENSIONS_BROWSER_WARNING_SERVICE_H_ |
6 #define EXTENSIONS_BROWSER_WARNING_SERVICE_H_ | 6 #define EXTENSIONS_BROWSER_WARNING_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void AddObserver(Observer* observer); | 68 void AddObserver(Observer* observer); |
69 void RemoveObserver(Observer* observer); | 69 void RemoveObserver(Observer* observer); |
70 | 70 |
71 private: | 71 private: |
72 void NotifyWarningsChanged(); | 72 void NotifyWarningsChanged(); |
73 | 73 |
74 // ExtensionRegistryObserver implementation. | 74 // ExtensionRegistryObserver implementation. |
75 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, | 75 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, |
76 const Extension* extension, | 76 const Extension* extension, |
77 UnloadedExtensionInfo::Reason reason) | 77 UnloadedExtensionInfo::Reason reason) |
78 OVERRIDE; | 78 override; |
79 | 79 |
80 // Currently existing warnings. | 80 // Currently existing warnings. |
81 WarningSet warnings_; | 81 WarningSet warnings_; |
82 | 82 |
83 content::BrowserContext* const browser_context_; | 83 content::BrowserContext* const browser_context_; |
84 | 84 |
85 // Listen to extension unloaded notifications. | 85 // Listen to extension unloaded notifications. |
86 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 86 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
87 extension_registry_observer_; | 87 extension_registry_observer_; |
88 | 88 |
89 ObserverList<Observer> observer_list_; | 89 ObserverList<Observer> observer_list_; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace extensions | 92 } // namespace extensions |
93 | 93 |
94 #endif // EXTENSIONS_BROWSER_WARNING_SERVICE_H_ | 94 #endif // EXTENSIONS_BROWSER_WARNING_SERVICE_H_ |
OLD | NEW |