OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef 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 // It is written as an enum inside a class so that it can be forward declared. |
13 // You're not allowed to forward declare an enum, and we want to forward | 13 // You're not allowed to forward declare an enum, and we want to forward |
14 // declare this since it's required by NotificationObserver which is included | 14 // declare this since it's required by NotificationObserver which is included |
15 // by a lot of header files. | 15 // by a lot of header files. |
16 // | 16 // |
17 // Since this class encapsulates an integral value, it should be passed by | 17 // Since this class encapsulates an integral value, it should be passed by |
18 // value. | 18 // value. |
19 class NotificationType { | 19 class NotificationType { |
20 public: | 20 public: |
21 enum Type { | 21 enum { |
| 22 CONTENT_NOTIFICATION_START = 0, |
| 23 |
22 // General ----------------------------------------------------------------- | 24 // General ----------------------------------------------------------------- |
23 | 25 |
24 // Special signal value to represent an interest in all notifications. | 26 // Special signal value to represent an interest in all notifications. |
25 // Not valid when posting a notification. | 27 // Not valid when posting a notification. |
26 ALL = 0, | 28 ALL = CONTENT_NOTIFICATION_START, |
27 | 29 |
28 // The app is done processing user actions, now is a good time to do | 30 // The app is done processing user actions, now is a good time to do |
29 // some background work. | 31 // some background work. |
30 IDLE, | 32 IDLE, |
31 | 33 |
32 // Means that the app has just started doing something in response to a | 34 // Means that the app has just started doing something in response to a |
33 // user action, and that background processes shouldn't run if avoidable. | 35 // user action, and that background processes shouldn't run if avoidable. |
34 BUSY, | 36 BUSY, |
35 | 37 |
36 // This is sent when the user does a gesture resulting in a noteworthy | 38 // This is sent when the user does a gesture resulting in a noteworthy |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // change. There are no details. | 173 // change. There are no details. |
172 SSL_INTERNAL_STATE_CHANGED, | 174 SSL_INTERNAL_STATE_CHANGED, |
173 | 175 |
174 // The user accepted or dismissed a SSL client authentication request. | 176 // The user accepted or dismissed a SSL client authentication request. |
175 // The source is a Source<SSLClientAuthHandler>. Details is a | 177 // The source is a Source<SSLClientAuthHandler>. Details is a |
176 // SSLClientAuthNotificationDetails which records specifies which | 178 // SSLClientAuthNotificationDetails which records specifies which |
177 // SSLCertRequestInfo the request was for and which X509Certificate was | 179 // SSLCertRequestInfo the request was for and which X509Certificate was |
178 // selected (if any). | 180 // selected (if any). |
179 SSL_CLIENT_AUTH_CERT_SELECTED, | 181 SSL_CLIENT_AUTH_CERT_SELECTED, |
180 | 182 |
181 // Views ------------------------------------------------------------------- | |
182 | |
183 // Notification that a view was removed from a view hierarchy. The source | 183 // Notification that a view was removed from a view hierarchy. The source |
184 // is the view, the details is the parent view. | 184 // is the view, the details is the parent view. |
185 VIEW_REMOVED, | 185 VIEW_REMOVED, |
186 | 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 | 187 // This message is sent when the last window considered to be an |
217 // "application window" has been closed. Dependent/dialog/utility windows | 188 // "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 | 189 // can use this as a way to know that they should also close. No source or |
219 // details are passed. | 190 // details are passed. |
220 ALL_APPWINDOWS_CLOSED, | 191 ALL_APPWINDOWS_CLOSED, |
221 | 192 |
222 #if defined(OS_MACOSX) | 193 #if defined(OS_MACOSX) |
223 // This message is sent when the application is made active (Mac OS X only | 194 // This message is sent when the application is made active (Mac OS X only |
224 // at present). No source or details are passed. | 195 // at present). No source or details are passed. |
225 APP_ACTIVATED, | 196 APP_ACTIVATED, |
(...skipping 17 matching lines...) Expand all Loading... |
243 // browsers have closed. This is sent if the user chooses to exit | 214 // 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 | 215 // (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 | 216 // (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 | 217 // (such as the user closing the last window). Note that receiving this |
247 // notification does not necessarily mean the process will exit | 218 // notification does not necessarily mean the process will exit |
248 // because the shutdown process can be cancelled by unload handler. | 219 // because the shutdown process can be cancelled by unload handler. |
249 // Use APP_TERMINATING for such needs. | 220 // Use APP_TERMINATING for such needs. |
250 // The source and details are unspecified. | 221 // The source and details are unspecified. |
251 APP_EXITING, | 222 APP_EXITING, |
252 | 223 |
253 // Indicates that a top window has been closed. The source is the HWND | |
254 // that was closed, no details are expected. | |
255 WINDOW_CLOSED, | |
256 | |
257 // Indicates that a devtools window is closing. The source is the Profile* | 224 // Indicates that a devtools window is closing. The source is the Profile* |
258 // and the details is the inspected RenderViewHost*. | 225 // and the details is the inspected RenderViewHost*. |
259 DEVTOOLS_WINDOW_CLOSING, | 226 DEVTOOLS_WINDOW_CLOSING, |
260 | 227 |
261 // Sent when an info bubble has been created but not yet shown. The source | |
262 // is the InfoBubble. | |
263 INFO_BUBBLE_CREATED, | |
264 | |
265 // Sent when the language (English, French...) for a page has been detected. | |
266 // The details Details<std::string> contain the ISO 639-1 language code and | |
267 // the source is Source<TabContents>. | |
268 TAB_LANGUAGE_DETERMINED, | |
269 | |
270 // Sent when a page has been translated. The source is the tab for that page | |
271 // (Source<TabContents>) and the details are the language the page was | |
272 // originally in and the language it was translated to | |
273 // (std::pair<std::string, std::string>). | |
274 PAGE_TRANSLATED, | |
275 | |
276 // Sent after the renderer returns a snapshot of tab contents. | |
277 // The source (Source<TabContentsWrapper>) is the RenderViewHost for which | |
278 // the snapshot was generated and the details (Details<const SkBitmap>) is | |
279 // the actual snapshot. | |
280 TAB_SNAPSHOT_TAKEN, | |
281 | |
282 // The user has changed the browser theme. The source is a | |
283 // Source<ThemeService>. There are no details. | |
284 BROWSER_THEME_CHANGED, | |
285 | |
286 // Sent when the renderer returns focus to the browser, as part of focus | |
287 // traversal. The source is the browser, there are no details. | |
288 FOCUS_RETURNED_TO_BROWSER, | |
289 | |
290 // Application-modal dialogs ----------------------------------------------- | |
291 | |
292 // Sent after an application-modal dialog has been shown. The source | |
293 // is the dialog. | |
294 APP_MODAL_DIALOG_SHOWN, | |
295 | |
296 // Tabs -------------------------------------------------------------------- | 228 // Tabs -------------------------------------------------------------------- |
297 | 229 |
298 // Sent when a tab is added to a TabContentsDelegate. The source is the | 230 // Sent when a tab is added to a TabContentsDelegate. The source is the |
299 // TabContentsDelegate and the details is the TabContents. | 231 // TabContentsDelegate and the details is the TabContents. |
300 TAB_ADDED, | 232 TAB_ADDED, |
301 | 233 |
302 // This notification is sent after a tab has been appended to the tab_strip. | 234 // This notification is sent after a tab has been appended to the tab_strip. |
303 // The source is a Source<TabContentsWrapper> of the tab being added. There | 235 // The source is a Source<TabContentsWrapper> of the tab being added. There |
304 // are no details. | 236 // are no details. |
305 TAB_PARENTED, | 237 TAB_PARENTED, |
(...skipping 26 matching lines...) Expand all Loading... |
332 // This message is sent after a TabContents is disconnected from the | 264 // This message is sent after a TabContents is disconnected from the |
333 // renderer process. The source is a Source<TabContents> with a pointer to | 265 // renderer process. The source is a Source<TabContents> with a pointer to |
334 // the TabContents (the pointer is usable). No details are expected. | 266 // the TabContents (the pointer is usable). No details are expected. |
335 TAB_CONTENTS_DISCONNECTED, | 267 TAB_CONTENTS_DISCONNECTED, |
336 | 268 |
337 // This notification is sent after TabContents' title is updated. The source | 269 // This notification is sent after TabContents' title is updated. The source |
338 // is a Source<TabContents> with a pointer to the TabContents. The details | 270 // is a Source<TabContents> with a pointer to the TabContents. The details |
339 // is a Details<TitleUpdatedDetails> that contains more information. | 271 // is a Details<TitleUpdatedDetails> that contains more information. |
340 TAB_CONTENTS_TITLE_UPDATED, | 272 TAB_CONTENTS_TITLE_UPDATED, |
341 | 273 |
342 // This message is sent when a new InfoBar has been added to a | |
343 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a | |
344 // pointer to the TabContentsWrapper the InfoBar was added to. The details | |
345 // is a Details<InfoBarDelegate> with a pointer to the delegate that was | |
346 // added. | |
347 TAB_CONTENTS_INFOBAR_ADDED, | |
348 | |
349 // This message is sent when an InfoBar is about to be removed from a | |
350 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a | |
351 // pointer to the TabContentsWrapper the InfoBar was removed from. The | |
352 // details is a Details<std::pair<InfoBarDelegate*, bool> > with a pointer | |
353 // to the removed delegate and whether the removal should be animated. | |
354 TAB_CONTENTS_INFOBAR_REMOVED, | |
355 | |
356 // This message is sent when an InfoBar is replacing another infobar in a | |
357 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a | |
358 // pointer to the TabContentsWrapper the InfoBar was removed from. The | |
359 // details is a Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> > with | |
360 // pointers to the old and new delegates, respectively. | |
361 TAB_CONTENTS_INFOBAR_REPLACED, | |
362 | |
363 // This is sent when an externally hosted tab is created. The details | |
364 // contain the ExternalTabContainer that contains the tab | |
365 EXTERNAL_TAB_CREATED, | |
366 | |
367 // This is sent when an externally hosted tab is closed. No details are | |
368 // expected. | |
369 EXTERNAL_TAB_CLOSED, | |
370 | |
371 // Indicates that the new page tab has finished loading. This is used for | |
372 // performance testing to see how fast we can load it after startup, and is | |
373 // only called once for the lifetime of the browser. The source is unused. | |
374 // Details is an integer: the number of milliseconds elapsed between | |
375 // starting and finishing all painting. | |
376 INITIAL_NEW_TAB_UI_LOAD, | |
377 | |
378 // Used to fire notifications about how long various events took to | |
379 // complete. E.g., this is used to get more fine grained timings from the | |
380 // new tab page. Details is a MetricEventDurationDetails. | |
381 METRIC_EVENT_DURATION, | |
382 | |
383 // This notification is sent when a TabContents is being hidden, e.g. due | 274 // This notification is sent when a TabContents is being hidden, e.g. due |
384 // to switching away from this tab. The source is a Source<TabContents>. | 275 // to switching away from this tab. The source is a Source<TabContents>. |
385 TAB_CONTENTS_HIDDEN, | 276 TAB_CONTENTS_HIDDEN, |
386 | 277 |
387 // This notification is sent when a TabContents is being destroyed. Any | 278 // This notification is sent when a TabContents is being destroyed. Any |
388 // object holding a reference to a TabContents can listen to that | 279 // object holding a reference to a TabContents can listen to that |
389 // notification to properly reset the reference. The source is a | 280 // notification to properly reset the reference. The source is a |
390 // Source<TabContents>. | 281 // Source<TabContents>. |
391 TAB_CONTENTS_DESTROYED, | 282 TAB_CONTENTS_DESTROYED, |
392 | 283 |
393 // This notification is sent when TabContents::SetAppExtension is invoked. | |
394 // The source is the ExtensionTabHelper SetAppExtension was invoked on. | |
395 TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, | |
396 | |
397 // A RenderViewHost was created for a TabContents. The source is the | 284 // A RenderViewHost was created for a TabContents. The source is the |
398 // associated TabContents, and the details is the RenderViewHost | 285 // associated TabContents, and the details is the RenderViewHost |
399 // pointer. | 286 // pointer. |
400 RENDER_VIEW_HOST_CREATED_FOR_TAB, | 287 RENDER_VIEW_HOST_CREATED_FOR_TAB, |
401 | 288 |
402 // Notification than an interstitial has become associated with a tab. The | 289 // Notification than an interstitial has become associated with a tab. The |
403 // source is the TabContents, the details not used. | 290 // source is the TabContents, the details not used. |
404 INTERSTITIAL_ATTACHED, | 291 INTERSTITIAL_ATTACHED, |
405 | 292 |
406 // Stuff inside the tabs --------------------------------------------------- | |
407 | |
408 // This message is sent after a constrained window has been closed. The | |
409 // source is a Source<ConstrainedWindow> with a pointer to the closed child | |
410 // window. (The pointer isn't usable, except for identification.) No | |
411 // details are expected. | |
412 CWINDOW_CLOSED, | |
413 | |
414 // Indicates that a RenderProcessHost was created and its handle is now | 293 // Indicates that a RenderProcessHost was created and its handle is now |
415 // available. The source will be the RenderProcessHost that corresponds to | 294 // available. The source will be the RenderProcessHost that corresponds to |
416 // the process. | 295 // the process. |
417 RENDERER_PROCESS_CREATED, | 296 RENDERER_PROCESS_CREATED, |
418 | 297 |
419 // Indicates that a RenderProcessHost is destructing. The source will be the | 298 // Indicates that a RenderProcessHost is destructing. The source will be the |
420 // RenderProcessHost that corresponds to the process. | 299 // RenderProcessHost that corresponds to the process. |
421 RENDERER_PROCESS_TERMINATED, | 300 RENDERER_PROCESS_TERMINATED, |
422 | 301 |
423 // Indicates that a render process is starting to exit, such that it should | 302 // Indicates that a render process is starting to exit, such that it should |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 // This notifies the observer that the drag operation ack in a drag and | 369 // This notifies the observer that the drag operation ack in a drag and |
491 // drop operation was received. The source is the RenderViewHost. | 370 // drop operation was received. The source is the RenderViewHost. |
492 // Note: Used only in testing. | 371 // Note: Used only in testing. |
493 RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, | 372 RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, |
494 | 373 |
495 // Indicates a RenderWidgetHost has been hidden or restored. The source is | 374 // 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 | 375 // the RWH whose visibility changed, the details is a bool set to true if |
497 // the new state is "visible." | 376 // the new state is "visible." |
498 RENDER_WIDGET_VISIBILITY_CHANGED, | 377 RENDER_WIDGET_VISIBILITY_CHANGED, |
499 | 378 |
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 | 379 // 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 | 380 // 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 | 381 // a Details<const bool> that indicates whether or not an editable node was |
534 // focused. | 382 // focused. |
535 FOCUS_CHANGED_IN_PAGE, | 383 FOCUS_CHANGED_IN_PAGE, |
536 | 384 |
537 // Notification posted from ExecuteJavascriptInWebFrameNotifyResult. The | 385 // Notification posted from ExecuteJavascriptInWebFrameNotifyResult. The |
538 // source is the RenderViewHost ExecuteJavascriptInWebFrameNotifyResult was | 386 // source is the RenderViewHost ExecuteJavascriptInWebFrameNotifyResult was |
539 // invoked on. The details are a std::pair<int, Value*> with the int giving | 387 // invoked on. The details are a std::pair<int, Value*> with the int giving |
540 // the id returned from ExecuteJavascriptInWebFrameNotifyResult and the | 388 // the id returned from ExecuteJavascriptInWebFrameNotifyResult and the |
541 // Value the results of the javascript expression. The Value is owned by | 389 // Value the results of the javascript expression. The Value is owned by |
542 // RenderViewHost and may be a Null Value. | 390 // RenderViewHost and may be a Null Value. |
543 EXECUTE_JAVASCRIPT_RESULT, | 391 EXECUTE_JAVASCRIPT_RESULT, |
544 | 392 |
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 --------------------------------------------------------- | 393 // Child Processes --------------------------------------------------------- |
571 | 394 |
572 // This notification is sent when a child process host has connected to a | 395 // 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 | 396 // child process. There is no usable source, since it is sent from an |
574 // ephemeral task; register for AllSources() to receive this notification. | 397 // ephemeral task; register for AllSources() to receive this notification. |
575 // The details are in a Details<ChildProcessInfo>. | 398 // The details are in a Details<ChildProcessInfo>. |
576 CHILD_PROCESS_HOST_CONNECTED, | 399 CHILD_PROCESS_HOST_CONNECTED, |
577 | 400 |
578 // This message is sent after a ChildProcessHost is disconnected from the | 401 // 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 | 402 // child process. There is no usable source, since it is sent from an |
(...skipping 18 matching lines...) Expand all Loading... |
598 // This message indicates that an instance of a particular child was | 421 // This message indicates that an instance of a particular child was |
599 // created in a page. (If one page contains several regions rendered by | 422 // created in a page. (If one page contains several regions rendered by |
600 // the same child, this notification will occur once for each region | 423 // the same child, this notification will occur once for each region |
601 // during the page load.) | 424 // during the page load.) |
602 // | 425 // |
603 // There is no usable source, since it is sent from an ephemeral task; | 426 // There is no usable source, since it is sent from an ephemeral task; |
604 // register for AllSources() to receive this notification. The details are | 427 // register for AllSources() to receive this notification. The details are |
605 // in a Details<ChildProcessInfo>. | 428 // in a Details<ChildProcessInfo>. |
606 CHILD_INSTANCE_CREATED, | 429 CHILD_INSTANCE_CREATED, |
607 | 430 |
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 | 431 // Sent by the PluginUpdater when there is a change of plugin |
615 // enable/disable status. | 432 // enable/disable status. |
616 PLUGIN_ENABLE_STATUS_CHANGED, | 433 PLUGIN_ENABLE_STATUS_CHANGED, |
617 | 434 |
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 ------------------------------------------------------------ | 435 // Purge Memory ------------------------------------------------------------ |
1036 | 436 |
1037 // Sent on the IO thread when the system should try to reduce the amount of | 437 // 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. | 438 // memory in use, no source or details are passed. See memory_purger.h .cc. |
1039 PURGE_MEMORY, | 439 PURGE_MEMORY, |
1040 | 440 |
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. | 441 // Sent before the repost form warning is brought up. |
1287 // The source is a NavigationController. | 442 // The source is a NavigationController. |
1288 REPOST_WARNING_SHOWN, | 443 REPOST_WARNING_SHOWN, |
1289 | 444 |
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 | 445 // 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 | 446 // 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. | 447 // of a temporary zoom level change, the details is an empty string. |
1299 ZOOM_LEVEL_CHANGED, | 448 ZOOM_LEVEL_CHANGED, |
1300 | 449 |
1301 // Sent when the tab's closeable state has changed due to increase/decrease | 450 // Custom notifications used by the embedder should start from here. |
1302 // in number of tabs in browser or increase/decrease in number of browsers. | 451 CONTENT_NOTIFICATION_END, |
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 }; | 452 }; |
1362 | 453 |
1363 // TODO(erg): Our notification system relies on implicit conversion. | 454 // TODO(erg): Our notification system relies on implicit conversion. |
1364 NotificationType(Type v) : value(v) {} // NOLINT | 455 NotificationType(int v) : value(v) {} // NOLINT |
1365 | 456 |
1366 bool operator==(NotificationType t) const { return value == t.value; } | 457 bool operator==(NotificationType t) const { return value == t.value; } |
1367 bool operator!=(NotificationType t) const { return value != t.value; } | 458 bool operator!=(NotificationType t) const { return value != t.value; } |
1368 | 459 |
1369 // Comparison to explicit enum values. | 460 // Comparison to explicit enum values. |
1370 bool operator==(Type v) const { return value == v; } | 461 bool operator==(int v) const { return value == v; } |
1371 bool operator!=(Type v) const { return value != v; } | 462 bool operator!=(int v) const { return value != v; } |
1372 | 463 |
1373 Type value; | 464 int value; |
1374 }; | 465 }; |
1375 | 466 |
1376 inline bool operator==(NotificationType::Type a, NotificationType b) { | 467 inline bool operator==(int a, NotificationType b) { |
1377 return a == b.value; | 468 return a == b.value; |
1378 } | 469 } |
1379 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 470 inline bool operator!=(int a, NotificationType b) { |
1380 return a != b.value; | 471 return a != b.value; |
1381 } | 472 } |
1382 | 473 |
1383 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 474 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |