#include "chrome/browser/devtools/devtools_eye_dropper.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/shared_memory_mapping.h"
#include "build/build_config.h"
#include "cc/paint/skia_paint_canvas.h"
#include "components/viz/common/features.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "media/base/limits.h"
#include "media/base/video_frame.h"
#include "media/capture/mojom/video_capture_buffer.mojom.h"
#include "media/capture/mojom/video_capture_types.mojom.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "skia/ext/legacy_display_globals.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
#include "ui/gfx/geometry/size_conversions.h"
DevToolsEyeDropper::DevToolsEyeDropper(content::WebContents* web_contents,
EyeDropperCallback callback)
: … { … }
DevToolsEyeDropper::~DevToolsEyeDropper() { … }
void DevToolsEyeDropper::AttachToHost(content::RenderFrameHost* frame_host) { … }
void DevToolsEyeDropper::DetachFromHost() { … }
void DevToolsEyeDropper::RenderFrameCreated(
content::RenderFrameHost* frame_host) { … }
void DevToolsEyeDropper::RenderFrameDeleted(
content::RenderFrameHost* frame_host) { … }
void DevToolsEyeDropper::RenderFrameHostChanged(
content::RenderFrameHost* old_host,
content::RenderFrameHost* new_host) { … }
void DevToolsEyeDropper::ResetFrame() { … }
bool DevToolsEyeDropper::HandleMouseEvent(const blink::WebMouseEvent& event) { … }
void DevToolsEyeDropper::UpdateCursor() { … }
void DevToolsEyeDropper::OnFrameCaptured(
::media::mojom::VideoBufferHandlePtr data,
::media::mojom::VideoFrameInfoPtr info,
const gfx::Rect& content_rect,
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
callbacks) { … }
void DevToolsEyeDropper::OnNewSubCaptureTargetVersion(
uint32_t sub_capture_target_version) { … }
void DevToolsEyeDropper::OnFrameWithEmptyRegionCapture() { … }
void DevToolsEyeDropper::OnStopped() { … }