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

Side by Side Diff: extensions/common/manifest_handlers/webview_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_WEBVIEW_INFO_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "extensions/common/extension.h" 11 #include "extensions/common/extension.h"
12 #include "extensions/common/manifest_handler.h" 12 #include "extensions/common/manifest_handler.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 class PartitionItem; 16 class PartitionItem;
17 17
18 // A class to hold the <webview> accessible extension resources 18 // A class to hold the <webview> accessible extension resources
19 // that may be specified in the manifest of an extension using the 19 // that may be specified in the manifest of an extension using the
20 // "webview" key. 20 // "webview" key.
21 class WebviewInfo : public Extension::ManifestData { 21 class WebviewInfo : public Extension::ManifestData {
22 public: 22 public:
23 // Define out of line constructor/destructor to please Clang. 23 // Define out of line constructor/destructor to please Clang.
24 WebviewInfo(); 24 WebviewInfo();
25 virtual ~WebviewInfo(); 25 ~WebviewInfo() override;
26 26
27 // Returns true if the specified resource is web accessible. 27 // Returns true if the specified resource is web accessible.
28 static bool IsResourceWebviewAccessible(const Extension* extension, 28 static bool IsResourceWebviewAccessible(const Extension* extension,
29 const std::string& partition_id, 29 const std::string& partition_id,
30 const std::string& relative_path); 30 const std::string& relative_path);
31 31
32 void AddPartitionItem(scoped_ptr<PartitionItem> item); 32 void AddPartitionItem(scoped_ptr<PartitionItem> item);
33 33
34 private: 34 private:
35 ScopedVector<PartitionItem> partition_items_; 35 ScopedVector<PartitionItem> partition_items_;
36 }; 36 };
37 37
38 // Parses the "webview" manifest key. 38 // Parses the "webview" manifest key.
39 class WebviewHandler : public ManifestHandler { 39 class WebviewHandler : public ManifestHandler {
40 public: 40 public:
41 WebviewHandler(); 41 WebviewHandler();
42 virtual ~WebviewHandler(); 42 ~WebviewHandler() override;
43 43
44 virtual bool Parse(Extension* extension, base::string16* error) override; 44 bool Parse(Extension* extension, base::string16* error) override;
45 45
46 private: 46 private:
47 virtual const std::vector<std::string> Keys() const override; 47 const std::vector<std::string> Keys() const override;
48 48
49 DISALLOW_COPY_AND_ASSIGN(WebviewHandler); 49 DISALLOW_COPY_AND_ASSIGN(WebviewHandler);
50 }; 50 };
51 51
52 } // namespace extensions 52 } // namespace extensions
53 53
54 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_ 54 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/web_accessible_resources_info.h ('k') | extensions/common/manifest_url_handlers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698