OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ | |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/extensions/extension_function.h" | |
10 | |
11 namespace webkit { | |
12 namespace npapi { | |
13 class PluginGroup; | |
14 } | |
15 } | |
16 | |
17 class ClearContentSettingsFunction : public SyncExtensionFunction { | |
18 public: | |
19 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear") | |
20 | |
21 protected: | |
22 virtual ~ClearContentSettingsFunction() {} | |
23 | |
24 // ExtensionFunction: | |
25 virtual bool RunImpl() OVERRIDE; | |
26 }; | |
27 | |
28 class GetContentSettingFunction : public SyncExtensionFunction { | |
29 public: | |
30 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.get") | |
31 | |
32 protected: | |
33 virtual ~GetContentSettingFunction() {} | |
34 | |
35 // ExtensionFunction: | |
36 virtual bool RunImpl() OVERRIDE; | |
37 }; | |
38 | |
39 class SetContentSettingFunction : public SyncExtensionFunction { | |
40 public: | |
41 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.set") | |
42 | |
43 protected: | |
44 virtual ~SetContentSettingFunction() {} | |
45 | |
46 // ExtensionFunction: | |
47 virtual bool RunImpl() OVERRIDE; | |
48 }; | |
49 | |
50 class GetResourceIdentifiersFunction : public AsyncExtensionFunction { | |
51 public: | |
52 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.getResourceIdentifiers") | |
53 | |
54 protected: | |
55 virtual ~GetResourceIdentifiersFunction() {} | |
56 | |
57 // ExtensionFunction: | |
58 virtual bool RunImpl() OVERRIDE; | |
59 | |
60 private: | |
61 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, | |
62 ContentSettingsGetResourceIdentifiers); | |
63 | |
64 void OnGotPluginGroups(const std::vector<webkit::npapi::PluginGroup>& groups); | |
65 | |
66 // Used to override the global plugin list in tests. | |
67 static void SetPluginGroupsForTesting( | |
68 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); | |
69 }; | |
70 | |
71 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_API_H__ | |
OLD | NEW |