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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 | 10 |
11 class ExtensionPrefs; | 11 class ExtensionPrefs; |
12 | 12 |
| 13 class ExtensionModuleEventRouter { |
| 14 public: |
| 15 // Dispatches the onInstalled event to the given extension. |
| 16 static void DispatchOnInstalledEvent(Profile* profile, |
| 17 const Extension* extension); |
| 18 }; |
| 19 |
13 class SetUpdateUrlDataFunction : public SyncExtensionFunction { | 20 class SetUpdateUrlDataFunction : public SyncExtensionFunction { |
14 protected: | 21 protected: |
15 virtual bool RunImpl() OVERRIDE; | 22 virtual bool RunImpl() OVERRIDE; |
16 DECLARE_EXTENSION_FUNCTION_NAME("extension.setUpdateUrlData"); | 23 DECLARE_EXTENSION_FUNCTION_NAME("extension.setUpdateUrlData"); |
17 | 24 |
18 private: | 25 private: |
19 ExtensionPrefs* extension_prefs(); | 26 ExtensionPrefs* extension_prefs(); |
20 }; | 27 }; |
21 | 28 |
22 class IsAllowedIncognitoAccessFunction : public SyncExtensionFunction { | 29 class IsAllowedIncognitoAccessFunction : public SyncExtensionFunction { |
23 protected: | 30 protected: |
24 virtual bool RunImpl() OVERRIDE; | 31 virtual bool RunImpl() OVERRIDE; |
25 DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedIncognitoAccess"); | 32 DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedIncognitoAccess"); |
26 }; | 33 }; |
27 | 34 |
28 class IsAllowedFileSchemeAccessFunction : public SyncExtensionFunction { | 35 class IsAllowedFileSchemeAccessFunction : public SyncExtensionFunction { |
29 protected: | 36 protected: |
30 virtual bool RunImpl() OVERRIDE; | 37 virtual bool RunImpl() OVERRIDE; |
31 DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedFileSchemeAccess"); | 38 DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedFileSchemeAccess"); |
32 }; | 39 }; |
| 40 |
33 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ | 41 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MODULE_H__ |
OLD | NEW |