| OLD | NEW |
| 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; |
| 11 |
| 10 namespace webkit { | 12 namespace webkit { |
| 13 struct WebPluginInfo; |
| 11 namespace npapi { | 14 namespace npapi { |
| 12 class PluginGroup; | 15 class PluginGroup; |
| 13 } | 16 } |
| 14 } | 17 } |
| 15 | 18 |
| 16 namespace extensions { | 19 namespace extensions { |
| 17 | 20 |
| 18 class ClearContentSettingsFunction : public SyncExtensionFunction { | 21 class ClearContentSettingsFunction : public SyncExtensionFunction { |
| 19 public: | 22 public: |
| 20 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear") | 23 DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear") |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 protected: | 58 protected: |
| 56 virtual ~GetResourceIdentifiersFunction() {} | 59 virtual ~GetResourceIdentifiersFunction() {} |
| 57 | 60 |
| 58 // ExtensionFunction: | 61 // ExtensionFunction: |
| 59 virtual bool RunImpl() OVERRIDE; | 62 virtual bool RunImpl() OVERRIDE; |
| 60 | 63 |
| 61 private: | 64 private: |
| 62 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, | 65 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, |
| 63 ContentSettingsGetResourceIdentifiers); | 66 ContentSettingsGetResourceIdentifiers); |
| 64 | 67 |
| 65 void OnGotPluginGroups(const std::vector<webkit::npapi::PluginGroup>& groups); | 68 // Callback method that gets executed when both |finder| and |plugins| |
| 69 // are asynchronously fetched. |
| 70 void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins, |
| 71 PluginFinder* finder); |
| 66 | 72 |
| 67 // Used to override the global plugin list in tests. | 73 // Used to override the global plugin list in tests. |
| 68 static void SetPluginGroupsForTesting( | 74 static void SetPluginsForTesting( |
| 69 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); | 75 const std::vector<webkit::WebPluginInfo>* plugins); |
| 70 }; | 76 }; |
| 71 | 77 |
| 72 } // namespace extensions | 78 } // namespace extensions |
| 73 | 79 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H
__ | 80 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H
__ |
| OLD | NEW |