| 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_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 9 | 9 |
| 10 class PluginFinder; | 10 class PluginFinder; |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 struct WebPluginInfo; | 13 struct WebPluginInfo; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class ContentSettingsContentSettingClearFunction | 18 class ContentSettingsContentSettingClearFunction |
| 19 : public ChromeSyncExtensionFunction { | 19 : public ChromeSyncExtensionFunction { |
| 20 public: | 20 public: |
| 21 DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR) | 21 DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR) |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 virtual ~ContentSettingsContentSettingClearFunction() {} | 24 virtual ~ContentSettingsContentSettingClearFunction() {} |
| 25 | 25 |
| 26 // ExtensionFunction: | 26 // ExtensionFunction: |
| 27 virtual bool RunSync() OVERRIDE; | 27 virtual bool RunSync() override; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class ContentSettingsContentSettingGetFunction | 30 class ContentSettingsContentSettingGetFunction |
| 31 : public ChromeSyncExtensionFunction { | 31 : public ChromeSyncExtensionFunction { |
| 32 public: | 32 public: |
| 33 DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET) | 33 DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET) |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 virtual ~ContentSettingsContentSettingGetFunction() {} | 36 virtual ~ContentSettingsContentSettingGetFunction() {} |
| 37 | 37 |
| 38 // ExtensionFunction: | 38 // ExtensionFunction: |
| 39 virtual bool RunSync() OVERRIDE; | 39 virtual bool RunSync() override; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 class ContentSettingsContentSettingSetFunction | 42 class ContentSettingsContentSettingSetFunction |
| 43 : public ChromeSyncExtensionFunction { | 43 : public ChromeSyncExtensionFunction { |
| 44 public: | 44 public: |
| 45 DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET) | 45 DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET) |
| 46 | 46 |
| 47 protected: | 47 protected: |
| 48 virtual ~ContentSettingsContentSettingSetFunction() {} | 48 virtual ~ContentSettingsContentSettingSetFunction() {} |
| 49 | 49 |
| 50 // ExtensionFunction: | 50 // ExtensionFunction: |
| 51 virtual bool RunSync() OVERRIDE; | 51 virtual bool RunSync() override; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 class ContentSettingsContentSettingGetResourceIdentifiersFunction | 54 class ContentSettingsContentSettingGetResourceIdentifiersFunction |
| 55 : public ChromeAsyncExtensionFunction { | 55 : public ChromeAsyncExtensionFunction { |
| 56 public: | 56 public: |
| 57 DECLARE_EXTENSION_FUNCTION("contentSettings.getResourceIdentifiers", | 57 DECLARE_EXTENSION_FUNCTION("contentSettings.getResourceIdentifiers", |
| 58 CONTENTSETTINGS_GETRESOURCEIDENTIFIERS) | 58 CONTENTSETTINGS_GETRESOURCEIDENTIFIERS) |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 virtual ~ContentSettingsContentSettingGetResourceIdentifiersFunction() {} | 61 virtual ~ContentSettingsContentSettingGetResourceIdentifiersFunction() {} |
| 62 | 62 |
| 63 // ExtensionFunction: | 63 // ExtensionFunction: |
| 64 virtual bool RunAsync() OVERRIDE; | 64 virtual bool RunAsync() override; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, | 67 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, |
| 68 ContentSettingsGetResourceIdentifiers); | 68 ContentSettingsGetResourceIdentifiers); |
| 69 | 69 |
| 70 // Callback method that gets executed when |plugins| | 70 // Callback method that gets executed when |plugins| |
| 71 // are asynchronously fetched. | 71 // are asynchronously fetched. |
| 72 void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); | 72 void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace extensions | 75 } // namespace extensions |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H
_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H
_ |
| OLD | NEW |