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

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

Issue 10876083: [4] Changing content_settings_api to use PluginFinder's async interface (Closed) Base URL: http://git.chromium.org/chromium/src.git@async_start
Patch Set: Adding CallbackBarrier but wait! Created 8 years, 3 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
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 #include "chrome/browser/plugin_finder.h"
9 10
10 namespace webkit { 11 namespace webkit {
11 namespace npapi { 12 namespace npapi {
12 class PluginGroup; 13 class PluginGroup;
13 } 14 }
14 } 15 }
15 16
16 namespace extensions { 17 namespace extensions {
17 18
18 class ClearContentSettingsFunction : public SyncExtensionFunction { 19 class ClearContentSettingsFunction : public SyncExtensionFunction {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 protected: 56 protected:
56 virtual ~GetResourceIdentifiersFunction() {} 57 virtual ~GetResourceIdentifiersFunction() {}
57 58
58 // ExtensionFunction: 59 // ExtensionFunction:
59 virtual bool RunImpl() OVERRIDE; 60 virtual bool RunImpl() OVERRIDE;
60 61
61 private: 62 private:
62 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, 63 FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest,
63 ContentSettingsGetResourceIdentifiers); 64 ContentSettingsGetResourceIdentifiers);
64 65
65 void OnGotPluginGroups(const std::vector<webkit::npapi::PluginGroup>& groups); 66 // Callback method that gets executed when both |finder| and |plugins|
67 // are asynchronously fetched.
68 void OnGotPlugins(PluginFinder* finder,
69 const std::vector<webkit::WebPluginInfo>& plugins);
66 70
67 // Used to override the global plugin list in tests. 71 // Used to override the global plugin list in tests.
68 static void SetPluginGroupsForTesting( 72 static void SetPluginsForTesting(
69 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); 73 const std::vector<webkit::WebPluginInfo>* plugins);
70 }; 74 };
71 75
72 } // namespace extensions 76 } // namespace extensions
73 77
74 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H __ 78 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698