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 #ifndef CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ | 5 #ifndef CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ |
6 #define CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ | 6 #define CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 class NotificationDetails; | 9 class NotificationDetails; |
10 class NotificationSource; | 10 class NotificationSource; |
11 class NotificationType; | |
12 | 11 |
13 // This is the base class for notification observers. When a matching | 12 // This is the base class for notification observers. When a matching |
14 // notification is posted to the notification service, Observe is called. | 13 // notification is posted to the notification service, Observe is called. |
15 class NotificationObserver { | 14 class NotificationObserver { |
16 public: | 15 public: |
17 NotificationObserver(); | 16 NotificationObserver(); |
18 virtual ~NotificationObserver(); | 17 virtual ~NotificationObserver(); |
19 | 18 |
20 virtual void Observe(NotificationType type, | 19 virtual void Observe(int type, |
21 const NotificationSource& source, | 20 const NotificationSource& source, |
22 const NotificationDetails& details) = 0; | 21 const NotificationDetails& details) = 0; |
23 }; | 22 }; |
24 | 23 |
25 #endif // CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ | 24 #endif // CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ |
OLD | NEW |