notification_types.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
  5. #define EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
  6. #include "content/public/browser/notification_types.h"
  7. #include "extensions/buildflags/buildflags.h"
  8. #if !BUILDFLAG(ENABLE_EXTENSIONS)
  9. #error "Extensions must be enabled"
  10. #endif
  11. // **
  12. // ** NOTICE
  13. // **
  14. // ** The notification system is deprecated, obsolete, and is slowly being
  15. // ** removed. See https://crbug.com/268984 and https://crbug.com/411569.
  16. // **
  17. // ** Please don't add any new notification types, and please help migrate
  18. // ** existing uses of the notification types below to use the Observer and
  19. // ** Callback patterns.
  20. // **
  21. namespace extensions {
  22. // Only notifications fired by the extensions module should be here. The
  23. // extensions module should not listen to notifications fired by the
  24. // embedder.
  25. enum NotificationType {
  26. // WARNING: This need to match chrome/browser/chrome_notification_types.h.
  27. NOTIFICATION_EXTENSIONS_START = content::NOTIFICATION_CONTENT_END,
  28. // Sent when a CrxInstaller finishes. Source is the CrxInstaller that
  29. // finished. The details are the extension which was installed.
  30. // DEPRECATED: Use extensions::InstallObserver::OnFinishCrxInstall()
  31. // TODO(https://crbug.com/1174728): Remove.
  32. NOTIFICATION_CRX_INSTALLER_DONE = NOTIFICATION_EXTENSIONS_START,
  33. // An error occurred during extension install. The details are a string with
  34. // details about why the install failed.
  35. // TODO(https://crbug.com/1174734): Remove.
  36. NOTIFICATION_EXTENSION_INSTALL_ERROR,
  37. // The extension updater found an update and will attempt to download and
  38. // install it. The source is a BrowserContext*, and the details are an
  39. // extensions::UpdateDetails object with the extension id and version of the
  40. // found update.
  41. // TODO(https://crbug.com/1174754): Remove.
  42. NOTIFICATION_EXTENSION_UPDATE_FOUND,
  43. NOTIFICATION_EXTENSIONS_END
  44. };
  45. // **
  46. // ** NOTICE
  47. // **
  48. // ** The notification system is deprecated, obsolete, and is slowly being
  49. // ** removed. See https://crbug.com/268984 and https://crbug.com/411569.
  50. // **
  51. // ** Please don't add any new notification types, and please help migrate
  52. // ** existing uses of the notification types below to use the Observer and
  53. // ** Callback patterns.
  54. // **
  55. } // namespace extensions
  56. #endif // EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_