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

Side by Side Diff: extensions/common/manifest_handlers/web_accessible_resources_info.h

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
11 #include "extensions/common/manifest_handler.h" 11 #include "extensions/common/manifest_handler.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // A structure to hold the web accessible extension resources 15 // A structure to hold the web accessible extension resources
16 // that may be specified in the manifest of an extension using 16 // that may be specified in the manifest of an extension using
17 // "web_accessible_resources" key. 17 // "web_accessible_resources" key.
18 struct WebAccessibleResourcesInfo : public Extension::ManifestData { 18 struct WebAccessibleResourcesInfo : public Extension::ManifestData {
19 // Define out of line constructor/destructor to please Clang. 19 // Define out of line constructor/destructor to please Clang.
20 WebAccessibleResourcesInfo(); 20 WebAccessibleResourcesInfo();
21 virtual ~WebAccessibleResourcesInfo(); 21 ~WebAccessibleResourcesInfo() override;
22 22
23 // Returns true if the specified resource is web accessible. 23 // Returns true if the specified resource is web accessible.
24 static bool IsResourceWebAccessible(const Extension* extension, 24 static bool IsResourceWebAccessible(const Extension* extension,
25 const std::string& relative_path); 25 const std::string& relative_path);
26 26
27 // Returns true when 'web_accessible_resources' are defined for the extension. 27 // Returns true when 'web_accessible_resources' are defined for the extension.
28 static bool HasWebAccessibleResources(const Extension* extension); 28 static bool HasWebAccessibleResources(const Extension* extension);
29 29
30 // Optional list of web accessible extension resources. 30 // Optional list of web accessible extension resources.
31 URLPatternSet web_accessible_resources_; 31 URLPatternSet web_accessible_resources_;
32 }; 32 };
33 33
34 // Parses the "web_accessible_resources" manifest key. 34 // Parses the "web_accessible_resources" manifest key.
35 class WebAccessibleResourcesHandler : public ManifestHandler { 35 class WebAccessibleResourcesHandler : public ManifestHandler {
36 public: 36 public:
37 WebAccessibleResourcesHandler(); 37 WebAccessibleResourcesHandler();
38 virtual ~WebAccessibleResourcesHandler(); 38 ~WebAccessibleResourcesHandler() override;
39 39
40 virtual bool Parse(Extension* extension, base::string16* error) override; 40 bool Parse(Extension* extension, base::string16* error) override;
41 41
42 private: 42 private:
43 virtual const std::vector<std::string> Keys() const override; 43 const std::vector<std::string> Keys() const override;
44 44
45 DISALLOW_COPY_AND_ASSIGN(WebAccessibleResourcesHandler); 45 DISALLOW_COPY_AND_ASSIGN(WebAccessibleResourcesHandler);
46 }; 46 };
47 47
48 } // namespace extensions 48 } // namespace extensions
49 49
50 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_ 50 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEB_ACCESSIBLE_RESOURCES_INFO_H_
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/shared_module_info.h ('k') | extensions/common/manifest_handlers/webview_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698