OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 27 matching lines...) Expand all Loading... |
38 // it no longer detects a previously known extension. | 38 // it no longer detects a previously known extension. |
39 virtual void OnApplicationListChanged(); | 39 virtual void OnApplicationListChanged(); |
40 | 40 |
41 protected: | 41 protected: |
42 virtual ~Observer(); | 42 virtual ~Observer(); |
43 }; | 43 }; |
44 | 44 |
45 // Create a new model associated with profile. | 45 // Create a new model associated with profile. |
46 explicit BackgroundApplicationListModel(Profile* profile); | 46 explicit BackgroundApplicationListModel(Profile* profile); |
47 | 47 |
48 ~BackgroundApplicationListModel(); | 48 virtual ~BackgroundApplicationListModel(); |
49 | 49 |
50 // Associate observer with this model. | 50 // Associate observer with this model. |
51 void AddObserver(Observer* observer); | 51 void AddObserver(Observer* observer); |
52 | 52 |
53 // Return the icon associated with |extension| or NULL. NULL indicates either | 53 // Return the icon associated with |extension| or NULL. NULL indicates either |
54 // that there is no icon associated with the extension, or that a pending | 54 // that there is no icon associated with the extension, or that a pending |
55 // task to retrieve the icon has not completed. See the Observer class above. | 55 // task to retrieve the icon has not completed. See the Observer class above. |
56 // | 56 // |
57 // NOTE: The model manages the SkBitmap result, that is it "owns" the memory, | 57 // NOTE: The model manages the SkBitmap result, that is it "owns" the memory, |
58 // releasing it if the associated background application is unloaded. | 58 // releasing it if the associated background application is unloaded. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 ApplicationMap applications_; | 128 ApplicationMap applications_; |
129 ExtensionList extensions_; | 129 ExtensionList extensions_; |
130 ObserverList<Observer> observers_; | 130 ObserverList<Observer> observers_; |
131 Profile* profile_; | 131 Profile* profile_; |
132 NotificationRegistrar registrar_; | 132 NotificationRegistrar registrar_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel); | 134 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel); |
135 }; | 135 }; |
136 | 136 |
137 #endif // CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ | 137 #endif // CHROME_BROWSER_BACKGROUND_APPLICATION_LIST_MODEL_H_ |
OLD | NEW |