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: content/common/content_notification_types.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « content/common/child_process_host.cc ('k') | content/common/notification_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CONTENT_COMMON_NOTIFICATION_TYPE_H_ 5 #ifndef CONTENT_COMMON_NOTIFICATION_TYPE_H_
6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_ 6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_
7 #pragma once 7 #pragma once
8 8
9 // This file describes various types used to describe and filter notifications 9 // This file describes various types used to describe and filter notifications
10 // that pass through the NotificationService. 10 // that pass through the NotificationService.
11 // 11 //
12 // It is written as an enum inside a class so that it can be forward declared. 12 namespace content {
13 // You're not allowed to forward declare an enum, and we want to forward 13
14 // declare this since it's required by NotificationObserver which is included 14 enum {
15 // by a lot of header files. 15 NOTIFICATION_CONTENT_START = 0,
16 // 16
17 // Since this class encapsulates an integral value, it should be passed by 17 // General -----------------------------------------------------------------
18 // value. 18
19 class NotificationType { 19 // Special signal value to represent an interest in all notifications.
20 public: 20 // Not valid when posting a notification.
21 enum Type { 21 NOTIFICATION_ALL = NOTIFICATION_CONTENT_START,
22 // General ----------------------------------------------------------------- 22
23 23 // The app is done processing user actions, now is a good time to do
24 // Special signal value to represent an interest in all notifications. 24 // some background work.
25 // Not valid when posting a notification. 25 NOTIFICATION_IDLE,
26 ALL = 0, 26
27 27 // Means that the app has just started doing something in response to a
28 // The app is done processing user actions, now is a good time to do 28 // user action, and that background processes shouldn't run if avoidable.
29 // some background work. 29 NOTIFICATION_BUSY,
30 IDLE, 30
31 31 // This is sent when the user does a gesture resulting in a noteworthy
32 // Means that the app has just started doing something in response to a 32 // action taking place. This is typically used for logging. The source is
33 // user action, and that background processes shouldn't run if avoidable. 33 // the profile, and the details is a string identifying the action.
34 BUSY, 34 NOTIFICATION_USER_ACTION,
35 35
36 // This is sent when the user does a gesture resulting in a noteworthy 36 // NavigationController ----------------------------------------------------
37 // action taking place. This is typically used for logging. The source is 37
38 // the profile, and the details is a string identifying the action. 38 // A new pending navigation has been created. Pending entries are created
39 USER_ACTION, 39 // when the user requests the navigation. We don't know if it will actually
40 40 // happen until it does (at this point, it will be "committed." Note that
41 // NavigationController ---------------------------------------------------- 41 // renderer- initiated navigations such as link clicks will never be
42 42 // pending.
43 // A new pending navigation has been created. Pending entries are created 43 //
44 // when the user requests the navigation. We don't know if it will actually 44 // This notification is called after the pending entry is created, but
45 // happen until it does (at this point, it will be "committed." Note that 45 // before we actually try to navigate. The source will be the
46 // renderer- initiated navigations such as link clicks will never be 46 // NavigationController that owns the pending entry, and there are no
47 // pending. 47 // details.
48 // 48 NOTIFICATION_NAV_ENTRY_PENDING,
49 // This notification is called after the pending entry is created, but 49
50 // before we actually try to navigate. The source will be the 50 // A new non-pending navigation entry has been created. This will
51 // NavigationController that owns the pending entry, and there are no 51 // correspond to one NavigationController entry being created (in the case
52 // details. 52 // of new navigations) or renavigated to (for back/forward navigations).
53 NAV_ENTRY_PENDING, 53 //
54 54 // The source will be the navigation controller doing the commit. The
55 // A new non-pending navigation entry has been created. This will 55 // details will be NavigationController::LoadCommittedDetails.
56 // correspond to one NavigationController entry being created (in the case 56 NOTIFICATION_NAV_ENTRY_COMMITTED,
57 // of new navigations) or renavigated to (for back/forward navigations). 57
58 // 58 // Indicates that the NavigationController given in the Source has
59 // The source will be the navigation controller doing the commit. The 59 // decreased its back/forward list count by removing entries from either
60 // details will be NavigationController::LoadCommittedDetails. 60 // the front or back of its list. This is usually the result of going back
61 NAV_ENTRY_COMMITTED, 61 // and then doing a new navigation, meaning all the "forward" items are
62 62 // deleted.
63 // Indicates that the NavigationController given in the Source has 63 //
64 // decreased its back/forward list count by removing entries from either 64 // This normally happens as a result of a new navigation. It will be
65 // the front or back of its list. This is usually the result of going back 65 // followed by a NAV_ENTRY_COMMITTED message for the new page that
66 // and then doing a new navigation, meaning all the "forward" items are 66 // caused the pruning. It could also be a result of removing an item from
67 // deleted. 67 // the list to fix up after interstitials.
68 // 68 //
69 // This normally happens as a result of a new navigation. It will be 69 // The details are NavigationController::PrunedDetails.
70 // followed by a NAV_ENTRY_COMMITTED message for the new page that 70 NOTIFICATION_NAV_LIST_PRUNED,
71 // caused the pruning. It could also be a result of removing an item from 71
72 // the list to fix up after interstitials. 72 // Indicates that a NavigationEntry has changed. The source will be the
73 // 73 // NavigationController that owns the NavigationEntry. The details will be
74 // The details are NavigationController::PrunedDetails. 74 // a NavigationController::EntryChangedDetails struct.
75 NAV_LIST_PRUNED, 75 //
76 76 // This will NOT be sent on navigation, interested parties should also
77 // Indicates that a NavigationEntry has changed. The source will be the 77 // listen for NAV_ENTRY_COMMITTED to handle that case. This will be
78 // NavigationController that owns the NavigationEntry. The details will be 78 // sent when the entry is updated outside of navigation (like when a new
79 // a NavigationController::EntryChangedDetails struct. 79 // title comes).
80 // 80 NOTIFICATION_NAV_ENTRY_CHANGED,
81 // This will NOT be sent on navigation, interested parties should also 81
82 // listen for NAV_ENTRY_COMMITTED to handle that case. This will be 82 // Other load-related (not from NavigationController) ----------------------
83 // sent when the entry is updated outside of navigation (like when a new 83
84 // title comes). 84 // Corresponds to ViewHostMsg_DocumentOnLoadCompletedInMainFrame. The source
85 NAV_ENTRY_CHANGED, 85 // is the TabContents and the details the page_id.
86 86 NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
87 // Other load-related (not from NavigationController) ---------------------- 87
88 88 // A content load is starting. The source will be a
89 // Corresponds to ViewHostMsg_DocumentOnLoadCompletedInMainFrame. The source 89 // Source<NavigationController> corresponding to the tab in which the load
90 // is the TabContents and the details the page_id. 90 // is occurring. No details are expected for this notification.
91 LOAD_COMPLETED_MAIN_FRAME, 91 NOTIFICATION_LOAD_START,
92 92
93 // A content load is starting. The source will be a 93 // A content load has stopped. The source will be a
94 // Source<NavigationController> corresponding to the tab in which the load 94 // Source<NavigationController> corresponding to the tab in which the load
95 // is occurring. No details are expected for this notification. 95 // is occurring. Details in the form of a LoadNotificationDetails object
96 LOAD_START, 96 // are optional.
97 97 NOTIFICATION_LOAD_STOP,
98 // A content load has stopped. The source will be a 98
99 // Source<NavigationController> corresponding to the tab in which the load 99 // Content was loaded from an in-memory cache. The source will be a
100 // is occurring. Details in the form of a LoadNotificationDetails object 100 // Source<NavigationController> corresponding to the tab in which the load
101 // are optional. 101 // occurred. Details in the form of a LoadFromMemoryCacheDetails object
102 LOAD_STOP, 102 // are provided.
103 103 NOTIFICATION_LOAD_FROM_MEMORY_CACHE,
104 // Content was loaded from an in-memory cache. The source will be a 104
105 // Source<NavigationController> corresponding to the tab in which the load 105 // A provisional content load has failed with an error. The source will be
106 // occurred. Details in the form of a LoadFromMemoryCacheDetails object 106 // a Source<NavigationController> corresponding to the tab in which the
107 // are provided. 107 // load occurred. Details in the form of a ProvisionalLoadDetails object
108 LOAD_FROM_MEMORY_CACHE, 108 // are provided.
109 109 NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
110 // A provisional content load has failed with an error. The source will be 110
111 // a Source<NavigationController> corresponding to the tab in which the 111 // A response has been received for a resource request. The source will be
112 // load occurred. Details in the form of a ProvisionalLoadDetails object 112 // a Source<RenderViewHostDelegate> corresponding to the tab in which the
113 // are provided. 113 // request was issued. Details in the form of a ResourceRequestDetails
114 FAIL_PROVISIONAL_LOAD_WITH_ERROR, 114 // object are provided.
115 115 NOTIFICATION_RESOURCE_RESPONSE_STARTED,
116 // A response has been received for a resource request. The source will be 116
117 // a Source<RenderViewHostDelegate> corresponding to the tab in which the 117 // A redirect was received while requesting a resource. The source will be
118 // request was issued. Details in the form of a ResourceRequestDetails 118 // a Source<RenderViewHostDelegate> corresponding to the tab in which the
119 // object are provided. 119 // request was issued. Details in the form of a ResourceRedirectDetails
120 RESOURCE_RESPONSE_STARTED, 120 // are provided.
121 121 NOTIFICATION_RESOURCE_RECEIVED_REDIRECT,
122 // A redirect was received while requesting a resource. The source will be 122
123 // a Source<RenderViewHostDelegate> corresponding to the tab in which the 123 // A new window is created in response to a request from a renderer. The
124 // request was issued. Details in the form of a ResourceRedirectDetails 124 // source will be a Source<TabContents> corresponding to the tab the
125 // are provided. 125 // request originates from. Details in the form of a
126 RESOURCE_RECEIVED_REDIRECT, 126 // ViewHostMsg_CreateWindow_Params object are provided.
127 127 NOTIFICATION_CREATING_NEW_WINDOW,
128 // A new window is created in response to a request from a renderer. The 128
129 // source will be a Source<TabContents> corresponding to the tab the 129 // A new window was requested but was not created. The source will be a
130 // request originates from. Details in the form of a 130 // Source<TabContents> corresponding to the tab the request originated from.
131 // ViewHostMsg_CreateWindow_Params object are provided. 131 // Details are the ViewHostMsg_CreateWindow_Params object that were used in
132 CREATING_NEW_WINDOW, 132 // the request.
133 133 NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED,
134 // A new window was requested but was not created. The source will be a 134
135 // Source<TabContents> corresponding to the tab the request originated from. 135 // SSL ---------------------------------------------------------------------
136 // Details are the ViewHostMsg_CreateWindow_Params object that were used in 136
137 // the request. 137 // Updating the SSL security indicators (the lock icon and such) proceeds
138 CREATING_NEW_WINDOW_CANCELLED, 138 // in two phases:
139 139 //
140 // SSL --------------------------------------------------------------------- 140 // 1) The internal SSL state for a host or tab changes. When this happens,
141 141 // the SSLManager broadcasts an SSL_INTERNAL_STATE_CHANGED notification.
142 // Updating the SSL security indicators (the lock icon and such) proceeds 142 //
143 // in two phases: 143 // 2) The SSLManager for each tab receives this notification and might or
144 // 144 // might not update the navigation entry for its tab, depending on
145 // 1) The internal SSL state for a host or tab changes. When this happens, 145 // whether the change in state affects that tab. If the SSLManager does
146 // the SSLManager broadcasts an SSL_INTERNAL_STATE_CHANGED notification. 146 // change the navigation entry, then the SSLManager broadcasts an
147 // 147 // SSL_VISIBLE_STATE_CHANGED notification to the user interface can
148 // 2) The SSLManager for each tab receives this notification and might or 148 // redraw properly.
149 // might not update the navigation entry for its tab, depending on 149
150 // whether the change in state affects that tab. If the SSLManager does 150 // The SSL state of a page has changed in some visible way. For example,
151 // change the navigation entry, then the SSLManager broadcasts an 151 // if an insecure resource is loaded on a secure page. Note that a
152 // SSL_VISIBLE_STATE_CHANGED notification to the user interface can 152 // toplevel load commit will also update the SSL state (since the
153 // redraw properly. 153 // NavigationEntry is new) and this message won't always be sent in that
154 154 // case. Listen to this notification if you need to refresh SSL-related UI
155 // The SSL state of a page has changed in some visible way. For example, 155 // elements.
156 // if an insecure resource is loaded on a secure page. Note that a 156 //
157 // toplevel load commit will also update the SSL state (since the 157 // There is no source or details.
158 // NavigationEntry is new) and this message won't always be sent in that 158 NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
159 // case. Listen to this notification if you need to refresh SSL-related UI 159
160 // elements. 160 // The SSL state of the browser has changed in some internal way. For
161 // 161 // example, the user might have explicitly allowed some broken certificate
162 // There is no source or details. 162 // or a secure origin might have included some insecure content. Listen to
163 SSL_VISIBLE_STATE_CHANGED, 163 // this notifiation if you need to keep track of our internal SSL state.
164 164 //
165 // The SSL state of the browser has changed in some internal way. For 165 // The source will be the navigation controller associated with the state
166 // example, the user might have explicitly allowed some broken certificate 166 // change. There are no details.
167 // or a secure origin might have included some insecure content. Listen to 167 NOTIFICATION_SSL_INTERNAL_STATE_CHANGED,
168 // this notifiation if you need to keep track of our internal SSL state. 168
169 // 169 // The user accepted or dismissed a SSL client authentication request.
170 // The source will be the navigation controller associated with the state 170 // The source is a Source<SSLClientAuthHandler>. Details is a
171 // change. There are no details. 171 // SSLClientAuthNotificationDetails which records specifies which
172 SSL_INTERNAL_STATE_CHANGED, 172 // SSLCertRequestInfo the request was for and which X509Certificate was
173 173 // selected (if any).
174 // The user accepted or dismissed a SSL client authentication request. 174 NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED,
175 // The source is a Source<SSLClientAuthHandler>. Details is a 175
176 // SSLClientAuthNotificationDetails which records specifies which 176 // Notification that a view was removed from a view hierarchy. The source
177 // SSLCertRequestInfo the request was for and which X509Certificate was 177 // is the view, the details is the parent view.
178 // selected (if any). 178 NOTIFICATION_VIEW_REMOVED,
179 SSL_CLIENT_AUTH_CERT_SELECTED, 179
180 180 // This message is sent when the last window considered to be an
181 // Views ------------------------------------------------------------------- 181 // "application window" has been closed. Dependent/dialog/utility windows
182 182 // can use this as a way to know that they should also close. No source or
183 // Notification that a view was removed from a view hierarchy. The source 183 // details are passed.
184 // is the view, the details is the parent view. 184 NOTIFICATION_ALL_APPWINDOWS_CLOSED,
185 VIEW_REMOVED,
186
187 // Browser-window ----------------------------------------------------------
188
189 // This message is sent after a window has been opened. The source is a
190 // Source<Browser> containing the affected Browser. No details are
191 // expected.
192 BROWSER_OPENED,
193
194 // This message is sent soon after BROWSER_OPENED, and indicates that
195 // the Browser's |window_| is now non-NULL. The source is a Source<Browser>
196 // containing the affected Browser. No details are expected.
197 BROWSER_WINDOW_READY,
198
199 // This message is sent when a browser is closing. The source is a
200 // Source<Browser> containing the affected Browser. Details is a boolean
201 // that if true indicates that the application will be closed as a result of
202 // this browser window closure (i.e. this was the last opened browser
203 // window on win/linux). This is sent prior to BROWSER_CLOSED, and may be
204 // sent more than once for a particular browser.
205 BROWSER_CLOSING,
206
207 // This message is sent after a window has been closed. The source is a
208 // Source<Browser> containing the affected Browser. Details is a boolean
209 // that if true indicates that the last browser window has closed - this
210 // does not indicate that the application is exiting (observers should
211 // listen for APP_TERMINATING if they want to detect when the application
212 // will shut down). Note that the boolean pointed to by details is only
213 // valid for the duration of this call.
214 BROWSER_CLOSED,
215
216 // This message is sent when the last window considered to be an
217 // "application window" has been closed. Dependent/dialog/utility windows
218 // can use this as a way to know that they should also close. No source or
219 // details are passed.
220 ALL_APPWINDOWS_CLOSED,
221 185
222 #if defined(OS_MACOSX) 186 #if defined(OS_MACOSX)
223 // This message is sent when the application is made active (Mac OS X only 187 // This message is sent when the application is made active (Mac OS X only
224 // at present). No source or details are passed. 188 // at present). No source or details are passed.
225 APP_ACTIVATED, 189 NOTIFICATION_APP_ACTIVATED,
226 #endif 190 #endif
227 191
228 // This message is sent when the application is terminating (the last 192 // This message is sent when the application is terminating (the last
229 // browser window has shutdown as part of an explicit user-initiated exit, 193 // browser window has shutdown as part of an explicit user-initiated exit,
230 // or the user closed the last browser window on Windows/Linux and there are 194 // or the user closed the last browser window on Windows/Linux and there are
231 // no BackgroundContents keeping the browser running). No source or details 195 // no BackgroundContents keeping the browser running). No source or details
232 // are passed. 196 // are passed.
233 APP_TERMINATING, 197 NOTIFICATION_APP_TERMINATING,
234 198
235 #if defined(OS_MACOSX) 199 #if defined(OS_MACOSX)
236 // This notification is sent when the app has no key window, such as when 200 // This notification is sent when the app has no key window, such as when
237 // all windows are closed but the app is still active. No source or details 201 // all windows are closed but the app is still active. No source or details
238 // are provided. 202 // are provided.
239 NO_KEY_WINDOW, 203 NOTIFICATION_NO_KEY_WINDOW,
240 #endif 204 #endif
241 205
242 // This is sent when the user has chosen to exit the app, but before any 206 // This is sent when the user has chosen to exit the app, but before any
243 // browsers have closed. This is sent if the user chooses to exit 207 // browsers have closed. This is sent if the user chooses to exit
244 // (via exit menu item or keyboard shortcut) or to restart the process 208 // (via exit menu item or keyboard shortcut) or to restart the process
245 // (such as in flags page), not if Chrome exists by some other means 209 // (such as in flags page), not if Chrome exists by some other means
246 // (such as the user closing the last window). Note that receiving this 210 // (such as the user closing the last window). Note that receiving this
247 // notification does not necessarily mean the process will exit 211 // notification does not necessarily mean the process will exit
248 // because the shutdown process can be cancelled by unload handler. 212 // because the shutdown process can be cancelled by unload handler.
249 // Use APP_TERMINATING for such needs. 213 // Use APP_TERMINATING for such needs.
250 // The source and details are unspecified. 214 // The source and details are unspecified.
251 APP_EXITING, 215 NOTIFICATION_APP_EXITING,
252 216
253 // Indicates that a top window has been closed. The source is the HWND 217 // Indicates that a devtools window is closing. The source is the Profile*
254 // that was closed, no details are expected. 218 // and the details is the inspected RenderViewHost*.
255 WINDOW_CLOSED, 219 NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
256 220
257 // Indicates that a devtools window is closing. The source is the Profile* 221 // Tabs --------------------------------------------------------------------
258 // and the details is the inspected RenderViewHost*. 222
259 DEVTOOLS_WINDOW_CLOSING, 223 // Sent when a tab is added to a TabContentsDelegate. The source is the
260 224 // TabContentsDelegate and the details is the TabContents.
261 // Sent when an info bubble has been created but not yet shown. The source 225 NOTIFICATION_TAB_ADDED,
262 // is the InfoBubble. 226
263 INFO_BUBBLE_CREATED, 227 // This notification is sent after a tab has been appended to the tab_strip.
264 228 // The source is a Source<TabContentsWrapper> of the tab being added. There
265 // Sent when the language (English, French...) for a page has been detected. 229 // are no details.
266 // The details Details<std::string> contain the ISO 639-1 language code and 230 NOTIFICATION_TAB_PARENTED,
267 // the source is Source<TabContents>. 231
268 TAB_LANGUAGE_DETERMINED, 232 // This message is sent before a tab has been closed. The source is a
269 233 // Source<NavigationController> with a pointer to the controller for the
270 // Sent when a page has been translated. The source is the tab for that page 234 // closed tab. No details are expected.
271 // (Source<TabContents>) and the details are the language the page was 235 //
272 // originally in and the language it was translated to 236 // See also TAB_CLOSED.
273 // (std::pair<std::string, std::string>). 237 NOTIFICATION_TAB_CLOSING,
274 PAGE_TRANSLATED, 238
275 239 // Notification that a tab has been closed. The source is the
276 // Sent after the renderer returns a snapshot of tab contents. 240 // NavigationController with no details.
277 // The source (Source<TabContentsWrapper>) is the RenderViewHost for which 241 NOTIFICATION_TAB_CLOSED,
278 // the snapshot was generated and the details (Details<const SkBitmap>) is 242
279 // the actual snapshot. 243 // This notification is sent when a render view host has connected to a
280 TAB_SNAPSHOT_TAKEN, 244 // renderer process. The source is a Source<TabContents> with a pointer to
281 245 // the TabContents. A TAB_CONTENTS_DISCONNECTED notification is
282 // The user has changed the browser theme. The source is a 246 // guaranteed before the source pointer becomes junk. No details are
283 // Source<ThemeService>. There are no details. 247 // expected.
284 BROWSER_THEME_CHANGED, 248 NOTIFICATION_TAB_CONTENTS_CONNECTED,
285 249
286 // Sent when the renderer returns focus to the browser, as part of focus 250 // This notification is sent when a TabContents swaps its render view host
287 // traversal. The source is the browser, there are no details. 251 // with another one, possibly changing processes. The source is a
288 FOCUS_RETURNED_TO_BROWSER, 252 // Source<TabContents> with a pointer to the TabContents. A
289 253 // TAB_CONTENTS_DISCONNECTED notification is guaranteed before the
290 // Application-modal dialogs ----------------------------------------------- 254 // source pointer becomes junk. No details are expected.
291 255 NOTIFICATION_TAB_CONTENTS_SWAPPED,
292 // Sent after an application-modal dialog has been shown. The source 256
293 // is the dialog. 257 // This message is sent after a TabContents is disconnected from the
294 APP_MODAL_DIALOG_SHOWN, 258 // renderer process. The source is a Source<TabContents> with a pointer to
295 259 // the TabContents (the pointer is usable). No details are expected.
296 // Tabs -------------------------------------------------------------------- 260 NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
297 261
298 // Sent when a tab is added to a TabContentsDelegate. The source is the 262 // This notification is sent after TabContents' title is updated. The source
299 // TabContentsDelegate and the details is the TabContents. 263 // is a Source<TabContents> with a pointer to the TabContents. The details
300 TAB_ADDED, 264 // is a Details<TitleUpdatedDetails> that contains more information.
301 265 NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED,
302 // This notification is sent after a tab has been appended to the tab_strip. 266
303 // The source is a Source<TabContentsWrapper> of the tab being added. There 267 // This notification is sent when a TabContents is being hidden, e.g. due
304 // are no details. 268 // to switching away from this tab. The source is a Source<TabContents>.
305 TAB_PARENTED, 269 NOTIFICATION_TAB_CONTENTS_HIDDEN,
306 270
307 // This message is sent before a tab has been closed. The source is a 271 // This notification is sent when a TabContents is being destroyed. Any
308 // Source<NavigationController> with a pointer to the controller for the 272 // object holding a reference to a TabContents can listen to that
309 // closed tab. No details are expected. 273 // notification to properly reset the reference. The source is a
310 // 274 // Source<TabContents>.
311 // See also TAB_CLOSED. 275 NOTIFICATION_TAB_CONTENTS_DESTROYED,
312 TAB_CLOSING, 276
313 277 // A RenderViewHost was created for a TabContents. The source is the
314 // Notification that a tab has been closed. The source is the 278 // associated TabContents, and the details is the RenderViewHost
315 // NavigationController with no details. 279 // pointer.
316 TAB_CLOSED, 280 NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
317 281
318 // This notification is sent when a render view host has connected to a 282 // Notification than an interstitial has become associated with a tab. The
319 // renderer process. The source is a Source<TabContents> with a pointer to 283 // source is the TabContents, the details not used.
320 // the TabContents. A TAB_CONTENTS_DISCONNECTED notification is 284 NOTIFICATION_INTERSTITIAL_ATTACHED,
321 // guaranteed before the source pointer becomes junk. No details are 285
322 // expected. 286 // Indicates that a RenderProcessHost was created and its handle is now
323 TAB_CONTENTS_CONNECTED, 287 // available. The source will be the RenderProcessHost that corresponds to
324 288 // the process.
325 // This notification is sent when a TabContents swaps its render view host 289 NOTIFICATION_RENDERER_PROCESS_CREATED,
326 // with another one, possibly changing processes. The source is a 290
327 // Source<TabContents> with a pointer to the TabContents. A 291 // Indicates that a RenderProcessHost is destructing. The source will be the
328 // TAB_CONTENTS_DISCONNECTED notification is guaranteed before the 292 // RenderProcessHost that corresponds to the process.
329 // source pointer becomes junk. No details are expected. 293 NOTIFICATION_RENDERER_PROCESS_TERMINATED,
330 TAB_CONTENTS_SWAPPED, 294
331 295 // Indicates that a render process is starting to exit, such that it should
332 // This message is sent after a TabContents is disconnected from the 296 // not be used for future navigations. The source will be the
333 // renderer process. The source is a Source<TabContents> with a pointer to 297 // RenderProcessHost that corresponds to the process.
334 // the TabContents (the pointer is usable). No details are expected. 298 NOTIFICATION_RENDERER_PROCESS_CLOSING,
335 TAB_CONTENTS_DISCONNECTED, 299
336 300 // Indicates that a render process was closed (meaning it exited, but the
337 // This notification is sent after TabContents' title is updated. The source 301 // RenderProcessHost might be reused). The source will be the corresponding
338 // is a Source<TabContents> with a pointer to the TabContents. The details 302 // RenderProcessHost. The details will be a RendererClosedDetails struct.
339 // is a Details<TitleUpdatedDetails> that contains more information. 303 // This may get sent along with RENDERER_PROCESS_TERMINATED.
340 TAB_CONTENTS_TITLE_UPDATED, 304 NOTIFICATION_RENDERER_PROCESS_CLOSED,
341 305
342 // This message is sent when a new InfoBar has been added to a 306 // Indicates that a render process has become unresponsive for a period of
343 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a 307 // time. The source will be the RenderWidgetHost that corresponds to the
344 // pointer to the TabContentsWrapper the InfoBar was added to. The details 308 // hung view, and no details are expected.
345 // is a Details<InfoBarDelegate> with a pointer to the delegate that was 309 NOTIFICATION_RENDERER_PROCESS_HANG,
346 // added. 310
347 TAB_CONTENTS_INFOBAR_ADDED, 311 // This is sent to notify that the RenderViewHost displayed in a
348 312 // TabContents has changed. Source is the TabContents for which the change
349 // This message is sent when an InfoBar is about to be removed from a 313 // happened, details is the previous RenderViewHost (can be NULL when the
350 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a 314 // first RenderViewHost is set).
351 // pointer to the TabContentsWrapper the InfoBar was removed from. The 315 NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
352 // details is a Details<std::pair<InfoBarDelegate*, bool> > with a pointer 316
353 // to the removed delegate and whether the removal should be animated. 317 // Indicates that the render view host has received an accessibility tree
354 TAB_CONTENTS_INFOBAR_REMOVED, 318 // update, either partial or full, from the render view. The source is the
355 319 // RenderViewHost, the details are not used.
356 // This message is sent when an InfoBar is replacing another infobar in a 320 NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
357 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a 321
358 // pointer to the TabContentsWrapper the InfoBar was removed from. The 322 // This is sent when a RenderWidgetHost is being destroyed. The source is
359 // details is a Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> > with 323 // the RenderWidgetHost, the details are not used.
360 // pointers to the old and new delegates, respectively. 324 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
361 TAB_CONTENTS_INFOBAR_REPLACED, 325
362 326 // Sent when the widget is about to paint. The source is the
363 // This is sent when an externally hosted tab is created. The details 327 // RenderWidgetHost, the details are not used.
364 // contain the ExternalTabContainer that contains the tab 328 NOTIFICATION_RENDER_WIDGET_HOST_WILL_PAINT,
365 EXTERNAL_TAB_CREATED, 329
366 330 // Sent after the widget has painted. The source is the RenderWidgetHost,
367 // This is sent when an externally hosted tab is closed. No details are 331 // the details are not used.
368 // expected. 332 NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
369 EXTERNAL_TAB_CLOSED, 333
370 334 // This notifies the observer that a PaintAtSizeACK was received. The source
371 // Indicates that the new page tab has finished loading. This is used for 335 // is the RenderWidgetHost, the details are an instance of
372 // performance testing to see how fast we can load it after startup, and is 336 // RenderWidgetHost::PaintAtSizeAckDetails.
373 // only called once for the lifetime of the browser. The source is unused. 337 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
374 // Details is an integer: the number of milliseconds elapsed between 338
375 // starting and finishing all painting. 339 // This notifies the observer that a HandleInputEventACK was received. The
376 INITIAL_NEW_TAB_UI_LOAD, 340 // source is the RenderWidgetHost, the details are the type of event
377 341 // received.
378 // Used to fire notifications about how long various events took to 342 // Note: The RenderWidgetHost may be deallocated at this point.
379 // complete. E.g., this is used to get more fine grained timings from the 343 // Used only in testing.
380 // new tab page. Details is a MetricEventDurationDetails. 344 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK,
381 METRIC_EVENT_DURATION, 345
382 346 // Sent from RenderViewHost constructor. The source is the RenderViewHost,
383 // This notification is sent when a TabContents is being hidden, e.g. due 347 // the details unused.
384 // to switching away from this tab. The source is a Source<TabContents>. 348 NOTIFICATION_RENDER_VIEW_HOST_CREATED,
385 TAB_CONTENTS_HIDDEN, 349
386 350 // Sent from ~RenderViewHost. The source is the RenderViewHost, the details
387 // This notification is sent when a TabContents is being destroyed. Any 351 // unused.
388 // object holding a reference to a TabContents can listen to that 352 NOTIFICATION_RENDER_VIEW_HOST_DELETED,
389 // notification to properly reset the reference. The source is a 353
390 // Source<TabContents>. 354 // Sent from RenderViewHost::ClosePage. The hosted RenderView has
391 TAB_CONTENTS_DESTROYED, 355 // processed the onbeforeunload handler and is about to be sent a
392 356 // ViewMsg_ClosePage message to complete the tear-down process. The source
393 // This notification is sent when TabContents::SetAppExtension is invoked. 357 // is the RenderViewHost sending the message, and no details are provided.
394 // The source is the ExtensionTabHelper SetAppExtension was invoked on. 358 // Note: This message is not sent in response to RenderView closure
395 TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, 359 // initiated by window.close().
396 360 NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW,
397 // A RenderViewHost was created for a TabContents. The source is the 361
398 // associated TabContents, and the details is the RenderViewHost 362 // This notifies the observer that the drag operation ack in a drag and
399 // pointer. 363 // drop operation was received. The source is the RenderViewHost.
400 RENDER_VIEW_HOST_CREATED_FOR_TAB, 364 // Note: Used only in testing.
401 365 NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK,
402 // Notification than an interstitial has become associated with a tab. The 366
403 // source is the TabContents, the details not used. 367 // Indicates a RenderWidgetHost has been hidden or restored. The source is
404 INTERSTITIAL_ATTACHED, 368 // the RWH whose visibility changed, the details is a bool set to true if
405 369 // the new state is "visible."
406 // Stuff inside the tabs --------------------------------------------------- 370 NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
407 371
408 // This message is sent after a constrained window has been closed. The 372 // The focused element inside a page has changed. The source is the
409 // source is a Source<ConstrainedWindow> with a pointer to the closed child 373 // TabContents containing the render view host for the page. The details is
410 // window. (The pointer isn't usable, except for identification.) No 374 // a Details<const bool> that indicates whether or not an editable node was
411 // details are expected. 375 // focused.
412 CWINDOW_CLOSED, 376 NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
413 377
414 // Indicates that a RenderProcessHost was created and its handle is now 378 // Notification posted from ExecuteJavascriptInWebFrameNotifyResult. The
415 // available. The source will be the RenderProcessHost that corresponds to 379 // source is the RenderViewHost ExecuteJavascriptInWebFrameNotifyResult was
416 // the process. 380 // invoked on. The details are a std::pair<int, Value*> with the int giving
417 RENDERER_PROCESS_CREATED, 381 // the id returned from ExecuteJavascriptInWebFrameNotifyResult and the
418 382 // Value the results of the javascript expression. The Value is owned by
419 // Indicates that a RenderProcessHost is destructing. The source will be the 383 // RenderViewHost and may be a Null Value.
420 // RenderProcessHost that corresponds to the process. 384 NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
421 RENDERER_PROCESS_TERMINATED, 385
422 386 // Child Processes ---------------------------------------------------------
423 // Indicates that a render process is starting to exit, such that it should 387
424 // not be used for future navigations. The source will be the 388 // This notification is sent when a child process host has connected to a
425 // RenderProcessHost that corresponds to the process. 389 // child process. There is no usable source, since it is sent from an
426 RENDERER_PROCESS_CLOSING, 390 // ephemeral task; register for AllSources() to receive this notification.
427 391 // The details are in a Details<ChildProcessInfo>.
428 // Indicates that a render process was closed (meaning it exited, but the 392 NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED,
429 // RenderProcessHost might be reused). The source will be the corresponding 393
430 // RenderProcessHost. The details will be a RendererClosedDetails struct. 394 // This message is sent after a ChildProcessHost is disconnected from the
431 // This may get sent along with RENDERER_PROCESS_TERMINATED. 395 // child process. There is no usable source, since it is sent from an
432 RENDERER_PROCESS_CLOSED, 396 // ephemeral task; register for AllSources() to receive this notification.
433 397 // The details are in a Details<ChildProcessInfo>.
434 // Indicates that a render process has become unresponsive for a period of 398 NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED,
435 // time. The source will be the RenderWidgetHost that corresponds to the 399
436 // hung view, and no details are expected. 400 // This message is sent when a child process disappears
437 RENDERER_PROCESS_HANG, 401 // unexpectedly as a result of a crash. There is no usable
438 402 // source, since it is sent from an ephemeral task; register for
439 // This is sent to notify that the RenderViewHost displayed in a 403 // AllSources() to receive this notification. The details are in
440 // TabContents has changed. Source is the TabContents for which the change 404 // a Details<ChildProcessInfo>.
441 // happened, details is the previous RenderViewHost (can be NULL when the 405 NOTIFICATION_CHILD_PROCESS_CRASHED,
442 // first RenderViewHost is set). 406
443 RENDER_VIEW_HOST_CHANGED, 407 // This message is sent when a child process disappears
444 408 // unexpectedly as a result of a termination signal. There is no
445 // Indicates that the render view host has received an accessibility tree 409 // usable source, since it is sent from an ephemeral task;
446 // update, either partial or full, from the render view. The source is the 410 // register for AllSources() to receive this notification. The
447 // RenderViewHost, the details are not used. 411 // details are in a Details<ChildProcessInfo>.
448 RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, 412 NOTIFICATION_CHILD_PROCESS_WAS_KILLED,
449 413
450 // This is sent when a RenderWidgetHost is being destroyed. The source is 414 // This message indicates that an instance of a particular child was
451 // the RenderWidgetHost, the details are not used. 415 // created in a page. (If one page contains several regions rendered by
452 RENDER_WIDGET_HOST_DESTROYED, 416 // the same child, this notification will occur once for each region
453 417 // during the page load.)
454 // Sent when the widget is about to paint. The source is the 418 //
455 // RenderWidgetHost, the details are not used. 419 // There is no usable source, since it is sent from an ephemeral task;
456 RENDER_WIDGET_HOST_WILL_PAINT, 420 // register for AllSources() to receive this notification. The details are
457 421 // in a Details<ChildProcessInfo>.
458 // Sent after the widget has painted. The source is the RenderWidgetHost, 422 NOTIFICATION_CHILD_INSTANCE_CREATED,
459 // the details are not used. 423
460 RENDER_WIDGET_HOST_DID_PAINT, 424 // Sent by the PluginUpdater when there is a change of plugin
461 425 // enable/disable status.
462 // This notifies the observer that a PaintAtSizeACK was received. The source 426 NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
463 // is the RenderWidgetHost, the details are an instance of 427
464 // RenderWidgetHost::PaintAtSizeAckDetails. 428 // Purge Memory ------------------------------------------------------------
465 RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, 429
466 430 // Sent on the IO thread when the system should try to reduce the amount of
467 // This notifies the observer that a HandleInputEventACK was received. The 431 // memory in use, no source or details are passed. See memory_purger.h .cc.
468 // source is the RenderWidgetHost, the details are the type of event 432 NOTIFICATION_PURGE_MEMORY,
469 // received. 433
470 // Note: The RenderWidgetHost may be deallocated at this point. 434 // Sent before the repost form warning is brought up.
471 // Used only in testing. 435 // The source is a NavigationController.
472 RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, 436 NOTIFICATION_REPOST_WARNING_SHOWN,
473 437
474 // Sent from RenderViewHost constructor. The source is the RenderViewHost, 438 // Sent when the zoom level changes. The source is the HostZoomMap. The
475 // the details unused. 439 // details is a string of the hostname for which the zoom changed. In case
476 RENDER_VIEW_HOST_CREATED, 440 // of a temporary zoom level change, the details is an empty string.
477 441 NOTIFICATION_ZOOM_LEVEL_CHANGED,
478 // Sent from ~RenderViewHost. The source is the RenderViewHost, the details 442
479 // unused. 443 // Custom notifications used by the embedder should start from here.
480 RENDER_VIEW_HOST_DELETED, 444 NOTIFICATION_CONTENT_END,
481
482 // Sent from RenderViewHost::ClosePage. The hosted RenderView has
483 // processed the onbeforeunload handler and is about to be sent a
484 // ViewMsg_ClosePage message to complete the tear-down process. The source
485 // is the RenderViewHost sending the message, and no details are provided.
486 // Note: This message is not sent in response to RenderView closure
487 // initiated by window.close().
488 RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW,
489
490 // This notifies the observer that the drag operation ack in a drag and
491 // drop operation was received. The source is the RenderViewHost.
492 // Note: Used only in testing.
493 RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK,
494
495 // Indicates a RenderWidgetHost has been hidden or restored. The source is
496 // the RWH whose visibility changed, the details is a bool set to true if
497 // the new state is "visible."
498 RENDER_WIDGET_VISIBILITY_CHANGED,
499
500 // Notification from TabContents that we have received a response from the
501 // renderer in response to a dom automation controller action.
502 DOM_OPERATION_RESPONSE,
503
504 // Sent when the bookmark bubble hides. The source is the profile, the
505 // details unused.
506 BOOKMARK_BUBBLE_HIDDEN,
507
508 // This notification is sent when the result of a find-in-page search is
509 // available with the browser process. The source is a Source<TabContents>
510 // with a pointer to the TabContents. Details encompass a
511 // FindNotificationDetail object that tells whether the match was found or
512 // not found.
513 FIND_RESULT_AVAILABLE,
514
515 // This is sent when the users preference for when the bookmark bar should
516 // be shown changes. The source is the profile, and the details are
517 // NoDetails.
518 BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
519
520 // Sent just before the installation confirm dialog is shown. The source
521 // is the ExtensionInstallUI, the details are NoDetails.
522 EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
523
524 // Used to monitor web cache usage by notifying whenever the
525 // CacheManagerHost observes new UsageStats. The source will be the
526 // RenderProcessHost that corresponds to the new statistics. Details are a
527 // UsageStats object sent by the renderer, and should be copied - ptr not
528 // guaranteed to be valid after the notification.
529 WEB_CACHE_STATS_OBSERVED,
530
531 // The focused element inside a page has changed. The source is the
532 // TabContents containing the render view host for the page. The details is
533 // a Details<const bool> that indicates whether or not an editable node was
534 // focused.
535 FOCUS_CHANGED_IN_PAGE,
536
537 // Notification posted from ExecuteJavascriptInWebFrameNotifyResult. The
538 // source is the RenderViewHost ExecuteJavascriptInWebFrameNotifyResult was
539 // invoked on. The details are a std::pair<int, Value*> with the int giving
540 // the id returned from ExecuteJavascriptInWebFrameNotifyResult and the
541 // Value the results of the javascript expression. The Value is owned by
542 // RenderViewHost and may be a Null Value.
543 EXECUTE_JAVASCRIPT_RESULT,
544
545 // BackgroundContents ------------------------------------------------------
546
547 // A new background contents was opened by script. The source is the parent
548 // profile and the details are BackgroundContentsOpenedDetails.
549 BACKGROUND_CONTENTS_OPENED,
550
551 // The background contents navigated to a new location. The source is the
552 // parent Profile, and the details are the BackgroundContents that was
553 // navigated.
554 BACKGROUND_CONTENTS_NAVIGATED,
555
556 // The background contents were closed by someone invoking window.close()
557 // or the parent application was uninstalled.
558 // The source is the parent profile, and the details are the
559 // BackgroundContents.
560 BACKGROUND_CONTENTS_CLOSED,
561
562 // The background contents is being deleted. The source is the
563 // parent Profile, and the details are the BackgroundContents being deleted.
564 BACKGROUND_CONTENTS_DELETED,
565
566 // The background contents has crashed. The source is the parent Profile,
567 // and the details are the BackgroundContents.
568 BACKGROUND_CONTENTS_TERMINATED,
569
570 // Child Processes ---------------------------------------------------------
571
572 // This notification is sent when a child process host has connected to a
573 // child process. There is no usable source, since it is sent from an
574 // ephemeral task; register for AllSources() to receive this notification.
575 // The details are in a Details<ChildProcessInfo>.
576 CHILD_PROCESS_HOST_CONNECTED,
577
578 // This message is sent after a ChildProcessHost is disconnected from the
579 // child process. There is no usable source, since it is sent from an
580 // ephemeral task; register for AllSources() to receive this notification.
581 // The details are in a Details<ChildProcessInfo>.
582 CHILD_PROCESS_HOST_DISCONNECTED,
583
584 // This message is sent when a child process disappears
585 // unexpectedly as a result of a crash. There is no usable
586 // source, since it is sent from an ephemeral task; register for
587 // AllSources() to receive this notification. The details are in
588 // a Details<ChildProcessInfo>.
589 CHILD_PROCESS_CRASHED,
590
591 // This message is sent when a child process disappears
592 // unexpectedly as a result of a termination signal. There is no
593 // usable source, since it is sent from an ephemeral task;
594 // register for AllSources() to receive this notification. The
595 // details are in a Details<ChildProcessInfo>.
596 CHILD_PROCESS_WAS_KILLED,
597
598 // This message indicates that an instance of a particular child was
599 // created in a page. (If one page contains several regions rendered by
600 // the same child, this notification will occur once for each region
601 // during the page load.)
602 //
603 // There is no usable source, since it is sent from an ephemeral task;
604 // register for AllSources() to receive this notification. The details are
605 // in a Details<ChildProcessInfo>.
606 CHILD_INSTANCE_CREATED,
607
608 // This is sent when network interception is disabled for a plugin, or the
609 // plugin is unloaded. This should only be sent/received on the browser IO
610 // thread or the plugin thread. The source is the plugin that is disabling
611 // interception. No details are expected.
612 CHROME_PLUGIN_UNLOADED,
613
614 // Sent by the PluginUpdater when there is a change of plugin
615 // enable/disable status.
616 PLUGIN_ENABLE_STATUS_CHANGED,
617
618 // This is sent when a login prompt is shown. The source is the
619 // Source<NavigationController> for the tab in which the prompt is shown.
620 // Details are a LoginNotificationDetails which provide the LoginHandler
621 // that should be given authentication.
622 AUTH_NEEDED,
623
624 // This is sent when authentication credentials have been supplied (either
625 // by the user or by an automation service), but before we've actually
626 // received another response from the server. The source is the
627 // Source<NavigationController> for the tab in which the prompt was shown.
628 // Details are an AuthSuppliedLoginNotificationDetails which provide the
629 // LoginHandler that should be given authentication as well as the supplied
630 // username and password.
631 AUTH_SUPPLIED,
632
633 // This is sent when an authentication request has been dismissed without
634 // supplying credentials (either by the user or by an automation service).
635 // The source is the Source<NavigationController> for the tab in which the
636 // prompt was shown. Details are a LoginNotificationDetails which provide
637 // the LoginHandler that should be cancelled.
638 AUTH_CANCELLED,
639
640 // Saved Pages -------------------------------------------------------------
641
642 // Sent when a SavePackage finishes successfully. The source is the
643 // SavePackage, and Details are a GURL containing address of downloaded
644 // page.
645 SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
646
647 // History -----------------------------------------------------------------
648
649 // Sent when a history service is created on the main thread. This is sent
650 // after history is created, but before it has finished loading. Use
651 // HISTORY_LOADED is you need to know when loading has completed.
652 // The source is the profile that the history service belongs to, and the
653 // details is the pointer to the newly created HistoryService object.
654 HISTORY_CREATED,
655
656 // Sent when a history service has finished loading. The source is the
657 // profile that the history service belongs to, and the details is the
658 // HistoryService.
659 HISTORY_LOADED,
660
661 // Sent when a URL that has been typed has been added or modified. This is
662 // used by the in-memory URL database (used by autocomplete) to track
663 // changes to the main history system.
664 //
665 // The source is the profile owning the history service that changed, and
666 // the details is history::URLsModifiedDetails that lists the modified or
667 // added URLs.
668 HISTORY_TYPED_URLS_MODIFIED,
669
670 // Sent when the user visits a URL.
671 //
672 // The source is the profile owning the history service that changed, and
673 // the details is history::URLVisitedDetails.
674 HISTORY_URL_VISITED,
675
676 // Sent when one or more URLs are deleted.
677 //
678 // The source is the profile owning the history service that changed, and
679 // the details is history::URLsDeletedDetails that lists the deleted URLs.
680 HISTORY_URLS_DELETED,
681
682 // Sent when a keyword search term is updated. The source is the Profile and
683 // the details are history::KeywordSearchTermDetails
684 HISTORY_KEYWORD_SEARCH_TERM_UPDATED,
685
686 // Sent by history when the favicon of a URL changes. The source is the
687 // profile, and the details is history::FaviconChangeDetails (see
688 // history_notifications.h).
689 FAVICON_CHANGED,
690
691 // Sent by FaviconTabHelper when a tab's favicon has been successfully
692 // updated.
693 FAVICON_UPDATED,
694
695 // Sent after an incognito profile has been created. The details are none
696 // and the source is the new profile.
697 OTR_PROFILE_CREATED,
698
699 // Sent before a Profile is destroyed. The details are
700 // none and the source is a Profile*.
701 PROFILE_DESTROYED,
702
703 // TopSites ----------------------------------------------------------------
704
705 // Sent by TopSites when it finishes loading. The source is the profile the
706 // details the TopSites.
707 TOP_SITES_LOADED,
708
709 // Sent by TopSites when it has finished updating its most visited URLs
710 // cache after querying the history service. The source is the TopSites and
711 // the details a CancelableRequestProvider::Handle from the history service
712 // query.
713 // Used only in testing.
714 TOP_SITES_UPDATED,
715
716 // Sent by TopSites when the either one of the most visited urls changed, or
717 // one of the images changes. The source is the TopSites, the details not
718 // used.
719 TOP_SITES_CHANGED,
720
721 // Thumbnails---------------------------------------------------------------
722
723 // Sent by the ThumbnailGenerator whenever a render widget host
724 // updates its backing store. The source is the
725 // ThumbnailGenerator, and the details are the RenderWidgetHost
726 // that notified the ThumbnailGenerator that its backing store was
727 // updated.
728 THUMBNAIL_GENERATOR_SNAPSHOT_CHANGED,
729
730 // Bookmarks ---------------------------------------------------------------
731
732 // Sent when the starred state of a URL changes. A URL is starred if there
733 // is at least one bookmark for it. The source is a Profile and the details
734 // is history::URLsStarredDetails that contains the list of URLs and
735 // whether they were starred or unstarred.
736 URLS_STARRED,
737
738 // Sent when the bookmark bar model finishes loading. This source is the
739 // Profile, and the details aren't used.
740 BOOKMARK_MODEL_LOADED,
741
742 // Sent when the bookmark bubble is shown for a particular URL. The source
743 // is the profile, the details the URL.
744 BOOKMARK_BUBBLE_SHOWN,
745
746 // Non-history storage services --------------------------------------------
747
748 // Notification that the TemplateURLService has finished loading from the
749 // database. The source is the TemplateURLService, and the details are
750 // NoDetails.
751 TEMPLATE_URL_SERVICE_LOADED,
752
753 // Sent when a TemplateURL is removed from the model. The source is the
754 // Profile, and the details the id of the TemplateURL being removed.
755 TEMPLATE_URL_REMOVED,
756
757 // Notification triggered when a web application has been installed or
758 // uninstalled. Any application view should reload its data. The source is
759 // the profile. No details are provided.
760 WEB_APP_INSTALL_CHANGED,
761
762 // This is sent to a pref observer when a pref is changed. The source is the
763 // PrefService and the details a std::string of the changed path.
764 PREF_CHANGED,
765
766 // This is broadcast after the preference subsystem has completed
767 // asynchronous initalization of a PrefService.
768 PREF_INITIALIZATION_COMPLETED,
769
770 // Sent when a default request context has been created, so calling
771 // Profile::GetDefaultRequestContext() will not return NULL. This is sent
772 // on the thread where Profile::GetRequestContext() is first called, which
773 // should be the UI thread.
774 DEFAULT_REQUEST_CONTEXT_AVAILABLE,
775
776 // The state of a web resource has been changed. A resource may have been
777 // added, removed, or altered. Source is WebResourceService, and the
778 // details are NoDetails.
779 PROMO_RESOURCE_STATE_CHANGED,
780
781 // Autocomplete ------------------------------------------------------------
782
783 // Sent by the autocomplete controller when done. The source is the
784 // AutocompleteController, the details not used.
785 AUTOCOMPLETE_CONTROLLER_RESULT_READY,
786
787 // This is sent when an item of the Omnibox popup is selected. The source
788 // is the profile.
789 OMNIBOX_OPENED_URL,
790
791 // Sent by the omnibox when it is destroyed.
792 OMNIBOX_DESTROYED,
793
794 // Sent by the omnibox when it is focused.
795 OMNIBOX_FOCUSED,
796
797 // Sent when the main Google URL has been updated. Some services cache
798 // this value and need to update themselves when it changes. See
799 // google_util::GetGoogleURLAndUpdateIfNecessary().
800 GOOGLE_URL_UPDATED,
801
802 // Printing ----------------------------------------------------------------
803
804 // Notification from PrintJob that an event occurred. It can be that a page
805 // finished printing or that the print job failed. Details is
806 // PrintJob::EventDetails. Source is a PrintJob.
807 PRINT_JOB_EVENT,
808
809 // Sent when a PrintJob has been released.
810 // Source is the TabContentsWrapper that holds the print job.
811 PRINT_JOB_RELEASED,
812
813 // Shutdown ----------------------------------------------------------------
814
815 // Sent on the browser IO thread when an net::URLRequestContext is released
816 // by its owning Profile. The source is a pointer to the
817 // net::URLRequestContext.
818 URL_REQUEST_CONTEXT_RELEASED,
819
820 // Sent when WM_ENDSESSION has been received, after the browsers have been
821 // closed but before browser process has been shutdown. The source/details
822 // are all source and no details.
823 SESSION_END,
824
825 // User Scripts ------------------------------------------------------------
826
827 // Sent when there are new user scripts available. The details are a
828 // pointer to SharedMemory containing the new scripts.
829 USER_SCRIPTS_UPDATED,
830
831 // User Style Sheet --------------------------------------------------------
832
833 // Sent when the user style sheet has changed.
834 USER_STYLE_SHEET_UPDATED,
835
836 // Extensions --------------------------------------------------------------
837
838 // Sent when a CrxInstaller finishes. Source is the CrxInstaller that
839 // finished. No details.
840 CRX_INSTALLER_DONE,
841
842 // Sent when the known installed extensions have all been loaded. In
843 // testing scenarios this can happen multiple times if extensions are
844 // unloaded and reloaded. The source is a Profile.
845 EXTENSIONS_READY,
846
847 // Sent when a new extension is loaded. The details are an Extension, and
848 // the source is a Profile.
849 EXTENSION_LOADED,
850
851 // Sent when attempting to load a new extension, but they are disabled. The
852 // details are an Extension*, and the source is a Profile*.
853 EXTENSION_UPDATE_DISABLED,
854
855 // Sent when an extension is about to be installed so we can (in the case of
856 // themes) alert the user with a loading dialog. The source is the download
857 // manager and the details are the download url.
858 EXTENSION_READY_FOR_INSTALL,
859
860 // Sent when an extension install turns out to not be a theme.
861 NO_THEME_DETECTED,
862
863 // Sent when new extensions are installed. The details are an Extension, and
864 // the source is a Profile.
865 EXTENSION_INSTALLED,
866
867 // An error occured during extension install. The details are a string with
868 // details about why the install failed.
869 EXTENSION_INSTALL_ERROR,
870
871 // Sent when an extension install is not allowed, as indicated by
872 // PendingExtensionInfo::ShouldAllowInstall. The details are an Extension,
873 // and the source is a Profile.
874 EXTENSION_INSTALL_NOT_ALLOWED,
875
876 // Sent when an extension has been uninstalled. The details are
877 // an UninstalledExtensionInfo struct and the source is a Profile.
878 EXTENSION_UNINSTALLED,
879
880 // Sent when an extension uninstall is not allowed because the extension is
881 // not user manageable. The details are an Extension, and the source is a
882 // Profile.
883 EXTENSION_UNINSTALL_NOT_ALLOWED,
884
885 // Sent when an extension is unloaded. This happens when an extension is
886 // uninstalled or disabled. The details are an UnloadedExtensionInfo, and
887 // the source is a Profile.
888 //
889 // Note that when this notification is sent, ExtensionService has already
890 // removed the extension from its internal state.
891 EXTENSION_UNLOADED,
892
893 // Sent after a new ExtensionHost is created. The details are
894 // an ExtensionHost* and the source is an ExtensionProcessManager*.
895 EXTENSION_HOST_CREATED,
896
897 // Sent before an ExtensionHost is destroyed. The details are
898 // an ExtensionHost* and the source is a Profile*.
899 EXTENSION_HOST_DESTROYED,
900
901 // Sent by an ExtensionHost when it finished its initial page load.
902 // The details are an ExtensionHost* and the source is a Profile*.
903 EXTENSION_HOST_DID_STOP_LOADING,
904
905 // Sent by an ExtensionHost when its render view requests closing through
906 // window.close(). The details are an ExtensionHost* and the source is a
907 // Profile*.
908 EXTENSION_HOST_VIEW_SHOULD_CLOSE,
909
910 // Sent after an extension render process is created and fully functional.
911 // The details are an ExtensionHost*.
912 EXTENSION_PROCESS_CREATED,
913
914 // Sent when extension render process ends (whether it crashes or closes).
915 // The details are an ExtensionHost* and the source is a Profile*. Not sent
916 // during browser shutdown.
917 EXTENSION_PROCESS_TERMINATED,
918
919 // Sent when a background page is ready so other components can load.
920 EXTENSION_BACKGROUND_PAGE_READY,
921
922 // Sent when a pop-up extension view is ready, so that notification may
923 // be sent to pending callbacks. Note that this notification is sent
924 // after all onload callbacks have been invoked in the main frame.
925 // The details is the ExtensionHost* hosted within the popup, and the source
926 // is a Profile*.
927 EXTENSION_POPUP_VIEW_READY,
928
929 // Sent when a browser action's state has changed. The source is the
930 // ExtensionAction* that changed. There are no details.
931 EXTENSION_BROWSER_ACTION_UPDATED,
932
933 // Sent when the count of page actions has changed. Note that some of them
934 // may not apply to the current page. The source is a LocationBar*. There
935 // are no details.
936 EXTENSION_PAGE_ACTION_COUNT_CHANGED,
937
938 // Sent when a browser action's visibility has changed. The source is the
939 // ExtensionPrefs* that changed. The details are a Extension*.
940 EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
941
942 // Sent when a page action's visibility has changed. The source is the
943 // ExtensionAction* that changed. The details are a TabContents*.
944 EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
945
946 // Sent by an extension to notify the browser about the results of a unit
947 // test.
948 EXTENSION_TEST_PASSED,
949 EXTENSION_TEST_FAILED,
950
951 // Sent by extension test javascript code, typically in a browser test. The
952 // sender is a std::string representing the extension id, and the details
953 // are a std::string with some message. This is particularly useful when you
954 // want to have C++ code wait for javascript code to do something.
955 EXTENSION_TEST_MESSAGE,
956
957 // Sent when an bookmarks extensions API function was successfully invoked.
958 // The source is the id of the extension that invoked the function, and the
959 // details are a pointer to the const BookmarksFunction in question.
960 EXTENSION_BOOKMARKS_API_INVOKED,
961
962 // Sent when an omnibox extension has sent back omnibox suggestions. The
963 // source is the profile, and the details are an ExtensionOmniboxSuggestions
964 // object.
965 EXTENSION_OMNIBOX_SUGGESTIONS_READY,
966
967 // Sent when the user accepts the input in an extension omnibox keyword
968 // session. The source is the profile.
969 EXTENSION_OMNIBOX_INPUT_ENTERED,
970
971 // Sent when an omnibox extension has updated the default suggestion. The
972 // source is the profile.
973 EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
974
975 // Sent when an extension changes a preference value. The source is the
976 // profile, and the details are an ExtensionPrefStore::ExtensionPrefDetails
977 // object.
978 EXTENSION_PREF_CHANGED,
979
980 // Sent when the extension updater starts checking for updates to installed
981 // extensions. The source is a Profile, and there are no details.
982 EXTENSION_UPDATING_STARTED,
983
984 // Sent when the extension updater is finished checking for updates to
985 // installed extensions. The source is a Profile, and there are no details.
986 // NOTE: It's possible that there are extension updates still being
987 // installed by the extension service at the time this notification fires.
988 EXTENSION_UPDATING_FINISHED,
989
990 // The extension updater found an update and will attempt to download and
991 // install it. The source is a Profile, and the details are an extension id
992 // (const std::string).
993 EXTENSION_UPDATE_FOUND,
994
995 // An installed app changed notification state (added or removed
996 // notifications). The source is a Profile, and the details are a string
997 // with the extension id of the app.
998 APP_NOTIFICATION_STATE_CHANGED,
999
1000 // Desktop Notifications ---------------------------------------------------
1001
1002 // This notification is sent when a balloon is connected to a renderer
1003 // process to render the balloon contents. The source is a
1004 // Source<BalloonHost> with a pointer to the the balloon. A
1005 // NOTIFY_BALLOON_DISCONNECTED is guaranteed before the source pointer
1006 // becomes junk. No details expected.
1007 NOTIFY_BALLOON_CONNECTED,
1008
1009 // This message is sent after a balloon is disconnected from the renderer
1010 // process. The source is a Source<BalloonHost> with a pointer to the
1011 // balloon host (the pointer is usable). No details are expected.
1012 NOTIFY_BALLOON_DISCONNECTED,
1013
1014 // Web Database Service ----------------------------------------------------
1015
1016 // This notification is sent whenever autofill entries are
1017 // changed. The detail of this notification is a list of changes
1018 // represented by a vector of AutofillChange. Each change
1019 // includes a change type (add, update, or remove) as well as the
1020 // key of the entry that was affected.
1021 AUTOFILL_ENTRIES_CHANGED,
1022
1023 // Sent when an AutofillProfile has been added/removed/updated in the
1024 // WebDatabase. The detail is an AutofillProfileChange.
1025 AUTOFILL_PROFILE_CHANGED,
1026
1027 // Sent when an Autofill CreditCard has been added/removed/updated in the
1028 // WebDatabase. The detail is an AutofillCreditCardChange.
1029 AUTOFILL_CREDIT_CARD_CHANGED,
1030
1031 // This notification is sent whenever the web database service has finished
1032 // loading the web database. No details are expected.
1033 WEB_DATABASE_LOADED,
1034
1035 // Purge Memory ------------------------------------------------------------
1036
1037 // Sent on the IO thread when the system should try to reduce the amount of
1038 // memory in use, no source or details are passed. See memory_purger.h .cc.
1039 PURGE_MEMORY,
1040
1041 // Upgrade notifications ---------------------------------------------------
1042
1043 // Sent when Chrome detects that it has been upgraded behind the scenes.
1044 // NOTE: The detection mechanism is asynchronous, so this event may arrive
1045 // quite some time after the upgrade actually happened. No details are
1046 // expected.
1047 UPGRADE_DETECTED,
1048
1049 // Sent when Chrome believes an update has been installed and available for
1050 // long enough with the user shutting down to let it take effect. See
1051 // upgrade_detector.cc for details on how long it waits. No details are
1052 // expected.
1053 UPGRADE_RECOMMENDED,
1054
1055 // Software incompatibility notifications ----------------------------------
1056
1057 // Sent when Chrome has finished compiling the list of loaded modules (and
1058 // other modules of interest). No details are expected.
1059 MODULE_LIST_ENUMERATED,
1060
1061 // Sent when Chrome is done scanning the module list and when the user has
1062 // acknowledged the module incompatibility. No details are expected.
1063 MODULE_INCOMPATIBILITY_BADGE_CHANGE,
1064
1065 // Accessibility Notifications ---------------------------------------------
1066
1067 // Notification that a window in the browser UI (not the web content)
1068 // was opened, for propagating to an accessibility extension.
1069 // Details will be an AccessibilityWindowInfo.
1070 ACCESSIBILITY_WINDOW_OPENED,
1071
1072 // Notification that a window in the browser UI was closed.
1073 // Details will be an AccessibilityWindowInfo.
1074 ACCESSIBILITY_WINDOW_CLOSED,
1075
1076 // Notification that a control in the browser UI was focused.
1077 // Details will be an AccessibilityControlInfo.
1078 ACCESSIBILITY_CONTROL_FOCUSED,
1079
1080 // Notification that a control in the browser UI had its action taken,
1081 // like pressing a button or toggling a checkbox.
1082 // Details will be an AccessibilityControlInfo.
1083 ACCESSIBILITY_CONTROL_ACTION,
1084
1085 // Notification that text box in the browser UI had text change.
1086 // Details will be an AccessibilityControlInfo.
1087 ACCESSIBILITY_TEXT_CHANGED,
1088
1089 // Notification that a pop-down menu was opened, for propagating
1090 // to an accessibility extension.
1091 // Details will be an AccessibilityMenuInfo.
1092 ACCESSIBILITY_MENU_OPENED,
1093
1094 // Notification that a pop-down menu was closed, for propagating
1095 // to an accessibility extension.
1096 // Details will be an AccessibilityMenuInfo.
1097 ACCESSIBILITY_MENU_CLOSED,
1098
1099 // Content Settings --------------------------------------------------------
1100
1101 // Sent when content settings change. The source is a HostContentSettings
1102 // object, the details are ContentSettingsNotificationsDetails.
1103 CONTENT_SETTINGS_CHANGED,
1104
1105 // Sent when the collect cookies dialog is shown. The source is a
1106 // TabSpecificContentSettings object, there are no details.
1107 COLLECTED_COOKIES_SHOWN,
1108
1109 // Sent when the default setting for desktop notifications has changed.
1110 // The source is the DesktopNotificationService, the details are None.
1111 DESKTOP_NOTIFICATION_DEFAULT_CHANGED,
1112
1113 // Sent when a non-default setting in the the notification content settings
1114 // map has changed. The source is the DesktopNotificationService, the
1115 // details are None.
1116 DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
1117
1118 // Sent when the geolocation settings change. The source is the
1119 // GeolocationContentSettingsMap object, the details are
1120 // ContentSettingsNotificationsDetails.
1121 GEOLOCATION_SETTINGS_CHANGED,
1122
1123 // Sent when content settings change for a tab. The source is a TabContents
1124 // object, the details are None.
1125 TAB_CONTENT_SETTINGS_CHANGED,
1126
1127 // Sync --------------------------------------------------------------------
1128
1129 // Sent when the syncer is blocked configuring.
1130 SYNC_CONFIGURE_BLOCKED,
1131
1132 // The sync service has started the configuration process.
1133 SYNC_CONFIGURE_START,
1134
1135 // The sync service is finished the configuration process.
1136 SYNC_CONFIGURE_DONE,
1137
1138 // The session service has been saved. This notification type is only sent
1139 // if there were new SessionService commands to save, and not for no-op save
1140 // operations.
1141 SESSION_SERVICE_SAVED,
1142
1143 // A foreign session has been updated. If a new tab page is open, the
1144 // foreign session handler needs to update the new tab page's foreign
1145 // session data.
1146 FOREIGN_SESSION_UPDATED,
1147
1148 // Foreign sessions has been disabled. New tabs should not display foreign
1149 // session data.
1150 FOREIGN_SESSION_DISABLED,
1151
1152 // Cookies -----------------------------------------------------------------
1153
1154 // Sent when a cookie changes. The source is a Profile object, the details
1155 // are a ChromeCookieDetails object.
1156 COOKIE_CHANGED,
1157
1158 // Sidebar -----------------------------------------------------------------
1159
1160 // Sent when the sidebar state is changed.
1161 // The source is a SidebarManager instance, the details are the changed
1162 // SidebarContainer object.
1163 SIDEBAR_CHANGED,
1164
1165 // Token Service -----------------------------------------------------------
1166
1167 // When the token service has a new token available for a service, one of
1168 // these notifications is issued per new token.
1169 // The source is a TokenService on the Profile. The details are a
1170 // TokenAvailableDetails object.
1171 TOKEN_AVAILABLE,
1172
1173 // When there aren't any additional tokens left to load, this notification
1174 // is sent.
1175 // The source is a TokenService on the profile. There are no details.
1176 TOKEN_LOADING_FINISHED,
1177
1178 // If a token request failed, one of these is issued per failed request.
1179 // The source is a TokenService on the Profile. The details are a
1180 // TokenRequestFailedDetails object.
1181 TOKEN_REQUEST_FAILED,
1182
1183 // When a service has a new token they got from a frontend that the
1184 // TokenService should know about, fire this notification. The details
1185 // are a TokenAvailableDetails object.
1186 TOKEN_UPDATED,
1187
1188 // Sent when a user signs into Google services such as sync.
1189 // The source is the Profile. The details are a GoogleServiceSignin object.
1190 GOOGLE_SIGNIN_SUCCESSFUL,
1191
1192 // Sent when a user fails to sign into Google services such as sync.
1193 // The source is the Profile. The details are a GoogleServiceAuthError
1194 // object.
1195 GOOGLE_SIGNIN_FAILED,
1196
1197 // Autofill Notifications --------------------------------------------------
1198
1199 // Sent when a popup with Autofill suggestions is shown in the renderer.
1200 // The source is the corresponding RenderViewHost. There are not details.
1201 AUTOFILL_DID_SHOW_SUGGESTIONS,
1202
1203 // Sent when a form is previewed or filled with Autofill suggestions.
1204 // The source is the corresponding RenderViewHost. There are not details.
1205 AUTOFILL_DID_FILL_FORM_DATA,
1206
1207 // Download Notifications --------------------------------------------------
1208
1209 // Sent when a download is initiated. It is possible that the download will
1210 // not actually begin due to the DownloadRequestLimiter cancelling it
1211 // prematurely.
1212 // The source is the corresponding RenderViewHost. There are no details.
1213 DOWNLOAD_INITIATED,
1214
1215 // Sent when a page generation to MHTML has finished.
1216 // The source is the corresponding RenderViewHost. The details is a
1217 // MHTMLGenerationManager::NotificationDetails.
1218 MHTML_GENERATED,
1219
1220 // Misc --------------------------------------------------------------------
1221
1222 #if defined(OS_CHROMEOS)
1223 // Sent when a chromium os user logs in.
1224 LOGIN_USER_CHANGED,
1225
1226 // Sent when user image is updated.
1227 LOGIN_USER_IMAGE_CHANGED,
1228
1229 // Sent when a chromium os user attempts to log in. The source is
1230 // all and the details are AuthenticationNotificationDetails.
1231 LOGIN_AUTHENTICATION,
1232
1233 // Sent when a panel state changed.
1234 PANEL_STATE_CHANGED,
1235
1236 // Sent when the window manager's layout mode has changed.
1237 LAYOUT_MODE_CHANGED,
1238
1239 // Sent when the wizard's content view is destroyed. The source and details
1240 // are not used.
1241 WIZARD_CONTENT_VIEW_DESTROYED,
1242
1243 // Sent when the screen lock state has changed. The source is
1244 // ScreenLocker and the details is a bool specifing that the
1245 // screen is locked. When details is a false, the source object
1246 // is being deleted, so the receiver shouldn't use the screen locker
1247 // object.
1248 SCREEN_LOCK_STATE_CHANGED,
1249
1250 // Sent when the network state has changed on UI thread.
1251 // The source is AllSources and the details is NetworkStateDetails defined
1252 // in chrome/browser/chromeos/network_state_notifier.h.
1253 // TODO(oshima): Port this to all platforms.
1254 NETWORK_STATE_CHANGED,
1255
1256 // Sent when an attempt to acquire the public key of the owner of a chromium
1257 // os device has succeeded.
1258 OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
1259
1260 // Sent when an attempt to acquire the public key of the owner of a chromium
1261 // os device has failed.
1262 OWNER_KEY_FETCH_ATTEMPT_FAILED,
1263
1264 // Sent after UserManager checked ownership status of logged in user.
1265 OWNERSHIP_CHECKED,
1266
1267 // This is sent to a ChromeOS settings observer when a system setting is
1268 // changed. The source is the CrosSettings and the details a std::string of
1269 // the changed setting.
1270 SYSTEM_SETTING_CHANGED,
1271
1272 // Sent by SIM unlock dialog when it has finished with the process of
1273 // updating RequirePin setting. RequirePin setting might have been changed
1274 // to a new value or update might have been canceled.
1275 // In either case notification is sent and details contain a bool
1276 // that represents current value.
1277 REQUIRE_PIN_SETTING_CHANGE_ENDED,
1278
1279 // Sent by SIM unlock dialog when it has finished the EnterPin or
1280 // EnterPuk dialog, either because the user cancelled, or entered a
1281 // PIN or PUK.
1282 ENTER_PIN_ENDED,
1283
1284 #endif
1285
1286 // Sent before the repost form warning is brought up.
1287 // The source is a NavigationController.
1288 REPOST_WARNING_SHOWN,
1289
1290 #if defined(TOOLKIT_VIEWS)
1291 // Sent when a bookmark's context menu is shown. Used to notify
1292 // tests that the context menu has been created and shown.
1293 BOOKMARK_CONTEXT_MENU_SHOWN,
1294 #endif
1295
1296 // Sent when the zoom level changes. The source is the HostZoomMap. The
1297 // details is a string of the hostname for which the zoom changed. In case
1298 // of a temporary zoom level change, the details is an empty string.
1299 ZOOM_LEVEL_CHANGED,
1300
1301 // Sent when the tab's closeable state has changed due to increase/decrease
1302 // in number of tabs in browser or increase/decrease in number of browsers.
1303 // Details<bool> contain the closeable flag while source is AllSources.
1304 // This is only sent from ChromeOS's TabCloseableStateWatcher.
1305 TAB_CLOSEABLE_STATE_CHANGED,
1306
1307 // Sent each time the InstantController is updated.
1308 INSTANT_CONTROLLER_UPDATED,
1309
1310 // Sent each time the InstantController shows the InstantLoader.
1311 INSTANT_CONTROLLER_SHOWN,
1312
1313 // Sent when the instant loader determines whether the page supports the
1314 // instant API or not. The details is a boolean indicating if the page
1315 // supports instant. The source is not used.
1316 INSTANT_SUPPORT_DETERMINED,
1317
1318 // Password Store ----------------------------------------------------------
1319 // This notification is sent whenenever login entries stored in the password
1320 // store are changed. The detail of this notification is a list of changes
1321 // represented by a vector of PasswordStoreChange. Each change includes a
1322 // change type (ADD, UPDATE, or REMOVE) as well as the
1323 // |webkit_glue::PasswordForm|s that were affected.
1324 LOGINS_CHANGED,
1325
1326 // Sent when the applications in the NTP app launcher have been reordered.
1327 EXTENSION_LAUNCHER_REORDERED,
1328
1329 #if defined(OS_CHROMEOS)
1330 // Sent when WebSocketProxy started accepting connections.
1331 WEB_SOCKET_PROXY_STARTED,
1332 #endif
1333
1334 // Sent when a new web store promo has been loaded.
1335 WEB_STORE_PROMO_LOADED,
1336
1337 #if defined(TOUCH_UI)
1338 // Sent when an API for hiding the keyboard is invoked from JavaScript code.
1339 HIDE_KEYBOARD_INVOKED,
1340
1341 // Sent when an API for set height of the keyboard is invoked from
1342 // JavaScript code.
1343 SET_KEYBOARD_HEIGHT_INVOKED,
1344
1345 // Sent when an editable element is touched, such as text box, password
1346 // field, and omnibox.
1347 EDITABLE_ELEMENT_TOUCHED,
1348 #endif
1349
1350 // Protocol Handler Registry -----------------------------------------------
1351 // Sent when a ProtocolHandlerRegistry is changed.
1352 PROTOCOL_HANDLER_REGISTRY_CHANGED,
1353
1354 // Sent when the cached profile info has changed.
1355 PROFILE_CACHED_INFO_CHANGED,
1356
1357 // Count (must be last) ----------------------------------------------------
1358 // Used to determine the number of notification types. Not valid as
1359 // a type parameter when registering for or posting notifications.
1360 NOTIFICATION_TYPE_COUNT
1361 };
1362
1363 // TODO(erg): Our notification system relies on implicit conversion.
1364 NotificationType(Type v) : value(v) {} // NOLINT
1365
1366 bool operator==(NotificationType t) const { return value == t.value; }
1367 bool operator!=(NotificationType t) const { return value != t.value; }
1368
1369 // Comparison to explicit enum values.
1370 bool operator==(Type v) const { return value == v; }
1371 bool operator!=(Type v) const { return value != v; }
1372
1373 Type value;
1374 }; 445 };
1375 446
1376 inline bool operator==(NotificationType::Type a, NotificationType b) { 447 } // namespace content
1377 return a == b.value;
1378 }
1379 inline bool operator!=(NotificationType::Type a, NotificationType b) {
1380 return a != b.value;
1381 }
1382 448
1383 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ 449 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_
OLDNEW
« no previous file with comments | « content/common/child_process_host.cc ('k') | content/common/notification_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698