1 // Copyright (c) 2012 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.
5 #ifndef CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_
12 #include "chrome/common/extensions/file_handler_info.h"
13 #include "extensions/common/extension.h"
14 #include "extensions/common/manifest_handler.h"
16 namespace extensions
{
18 struct FileHandlers
: public Extension::ManifestData
{
20 virtual ~FileHandlers();
22 std::vector
<FileHandlerInfo
> file_handlers
;
24 static const std::vector
<FileHandlerInfo
>* GetFileHandlers(
25 const Extension
* extension
);
28 // Parses the "file_handlers" manifest key.
29 class FileHandlersParser
: public ManifestHandler
{
32 virtual ~FileHandlersParser();
34 virtual bool Parse(Extension
* extension
, base::string16
* error
) OVERRIDE
;
37 virtual const std::vector
<std::string
> Keys() const OVERRIDE
;
39 DISALLOW_COPY_AND_ASSIGN(FileHandlersParser
);
42 } // namespace extensions
44 #endif // CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_