OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 | 12 |
13 class Browser; | 13 class Browser; |
14 | 14 |
| 15 namespace content { |
| 16 class RenderProcessHost; |
| 17 } |
| 18 |
15 namespace extensions { | 19 namespace extensions { |
16 | 20 |
17 // Observer for Chrome-specific notifications that need to be relayed to the | 21 // Observer for Chrome-specific notifications that need to be relayed to the |
18 // extensions module. | 22 // extensions module. |
19 class ChromeNotificationObserver : public content::NotificationObserver { | 23 class ChromeNotificationObserver : public content::NotificationObserver { |
20 public: | 24 public: |
21 ChromeNotificationObserver(); | 25 ChromeNotificationObserver(); |
22 virtual ~ChromeNotificationObserver(); | 26 virtual ~ChromeNotificationObserver(); |
23 | 27 |
| 28 // IPC message handlers: |
24 void OnBrowserWindowReady(Browser* browser); | 29 void OnBrowserWindowReady(Browser* browser); |
| 30 void OnRendererProcessCreated(content::RenderProcessHost* process); |
25 | 31 |
26 // content::NotificationObserver overrides: | 32 // content::NotificationObserver overrides: |
27 virtual void Observe(int type, | 33 virtual void Observe(int type, |
28 const content::NotificationSource& source, | 34 const content::NotificationSource& source, |
29 const content::NotificationDetails& details) OVERRIDE; | 35 const content::NotificationDetails& details) OVERRIDE; |
30 | 36 |
31 private: | 37 private: |
32 content::NotificationRegistrar registrar_; | 38 content::NotificationRegistrar registrar_; |
33 | 39 |
34 DISALLOW_COPY_AND_ASSIGN(ChromeNotificationObserver); | 40 DISALLOW_COPY_AND_ASSIGN(ChromeNotificationObserver); |
35 }; | 41 }; |
36 | 42 |
37 } // namespace extensions | 43 } // namespace extensions |
38 | 44 |
39 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_NOTIFICATION_OBSERVER_H_ |
OLD | NEW |