chromium/chrome/browser/apps/app_service/app_icon/app_icon_util.cc

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

#include "chrome/browser/apps/app_service/app_icon/app_icon_util.h"

#include "ash/public/cpp/shelf_types.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/no_destructor.h"
#include "base/strings/stringprintf.h"
#include "base/task/thread_pool.h"
#include "chrome/browser/apps/app_service/app_icon/dip_px_util.h"
#include "components/services/app_service/public/cpp/icon_effects.h"
#include "services/data_decoder/public/cpp/data_decoder.h"
#include "ui/base/resource/resource_scale_factor.h"
#include "ui/gfx/geometry/size.h"

namespace {

constexpr char kAppService[] =;
constexpr char kIcon[] =;

// Template for the icon name.
constexpr char kIconNameTemplate[] =;
constexpr char kMaskableIconNameTemplate[] =;
constexpr char kForegroundIconNameTemplate[] =;
constexpr char kBackgroundIconNameTemplate[] =;

}  // namespace

namespace apps {

data_decoder::DataDecoder& GetIconDataDecoder() {}

base::FilePath GetIconFolderPath(const base::FilePath& base_path,
                                 const std::string& app_id) {}

base::FilePath GetIconPath(const base::FilePath& base_path,
                           const std::string& app_id,
                           int32_t icon_size_in_px,
                           bool is_maskable_icon) {}

base::FilePath GetForegroundIconPath(const base::FilePath& base_path,
                                     const std::string& app_id,
                                     int32_t icon_size_in_px) {}

base::FilePath GetBackgroundIconPath(const base::FilePath& base_path,
                                     const std::string& app_id,
                                     int32_t icon_size_in_px) {}

bool IsAdaptiveIcon(const base::FilePath& base_path,
                    const std::string& app_id,
                    int32_t size_in_dip) {}

bool IsAdaptiveIcon(const base::FilePath& foreground_icon_path,
                    const base::FilePath& background_icon_path) {}

bool HasAdaptiveIconData(const IconValuePtr& iv) {}

IconValuePtr ReadOnBackgroundThread(const base::FilePath& base_path,
                                    const std::string& app_id,
                                    int32_t icon_size_in_px) {}

IconValuePtr ReadAdaptiveIconOnBackgroundThread(const base::FilePath& base_path,
                                                const std::string& app_id,
                                                int32_t icon_size_in_px) {}

std::map<ui::ResourceScaleFactor, IconValuePtr> ReadIconFilesOnBackgroundThread(
    const base::FilePath& base_path,
    const std::string& app_id,
    int32_t size_in_dip) {}

void ScheduleIconFoldersDeletion(const base::FilePath& base_path,
                                 const std::vector<std::string>& ids,
                                 base::OnceCallback<void()> callback) {}

}  // namespace apps