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_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_
8 #include "chrome/browser/extensions/chrome_extension_function.h"
16 namespace extensions
{
18 class ContentSettingsContentSettingClearFunction
19 : public ChromeSyncExtensionFunction
{
21 DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR
)
24 ~ContentSettingsContentSettingClearFunction() override
{}
27 bool RunSync() override
;
30 class ContentSettingsContentSettingGetFunction
31 : public ChromeSyncExtensionFunction
{
33 DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET
)
36 ~ContentSettingsContentSettingGetFunction() override
{}
39 bool RunSync() override
;
42 class ContentSettingsContentSettingSetFunction
43 : public ChromeSyncExtensionFunction
{
45 DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET
)
48 ~ContentSettingsContentSettingSetFunction() override
{}
51 bool RunSync() override
;
54 class ContentSettingsContentSettingGetResourceIdentifiersFunction
55 : public ChromeAsyncExtensionFunction
{
57 DECLARE_EXTENSION_FUNCTION("contentSettings.getResourceIdentifiers",
58 CONTENTSETTINGS_GETRESOURCEIDENTIFIERS
)
61 ~ContentSettingsContentSettingGetResourceIdentifiersFunction() override
{}
64 bool RunAsync() override
;
67 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest
,
68 ContentSettingsGetResourceIdentifiers
);
70 // Callback method that gets executed when |plugins|
71 // are asynchronously fetched.
72 void OnGotPlugins(const std::vector
<content::WebPluginInfo
>& plugins
);
75 } // namespace extensions
77 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_