OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BACKGROUND_APPLICATION_LIST_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ |
6 #define CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ | 6 #define CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Notifies observers that at least one background application has been added | 115 // Notifies observers that at least one background application has been added |
116 // or removed. | 116 // or removed. |
117 void OnApplicationListChanged(); | 117 void OnApplicationListChanged(); |
118 | 118 |
119 // Invoked by Observe for EXTENSION_LOADED notifications. | 119 // Invoked by Observe for EXTENSION_LOADED notifications. |
120 void OnExtensionLoaded(Extension* extension); | 120 void OnExtensionLoaded(Extension* extension); |
121 | 121 |
122 // Invoked by Observe for EXTENSION_UNLOADED notifications. | 122 // Invoked by Observe for EXTENSION_UNLOADED notifications. |
123 void OnExtensionUnloaded(const Extension* extension); | 123 void OnExtensionUnloaded(const Extension* extension); |
124 | 124 |
125 // Refresh the list of background applications and generates ApplicationAdded | 125 // Refresh the list of background applications and generate notifications. |
126 // and ApplicationRemoved events. | |
127 void Update(); | 126 void Update(); |
128 | 127 |
129 ApplicationMap applications_; | 128 ApplicationMap applications_; |
130 ExtensionList extensions_; | 129 ExtensionList extensions_; |
131 ObserverList<Observer> observers_; | 130 ObserverList<Observer> observers_; |
132 Profile* profile_; | 131 Profile* profile_; |
133 NotificationRegistrar registrar_; | 132 NotificationRegistrar registrar_; |
134 | 133 |
135 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel); | 134 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel); |
136 }; | 135 }; |
137 | 136 |
138 #endif // CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ | 137 #endif // CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ |
OLD | NEW |