1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file.
4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_
6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/basictypes.h"
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/compiler_specific.h"
10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/public/browser/notification_observer.h"
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/public/browser/notification_registrar.h"
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class Browser;
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
15a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochnamespace content {
16a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochclass RenderProcessHost;
17a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch}
18a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace extensions {
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Observer for Chrome-specific notifications that need to be relayed to the
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// extensions module.
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class ChromeNotificationObserver : public content::NotificationObserver {
24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public:
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  ChromeNotificationObserver();
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual ~ChromeNotificationObserver();
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
285f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  // Notification handlers:
29a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  void OnRendererProcessCreated(content::RenderProcessHost* process);
30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // content::NotificationObserver overrides:
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual void Observe(int type,
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)                       const content::NotificationSource& source,
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)                       const content::NotificationDetails& details) OVERRIDE;
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) private:
37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  content::NotificationRegistrar registrar_;
38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(ChromeNotificationObserver);
40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)};
41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
42f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace extensions
43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
44f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif  // CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_
45