OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "content/public/browser/notification_types.h" | 8 #include "content/public/browser/notification_types.h" |
9 | 9 |
10 namespace chrome { | 10 namespace chrome { |
11 | 11 |
12 enum NotificationType { | 12 enum NotificationType { |
13 NOTIFICATION_CHROME_START = content::NOTIFICATION_CONTENT_END, | 13 NOTIFICATION_CHROME_START = content::NOTIFICATION_CONTENT_END, |
14 | 14 |
15 // Browser-window ---------------------------------------------------------- | 15 // Browser-window ---------------------------------------------------------- |
16 | 16 |
17 // This message is sent after a window has been opened. The source is a | 17 // This message is sent after a window has been opened. The source is a |
18 // Source<Browser> containing the affected Browser. No details are | 18 // Source<Browser> containing the affected Browser. No details are |
19 // expected. | 19 // expected. |
20 NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START, | 20 NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START, |
21 | 21 |
22 // This message is sent soon after BROWSER_OPENED, and indicates that | 22 // This message is sent soon after BROWSER_OPENED, and indicates that |
23 // the Browser's |window_| is now non-NULL. The source is a Source<Browser> | 23 // the Browser's |window_| is now non-NULL. The source is a Source<Browser> |
24 // containing the affected Browser. No details are expected. | 24 // containing the affected Browser. No details are expected. |
25 NOTIFICATION_BROWSER_WINDOW_READY, | 25 NOTIFICATION_BROWSER_WINDOW_READY, |
26 | 26 |
27 // This message is sent when a browser is closing. The source is a | 27 // This message is sent when a browser is closing. The source is a |
28 // Source<Browser> containing the affected Browser. Details is a boolean | 28 // Source<Browser> containing the affected Browser. No details are expected. |
29 // that if true indicates that the application will be closed as a result of | 29 // This is sent prior to BROWSER_CLOSED, and may be sent more than once for a |
30 // this browser window closure (i.e. this was the last opened browser | 30 // particular browser. |
31 // window on win/linux). This is sent prior to BROWSER_CLOSED, and may be | |
32 // sent more than once for a particular browser. | |
33 NOTIFICATION_BROWSER_CLOSING, | 31 NOTIFICATION_BROWSER_CLOSING, |
34 | 32 |
35 // This message is sent after a window has been closed. The source is a | 33 // This message is sent after a window has been closed. The source is a |
36 // Source<Browser> containing the affected Browser. Details is a boolean | 34 // Source<Browser> containing the affected Browser. No details are exptected. |
37 // that if true indicates that the last browser window has closed - this | |
38 // does not indicate that the application is exiting (observers should | |
39 // listen for APP_TERMINATING if they want to detect when the application | |
40 // will shut down). Note that the boolean pointed to by details is only | |
41 // valid for the duration of this call. | |
42 NOTIFICATION_BROWSER_CLOSED, | 35 NOTIFICATION_BROWSER_CLOSED, |
43 | 36 |
44 // This message is sent when closing a browser has been cancelled, either by | 37 // This message is sent when closing a browser has been cancelled, either by |
45 // the user cancelling a beforeunload dialog, or IsClosingPermitted() | 38 // the user cancelling a beforeunload dialog, or IsClosingPermitted() |
46 // disallowing closing. This notification implies that no BROWSER_CLOSING or | 39 // disallowing closing. This notification implies that no BROWSER_CLOSING or |
47 // BROWSER_CLOSED notification will be sent. | 40 // BROWSER_CLOSED notification will be sent. |
48 // The source is a Source<Browser> containing the affected browser. No details | 41 // The source is a Source<Browser> containing the affected browser. No details |
49 // are expected. | 42 // are expected. |
50 NOTIFICATION_BROWSER_CLOSE_CANCELLED, | 43 NOTIFICATION_BROWSER_CLOSE_CANCELLED, |
51 | 44 |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 // Currently only Content and Chrome define and use notifications. | 1227 // Currently only Content and Chrome define and use notifications. |
1235 // Custom notifications not belonging to Content and Chrome should start | 1228 // Custom notifications not belonging to Content and Chrome should start |
1236 // from here. | 1229 // from here. |
1237 NOTIFICATION_CHROME_END, | 1230 NOTIFICATION_CHROME_END, |
1238 }; | 1231 }; |
1239 | 1232 |
1240 } // namespace chrome | 1233 } // namespace chrome |
1241 | 1234 |
1242 | 1235 |
1243 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ | 1236 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ |
OLD | NEW |