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

Side by Side Diff: chrome/common/extensions/api/plugins/plugins_handler.h

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: rebase? Created 3 years, 8 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
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/extensions/api/plugins/plugins_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_API_PLUGINS_PLUGINS_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_PLUGINS_PLUGINS_HANDLER_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/macros.h"
12 #include "extensions/common/extension.h"
13 #include "extensions/common/manifest_handler.h"
14
15 namespace extensions {
16
17 // An NPAPI plugin included in the extension.
18 struct PluginInfo {
19 typedef std::vector<PluginInfo> PluginVector;
20
21 PluginInfo(const base::FilePath& plugin_path, bool plugin_is_public);
22 ~PluginInfo();
23
24 base::FilePath path; // Path to the plugin.
25 bool is_public; // False if only this extension can load this plugin.
26
27 // Return the plugins for a given |extensions|, or NULL if none exist.
28 static const PluginVector* GetPlugins(const Extension* extension);
29
30 // Return true if the given |extension| has plugins, and false otherwise.
31 static bool HasPlugins(const Extension* extension);
32 };
33
34 // Parses the "plugins" manifest key.
35 class PluginsHandler : public ManifestHandler {
36 public:
37 PluginsHandler();
38 ~PluginsHandler() override;
39
40 bool Parse(Extension* extension, base::string16* error) override;
41 bool Validate(const Extension* extension,
42 std::string* error,
43 std::vector<InstallWarning>* warnings) const override;
44
45 private:
46 const std::vector<std::string> Keys() const override;
47
48 DISALLOW_COPY_AND_ASSIGN(PluginsHandler);
49 };
50
51 } // namespace extensions
52
53 #endif // CHROME_COMMON_EXTENSIONS_API_PLUGINS_PLUGINS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/extensions/api/plugins/plugins_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698