Commit 23f9ce16 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Add deprecation notices to the notification files.

This also does some cleanup.

BUG=268984

Change-Id: I936c148f22c8c9d18c90b795e2f3412831e9f122
Reviewed-on: https://chromium-review.googlesource.com/962719
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543510}
parent c7041c16
......@@ -20,11 +20,19 @@
#define PREVIOUS_END content::NOTIFICATION_CONTENT_END
#endif
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
namespace chrome {
// NotificationService &c. are deprecated (https://crbug.com/268984).
// Don't add any new notification types, and migrate existing uses of the
// notification types below to observers.
enum NotificationType {
NOTIFICATION_CHROME_START = PREVIOUS_END,
......@@ -418,4 +426,15 @@ enum NotificationType {
} // namespace chrome
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
#endif // CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_
......@@ -5,6 +5,17 @@
#ifndef COMPONENTS_SAFE_BROWSING_DB_NOTIFICATION_TYPES_H_
#define COMPONENTS_SAFE_BROWSING_DB_NOTIFICATION_TYPES_H_
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
// Lists of Safe Browsing related notifications, used with NotificationService.
namespace safe_browsing {
......@@ -27,4 +38,15 @@ enum NotificationType {
} // namespace safe_browsing
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
#endif // COMPONENTS_SAFE_BROWSING_DB_NOTIFICATION_TYPES_H_
......@@ -4945,11 +4945,6 @@ void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) {
rwhv->SetMainFrameAXTreeID(GetMainFrame()->GetAXTreeID());
notify_disconnection_ = true;
// TODO(avi): Remove. http://crbug.com/170921
NotificationService::current()->Notify(
NOTIFICATION_WEB_CONTENTS_CONNECTED,
Source<WebContents>(this),
NotificationService::NoDetails());
bool was_crashed = IsCrashed();
SetIsCrashed(base::TERMINATION_STATUS_STILL_RUNNING, 0);
......
......@@ -5,12 +5,17 @@
#ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_TYPES_H_
#define CONTENT_PUBLIC_BROWSER_NOTIFICATION_TYPES_H_
// This file describes various types used to describe and filter notifications
// that pass through the NotificationService.
//
// Only notifications that are fired from the content module should be here. We
// should never have a notification that is fired by the embedder and listened
// to by content.
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984 and https://crbug.com/170921.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
namespace content {
enum NotificationType {
......@@ -67,14 +72,6 @@ enum NotificationType {
// WebContents ---------------------------------------------------------------
// This notification is sent when a render view host has connected to a
// renderer process. The source is a Source<WebContents> with a pointer to
// the WebContents. A WEB_CONTENTS_DISCONNECTED notification is
// guaranteed before the source pointer becomes junk. No details are
// expected.
// DEPRECATED: Use WebContentsObserver::RenderViewReady()
NOTIFICATION_WEB_CONTENTS_CONNECTED,
// This message is sent after a WebContents is disconnected from the
// renderer process. The source is a Source<WebContents> with a pointer to
// the WebContents (the pointer is usable). No details are expected.
......@@ -145,4 +142,15 @@ enum NotificationType {
} // namespace content
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984 and https://crbug.com/170921.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
#endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_TYPES_H_
......@@ -14,6 +14,17 @@
#error "Extensions must be enabled"
#endif
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984 and https://crbug.com/411569.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
namespace extensions {
// Only notifications fired by the extensions module should be here. The
......@@ -176,6 +187,17 @@ struct ExtensionCommandRemovedDetails {
std::string accelerator;
};
// **
// ** NOTICE
// **
// ** The notification system is deprecated, obsolete, and is slowly being
// ** removed. See https://crbug.com/268984 and https://crbug.com/411569.
// **
// ** Please don't add any new notification types, and please help migrate
// ** existing uses of the notification types below to use the Observer and
// ** Callback patterns.
// **
} // namespace extensions
#endif // EXTENSIONS_BROWSER_NOTIFICATION_TYPES_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment