1 // Copyright 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ 6 #define CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ 7 8 #include "build/build_config.h" 9 #include "content/public/browser/notification_types.h" 10 11 namespace chrome { 12 13 enum NotificationType { 14 NOTIFICATION_CHROME_START = content::NOTIFICATION_CONTENT_END, 15 16 // Browser-window ---------------------------------------------------------- 17 18 // This message is sent after a window has been opened. The source is a 19 // Source<Browser> containing the affected Browser. No details are 20 // expected. 21 NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START, 22 23 // This message is sent soon after BROWSER_OPENED, and indicates that 24 // the Browser's |window_| is now non-NULL. The source is a Source<Browser> 25 // containing the affected Browser. No details are expected. 26 NOTIFICATION_BROWSER_WINDOW_READY, 27 28 // This message is sent when a browser is closing. The source is a 29 // Source<Browser> containing the affected Browser. No details are expected. 30 // This is sent prior to BROWSER_CLOSED, and may be sent more than once for a 31 // particular browser. 32 NOTIFICATION_BROWSER_CLOSING, 33 34 // This message is sent after a window has been closed. The source is a 35 // Source<Browser> containing the affected Browser. No details are exptected. 36 NOTIFICATION_BROWSER_CLOSED, 37 38 // This message is sent when closing a browser has been cancelled, either by 39 // the user cancelling a beforeunload dialog, or IsClosingPermitted() 40 // disallowing closing. This notification implies that no BROWSER_CLOSING or 41 // BROWSER_CLOSED notification will be sent. 42 // The source is a Source<Browser> containing the affected browser. No details 43 // are expected. 44 NOTIFICATION_BROWSER_CLOSE_CANCELLED, 45 46 // Indicates that a top window has been closed. The source is the HWND 47 // that was closed, no details are expected. 48 NOTIFICATION_WINDOW_CLOSED, 49 50 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 51 // On Linux maximize can be an asynchronous operation. This notification 52 // indicates that the window has been maximized. The source is 53 // a Source<BrowserWindow> containing the BrowserWindow that was maximized. 54 // No details are expected. 55 NOTIFICATION_BROWSER_WINDOW_MAXIMIZED, 56 #endif 57 58 // Sent when the language (English, French...) for a page has been detected. 59 // The details Details<std::string> contain the ISO 639-1 language code and 60 // the source is Source<WebContents>. 61 NOTIFICATION_TAB_LANGUAGE_DETERMINED, 62 63 // Sent when a page has been translated. The source is the tab for that page 64 // (Source<WebContents>) and the details are the language the page was 65 // originally in and the language it was translated to 66 // (std::pair<std::string, std::string>). 67 NOTIFICATION_PAGE_TRANSLATED, 68 69 // The user has changed the browser theme. The source is a 70 // Source<ThemeService>. There are no details. 71 NOTIFICATION_BROWSER_THEME_CHANGED, 72 73 #if defined(USE_AURA) 74 // The user has changed the fling curve configuration. 75 // Source<GesturePrefsObserver>. There are no details. 76 NOTIFICATION_BROWSER_FLING_CURVE_PARAMETERS_CHANGED, 77 #endif // defined(USE_AURA) 78 79 // Sent when the renderer returns focus to the browser, as part of focus 80 // traversal. The source is the browser, there are no details. 81 NOTIFICATION_FOCUS_RETURNED_TO_BROWSER, 82 83 // A new tab is created from an existing tab to serve as a target of a 84 // navigation that is about to happen. The source will be a Source<Profile> 85 // corresponding to the profile in which the new tab will live. Details in 86 // the form of a RetargetingDetails object are provided. 87 NOTIFICATION_RETARGETING, 88 89 // Application-wide ---------------------------------------------------------- 90 91 // This message is sent when the application is terminating (the last 92 // browser window has shutdown as part of an explicit user-initiated exit, 93 // or the user closed the last browser window on Windows/Linux and there are 94 // no BackgroundContents keeping the browser running). No source or details 95 // are passed. 96 NOTIFICATION_APP_TERMINATING, 97 98 #if defined(OS_MACOSX) 99 // This notification is sent when the app has no key window, such as when 100 // all windows are closed but the app is still active. No source or details 101 // are provided. 102 NOTIFICATION_NO_KEY_WINDOW, 103 #endif 104 105 // This is sent when the user has chosen to exit the app, but before any 106 // browsers have closed. This is sent if the user chooses to exit (via exit 107 // menu item or keyboard shortcut) or to restart the process (such as in flags 108 // page), not if Chrome exits by some other means (such as the user closing 109 // the last window). No source or details are passed. 110 // 111 // Note that receiving this notification does not necessarily mean the process 112 // will exit because the shutdown process can be cancelled by an unload 113 // handler. Use APP_TERMINATING for such needs. 114 NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, 115 116 // Application-modal dialogs ----------------------------------------------- 117 118 // Sent after an application-modal dialog has been shown. The source 119 // is the dialog. 120 NOTIFICATION_APP_MODAL_DIALOG_SHOWN, 121 122 // This message is sent when a new InfoBar has been added to an 123 // InfoBarService. The source is a Source<InfoBarService> with a pointer to 124 // the InfoBarService the InfoBar was added to. The details is a 125 // Details<InfoBar::AddedDetails>. 126 NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 127 128 // This message is sent when an InfoBar is about to be removed from an 129 // InfoBarService. The source is a Source<InfoBarService> with a pointer to 130 // the InfoBarService the InfoBar was removed from. The details is a 131 // Details<InfoBar::RemovedDetails>. 132 NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 133 134 // This message is sent when an InfoBar is replacing another infobar in an 135 // InfoBarService. The source is a Source<InfoBarService> with a pointer to 136 // the InfoBarService the InfoBar was removed from. The details is a 137 // Details<InfoBar::ReplacedDetails>. 138 NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED, 139 140 // This is sent when an externally hosted tab is closed. No details are 141 // expected. 142 NOTIFICATION_EXTERNAL_TAB_CLOSED, 143 144 // Indicates that the new page tab has finished loading. This is used for 145 // performance testing to see how fast we can load it after startup, and is 146 // only called once for the lifetime of the browser. The source is unused. 147 // Details is an integer: the number of milliseconds elapsed between 148 // starting and finishing all painting. 149 NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD, 150 151 // Used to fire notifications about how long various events took to 152 // complete. E.g., this is used to get more fine grained timings from the 153 // new tab page. The source is a WebContents and the details is a 154 // MetricEventDurationDetails. 155 NOTIFICATION_METRIC_EVENT_DURATION, 156 157 // This notification is sent when extensions::TabHelper::SetExtensionApp is 158 // invoked. The source is the extensions::TabHelper SetExtensionApp was 159 // invoked on. 160 NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, 161 162 // Tabs -------------------------------------------------------------------- 163 164 // Sent when a tab is added to a WebContentsDelegate. The source is the 165 // WebContentsDelegate and the details is the added WebContents. 166 NOTIFICATION_TAB_ADDED, 167 168 // This notification is sent after a tab has been appended to the tab_strip. 169 // The source is a Source<WebContents> of the tab being added. There 170 // are no details. 171 NOTIFICATION_TAB_PARENTED, 172 173 // This message is sent before a tab has been closed. The source is a 174 // Source<NavigationController> with a pointer to the controller for the 175 // closed tab. No details are expected. 176 // 177 // See also content::NOTIFICATION_WEB_CONTENTS_DESTROYED, which is sent when 178 // the WebContents containing the NavigationController is destroyed. 179 NOTIFICATION_TAB_CLOSING, 180 181 // Stuff inside the tabs --------------------------------------------------- 182 183 // This notification is sent when the result of a find-in-page search is 184 // available with the browser process. The source is a Source<WebContents>. 185 // Details encompass a FindNotificationDetail object that tells whether the 186 // match was found or not found. 187 NOTIFICATION_FIND_RESULT_AVAILABLE, 188 189 // BackgroundContents ------------------------------------------------------ 190 191 // A new background contents was opened by script. The source is the parent 192 // profile and the details are BackgroundContentsOpenedDetails. 193 NOTIFICATION_BACKGROUND_CONTENTS_OPENED, 194 195 // The background contents navigated to a new location. The source is the 196 // parent Profile, and the details are the BackgroundContents that was 197 // navigated. 198 NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, 199 200 // The background contents were closed by someone invoking window.close() 201 // or the parent application was uninstalled. 202 // The source is the parent profile, and the details are the 203 // BackgroundContents. 204 NOTIFICATION_BACKGROUND_CONTENTS_CLOSED, 205 206 // The background contents is being deleted. The source is the 207 // parent Profile, and the details are the BackgroundContents being deleted. 208 NOTIFICATION_BACKGROUND_CONTENTS_DELETED, 209 210 // The background contents has crashed. The source is the parent Profile, 211 // and the details are the BackgroundContents. 212 NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED, 213 214 // The background contents associated with a hosted app has changed (either 215 // a new background contents has been created, or an existing background 216 // contents has closed). The source is the parent Profile, and the details 217 // are the BackgroundContentsService. 218 NOTIFICATION_BACKGROUND_CONTENTS_SERVICE_CHANGED, 219 220 // Chrome has entered/exited background mode. The source is the 221 // BackgroundModeManager and the details are a boolean value which is set to 222 // true if Chrome is now in background mode. 223 NOTIFICATION_BACKGROUND_MODE_CHANGED, 224 225 // This is sent when a login prompt is shown. The source is the 226 // Source<NavigationController> for the tab in which the prompt is shown. 227 // Details are a LoginNotificationDetails which provide the LoginHandler 228 // that should be given authentication. 229 NOTIFICATION_AUTH_NEEDED, 230 231 // This is sent when authentication credentials have been supplied (either 232 // by the user or by an automation service), but before we've actually 233 // received another response from the server. The source is the 234 // Source<NavigationController> for the tab in which the prompt was shown. 235 // Details are an AuthSuppliedLoginNotificationDetails which provide the 236 // LoginHandler that should be given authentication as well as the supplied 237 // username and password. 238 NOTIFICATION_AUTH_SUPPLIED, 239 240 // This is sent when an authentication request has been dismissed without 241 // supplying credentials (either by the user or by an automation service). 242 // The source is the Source<NavigationController> for the tab in which the 243 // prompt was shown. Details are a LoginNotificationDetails which provide 244 // the LoginHandler that should be cancelled. 245 NOTIFICATION_AUTH_CANCELLED, 246 247 // History ----------------------------------------------------------------- 248 249 // Sent when a history service has finished loading. The source is the 250 // profile that the history service belongs to, and the details is the 251 // HistoryService. 252 NOTIFICATION_HISTORY_LOADED, 253 254 // Sent when a URL has been added or modified. This is used by the in-memory 255 // URL database and the InMemoryURLIndex (both used by autocomplete) to track 256 // changes to the main history system. 257 // 258 // The source is the profile owning the history service that changed, and 259 // the details is history::URLsModifiedDetails that lists the modified or 260 // added URLs. 261 NOTIFICATION_HISTORY_URLS_MODIFIED, 262 263 // Sent when the user visits a URL. 264 // 265 // The source is the profile owning the history service that changed, and 266 // the details is history::URLVisitedDetails. 267 NOTIFICATION_HISTORY_URL_VISITED, 268 269 // Sent when one or more URLs are deleted. 270 // 271 // The source is the profile owning the history service that changed, and 272 // the details is history::URLsDeletedDetails that lists the deleted URLs. 273 NOTIFICATION_HISTORY_URLS_DELETED, 274 275 // Sent when a keyword search term is updated. The source is the Profile and 276 // the details is history::KeywordSearchUpdatedDetails. 277 NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED, 278 279 // Sent when a keyword search term is deleted. The source is the Profile and 280 // the details is history::KeywordSearchDeletedDetails. 281 NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_DELETED, 282 283 // Sent by history when the favicon of a URL changes. The source is the 284 // profile, and the details is FaviconChangedDetails (see 285 // chrome/browser/favicon/favicon_changed_details.h). 286 NOTIFICATION_FAVICON_CHANGED, 287 288 // Sent by FaviconTabHelper when a tab's favicon has been successfully 289 // updated. The details are a bool indicating whether the 290 // NavigationEntry's favicon URL has changed since the previous 291 // NOTIFICATION_FAVICON_UPDATED notification. The details are true if 292 // there was no previous NOTIFICATION_FAVICON_UPDATED notification for the 293 // current NavigationEntry. 294 NOTIFICATION_FAVICON_UPDATED, 295 296 // Profiles ----------------------------------------------------------------- 297 298 // Sent after a Profile has been created. This notification is sent both for 299 // normal and OTR profiles. 300 // The details are none and the source is the new profile. 301 NOTIFICATION_PROFILE_CREATED, 302 303 // Sent after a Profile has been added to ProfileManager. 304 // The details are none and the source is the new profile. 305 NOTIFICATION_PROFILE_ADDED, 306 307 // Sent before a Profile is destroyed. This notification is sent both for 308 // normal and OTR profiles. 309 // The details are none and the source is a Profile*. 310 NOTIFICATION_PROFILE_DESTROYED, 311 312 // Sent after the URLRequestContextGetter for a Profile has been initialized. 313 // The details are none and the source is a Profile*. 314 NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED, 315 316 // TopSites ---------------------------------------------------------------- 317 318 // Sent by TopSites when it finishes loading. The source is the profile the 319 // details the TopSites. 320 NOTIFICATION_TOP_SITES_LOADED, 321 322 // Sent by TopSites when it has finished updating its most visited URLs 323 // cache after querying the history service. The source is the TopSites and 324 // the details a CancelableRequestProvider::Handle from the history service 325 // query. 326 // Used only in testing. 327 NOTIFICATION_TOP_SITES_UPDATED, 328 329 // Sent by TopSites when the either one of the most visited urls changed, or 330 // one of the images changes. The source is the TopSites, the details not 331 // used. 332 NOTIFICATION_TOP_SITES_CHANGED, 333 334 // Task Manager ------------------------------------------------------------ 335 336 // Sent when a renderer process is notified of new v8 heap statistics. The 337 // source is the ID of the renderer process, and the details are a 338 // V8HeapStatsDetails object. 339 NOTIFICATION_RENDERER_V8_HEAP_STATS_COMPUTED, 340 341 // Sent when a renderer process is notified of a new FPS value. The source 342 // is the ID of the renderer process, and the details are an FPSDetails 343 // object. 344 NOTIFICATION_RENDERER_FPS_COMPUTED, 345 346 // Non-history storage services -------------------------------------------- 347 348 // Sent when a TemplateURL is removed from the model. The source is the 349 // Profile, and the details the id of the TemplateURL being removed. 350 NOTIFICATION_TEMPLATE_URL_REMOVED, 351 352 // Sent when the prefs relating to the default search engine have changed due 353 // to policy. Source and details are unused. 354 NOTIFICATION_DEFAULT_SEARCH_POLICY_CHANGED, 355 356 // The state of a web resource has been changed. A resource may have been 357 // added, removed, or altered. Source is WebResourceService, and the 358 // details are NoDetails. 359 NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED, 360 361 // A safe browsing database update completed. Source is the 362 // SafeBrowsingService and the details are a bool indicating whether the 363 // update was successful. 364 NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 365 366 // Autocomplete ------------------------------------------------------------ 367 368 // Sent by the autocomplete controller when done. The source is the 369 // AutocompleteController, the details not used. 370 NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, 371 372 // This is sent when an item of the Omnibox popup is selected. The source 373 // is the profile. 374 NOTIFICATION_OMNIBOX_OPENED_URL, 375 376 // This is sent from Instant when the omnibox focus state changes. 377 NOTIFICATION_OMNIBOX_FOCUS_CHANGED, 378 379 // Sent when the Google URL for a profile has been updated. Some services 380 // cache this value and need to update themselves when it changes. See 381 // google_util::GetGoogleURLAndUpdateIfNecessary(). The source is the 382 // Profile, the details a GoogleURLTracker::UpdatedDetails containing the old 383 // and new URLs. 384 // 385 // Note that because incognito mode requests for the GoogleURLTracker are 386 // redirected to the non-incognito profile's copy, this notification will only 387 // ever fire on non-incognito profiles; thus listeners should use 388 // GetOriginalProfile() when constructing a Source to filter against. 389 NOTIFICATION_GOOGLE_URL_UPDATED, 390 391 // Printing ---------------------------------------------------------------- 392 393 // Notification from PrintJob that an event occurred. It can be that a page 394 // finished printing or that the print job failed. Details is 395 // PrintJob::EventDetails. Source is a PrintJob. 396 NOTIFICATION_PRINT_JOB_EVENT, 397 398 // Sent when a PrintJob has been released. 399 // Source is the WebContents that holds the print job. 400 NOTIFICATION_PRINT_JOB_RELEASED, 401 402 // Shutdown ---------------------------------------------------------------- 403 404 // Sent when WM_ENDSESSION has been received, after the browsers have been 405 // closed but before browser process has been shutdown. The source/details 406 // are all source and no details. 407 NOTIFICATION_SESSION_END, 408 409 // User Scripts ------------------------------------------------------------ 410 411 // Sent when there are new user scripts available. The details are a 412 // pointer to SharedMemory containing the new scripts. 413 NOTIFICATION_USER_SCRIPTS_UPDATED, 414 415 // Extensions -------------------------------------------------------------- 416 417 // Sent when a CrxInstaller finishes. Source is the CrxInstaller that 418 // finished. The details are the extension which was installed. 419 NOTIFICATION_CRX_INSTALLER_DONE, 420 421 // Sent when the known installed extensions have all been loaded. In 422 // testing scenarios this can happen multiple times if extensions are 423 // unloaded and reloaded. The source is a Profile. 424 NOTIFICATION_EXTENSIONS_READY, 425 426 // Sent when an extension icon being displayed in the location bar is updated. 427 // The source is the Profile and the details are the WebContents for 428 // the tab. 429 NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, 430 431 // Sent when a new extension is loaded. The details are an Extension, and 432 // the source is a Profile. 433 NOTIFICATION_EXTENSION_LOADED, 434 435 // An error occured while attempting to load an extension. The details are a 436 // string with details about why the load failed. 437 NOTIFICATION_EXTENSION_LOAD_ERROR, 438 439 // Sent when an extension is enabled. Under most circumstances, listeners 440 // will want to use NOTIFICATION_EXTENSION_LOADED. This notification is only 441 // fired when the "Enable" button is hit in the extensions tab. The details 442 // are an Extension, and the source is a Profile. 443 NOTIFICATION_EXTENSION_ENABLED, 444 445 // Sent when attempting to load a new extension, but they are disabled. The 446 // details are an Extension*, and the source is a Profile*. 447 NOTIFICATION_EXTENSION_UPDATE_DISABLED, 448 449 // Sent when an extension's permissions change. The details are an 450 // UpdatedExtensionPermissionsInfo, and the source is a Profile. 451 NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED, 452 453 // Sent when new extensions are installed, or existing extensions are updated. 454 // The details are an InstalledExtensionInfo, and the source is a Profile. 455 NOTIFICATION_EXTENSION_INSTALLED, 456 457 // An error occured during extension install. The details are a string with 458 // details about why the install failed. 459 NOTIFICATION_EXTENSION_INSTALL_ERROR, 460 461 // Sent when an extension has been uninstalled. The details are an Extension, 462 // and the source is a Profile. 463 NOTIFICATION_EXTENSION_UNINSTALLED, 464 465 // Sent when an extension uninstall is not allowed because the extension is 466 // not user manageable. The details are an Extension, and the source is a 467 // Profile. 468 NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, 469 470 // Sent when an extension is unloaded. This happens when an extension is 471 // uninstalled or disabled. The details are an UnloadedExtensionInfo, and 472 // the source is a Profile. 473 // 474 // Note that when this notification is sent, ExtensionService has already 475 // removed the extension from its internal state. 476 NOTIFICATION_EXTENSION_UNLOADED, 477 478 // Sent when an Extension object is removed from ExtensionService. This 479 // can happen when an extension is uninstalled, upgraded, or blacklisted, 480 // including all cases when the Extension is deleted. The details are an 481 // Extension, and the source is a Profile. 482 NOTIFICATION_EXTENSION_REMOVED, 483 484 // Sent after a new ExtensionHost is created. The details are 485 // an ExtensionHost* and the source is a Profile*. 486 NOTIFICATION_EXTENSION_HOST_CREATED, 487 488 // Sent before an ExtensionHost is destroyed. The details are 489 // an ExtensionHost* and the source is a Profile*. 490 NOTIFICATION_EXTENSION_HOST_DESTROYED, 491 492 // Sent by an ExtensionHost when it has finished its initial page load, 493 // including any external resources. 494 // The details are an ExtensionHost* and the source is a Profile*. 495 NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, 496 497 // Sent by an ExtensionHost when its render view requests closing through 498 // window.close(). The details are an ExtensionHost* and the source is a 499 // Profile*. 500 NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, 501 502 // Sent when extension render process ends (whether it crashes or closes). 503 // The details are an ExtensionHost* and the source is a Profile*. Not sent 504 // during browser shutdown. 505 NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 506 507 // Sent when a background page is ready so other components can load. 508 NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY, 509 510 // Sent when a browser action's state has changed. The source is the 511 // ExtensionAction* that changed. The details are the Profile* that the 512 // browser action belongs to. 513 NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, 514 515 // Sent when the count of page actions has changed. Note that some of them 516 // may not apply to the current page. The source is a LocationBar*. There 517 // are no details. 518 NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, 519 520 // Sent when a browser action's visibility has changed. The source is the 521 // ExtensionPrefs* that changed, and the details are a std::string with the 522 // extension's ID. 523 NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, 524 525 // Sent when a page action's visibility has changed. The source is the 526 // ExtensionAction* that changed. The details are a WebContents*. 527 NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED, 528 529 // Sent when a system indicator action's state has changed. The source is the 530 // Profile* that the browser action belongs to. The details are the 531 // ExtensionAction* that changed. 532 NOTIFICATION_EXTENSION_SYSTEM_INDICATOR_UPDATED, 533 534 // Sent when an extension command has been removed. The source is the profile 535 // and the details is a std::pair of two std::string objects (an extension ID 536 // and the name of the command being removed). 537 NOTIFICATION_EXTENSION_COMMAND_REMOVED, 538 539 // Sent when an extension command has been added. The source is the profile 540 // and the details is a std::pair of two std::string objects (an extension ID 541 // and the name of the command being added). 542 NOTIFICATION_EXTENSION_COMMAND_ADDED, 543 544 // Sent when an extension command shortcut for a browser action is activated 545 // on Mac. The source is the profile and the details is a std::pair of a 546 // std::string containing an extension ID and a gfx::NativeWindow for the 547 // associated window. 548 NOTIFICATION_EXTENSION_COMMAND_BROWSER_ACTION_MAC, 549 550 // Sent when an extension command shortcut for a page action is activated 551 // on Mac. The source is the profile and the details is a std::pair of a 552 // std::string containing an extension ID and a gfx::NativeWindow for the 553 // associated window. 554 NOTIFICATION_EXTENSION_COMMAND_PAGE_ACTION_MAC, 555 556 // Sent when an extension command shortcut for a script badge is activated 557 // on Mac. The source is the profile and the details is a std::pair of a 558 // std::string containing an extension ID and a gfx::NativeWindow for the 559 // associated window. 560 NOTIFICATION_EXTENSION_COMMAND_SCRIPT_BADGE_MAC, 561 562 // A new extension RenderViewHost has been registered. The details are 563 // the RenderViewHost*. 564 NOTIFICATION_EXTENSION_VIEW_REGISTERED, 565 566 // An extension RenderViewHost has been unregistered. The details are 567 // the RenderViewHost*. 568 NOTIFICATION_EXTENSION_VIEW_UNREGISTERED, 569 570 // Sent by an extension to notify the browser about the results of a unit 571 // test. 572 NOTIFICATION_EXTENSION_TEST_PASSED, 573 NOTIFICATION_EXTENSION_TEST_FAILED, 574 575 // Sent by extension test javascript code, typically in a browser test. The 576 // sender is a std::string representing the extension id, and the details 577 // are a std::string with some message. This is particularly useful when you 578 // want to have C++ code wait for javascript code to do something. 579 NOTIFICATION_EXTENSION_TEST_MESSAGE, 580 581 // Sent when an bookmarks extensions API function was successfully invoked. 582 // The source is the id of the extension that invoked the function, and the 583 // details are a pointer to the const BookmarksFunction in question. 584 NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED, 585 586 // Sent when a downloads extensions API event is fired. The source is an 587 // ExtensionDownloadsEventRouter::NotificationSource, and the details is a 588 // std::string containing json. Used for testing. 589 NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, 590 591 // Sent when an omnibox extension has sent back omnibox suggestions. The 592 // source is the profile, and the details are an 593 // extensions::api::omnibox::SendSuggestions::Params object. 594 NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY, 595 596 // Sent when the user accepts the input in an extension omnibox keyword 597 // session. The source is the profile. 598 NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED, 599 600 // Sent when an omnibox extension has updated the default suggestion. The 601 // source is the profile. 602 NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED, 603 604 // Sent when the extension updater starts checking for updates to installed 605 // extensions. The source is a Profile, and there are no details. 606 NOTIFICATION_EXTENSION_UPDATING_STARTED, 607 608 // The extension updater found an update and will attempt to download and 609 // install it. The source is a Profile, and the details are an 610 // extensions::UpdateDetails object with the extension id and version of the 611 // found update. 612 NOTIFICATION_EXTENSION_UPDATE_FOUND, 613 614 // Desktop Notifications --------------------------------------------------- 615 616 // This notification is sent when a balloon is connected to a renderer 617 // process to render the balloon contents. The source is a 618 // Source<BalloonHost> with a pointer to the the balloon. A 619 // NOTIFY_BALLOON_DISCONNECTED is guaranteed before the source pointer 620 // becomes junk. No details expected. 621 NOTIFICATION_NOTIFY_BALLOON_CONNECTED, 622 623 // This message is sent after a balloon is disconnected from the renderer 624 // process. The source is a Source<BalloonHost> with a pointer to the 625 // balloon host (the pointer is usable). No details are expected. 626 NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 627 628 // Upgrade notifications --------------------------------------------------- 629 630 // Sent when Chrome believes an update has been installed and available for 631 // long enough with the user shutting down to let it take effect. See 632 // upgrade_detector.cc for details on how long it waits. No details are 633 // expected. 634 NOTIFICATION_UPGRADE_RECOMMENDED, 635 636 // Sent when a critical update has been installed. No details are expected. 637 NOTIFICATION_CRITICAL_UPGRADE_INSTALLED, 638 639 // Sent when the current install is outdated. No details are expected. 640 NOTIFICATION_OUTDATED_INSTALL, 641 642 // Software incompatibility notifications ---------------------------------- 643 644 // Sent when Chrome has finished compiling the list of loaded modules (and 645 // other modules of interest). No details are expected. 646 NOTIFICATION_MODULE_LIST_ENUMERATED, 647 648 // Sent when Chrome is done scanning the module list and when the user has 649 // acknowledged the module incompatibility. No details are expected. 650 NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE, 651 652 // Content Settings -------------------------------------------------------- 653 654 // Sent when content settings change. The source is a HostContentSettings 655 // object, the details are ContentSettingsNotificationsDetails. 656 NOTIFICATION_CONTENT_SETTINGS_CHANGED, 657 658 // Sent when the collect cookies dialog is shown. The source is a 659 // TabSpecificContentSettings object, there are no details. 660 NOTIFICATION_COLLECTED_COOKIES_SHOWN, 661 662 // Sent when a non-default setting in the the notification content settings 663 // map has changed. The source is the DesktopNotificationService, the 664 // details are None. 665 NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED, 666 667 // Sent when content settings change for a tab. The source is a 668 // content::WebContents object, the details are None. 669 NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, 670 671 // Sync -------------------------------------------------------------------- 672 673 // The sync service has finished the datatype configuration process. The 674 // source is the ProfileSyncService object of the Profile. There are no 675 // details. 676 NOTIFICATION_SYNC_CONFIGURE_DONE, 677 678 // A service is requesting a sync datatype refresh for the current profile. 679 // The details value is a const syncer::ModelTypeSet. 680 // If the payload map is empty, it should be treated as an invalidation for 681 // all enabled types. This is used by session sync. 682 NOTIFICATION_SYNC_REFRESH_LOCAL, 683 684 // External notification requesting a sync datatype refresh for the current 685 // profile. The details value is a const syncer::ObjectIdInvalidationMap. 686 // If the payload map is empty, it should be treated as an invalidation for 687 // all enabled types. This is used for notifications on Android. 688 NOTIFICATION_SYNC_REFRESH_REMOTE, 689 690 // The session service has been saved. This notification type is only sent 691 // if there were new SessionService commands to save, and not for no-op save 692 // operations. 693 NOTIFICATION_SESSION_SERVICE_SAVED, 694 695 // A foreign session has been updated. If a new tab page is open, the 696 // foreign session handler needs to update the new tab page's foreign 697 // session data. 698 NOTIFICATION_FOREIGN_SESSION_UPDATED, 699 700 // Foreign sessions has been disabled. New tabs should not display foreign 701 // session data. 702 NOTIFICATION_FOREIGN_SESSION_DISABLED, 703 704 // All tab metadata has been loaded from disk asynchronously. 705 // Sent on the UI thread. 706 // The source is the Profile. There are no details. 707 NOTIFICATION_SESSION_RESTORE_COMPLETE, 708 709 // Cookies ----------------------------------------------------------------- 710 711 // Sent when a cookie changes. The source is a Profile object, the details 712 // are a ChromeCookieDetails object. 713 NOTIFICATION_COOKIE_CHANGED, 714 715 // Signin Manager ---------------------------------------------------------- 716 717 // Sent when a user signs into Google services such as sync. 718 // The source is the Profile. The details are a 719 // GoogleServiceSigninSuccessDetails object. 720 NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, 721 722 // Sent when a user fails to sign into Google services such as sync. 723 // The source is the Profile. The details are a GoogleServiceAuthError 724 // object. 725 NOTIFICATION_GOOGLE_SIGNIN_FAILED, 726 727 // Sent when the currently signed-in user for a user has been signed out. 728 // The source is the Profile. The details are a 729 // GoogleServiceSignoutDetails object. 730 NOTIFICATION_GOOGLE_SIGNED_OUT, 731 732 // Download Notifications -------------------------------------------------- 733 734 // Sent when a download is initiated. It is possible that the download will 735 // not actually begin due to the DownloadRequestLimiter cancelling it 736 // prematurely. 737 // The source is the corresponding RenderViewHost. There are no details. 738 NOTIFICATION_DOWNLOAD_INITIATED, 739 740 // Misc -------------------------------------------------------------------- 741 742 // Sent when PerformanceMonitor has finished all the initial steps of data 743 // collection and has begun passively observing. The source is the 744 // PerformanceMonitor*. No details are expected. 745 NOTIFICATION_PERFORMANCE_MONITOR_INITIALIZED, 746 747 #if defined(OS_CHROMEOS) 748 // Sent when a chromium os user logs in. 749 // The details are a chromeos::User object. 750 NOTIFICATION_LOGIN_USER_CHANGED, 751 752 // Sent immediately after the logged-in user's profile is ready. 753 // The details are a Profile object. 754 NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 755 756 // Sent when the chromium session of a particular user is started. 757 // If this is a new user on the machine this will not be sent until a profile 758 // picture has been selected, unlike NOTIFICATION_LOGIN_USER_CHANGED which is 759 // sent immediately after the user has logged in. This will be sent again if 760 // the browser crashes and restarts. 761 // The details are a chromeos::User object. 762 NOTIFICATION_SESSION_STARTED, 763 764 // Sent when user image is updated. 765 NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, 766 767 // Sent by UserManager when a profile image download has been completed. 768 NOTIFICATION_PROFILE_IMAGE_UPDATED, 769 770 // Sent by UserManager when profile image download has failed or user has the 771 // default profile image or no profile image at all. No details are expected. 772 NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, 773 774 // Sent when a chromium os user attempts to log in. The source is 775 // all and the details are AuthenticationNotificationDetails. 776 NOTIFICATION_LOGIN_AUTHENTICATION, 777 778 // Sent when GAIA iframe has been loaded. First paint event after this fires 779 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE. 780 // Possible scenarios: 781 // 1. Boot into device that has user pods display disabled or no users. 782 // Note that booting with network not connected would first generate 783 // NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN. 784 // 2. From the user pods list, open "Add User" for the second time 785 // (see below). 786 // TODO(nkostylev): Send this notification any time "Add User" is activated 787 // even if it has been silently preloaded on boot. 788 // Not sent on "silent preload" i.e. when booting into login screen 789 // with user pods, GAIA frame is silently preloaded in the background. 790 // Activating it ("Add User") for the first time would not generate this 791 // notification. 792 NOTIFICATION_LOGIN_WEBUI_LOADED, 793 794 // Sent when a network error message is displayed on the WebUI login screen. 795 // First paint event of this fires NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE. 796 NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN, 797 798 // Sent when the specific part of login/lock WebUI is considered to be 799 // visible. That moment is tracked as the first paint event after one of the: 800 // 1. NOTIFICATION_LOGIN_WEBUI_LOADED 801 // 2. NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN 802 // 803 // Possible series of notifications: 804 // 1. Boot into fresh OOBE 805 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE 806 // 2. Boot into user pods list (normal boot). Same for lock screen. 807 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE 808 // 3. Boot into GAIA sign in UI (user pods display disabled or no users): 809 // if no network is connected or flaky network 810 // (NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN + 811 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE) 812 // NOTIFICATION_LOGIN_WEBUI_LOADED 813 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE 814 // 4. Boot into retail mode 815 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE 816 // 5. Boot into kiosk mode 817 // NOTIFICATION_KIOSK_APP_LAUNCHED 818 NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, 819 820 // Sent when proxy dialog is closed. 821 NOTIFICATION_LOGIN_PROXY_CHANGED, 822 823 // Send when kiosk auto-launch warning screen is visible. 824 NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, 825 826 // Send when kiosk auto-launch warning screen had completed. 827 NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_COMPLETED, 828 829 // Send when enable consumer kiosk warning screen is visible. 830 NOTIFICATION_KIOSK_ENABLE_WARNING_VISIBLE, 831 832 // Send when consumer kiosk has been enabled. 833 NOTIFICATION_KIOSK_ENABLED, 834 835 // Send when enable consumer kiosk warning screen had completed. 836 NOTIFICATION_KIOSK_ENABLE_WARNING_COMPLETED, 837 838 // Sent when kiosk app list is loaded in UI. 839 NOTIFICATION_KIOSK_APPS_LOADED, 840 841 // Sent when a kiosk app is launched. 842 NOTIFICATION_KIOSK_APP_LAUNCHED, 843 844 // Sent when the user list has changed. 845 NOTIFICATION_USER_LIST_CHANGED, 846 847 // Sent when the screen lock state has changed. The source is 848 // ScreenLocker and the details is a bool specifing that the 849 // screen is locked. When details is a false, the source object 850 // is being deleted, so the receiver shouldn't use the screen locker 851 // object. 852 NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 853 854 // Sent by DeviceSettingsService to indicate that the ownership status 855 // changed. If you can, please use DeviceSettingsService::Observer instead. 856 // Other singleton-based services can't use that because Observer 857 // unregistration is impossible due to unpredictable deletion order. 858 NOTIFICATION_OWNERSHIP_STATUS_CHANGED, 859 860 // Sent by SIM unlock dialog when it has finished with the process of 861 // updating RequirePin setting. RequirePin setting might have been changed 862 // to a new value or update might have been canceled. 863 // In either case notification is sent and details contain a bool 864 // that represents current value. 865 NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED, 866 867 // Sent by SIM unlock dialog when it has finished the EnterPin or 868 // EnterPuk dialog, either because the user cancelled, or entered a 869 // PIN or PUK. 870 NOTIFICATION_ENTER_PIN_ENDED, 871 872 // Sent when large cursor is toggled. 873 NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_LARGE_CURSOR, 874 875 // Sent when high contrast mode is toggled. 876 NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE, 877 878 // Sent when screen magnifier is toggled. 879 NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, 880 881 // Sent when spoken feedback is toggled. 882 NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, 883 884 #endif 885 886 #if defined(TOOLKIT_VIEWS) 887 // Sent when a bookmark's context menu is shown. Used to notify 888 // tests that the context menu has been created and shown. 889 NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN, 890 891 // Notification that the nested loop using during tab dragging has returned. 892 // Used for testing. 893 NOTIFICATION_TAB_DRAG_LOOP_DONE, 894 #endif 895 896 // Send when a context menu is shown. Used to notify tests that the context 897 // menu has been created and shown. 898 NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN, 899 900 // Sent when the Instant Controller determines whether an Instant tab supports 901 // the Instant API or not. 902 NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED, 903 904 // Sent when the Instant Controller determines whether the NTP supports the 905 // Instant API or not. 906 NOTIFICATION_INSTANT_NTP_SUPPORT_DETERMINED, 907 908 // Sent when the CaptivePortalService checks if we're behind a captive portal. 909 // The Source is the Profile the CaptivePortalService belongs to, and the 910 // Details are a Details<CaptivePortalService::CheckResults>. 911 NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT, 912 913 // Password Store ---------------------------------------------------------- 914 // This notification is sent whenenever login entries stored in the password 915 // store are changed. The detail of this notification is a list of changes 916 // represented by a vector of PasswordStoreChange. Each change includes a 917 // change type (ADD, UPDATE, or REMOVE) as well as the 918 // |autofill::PasswordForm|s that were affected. 919 NOTIFICATION_LOGINS_CHANGED, 920 921 // Sent when the applications in the NTP app launcher have been reordered. 922 // The details, if not NoDetails, is the std::string ID of the extension that 923 // was moved. 924 NOTIFICATION_EXTENSION_LAUNCHER_REORDERED, 925 926 // Sent when an app is installed and an NTP has been shown. Source is the 927 // WebContents that was shown, and Details is the string ID of the extension 928 // which was installed. 929 NOTIFICATION_APP_INSTALLED_TO_NTP, 930 931 // Similar to NOTIFICATION_APP_INSTALLED_TO_NTP but used to nofity ash AppList 932 // about installed app. Source is the profile in which the app is installed 933 // and Details is the string ID of the extension. 934 NOTIFICATION_APP_INSTALLED_TO_APPLIST, 935 936 #if defined(USE_ASH) 937 // Sent when wallpaper show animation has finished. 938 NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, 939 940 // Sent when the Ash session has started. In its current incantation this is 941 // generated when the metro app has connected to the browser IPC channel. 942 // Used only on Windows. 943 NOTIFICATION_ASH_SESSION_STARTED, 944 // Sent when the Ash session ended. Currently this means the metro app exited. 945 // Used only on Windows. 946 NOTIFICATION_ASH_SESSION_ENDED, 947 #endif 948 949 // Protocol Handler Registry ----------------------------------------------- 950 // Sent when a ProtocolHandlerRegistry is changed. The source is the profile. 951 NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, 952 953 // Sent when the cached profile info has changed. 954 NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 955 956 // Sent when the cached profile has finished writing a profile picture to 957 // disk. 958 NOTIFICATION_PROFILE_CACHE_PICTURE_SAVED, 959 960 // Sent when the browser enters or exits fullscreen mode. 961 NOTIFICATION_FULLSCREEN_CHANGED, 962 963 // Sent when the FullscreenController changes, confirms, or denies mouse lock. 964 // The source is the browser's FullscreenController, no details. 965 NOTIFICATION_MOUSE_LOCK_CHANGED, 966 967 // Sent by the PluginPrefs when there is a change of plugin enable/disable 968 // status. The source is the profile. 969 NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 970 971 // Panels Notifications. The Panels are small browser windows near the bottom 972 // of the screen. 973 // Sent when all nonblocking bounds animations are finished across panels. 974 // Used only in unit testing. 975 NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, 976 977 // Sent when panel gains/loses focus. 978 // The source is the Panel, no details. 979 // Used only in unit testing. 980 NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, 981 982 // Sent when panel is minimized/restored/shows title only etc. 983 // The source is the Panel, no details. 984 NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE, 985 986 // Sent when panel window size is known. This is for platforms where the 987 // window creation is async and size of the window only becomes known later. 988 // Used only in unit testing. 989 NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN, 990 991 // Sent when panel app icon is loaded. 992 // Used only in unit testing. 993 NOTIFICATION_PANEL_APP_ICON_LOADED, 994 995 // Sent when panel collection get updated. 996 // The source is the PanelCollection, no details. 997 // Used only in coordination with notification balloons. 998 NOTIFICATION_PANEL_COLLECTION_UPDATED, 999 1000 // Sent when panel is closed. 1001 // The source is the Panel, no details. 1002 NOTIFICATION_PANEL_CLOSED, 1003 1004 // Sent when a global error has changed and the error UI should update it 1005 // self. The source is a Source<Profile> containing the profile for the 1006 // error. The detail is a GlobalError object that has changed or NULL if 1007 // all error UIs should update. 1008 NOTIFICATION_GLOBAL_ERRORS_CHANGED, 1009 1010 // BrowsingDataRemover ---------------------------------------------------- 1011 // Sent on the UI thread after BrowsingDataRemover has removed browsing data 1012 // but before it has notified its explicit observers. The source is a 1013 // Source<Profile> containing the profile in which browsing data was removed, 1014 // and the detail is a BrowsingDataRemover::NotificationDetail containing the 1015 // removal mask and the start of the removal timeframe with which 1016 // BrowsingDataRemove::Remove was called. 1017 NOTIFICATION_BROWSING_DATA_REMOVED, 1018 1019 // The user accepted or dismissed a SSL client authentication request. 1020 // The source is a Source<net::HttpNetworkSession>. Details is a 1021 // (std::pair<net::SSLCertRequestInfo*, net::X509Certificate*>). 1022 NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, 1023 1024 // Session Restore -------------------------------------------------------- 1025 1026 // Sent when synchronous (startup) session restore completes. No details or 1027 // source. 1028 NOTIFICATION_SESSION_RESTORE_DONE, 1029 1030 // Note:- 1031 // Currently only Content and Chrome define and use notifications. 1032 // Custom notifications not belonging to Content and Chrome should start 1033 // from here. 1034 NOTIFICATION_CHROME_END, 1035 }; 1036 1037 } // namespace chrome 1038 1039 #endif // CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ 1040