| 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_CONTENT_SETTINGS_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_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 namespace webkit { | 11 namespace webkit { |
| 12 namespace npapi { | 12 namespace npapi { |
| 13 class PluginGroup; | 13 class PluginGroup; |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 | 16 |
| 17 class ClearContentSettingsFunction : public SyncExtensionFunction { | 17 class ClearContentSettingsFunction : public SyncExtensionFunction { |
| 18 public: | 18 public: |
| 19 virtual bool RunImpl(); | 19 virtual bool RunImpl(); |
| 20 DECLARE_EXTENSION_FUNCTION_NAME( | 20 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear") |
| 21 "experimental.contentSettings.clear") | |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 class GetContentSettingFunction : public SyncExtensionFunction { | 23 class GetContentSettingFunction : public SyncExtensionFunction { |
| 25 public: | 24 public: |
| 26 virtual bool RunImpl(); | 25 virtual bool RunImpl(); |
| 27 DECLARE_EXTENSION_FUNCTION_NAME( | 26 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.get") |
| 28 "experimental.contentSettings.get") | |
| 29 }; | 27 }; |
| 30 | 28 |
| 31 class SetContentSettingFunction : public SyncExtensionFunction { | 29 class SetContentSettingFunction : public SyncExtensionFunction { |
| 32 public: | 30 public: |
| 33 virtual bool RunImpl(); | 31 virtual bool RunImpl(); |
| 34 DECLARE_EXTENSION_FUNCTION_NAME( | 32 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.set") |
| 35 "experimental.contentSettings.set") | |
| 36 }; | 33 }; |
| 37 | 34 |
| 38 class GetResourceIdentifiersFunction : public AsyncExtensionFunction { | 35 class GetResourceIdentifiersFunction : public AsyncExtensionFunction { |
| 39 public: | 36 public: |
| 40 virtual bool RunImpl(); | 37 virtual bool RunImpl(); |
| 41 DECLARE_EXTENSION_FUNCTION_NAME( | 38 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.getResourceIdentifiers") |
| 42 "experimental.contentSettings.getResourceIdentifiers") | |
| 43 | 39 |
| 44 private: | 40 private: |
| 45 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, | 41 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, |
| 46 ContentSettingsGetResourceIdentifiers); | 42 ContentSettingsGetResourceIdentifiers); |
| 47 | 43 |
| 48 void OnGotPluginGroups(const std::vector<webkit::npapi::PluginGroup>& groups); | 44 void OnGotPluginGroups(const std::vector<webkit::npapi::PluginGroup>& groups); |
| 49 | 45 |
| 50 // Used to override the global plugin list in tests. | 46 // Used to override the global plugin list in tests. |
| 51 static void SetPluginGroupsForTesting( | 47 static void SetPluginGroupsForTesting( |
| 52 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); | 48 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); |
| 53 }; | 49 }; |
| 54 | 50 |
| 55 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ | 51 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ |
| OLD | NEW |