[M85 Dev][EFL] Fix errors to generate ninja files
[platform/framework/web/chromium-efl.git] / chrome / browser / chrome_notification_types.h
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 "extensions/buildflags/buildflags.h"
10
11 #if BUILDFLAG(ENABLE_EXTENSIONS)
12 #include "extensions/browser/notification_types.h"
13 #else
14 #include "content/public/browser/notification_types.h"
15 #endif
16
17 #if BUILDFLAG(ENABLE_EXTENSIONS)
18 #define PREVIOUS_END extensions::NOTIFICATION_EXTENSIONS_END
19 #else
20 #define PREVIOUS_END content::NOTIFICATION_CONTENT_END
21 #endif
22
23 // **
24 // ** NOTICE
25 // **
26 // ** The notification system is deprecated, obsolete, and is slowly being
27 // ** removed. See https://crbug.com/268984.
28 // **
29 // ** Please don't add any new notification types, and please help migrate
30 // ** existing uses of the notification types below to use the Observer and
31 // ** Callback patterns.
32 // **
33
34 namespace chrome {
35
36 enum NotificationType {
37   NOTIFICATION_CHROME_START = PREVIOUS_END,
38
39   // Browser-window ----------------------------------------------------------
40
41   // This message is sent after a window has been opened.  The source is a
42   // Source<Browser> containing the affected Browser.  No details are
43   // expected.
44   // DEPRECATED: Use BrowserListObserver::OnBrowserAdded()
45   NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START,
46
47   // This message is sent when closing a browser has been cancelled, either by
48   // the user cancelling a beforeunload dialog, or IsClosingPermitted()
49   // disallowing closing. This notification implies that no BROWSER_CLOSING or
50   // BROWSER_CLOSED notification will be sent.
51   // The source is a Source<Browser> containing the affected browser. No details
52   // are expected.
53   NOTIFICATION_BROWSER_CLOSE_CANCELLED,
54
55   // Sent when the language (English, French...) for a page has been detected.
56   // The details Details<std::string> contain the ISO 639-1 language code and
57   // the source is Source<WebContents>.
58   NOTIFICATION_TAB_LANGUAGE_DETERMINED,
59
60   // The user has changed the browser theme. The source is a
61   // Source<ThemeService>. There are no details.
62   NOTIFICATION_BROWSER_THEME_CHANGED,
63
64   // Application-wide ----------------------------------------------------------
65
66   // This message is sent when the application is terminating (the last
67   // browser window has shutdown as part of an explicit user-initiated exit,
68   // or the user closed the last browser window on Windows/Linux and there are
69   // no BackgroundContents keeping the browser running). No source or details
70   // are passed.
71   NOTIFICATION_APP_TERMINATING,
72
73 #if defined(OS_MACOSX)
74   // This notification is sent when the app has no key window, such as when
75   // all windows are closed but the app is still active. No source or details
76   // are provided.
77   NOTIFICATION_NO_KEY_WINDOW,
78 #endif
79
80   // This is sent when the user has chosen to exit the app, but before any
81   // browsers have closed. This is sent if the user chooses to exit (via exit
82   // menu item or keyboard shortcut) or to restart the process (such as in flags
83   // page), not if Chrome exits by some other means (such as the user closing
84   // the last window). No source or details are passed.
85   //
86   // Note that receiving this notification does not necessarily mean the process
87   // will exit because the shutdown process can be cancelled by an unload
88   // handler.  Use APP_TERMINATING for such needs.
89   NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
90
91   // Authentication ----------------------------------------------------------
92
93   // This is sent when a login prompt is shown.  The source is the
94   // Source<NavigationController> for the tab in which the prompt is shown.
95   // Details are a LoginNotificationDetails which provide the LoginHandler
96   // that should be given authentication.
97   NOTIFICATION_AUTH_NEEDED,
98
99   // This is sent when authentication credentials have been supplied (either
100   // by the user or by an automation service), but before we've actually
101   // received another response from the server.  The source is the
102   // Source<NavigationController> for the tab in which the prompt was shown.
103   // Details are an AuthSuppliedLoginNotificationDetails which provide the
104   // LoginHandler that should be given authentication as well as the supplied
105   // username and password.
106   NOTIFICATION_AUTH_SUPPLIED,
107
108   // This is sent when an authentication request has been dismissed without
109   // supplying credentials (either by the user or by an automation service).
110   // The source is the Source<NavigationController> for the tab in which the
111   // prompt was shown. Details are a LoginNotificationDetails which provide
112   // the LoginHandler that should be cancelled.
113   NOTIFICATION_AUTH_CANCELLED,
114
115   // Profiles -----------------------------------------------------------------
116
117   // Sent after a Profile has been created. This notification is sent both for
118   // normal and OTR profiles.
119   // The details are none and the source is the new profile.
120   NOTIFICATION_PROFILE_CREATED,
121
122   // Use ProfileManagerObserver::OnProfileAdded instead of this notification.
123   // Sent after a Profile has been added to ProfileManager.
124   // The details are none and the source is the new profile.
125   NOTIFICATION_PROFILE_ADDED,
126
127   // Use KeyedServiceShutdownNotifier instead this notification type (you did
128   // read the comment at the top of the file, didn't you?).
129   // Sent before a Profile is destroyed. This notification is sent both for
130   // normal and OTR profiles.
131   // The details are none and the source is a Profile*.
132   NOTIFICATION_PROFILE_DESTROYED,
133
134   // Printing ----------------------------------------------------------------
135
136   // Notification from PrintJob that an event occurred. It can be that a page
137   // finished printing or that the print job failed. Details is
138   // PrintJob::EventDetails. Source is a PrintJob.
139   NOTIFICATION_PRINT_JOB_EVENT,
140
141   // Sent when a PrintJob has been released.
142   // Source is the WebContents that holds the print job.
143   NOTIFICATION_PRINT_JOB_RELEASED,
144
145   // Misc --------------------------------------------------------------------
146
147 #if defined(OS_CHROMEOS)
148   // Sent immediately after the logged-in user's profile is ready.
149   // The details are a Profile object.
150   NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
151
152   // Sent when a network error message is displayed on the WebUI login screen.
153   // First paint event of this fires NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE.
154   NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN,
155
156   // Sent when the specific part of login/lock WebUI is considered to be
157   // visible. That moment is tracked as the first paint event after one of the:
158   // NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN
159   //
160   // Possible series of notifications:
161   // 1. Boot into fresh OOBE
162   //    NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE
163   // 2. Boot into user pods list (normal boot). Same for lock screen.
164   //    NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE
165   // 3. Boot into GAIA sign in UI (user pods display disabled or no users):
166   //    if no network is connected or flaky network
167   //    (NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN +
168   //     NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE)
169   //    NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE
170   // 4. Boot into retail mode
171   //    NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE
172   NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
173
174   // Send when kiosk auto-launch warning screen is visible.
175   NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE,
176
177   // Send when kiosk auto-launch warning screen had completed.
178   NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_COMPLETED,
179
180   // Send when consumer kiosk has been enabled.
181   NOTIFICATION_KIOSK_ENABLED,
182
183   // Sent when kiosk app list is loaded in UI.
184   NOTIFICATION_KIOSK_APPS_LOADED,
185
186   // Sent when the screen lock state has changed. The source is
187   // ScreenLocker and the details is a bool specifing that the
188   // screen is locked. When details is a false, the source object
189   // is being deleted, so the receiver shouldn't use the screen locker
190   // object.
191   NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
192 #endif
193
194 #if defined(TOOLKIT_VIEWS)
195   // Notification that the nested loop using during tab dragging has returned.
196   // Used for testing.
197   NOTIFICATION_TAB_DRAG_LOOP_DONE,
198 #endif
199
200   // Sent when the applications in the NTP app launcher have been reordered.
201   // The details, if not NoDetails, is the std::string ID of the extension that
202   // was moved.
203   NOTIFICATION_APP_LAUNCHER_REORDERED,
204
205   // Sent when an app is installed and an NTP has been shown. Source is the
206   // WebContents that was shown, and Details is the string ID of the extension
207   // which was installed.
208   NOTIFICATION_APP_INSTALLED_TO_NTP,
209
210   // Note:-
211   // Currently only Content and Chrome define and use notifications.
212   // Custom notifications not belonging to Content and Chrome should start
213   // from here.
214   NOTIFICATION_CHROME_END,
215 };
216
217 }  // namespace chrome
218
219 // **
220 // ** NOTICE
221 // **
222 // ** The notification system is deprecated, obsolete, and is slowly being
223 // ** removed. See https://crbug.com/268984.
224 // **
225 // ** Please don't add any new notification types, and please help migrate
226 // ** existing uses of the notification types below to use the Observer and
227 // ** Callback patterns.
228 // **
229
230 #endif  // CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_