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. No details are expected. | 28 // Source<Browser> containing the affected Browser. Details is a boolean |
29 // This is sent prior to BROWSER_CLOSED, and may be sent more than once for a | 29 // that if true indicates that the application will be closed as a result of |
30 // particular browser. | 30 // this browser window closure (i.e. this was the last opened 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. |
31 NOTIFICATION_BROWSER_CLOSING, | 33 NOTIFICATION_BROWSER_CLOSING, |
32 | 34 |
33 // This message is sent after a window has been closed. The source is a | 35 // This message is sent after a window has been closed. The source is a |
34 // Source<Browser> containing the affected Browser. No details are exptected. | 36 // Source<Browser> containing the affected Browser. Details is a boolean |
| 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. |
35 NOTIFICATION_BROWSER_CLOSED, | 42 NOTIFICATION_BROWSER_CLOSED, |
36 | 43 |
37 // This message is sent when closing a browser has been cancelled, either by | 44 // This message is sent when closing a browser has been cancelled, either by |
38 // the user cancelling a beforeunload dialog, or IsClosingPermitted() | 45 // the user cancelling a beforeunload dialog, or IsClosingPermitted() |
39 // disallowing closing. This notification implies that no BROWSER_CLOSING or | 46 // disallowing closing. This notification implies that no BROWSER_CLOSING or |
40 // BROWSER_CLOSED notification will be sent. | 47 // BROWSER_CLOSED notification will be sent. |
41 // The source is a Source<Browser> containing the affected browser. No details | 48 // The source is a Source<Browser> containing the affected browser. No details |
42 // are expected. | 49 // are expected. |
43 NOTIFICATION_BROWSER_CLOSE_CANCELLED, | 50 NOTIFICATION_BROWSER_CLOSE_CANCELLED, |
44 | 51 |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 // Currently only Content and Chrome define and use notifications. | 1234 // Currently only Content and Chrome define and use notifications. |
1228 // Custom notifications not belonging to Content and Chrome should start | 1235 // Custom notifications not belonging to Content and Chrome should start |
1229 // from here. | 1236 // from here. |
1230 NOTIFICATION_CHROME_END, | 1237 NOTIFICATION_CHROME_END, |
1231 }; | 1238 }; |
1232 | 1239 |
1233 } // namespace chrome | 1240 } // namespace chrome |
1234 | 1241 |
1235 | 1242 |
1236 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ | 1243 #endif // CHROME_COMMON_CHROME_NOTIFICATION_TYPES_H_ |
OLD | NEW |