Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: chrome/browser/extensions/api/content_settings/content_settings_api.h

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 9
10 class PluginFinder; 10 class PluginFinder;
11 11
12 namespace webkit { 12 namespace webkit {
13 struct WebPluginInfo; 13 struct WebPluginInfo;
14 } 14 }
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class ContentSettingsClearFunction : public SyncExtensionFunction { 18 class ClearContentSettingsFunction : public SyncExtensionFunction {
19 public: 19 public:
20 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear") 20 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear")
21 21
22 protected: 22 protected:
23 virtual ~ContentSettingsClearFunction() {} 23 virtual ~ClearContentSettingsFunction() {}
24 24
25 // ExtensionFunction: 25 // ExtensionFunction:
26 virtual bool RunImpl() OVERRIDE; 26 virtual bool RunImpl() OVERRIDE;
27 }; 27 };
28 28
29 class ContentSettingsGetFunction : public SyncExtensionFunction { 29 class GetContentSettingFunction : public SyncExtensionFunction {
30 public: 30 public:
31 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.get") 31 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.get")
32 32
33 protected: 33 protected:
34 virtual ~ContentSettingsGetFunction() {} 34 virtual ~GetContentSettingFunction() {}
35 35
36 // ExtensionFunction: 36 // ExtensionFunction:
37 virtual bool RunImpl() OVERRIDE; 37 virtual bool RunImpl() OVERRIDE;
38 }; 38 };
39 39
40 class ContentSettingsSetFunction : public SyncExtensionFunction { 40 class SetContentSettingFunction : public SyncExtensionFunction {
41 public: 41 public:
42 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.set") 42 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.set")
43 43
44 protected: 44 protected:
45 virtual ~ContentSettingsSetFunction() {} 45 virtual ~SetContentSettingFunction() {}
46 46
47 // ExtensionFunction: 47 // ExtensionFunction:
48 virtual bool RunImpl() OVERRIDE; 48 virtual bool RunImpl() OVERRIDE;
49 }; 49 };
50 50
51 class ContentSettingsGetResourceIdentifiersFunction 51 class GetResourceIdentifiersFunction : public AsyncExtensionFunction {
52 : public AsyncExtensionFunction {
53 public: 52 public:
54 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.getResourceIdentifiers") 53 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.getResourceIdentifiers")
55 54
56 protected: 55 protected:
57 virtual ~ContentSettingsGetResourceIdentifiersFunction() {} 56 virtual ~GetResourceIdentifiersFunction() {}
58 57
59 // ExtensionFunction: 58 // ExtensionFunction:
60 virtual bool RunImpl() OVERRIDE; 59 virtual bool RunImpl() OVERRIDE;
61 60
62 private: 61 private:
63 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, 62 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest,
64 ContentSettingsGetResourceIdentifiers); 63 ContentSettingsGetResourceIdentifiers);
65 64
66 // Callback method that gets executed when |plugins| 65 // Callback method that gets executed when |plugins|
67 // are asynchronously fetched. 66 // are asynchronously fetched.
68 void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); 67 void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins);
69 68
70 // Used to override the global plugin list in tests. 69 // Used to override the global plugin list in tests.
71 static void SetPluginsForTesting( 70 static void SetPluginsForTesting(
72 const std::vector<webkit::WebPluginInfo>* plugins); 71 const std::vector<webkit::WebPluginInfo>* plugins);
73 }; 72 };
74 73
75 } // namespace extensions 74 } // namespace extensions
76 75
77 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H _ 76 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698