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