chromium/chrome/browser/image_editor/screenshot_flow.h

// Copyright 2021 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_IMAGE_EDITOR_SCREENSHOT_FLOW_H_
#define CHROME_BROWSER_IMAGE_EDITOR_SCREENSHOT_FLOW_H_

#include <memory>
#include <string>

#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/supports_user_data.h"
#include "build/build_config.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_delegate.h"
#include "ui/events/event.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image.h"

#if BUILDFLAG(IS_MAC)
#include "chrome/browser/image_editor/event_capture_mac.h"
#else
#include "base/scoped_observation.h"
#endif

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

namespace gfx {
class Canvas;
}  // namespace gfx

namespace ui {
class EventTarget;
class Layer;
}  // namespace ui

namespace image_editor {

// Class to associate screenshot capture data with Profile across navigation.
class ScreenshotCapturedData : public base::SupportsUserData::Data {};

// Result codes to distinguish between how the capture mode was closed.
enum class ScreenshotCaptureResultCode {};

// Structure containing image data and any future metadata.
struct ScreenshotCaptureResult {};

// Callback for obtaining image data.
// OnceCallback: This class currently expects to capture only one screenshot,
// then the caller proceeds to the next steps in its user-facing flow.
ScreenshotCaptureCallback;

// ScreenshotFlow allows the user to enter a capture mode where they may drag
// a capture rectangle over a WebContents. The class calls a OnceCallback with
// the screenshot data contained in the region of interest.
class ScreenshotFlow : public content::WebContentsObserver,
                       public ui::LayerDelegate,
                       public ui::EventHandler {};

}  // namespace image_editor

#endif  // CHROME_BROWSER_IMAGE_EDITOR_SCREENSHOT_FLOW_H_