OLD | NEW |
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_FILE_HANDLER_INFO_H_ | 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ | 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... |
25 std::set<std::string> extensions; | 25 std::set<std::string> extensions; |
26 | 26 |
27 // MIME types associated with this handler. | 27 // MIME types associated with this handler. |
28 std::set<std::string> types; | 28 std::set<std::string> types; |
29 }; | 29 }; |
30 | 30 |
31 typedef std::vector<FileHandlerInfo> FileHandlersInfo; | 31 typedef std::vector<FileHandlerInfo> FileHandlersInfo; |
32 | 32 |
33 struct FileHandlers : public Extension::ManifestData { | 33 struct FileHandlers : public Extension::ManifestData { |
34 FileHandlers(); | 34 FileHandlers(); |
35 virtual ~FileHandlers(); | 35 ~FileHandlers() override; |
36 | 36 |
37 FileHandlersInfo file_handlers; | 37 FileHandlersInfo file_handlers; |
38 | 38 |
39 static const FileHandlersInfo* GetFileHandlers(const Extension* extension); | 39 static const FileHandlersInfo* GetFileHandlers(const Extension* extension); |
40 }; | 40 }; |
41 | 41 |
42 // Parses the "file_handlers" manifest key. | 42 // Parses the "file_handlers" manifest key. |
43 class FileHandlersParser : public ManifestHandler { | 43 class FileHandlersParser : public ManifestHandler { |
44 public: | 44 public: |
45 FileHandlersParser(); | 45 FileHandlersParser(); |
46 virtual ~FileHandlersParser(); | 46 ~FileHandlersParser() override; |
47 | 47 |
48 virtual bool Parse(Extension* extension, base::string16* error) override; | 48 bool Parse(Extension* extension, base::string16* error) override; |
49 | 49 |
50 private: | 50 private: |
51 virtual const std::vector<std::string> Keys() const override; | 51 const std::vector<std::string> Keys() const override; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(FileHandlersParser); | 53 DISALLOW_COPY_AND_ASSIGN(FileHandlersParser); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace extensions | 56 } // namespace extensions |
57 | 57 |
58 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ | 58 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |
OLD | NEW |