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

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: Addressed review comments by Mattias 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 passed in by GetPluginFinderForRunImpl to
67 // PluginService::GetPlugins where it gets executed
68 // taking the fetched plug-ins as a parameter.
69 void OnGotPlugins(PluginFinder* finder,
70 const std::vector<webkit::WebPluginInfo>& plugins);
71
72 // Callback method called by RunImpl. It takes in the asynchronously created
73 // PluginFinder instance. It delegates the logic (async) to OnGotPlugins.
74 void GetPluginFinderForRunImpl(PluginFinder* finder);
66 75
67 // Used to override the global plugin list in tests. 76 // Used to override the global plugin list in tests.
68 static void SetPluginGroupsForTesting( 77 static void SetPluginsForTesting(
69 const std::vector<webkit::npapi::PluginGroup>* plugin_groups); 78 const std::vector<webkit::WebPluginInfo>* plugins);
70 }; 79 };
71 80
72 } // namespace extensions 81 } // namespace extensions
73 82
74 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H __ 83 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_API_H __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698