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

Side by Side Diff: extensions/browser/notification_types.h

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « extensions/browser/lazy_background_task_queue.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
6 #define EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
7
8 #include "content/public/browser/notification_types.h"
9
10 //NOCOMMIT: This will become "namespace extensions".
James Cook 2014/07/30 16:51:45 and will involve a global find/replace touching 13
11 namespace chrome {
12
13 // Only notifications fired by the extensions module should be here. The
14 // extensions module should not listen to notifications fired by the
15 // embedder.
16 enum ExtensionNotificationType {
sky 2014/07/30 17:31:39 You're going to drop the Extension here too, that
James Cook 2014/07/30 22:36:34 Yes, this will become NotificationType (in namespa
17 NOTIFICATION_EXTENSIONS_START = content::NOTIFICATION_CONTENT_END,
18
19 // Sent when a CrxInstaller finishes. Source is the CrxInstaller that
20 // finished. The details are the extension which was installed.
21 NOTIFICATION_CRX_INSTALLER_DONE,
James Cook 2014/07/30 16:51:45 These are copied in order from chrome_notification
sky 2014/07/30 17:31:40 If you look in chrome/browser/chrome_notification_
James Cook 2014/07/30 22:36:34 I'll stick with the existing order, then, as it ha
22
23 // Sent when the known installed extensions have all been loaded. In
24 // testing scenarios this can happen multiple times if extensions are
25 // unloaded and reloaded. The source is a BrowserContext*.
26 //
27 // DEPRECATED: Use ExtensionSystem::Get(browser_context)->ready().Post().
28 NOTIFICATION_EXTENSIONS_READY,//NOCOMMIT: Rename with _DEPRECATED
29
30 // Sent when a new extension is loaded. The details are an Extension, and
31 // the source is a BrowserContext*.
32 //
33 // DEPRECATED: Use ExtensionRegistry::AddObserver instead.
34 NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
35
36 // An error occured while attempting to load an extension. The details are a
37 // string with details about why the load failed.
38 NOTIFICATION_EXTENSION_LOAD_ERROR,
39
40 // Sent when an extension is enabled. Under most circumstances, listeners will
41 // want to use ExtensionRegistryObserver::OnExtensionLoaded(). This
42 // notification is only fired when the "Enable" button is hit in the
43 // extensions tab. The details are an Extension, and the source is a
44 // BrowserContext*.
45 NOTIFICATION_EXTENSION_ENABLED,
46
47 // Sent when attempting to load a new extension, but they are disabled. The
48 // details are an Extension, and the source is a BrowserContext*.
49 NOTIFICATION_EXTENSION_UPDATE_DISABLED,
50
51 // Sent when an extension's permissions change. The details are an
52 // UpdatedExtensionPermissionsInfo, and the source is a BrowserContext*.
53 NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED,
54
55 // Sent immediately before new extensions are installed or existing
56 // extensions are updated. The details are an InstalledExtensionInfo, and the
57 // source is a BrowserContext*.
58 //
59 // DEPRECATED: Use ExtensionRegistry::AddObserver instead.
60 NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
61
62 // An error occured during extension install. The details are a string with
63 // details about why the install failed.
64 NOTIFICATION_EXTENSION_INSTALL_ERROR,
65
66 // Sent when an extension has been uninstalled. The details are an Extension,
67 // and the source is a BrowserContext*.
68 //
69 // DEPRECATED: Use ExtensionRegistry::AddObserver instead.
70 NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
71
72 // Sent when an extension uninstall is not allowed because the extension is
73 // not user manageable. The details are an Extension, and the source is a
74 // BrowserContext*.
75 NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
76
77 // Sent when an extension is unloaded. This happens when an extension is
78 // uninstalled or disabled. The details are an UnloadedExtensionInfo, and the
79 // source is a BrowserContext*.
80 //
81 // Note that when this notification is sent, the ExtensionService and the
82 // ExtensionRegistry have already removed the extension from their internal
83 // state.
84 //
85 // DEPRECATED: Use ExtensionRegistry::AddObserver instead.
86 NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
87
88 // Sent when an Extension object is removed from ExtensionService. This
89 // can happen when an extension is uninstalled, upgraded, or blacklisted,
90 // including all cases when the Extension is deleted. The details are an
91 // Extension, and the source is a BrowserContext*.
92 NOTIFICATION_EXTENSION_REMOVED,
93
94 // Sent after a new ExtensionHost* is created. The details are
95 // an ExtensionHost* and the source is a BrowserContext*.
96 NOTIFICATION_EXTENSION_HOST_CREATED,
97
98 // Sent before an ExtensionHost* is destroyed. The details are
99 // an ExtensionHost* and the source is a BrowserContext*.
100 NOTIFICATION_EXTENSION_HOST_DESTROYED,
101
102 // Sent by an ExtensionHost* when it has finished its initial page load,
103 // including any external resources.
104 // The details are an ExtensionHost* and the source is a BrowserContext*.
105 NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
106
107 // Sent by an ExtensionHost* when its render view requests closing through
108 // window.close(). The details are an ExtensionHost* and the source is a
109 // BrowserContext*.
110 NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
111
112 // Sent when extension render process ends (whether it crashes or closes). The
113 // details are an ExtensionHost* and the source is a BrowserContext*. Not sent
114 // during browser shutdown.
115 NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
116
117 // Sent when a background page is ready so other components can load.
118 NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
119
120 // Sent when a browser action's state has changed. The source is the
121 // ExtensionAction* that changed. The details are the BrowserContext* that the
122 // browser action belongs to.
123 NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
124
125 // Sent when the count of page actions has changed. Note that some of them
126 // may not apply to the current page. The source is a LocationBar*. There
127 // are no details.
128 NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
129
130 // Sent when a browser action's visibility has changed. The source is the
131 // ExtensionPrefs* that changed, and the details are a std::string with the
132 // extension's ID.
133 NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
134
135 // Sent when a page action's visibility has changed. The source is the
136 // ExtensionAction* that changed. The details are a WebContents*.
137 NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
138
139 // Sent when a system indicator action's state has changed. The source is the
140 // BrowserContext* that the browser action belongs to. The details are the
141 // ExtensionAction* that changed.
142 NOTIFICATION_EXTENSION_SYSTEM_INDICATOR_UPDATED,
143
144 // Sent when an extension command has been removed. The source is the
145 // BrowserContext* and the details is a std::pair of two std::string objects
146 // (an extension ID and the name of the command being removed).
147 NOTIFICATION_EXTENSION_COMMAND_REMOVED,
148
149 // Sent when an extension command has been added. The source is the
150 // BrowserContext* and the details is a std::pair of two std::string objects
151 // (an extension ID and the name of the command being added).
152 NOTIFICATION_EXTENSION_COMMAND_ADDED,
153
154 // Sent when an extension command shortcut for a browser action is activated
155 // on Mac. The source is the BrowserContext* and the details is a std::pair of
156 // a std::string containing an extension ID and a gfx::NativeWindow for the
157 // associated window.
158 NOTIFICATION_EXTENSION_COMMAND_BROWSER_ACTION_MAC,
159
160 // Sent when an extension command shortcut for a page action is activated
161 // on Mac. The source is the BrowserContext* and the details is a std::pair of a
162 // std::string containing an extension ID and a gfx::NativeWindow for the
163 // associated window.
164 NOTIFICATION_EXTENSION_COMMAND_PAGE_ACTION_MAC,
165
166 // A new extension RenderViewHost has been registered. The details are
167 // the RenderViewHost*.
168 NOTIFICATION_EXTENSION_VIEW_REGISTERED,
169
170 // An extension RenderViewHost has been unregistered. The details are
171 // the RenderViewHost*.
172 NOTIFICATION_EXTENSION_VIEW_UNREGISTERED,
173
174 // Sent by an extension to notify the browser about the results of a unit
175 // test.
176 NOTIFICATION_EXTENSION_TEST_PASSED,
177 NOTIFICATION_EXTENSION_TEST_FAILED,
178
179 // Sent by extension test javascript code, typically in a browser test. The
180 // sender is a std::string representing the extension id, and the details
181 // are a std::string with some message. This is particularly useful when you
182 // want to have C++ code wait for javascript code to do something.
183 NOTIFICATION_EXTENSION_TEST_MESSAGE,
184
185 // Sent when an bookmarks extensions API function was successfully invoked.
186 // The source is the id of the extension that invoked the function, and the
187 // details are a pointer to the const BookmarksFunction in question.
188 NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED,
189
190 // Sent when a downloads extensions API event is fired. The source is an
191 // ExtensionDownloadsEventRouter::NotificationSource, and the details is a
192 // std::string containing json. Used for testing.
193 NOTIFICATION_EXTENSION_DOWNLOADS_EVENT,
194
195 // Sent when an omnibox extension has sent back omnibox suggestions. The
196 // source is the BrowserContext*, and the details are an
197 // extensions::api::omnibox::SendSuggestions::Params object.
198 NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY,
199
200 // Sent when the user accepts the input in an extension omnibox keyword
201 // session. The source is the BrowserContext*.
202 NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED,
203
204 // Sent when an omnibox extension has updated the default suggestion. The
205 // source is the BrowserContext*.
206 NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
207
208 // Sent when the extension updater starts checking for updates to installed
209 // extensions. The source is a BrowserContext*, and there are no details.
210 NOTIFICATION_EXTENSION_UPDATING_STARTED,
211
212 // The extension updater found an update and will attempt to download and
213 // install it. The source is a BrowserContext*, and the details are an
214 // extensions::UpdateDetails object with the extension id and version of the
215 // found update.
216 NOTIFICATION_EXTENSION_UPDATE_FOUND,
217
218 // Sent when there are new user scripts available. The details are a
219 // pointer to SharedMemory containing the new scripts.
220 NOTIFICATION_USER_SCRIPTS_UPDATED,
221
222 NOTIFICATION_EXTENSIONS_END
223 };
224
225 } // namespace chrome
226
227 #endif // EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
OLDNEW
« no previous file with comments | « extensions/browser/lazy_background_task_queue.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698