| 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 CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ | 5 #ifndef CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ |
| 6 #define CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ | 6 #define CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/common/content_notification_types.h" | 9 #include "content/common/content_notification_types.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // does not indicate that the application is exiting (observers should | 39 // does not indicate that the application is exiting (observers should |
| 40 // listen for APP_TERMINATING if they want to detect when the application | 40 // listen for APP_TERMINATING if they want to detect when the application |
| 41 // will shut down). Note that the boolean pointed to by details is only | 41 // will shut down). Note that the boolean pointed to by details is only |
| 42 // valid for the duration of this call. | 42 // valid for the duration of this call. |
| 43 NOTIFICATION_BROWSER_CLOSED, | 43 NOTIFICATION_BROWSER_CLOSED, |
| 44 | 44 |
| 45 // Indicates that a top window has been closed. The source is the HWND | 45 // Indicates that a top window has been closed. The source is the HWND |
| 46 // that was closed, no details are expected. | 46 // that was closed, no details are expected. |
| 47 NOTIFICATION_WINDOW_CLOSED, | 47 NOTIFICATION_WINDOW_CLOSED, |
| 48 | 48 |
| 49 // Sent when an info bubble has been created but not yet shown. The source | |
| 50 // is the InfoBubble. | |
| 51 NOTIFICATION_INFO_BUBBLE_CREATED, | |
| 52 | |
| 53 // Sent when the language (English, French...) for a page has been detected. | 49 // Sent when the language (English, French...) for a page has been detected. |
| 54 // The details Details<std::string> contain the ISO 639-1 language code and | 50 // The details Details<std::string> contain the ISO 639-1 language code and |
| 55 // the source is Source<TabContents>. | 51 // the source is Source<TabContents>. |
| 56 NOTIFICATION_TAB_LANGUAGE_DETERMINED, | 52 NOTIFICATION_TAB_LANGUAGE_DETERMINED, |
| 57 | 53 |
| 58 // Sent when a page has been translated. The source is the tab for that page | 54 // Sent when a page has been translated. The source is the tab for that page |
| 59 // (Source<TabContents>) and the details are the language the page was | 55 // (Source<TabContents>) and the details are the language the page was |
| 60 // originally in and the language it was translated to | 56 // originally in and the language it was translated to |
| 61 // (std::pair<std::string, std::string>). | 57 // (std::pair<std::string, std::string>). |
| 62 NOTIFICATION_PAGE_TRANSLATED, | 58 NOTIFICATION_PAGE_TRANSLATED, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // to the removed delegate and whether the removal should be animated. | 91 // to the removed delegate and whether the removal should be animated. |
| 96 NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 92 NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 97 | 93 |
| 98 // This message is sent when an InfoBar is replacing another infobar in a | 94 // This message is sent when an InfoBar is replacing another infobar in a |
| 99 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a | 95 // TabContentsWrapper. The source is a Source<TabContentsWrapper> with a |
| 100 // pointer to the TabContentsWrapper the InfoBar was removed from. The | 96 // pointer to the TabContentsWrapper the InfoBar was removed from. The |
| 101 // details is a Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> > with | 97 // details is a Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> > with |
| 102 // pointers to the old and new delegates, respectively. | 98 // pointers to the old and new delegates, respectively. |
| 103 NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED, | 99 NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED, |
| 104 | 100 |
| 105 // This is sent when an externally hosted tab is created. The details | |
| 106 // contain the ExternalTabContainer that contains the tab | |
| 107 NOTIFICATION_EXTERNAL_TAB_CREATED, | |
| 108 | |
| 109 // This is sent when an externally hosted tab is closed. No details are | 101 // This is sent when an externally hosted tab is closed. No details are |
| 110 // expected. | 102 // expected. |
| 111 NOTIFICATION_EXTERNAL_TAB_CLOSED, | 103 NOTIFICATION_EXTERNAL_TAB_CLOSED, |
| 112 | 104 |
| 113 // Indicates that the new page tab has finished loading. This is used for | 105 // Indicates that the new page tab has finished loading. This is used for |
| 114 // performance testing to see how fast we can load it after startup, and is | 106 // performance testing to see how fast we can load it after startup, and is |
| 115 // only called once for the lifetime of the browser. The source is unused. | 107 // only called once for the lifetime of the browser. The source is unused. |
| 116 // Details is an integer: the number of milliseconds elapsed between | 108 // Details is an integer: the number of milliseconds elapsed between |
| 117 // starting and finishing all painting. | 109 // starting and finishing all painting. |
| 118 NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD, | 110 NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD, |
| 119 | 111 |
| 120 // Used to fire notifications about how long various events took to | 112 // Used to fire notifications about how long various events took to |
| 121 // complete. E.g., this is used to get more fine grained timings from the | 113 // complete. E.g., this is used to get more fine grained timings from the |
| 122 // new tab page. Details is a MetricEventDurationDetails. | 114 // new tab page. Details is a MetricEventDurationDetails. |
| 123 NOTIFICATION_METRIC_EVENT_DURATION, | 115 NOTIFICATION_METRIC_EVENT_DURATION, |
| 124 | 116 |
| 125 // This notification is sent when TabContents::SetAppExtension is invoked. | 117 // This notification is sent when TabContents::SetAppExtension is invoked. |
| 126 // The source is the ExtensionTabHelper SetAppExtension was invoked on. | 118 // The source is the ExtensionTabHelper SetAppExtension was invoked on. |
| 127 NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, | 119 NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, |
| 128 | 120 |
| 129 // Stuff inside the tabs --------------------------------------------------- | 121 // Stuff inside the tabs --------------------------------------------------- |
| 130 | 122 |
| 131 // This message is sent after a constrained window has been closed. The | |
| 132 // source is a Source<ConstrainedWindow> with a pointer to the closed child | |
| 133 // window. (The pointer isn't usable, except for identification.) No | |
| 134 // details are expected. | |
| 135 NOTIFICATION_CWINDOW_CLOSED, | |
| 136 | |
| 137 // Notification from TabContents that we have received a response from the | 123 // Notification from TabContents that we have received a response from the |
| 138 // renderer in response to a dom automation controller action. | 124 // renderer in response to a dom automation controller action. |
| 139 NOTIFICATION_DOM_OPERATION_RESPONSE, | 125 NOTIFICATION_DOM_OPERATION_RESPONSE, |
| 140 | 126 |
| 141 // Sent when the bookmark bubble hides. The source is the profile, the | 127 // Sent when the bookmark bubble hides. The source is the profile, the |
| 142 // details unused. | 128 // details unused. |
| 143 NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN, | 129 NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN, |
| 144 | 130 |
| 145 // This notification is sent when the result of a find-in-page search is | 131 // This notification is sent when the result of a find-in-page search is |
| 146 // available with the browser process. The source is a Source<TabContents> | 132 // available with the browser process. The source is a Source<TabContents> |
| 147 // with a pointer to the TabContents. Details encompass a | 133 // with a pointer to the TabContents. Details encompass a |
| 148 // FindNotificationDetail object that tells whether the match was found or | 134 // FindNotificationDetail object that tells whether the match was found or |
| 149 // not found. | 135 // not found. |
| 150 NOTIFICATION_FIND_RESULT_AVAILABLE, | 136 NOTIFICATION_FIND_RESULT_AVAILABLE, |
| 151 | 137 |
| 152 // This is sent when the users preference for when the bookmark bar should | 138 // This is sent when the users preference for when the bookmark bar should |
| 153 // be shown changes. The source is the profile, and the details are | 139 // be shown changes. The source is the profile, and the details are |
| 154 // NoDetails. | 140 // NoDetails. |
| 155 NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, | 141 NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, |
| 156 | 142 |
| 157 // Sent just before the installation confirm dialog is shown. The source | 143 // Sent just before the installation confirm dialog is shown. The source |
| 158 // is the ExtensionInstallUI, the details are NoDetails. | 144 // is the ExtensionInstallUI, the details are NoDetails. |
| 159 NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG, | 145 NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG, |
| 160 | 146 |
| 161 // Used to monitor web cache usage by notifying whenever the | |
| 162 // CacheManagerHost observes new UsageStats. The source will be the | |
| 163 // RenderProcessHost that corresponds to the new statistics. Details are a | |
| 164 // UsageStats object sent by the renderer, and should be copied - ptr not | |
| 165 // guaranteed to be valid after the notification. | |
| 166 NOTIFICATION_WEB_CACHE_STATS_OBSERVED, | |
| 167 | |
| 168 // BackgroundContents ------------------------------------------------------ | 147 // BackgroundContents ------------------------------------------------------ |
| 169 | 148 |
| 170 // A new background contents was opened by script. The source is the parent | 149 // A new background contents was opened by script. The source is the parent |
| 171 // profile and the details are BackgroundContentsOpenedDetails. | 150 // profile and the details are BackgroundContentsOpenedDetails. |
| 172 NOTIFICATION_BACKGROUND_CONTENTS_OPENED, | 151 NOTIFICATION_BACKGROUND_CONTENTS_OPENED, |
| 173 | 152 |
| 174 // The background contents navigated to a new location. The source is the | 153 // The background contents navigated to a new location. The source is the |
| 175 // parent Profile, and the details are the BackgroundContents that was | 154 // parent Profile, and the details are the BackgroundContents that was |
| 176 // navigated. | 155 // navigated. |
| 177 NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, | 156 NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, |
| 178 | 157 |
| 179 // The background contents were closed by someone invoking window.close() | 158 // The background contents were closed by someone invoking window.close() |
| 180 // or the parent application was uninstalled. | 159 // or the parent application was uninstalled. |
| 181 // The source is the parent profile, and the details are the | 160 // The source is the parent profile, and the details are the |
| 182 // BackgroundContents. | 161 // BackgroundContents. |
| 183 NOTIFICATION_BACKGROUND_CONTENTS_CLOSED, | 162 NOTIFICATION_BACKGROUND_CONTENTS_CLOSED, |
| 184 | 163 |
| 185 // The background contents is being deleted. The source is the | 164 // The background contents is being deleted. The source is the |
| 186 // parent Profile, and the details are the BackgroundContents being deleted. | 165 // parent Profile, and the details are the BackgroundContents being deleted. |
| 187 NOTIFICATION_BACKGROUND_CONTENTS_DELETED, | 166 NOTIFICATION_BACKGROUND_CONTENTS_DELETED, |
| 188 | 167 |
| 189 // The background contents has crashed. The source is the parent Profile, | 168 // The background contents has crashed. The source is the parent Profile, |
| 190 // and the details are the BackgroundContents. | 169 // and the details are the BackgroundContents. |
| 191 NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED, | 170 NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED, |
| 192 | 171 |
| 193 // This is sent when network interception is disabled for a plugin, or the | |
| 194 // plugin is unloaded. This should only be sent/received on the browser IO | |
| 195 // thread or the plugin thread. The source is the plugin that is disabling | |
| 196 // interception. No details are expected. | |
| 197 NOTIFICATION_CHROME_PLUGIN_UNLOADED, | |
| 198 | |
| 199 // This is sent when a login prompt is shown. The source is the | 172 // This is sent when a login prompt is shown. The source is the |
| 200 // Source<NavigationController> for the tab in which the prompt is shown. | 173 // Source<NavigationController> for the tab in which the prompt is shown. |
| 201 // Details are a LoginNotificationDetails which provide the LoginHandler | 174 // Details are a LoginNotificationDetails which provide the LoginHandler |
| 202 // that should be given authentication. | 175 // that should be given authentication. |
| 203 NOTIFICATION_AUTH_NEEDED, | 176 NOTIFICATION_AUTH_NEEDED, |
| 204 | 177 |
| 205 // This is sent when authentication credentials have been supplied (either | 178 // This is sent when authentication credentials have been supplied (either |
| 206 // by the user or by an automation service), but before we've actually | 179 // by the user or by an automation service), but before we've actually |
| 207 // received another response from the server. The source is the | 180 // received another response from the server. The source is the |
| 208 // Source<NavigationController> for the tab in which the prompt was shown. | 181 // Source<NavigationController> for the tab in which the prompt was shown. |
| 209 // Details are an AuthSuppliedLoginNotificationDetails which provide the | 182 // Details are an AuthSuppliedLoginNotificationDetails which provide the |
| 210 // LoginHandler that should be given authentication as well as the supplied | 183 // LoginHandler that should be given authentication as well as the supplied |
| 211 // username and password. | 184 // username and password. |
| 212 NOTIFICATION_AUTH_SUPPLIED, | 185 NOTIFICATION_AUTH_SUPPLIED, |
| 213 | 186 |
| 214 // This is sent when an authentication request has been dismissed without | 187 // This is sent when an authentication request has been dismissed without |
| 215 // supplying credentials (either by the user or by an automation service). | 188 // supplying credentials (either by the user or by an automation service). |
| 216 // The source is the Source<NavigationController> for the tab in which the | 189 // The source is the Source<NavigationController> for the tab in which the |
| 217 // prompt was shown. Details are a LoginNotificationDetails which provide | 190 // prompt was shown. Details are a LoginNotificationDetails which provide |
| 218 // the LoginHandler that should be cancelled. | 191 // the LoginHandler that should be cancelled. |
| 219 NOTIFICATION_AUTH_CANCELLED, | 192 NOTIFICATION_AUTH_CANCELLED, |
| 220 | 193 |
| 221 // History ----------------------------------------------------------------- | 194 // History ----------------------------------------------------------------- |
| 222 | 195 |
| 223 // Sent when a history service is created on the main thread. This is sent | |
| 224 // after history is created, but before it has finished loading. Use | |
| 225 // HISTORY_LOADED is you need to know when loading has completed. | |
| 226 // The source is the profile that the history service belongs to, and the | |
| 227 // details is the pointer to the newly created HistoryService object. | |
| 228 NOTIFICATION_HISTORY_CREATED, | |
| 229 | |
| 230 // Sent when a history service has finished loading. The source is the | 196 // Sent when a history service has finished loading. The source is the |
| 231 // profile that the history service belongs to, and the details is the | 197 // profile that the history service belongs to, and the details is the |
| 232 // HistoryService. | 198 // HistoryService. |
| 233 NOTIFICATION_HISTORY_LOADED, | 199 NOTIFICATION_HISTORY_LOADED, |
| 234 | 200 |
| 235 // Sent when a URL that has been typed has been added or modified. This is | 201 // Sent when a URL that has been typed has been added or modified. This is |
| 236 // used by the in-memory URL database (used by autocomplete) to track | 202 // used by the in-memory URL database (used by autocomplete) to track |
| 237 // changes to the main history system. | 203 // changes to the main history system. |
| 238 // | 204 // |
| 239 // The source is the profile owning the history service that changed, and | 205 // The source is the profile owning the history service that changed, and |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 // Currently only Content and Chrome define and use notifications. | 870 // Currently only Content and Chrome define and use notifications. |
| 905 // Custom notifications not belonging to Content and Chrome should start | 871 // Custom notifications not belonging to Content and Chrome should start |
| 906 // from here. | 872 // from here. |
| 907 NOTIFICATION_CHROME_END, | 873 NOTIFICATION_CHROME_END, |
| 908 }; | 874 }; |
| 909 | 875 |
| 910 } // namespace chrome | 876 } // namespace chrome |
| 911 | 877 |
| 912 | 878 |
| 913 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ | 879 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ |
| OLD | NEW |