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 // This file describes a central switchboard for notifications that might | 5 // This file describes a central switchboard for notifications that might |
6 // happen in various parts of the application, and allows users to register | 6 // happen in various parts of the application, and allows users to register |
7 // observers for various classes of events that they're interested in. | 7 // observers for various classes of events that they're interested in. |
8 | 8 |
9 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ | 9 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
10 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ | 10 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
11 #pragma once | |
12 | 11 |
13 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
14 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
15 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
16 | 15 |
17 namespace content { | 16 namespace content { |
18 | 17 |
19 class CONTENT_EXPORT NotificationService { | 18 class CONTENT_EXPORT NotificationService { |
20 public: | 19 public: |
21 // Returns the NotificationService object for the current thread, or NULL if | 20 // Returns the NotificationService object for the current thread, or NULL if |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 56 } |
58 | 57 |
59 // Returns a NotificationDetails object that represents a lack of details | 58 // Returns a NotificationDetails object that represents a lack of details |
60 // associated with a notification. (This is effectively a null pointer.) | 59 // associated with a notification. (This is effectively a null pointer.) |
61 static Details<void> NoDetails() { return Details<void>(NULL); } | 60 static Details<void> NoDetails() { return Details<void>(NULL); } |
62 }; | 61 }; |
63 | 62 |
64 } // namespace content | 63 } // namespace content |
65 | 64 |
66 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ | 65 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
OLD | NEW |