Index: extensions/common/manifest_handlers/file_handler_info.h |
diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h b/extensions/common/manifest_handlers/file_handler_info.h |
similarity index 54% |
rename from chrome/common/extensions/api/file_handlers/file_handlers_parser.h |
rename to extensions/common/manifest_handlers/file_handler_info.h |
index 864a38f960c08289b178f45d2dcf2963971053d6..4cda355721c9487cc841d822951ab5ae2d908a08 100644 |
--- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h |
+++ b/extensions/common/manifest_handlers/file_handler_info.h |
@@ -2,27 +2,44 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_ |
-#define CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_ |
+#ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |
+#define EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |
#include <set> |
#include <string> |
#include <vector> |
-#include "chrome/common/extensions/file_handler_info.h" |
#include "extensions/common/extension.h" |
#include "extensions/common/manifest_handler.h" |
namespace extensions { |
+struct FileHandlerInfo { |
+ FileHandlerInfo(); |
+ ~FileHandlerInfo(); |
+ |
+ // The id of this handler. |
+ std::string id; |
+ |
+ // The title of this handler. |
+ std::string title; |
+ |
+ // File extensions associated with this handler. |
+ std::set<std::string> extensions; |
+ |
+ // MIME types associated with this handler. |
+ std::set<std::string> types; |
+}; |
+ |
+typedef std::vector<FileHandlerInfo> FileHandlersInfo; |
+ |
struct FileHandlers : public Extension::ManifestData { |
FileHandlers(); |
virtual ~FileHandlers(); |
- std::vector<FileHandlerInfo> file_handlers; |
+ FileHandlersInfo file_handlers; |
- static const std::vector<FileHandlerInfo>* GetFileHandlers( |
- const Extension* extension); |
+ static const FileHandlersInfo* GetFileHandlers(const Extension* extension); |
}; |
// Parses the "file_handlers" manifest key. |
@@ -41,4 +58,4 @@ class FileHandlersParser : public ManifestHandler { |
} // namespace extensions |
-#endif // CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_ |
+#endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_ |