OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_MANIFEST_PARSER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_MANIFEST_PARSER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.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 Profile; | 13 class Profile; |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 class ChromeManifestParser : public ProfileKeyedAPI, | 17 class ExtensionWebUIOverrideRegistrar : public ProfileKeyedAPI, |
18 public content::NotificationObserver { | 18 public content::NotificationObserver { |
19 public: | 19 public: |
20 explicit ChromeManifestParser(Profile* profile); | 20 explicit ExtensionWebUIOverrideRegistrar(Profile* profile); |
21 virtual ~ChromeManifestParser(); | 21 virtual ~ExtensionWebUIOverrideRegistrar(); |
22 | 22 |
23 // ProfileKeyedAPI implementation. | 23 // ProfileKeyedAPI implementation. |
24 static ProfileKeyedAPIFactory<ChromeManifestParser>* GetFactoryInstance(); | 24 static ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* |
| 25 GetFactoryInstance(); |
25 | 26 |
26 // content::NotificationObserver implementation. | 27 // content::NotificationObserver implementation. |
27 virtual void Observe(int type, | 28 virtual void Observe(int type, |
28 const content::NotificationSource& source, | 29 const content::NotificationSource& source, |
29 const content::NotificationDetails& details) OVERRIDE; | 30 const content::NotificationDetails& details) OVERRIDE; |
30 | 31 |
31 private: | 32 private: |
32 friend class ProfileKeyedAPIFactory<ChromeManifestParser>; | 33 friend class ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>; |
33 | 34 |
34 // ProfileKeyedAPI implementation. | 35 // ProfileKeyedAPI implementation. |
35 static const char* service_name() { return "ChromeManifestParser"; } | 36 static const char* service_name() { |
| 37 return "ExtensionWebUIOverrideRegistrar"; |
| 38 } |
36 | 39 |
37 Profile* const profile_; | 40 Profile* const profile_; |
38 content::NotificationRegistrar registrar_; | 41 content::NotificationRegistrar registrar_; |
39 | 42 |
40 DISALLOW_COPY_AND_ASSIGN(ChromeManifestParser); | 43 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIOverrideRegistrar); |
41 }; | 44 }; |
42 | 45 |
43 } // namespace extensions | 46 } // namespace extensions |
44 | 47 |
45 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_MANIFEST_PARSER_H_ | 48 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
OLD | NEW |