Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: content/public/browser/notification_service.h

Issue 8381024: more content exports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't link installer_unittests, setup against content Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_NOTIFICATION_SERVICE_H_
10 #define CONTENT_PUBLIC_NOTIFICATION_SERVICE_H_ 10 #define CONTENT_PUBLIC_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 NotificationService { 19 class CONTENT_EXPORT NotificationService {
20 public: 20 public:
21 // Returns the NotificationService object for the current thread, or NULL if 21 // Returns the NotificationService object for the current thread, or NULL if
22 // none. 22 // none.
23 static CONTENT_EXPORT NotificationService* current(); 23 static NotificationService* current();
24 24
25 virtual ~NotificationService() {} 25 virtual ~NotificationService() {}
26 26
27 // Synchronously posts a notification to all interested observers. 27 // Synchronously posts a notification to all interested observers.
28 // Source is a reference to a NotificationSource object representing 28 // Source is a reference to a NotificationSource object representing
29 // the object originating the notification (can be 29 // the object originating the notification (can be
30 // NotificationService::AllSources(), in which case 30 // NotificationService::AllSources(), in which case
31 // only observers interested in all sources will be notified). 31 // only observers interested in all sources will be notified).
32 // Details is a reference to an object containing additional data about 32 // Details is a reference to an object containing additional data about
33 // the notification. If no additional data is needed, NoDetails() is used. 33 // the notification. If no additional data is needed, NoDetails() is used.
(...skipping 21 matching lines...) Expand all
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 content::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_COMMON_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698