chromium/extensions/common/manifest_handlers/file_handler_info.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 "base/memory/raw_ptr.h"
#include "components/services/app_service/public/cpp/file_handler_info.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handler.h"

namespace extensions {

FileHandlersInfo;

// When setting up the menus for file open, if a file type has default Chrome
// extension set as the default we used to try to choose a default handler by
// matching against any sniffed MIME type or its file name extension.
//
// If there was no clear 'winner' for being set as the default handler for the
// file type, we'd prefer one of our allowlisted handlers over a handler that
// explicitly matches the file name extension. e.g. an '.ica' file contains
// plain text, but if there is a Chrome extension registered that lists '.ica'
// in its 'file_handlers' in the manifest, it fails to be chosen as default if
// there is a text editor installed that can process MIME types of text/plain.
struct FileHandlerMatch {};

struct FileHandlers : public Extension::ManifestData {};

// Parses the "file_handlers" manifest key.
class FileHandlersParser : public ManifestHandler {};

}  // namespace extensions

#endif  // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_