Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/background/background_application_list_model.h

Issue 204703002: Rename NOTIFICATION_EXTENSION_UNLOADED to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: maybe upload wont do something bizarre this time Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_ 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_
6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_ 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void SendApplicationDataChangedNotifications( 120 void SendApplicationDataChangedNotifications(
121 const extensions::Extension* extension); 121 const extensions::Extension* extension);
122 122
123 // Notifies observers that at least one background application has been added 123 // Notifies observers that at least one background application has been added
124 // or removed. 124 // or removed.
125 void SendApplicationListChangedNotifications(); 125 void SendApplicationListChangedNotifications();
126 126
127 // Invoked by Observe for NOTIFICATION_EXTENSION_LOADED. 127 // Invoked by Observe for NOTIFICATION_EXTENSION_LOADED.
128 void OnExtensionLoaded(const extensions::Extension* extension); 128 void OnExtensionLoaded(const extensions::Extension* extension);
129 129
130 // Invoked by Observe for NOTIFICATION_EXTENSION_UNLOADED. 130 // Invoked by Observe for NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED.
131 void OnExtensionUnloaded(const extensions::Extension* extension); 131 void OnExtensionUnloaded(const extensions::Extension* extension);
132 132
133 // Invoked by Observe for NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED. 133 // Invoked by Observe for NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED.
134 void OnExtensionPermissionsUpdated( 134 void OnExtensionPermissionsUpdated(
135 const extensions::Extension* extension, 135 const extensions::Extension* extension,
136 extensions::UpdatedExtensionPermissionsInfo::Reason reason, 136 extensions::UpdatedExtensionPermissionsInfo::Reason reason,
137 const extensions::PermissionSet* permissions); 137 const extensions::PermissionSet* permissions);
138 138
139 // Refresh the list of background applications and generate notifications. 139 // Refresh the list of background applications and generate notifications.
140 void Update(); 140 void Update();
141 141
142 // Determines if the given extension has to be considered a "background app" 142 // Determines if the given extension has to be considered a "background app"
143 // due to its use of PushMessaging. Normally every extension that expectes 143 // due to its use of PushMessaging. Normally every extension that expectes
144 // push messages is classified as "background app", however there are some 144 // push messages is classified as "background app", however there are some
145 // rare exceptions, so this function implements a whitelist. 145 // rare exceptions, so this function implements a whitelist.
146 static bool RequiresBackgroundModeForPushMessaging( 146 static bool RequiresBackgroundModeForPushMessaging(
147 const extensions::Extension& extension); 147 const extensions::Extension& extension);
148 148
149 ApplicationMap applications_; 149 ApplicationMap applications_;
150 extensions::ExtensionList extensions_; 150 extensions::ExtensionList extensions_;
151 ObserverList<Observer, true> observers_; 151 ObserverList<Observer, true> observers_;
152 Profile* profile_; 152 Profile* profile_;
153 content::NotificationRegistrar registrar_; 153 content::NotificationRegistrar registrar_;
154 154
155 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel); 155 DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel);
156 }; 156 };
157 157
158 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_ 158 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698