Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / extensions / api / module / module.h
blobc35249941c397139f4377a8949d58131c1bb9b1d
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MODULE_MODULE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MODULE_MODULE_H_
8 #include "chrome/browser/extensions/chrome_extension_function.h"
10 namespace extensions {
11 class ExtensionPrefs;
13 namespace extension {
14 // Return the extension's update URL data, if any.
15 std::string GetUpdateURLData(const ExtensionPrefs* prefs,
16 const std::string& extension_id);
17 } // namespace extension
19 class ExtensionSetUpdateUrlDataFunction : public ChromeSyncExtensionFunction {
20 public:
21 DECLARE_EXTENSION_FUNCTION("extension.setUpdateUrlData",
22 EXTENSION_SETUPDATEURLDATA)
24 protected:
25 ~ExtensionSetUpdateUrlDataFunction() override {}
27 // ExtensionFunction:
28 bool RunSync() override;
31 class ExtensionIsAllowedIncognitoAccessFunction
32 : public ChromeSyncExtensionFunction {
33 public:
34 DECLARE_EXTENSION_FUNCTION("extension.isAllowedIncognitoAccess",
35 EXTENSION_ISALLOWEDINCOGNITOACCESS)
37 protected:
38 ~ExtensionIsAllowedIncognitoAccessFunction() override {}
40 // ExtensionFunction:
41 bool RunSync() override;
44 class ExtensionIsAllowedFileSchemeAccessFunction
45 : public ChromeSyncExtensionFunction {
46 public:
47 DECLARE_EXTENSION_FUNCTION("extension.isAllowedFileSchemeAccess",
48 EXTENSION_ISALLOWEDFILESCHEMEACCESS)
50 protected:
51 ~ExtensionIsAllowedFileSchemeAccessFunction() override {}
53 // ExtensionFunction:
54 bool RunSync() override;
57 } // namespace extensions
59 #endif // CHROME_BROWSER_EXTENSIONS_API_MODULE_MODULE_H_