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

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: 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 void OnGotPlugins(PluginFinder* finder,
Mattias Nissler (ping if slow) 2012/08/27 15:42:09 This could also use some documentation on when and
ibraaaa 2012/08/27 17:34:05 Done.
67 const std::vector<webkit::WebPluginInfo>& plugins);
68
69 // Callback method called by RunImpl. It takes in the asynchronously created
70 // PluginFinder instance. It delegates the logic (async) to OnGotPlugins.
71 void GetPluginFinderForRunImpl(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 __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698