notification_observer.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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
3// found in the LICENSE file.
4
5#ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_OBSERVER_H_
6#define CONTENT_PUBLIC_BROWSER_NOTIFICATION_OBSERVER_H_
7
8#include "content/common/content_export.h"
9
10namespace content {
11
12class NotificationDetails;
13class NotificationSource;
14
15// This is the base class for notification observers. When a matching
16// notification is posted to the notification service, Observe is called.
17class CONTENT_EXPORT NotificationObserver {
18 public:
19  virtual void Observe(int type,
20                       const NotificationSource& source,
21                       const NotificationDetails& details) = 0;
22
23 protected:
24  virtual ~NotificationObserver() {}
25};
26
27}  // namespace content
28
29#endif  // CONTENT_PUBLIC_BROWSER_NOTIFICATION_OBSERVER_H_
30