chromium/chrome/browser/shortcuts/create_shortcut_for_current_web_contents_task.h

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

#ifndef CHROME_BROWSER_SHORTCUTS_CREATE_SHORTCUT_FOR_CURRENT_WEB_CONTENTS_TASK_H_
#define CHROME_BROWSER_SHORTCUTS_CREATE_SHORTCUT_FOR_CURRENT_WEB_CONTENTS_TASK_H_

#include <memory>

#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/shortcuts/document_icon_fetcher_task.h"
#include "chrome/browser/shortcuts/shortcut_creator.h"
#include "content/public/browser/document_user_data.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/image/image_family.h"

namespace content {
class WebContents;
class RenderFrameHost;
class Page;
enum class Visibility;
}  // namespace content

namespace gfx {
class ImageSkia;
class ImageFamily;
}  // namespace gfx

namespace shortcuts {

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class ShortcutCreationTaskResult {};

// Used to perform the actions needed to create the shortcut on the UI thread.
// This usually involves downloading icons and badging them before passing them
// on to the OS specific code to create the shortcuts.
class CreateShortcutForCurrentWebContentsTask
    : public content::DocumentUserData<CreateShortcutForCurrentWebContentsTask>,
      public content::WebContentsObserver {};

}  // namespace shortcuts

#endif  // CHROME_BROWSER_SHORTCUTS_CREATE_SHORTCUT_FOR_CURRENT_WEB_CONTENTS_TASK_H_