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_NOTIFICATION_SERVICE_H_ | 9 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
10 #define CONTENT_PUBLIC_NOTIFICATION_SERVICE_H_ | 10 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
11 #pragma once | 11 #pragma once |
12 | 12 |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/browser/notification_details.h" | 14 #include "content/public/browser/notification_details.h" |
15 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 class CONTENT_EXPORT NotificationService { | 19 class CONTENT_EXPORT NotificationService { |
20 public: | 20 public: |
(...skipping 28 matching lines...) Expand all Loading... |
49 // Some usage is safe, where the Source is checked to see if it's a member of | 49 // Some usage is safe, where the Source is checked to see if it's a member of |
50 // a container before use. But, we want the number of AllSources() calls to | 50 // a container before use. But, we want the number of AllSources() calls to |
51 // drop to almost nothing, because most usages are not multiprofile safe and | 51 // drop to almost nothing, because most usages are not multiprofile safe and |
52 // were done because it was easier to listen to everything. | 52 // were done because it was easier to listen to everything. |
53 static Source<void> AllBrowserContextsAndSources() { | 53 static Source<void> AllBrowserContextsAndSources() { |
54 return Source<void>(NULL); | 54 return Source<void>(NULL); |
55 } | 55 } |
56 | 56 |
57 // Returns a NotificationDetails object that represents a lack of details | 57 // Returns a NotificationDetails object that represents a lack of details |
58 // associated with a notification. (This is effectively a null pointer.) | 58 // associated with a notification. (This is effectively a null pointer.) |
59 static Details<void> NoDetails() { return content::Details<void>(NULL); } | 59 static Details<void> NoDetails() { return Details<void>(NULL); } |
60 }; | 60 }; |
61 | 61 |
62 } // namespace content | 62 } // namespace content |
63 | 63 |
64 #endif // CONTENT_COMMON_NOTIFICATION_SERVICE_H_ | 64 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_SERVICE_H_ |
OLD | NEW |