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