#include "chrome/browser/web_applications/os_integration/web_app_file_handler_manager.h"
#include <set>
#include <tuple>
#include <utility>
#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/no_destructor.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/browser/web_applications/web_app_registry_update.h"
#include "chrome/browser/web_applications/web_app_sync_bridge.h"
#include "chrome/browser/web_applications/web_app_utils.h"
#include "chrome/common/chrome_features.h"
#include "components/services/app_service/public/cpp/file_handler.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
namespace web_app {
namespace {
std::optional<bool> g_icons_supported_by_os_override;
}
WebAppFileHandlerManager::WebAppFileHandlerManager(Profile* profile)
: … { … }
WebAppFileHandlerManager::~WebAppFileHandlerManager() = default;
void WebAppFileHandlerManager::SetProvider(base::PassKey<OsIntegrationManager>,
WebAppProvider& provider) { … }
void WebAppFileHandlerManager::Start() { … }
void WebAppFileHandlerManager::SetIconsSupportedByOsForTesting(bool value) { … }
const apps::FileHandlers* WebAppFileHandlerManager::GetEnabledFileHandlers(
const webapps::AppId& app_id) const { … }
bool WebAppFileHandlerManager::IconsEnabled() { … }
const apps::FileHandlers* WebAppFileHandlerManager::GetAllFileHandlers(
const webapps::AppId& app_id) const { … }
bool WebAppFileHandlerManager::IsDisabledForTesting() { … }
WebAppFileHandlerManager::LaunchInfos
WebAppFileHandlerManager::GetMatchingFileHandlerUrls(
const webapps::AppId& app_id,
const std::vector<base::FilePath>& launch_files) { … }
bool WebAppFileHandlerManager::ShouldOsIntegrationBeEnabled(
const webapps::AppId& app_id) const { … }
}