#include "third_party/blink/renderer/modules/eyedropper/eye_dropper.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_color_selection_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_color_selection_result.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/scoped_abort_state.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "ui/base/ui_base_features.h"
namespace blink {
class EyeDropper::OpenAbortAlgorithm final : public AbortSignal::Algorithm { … };
constexpr char kNotAvailableMessage[] = …;
EyeDropper::EyeDropper(ExecutionContext* context)
: … { … }
EyeDropper* EyeDropper::Create(ExecutionContext* context) { … }
ScriptPromise<ColorSelectionResult> EyeDropper::open(
ScriptState* script_state,
const ColorSelectionOptions* options,
ExceptionState& exception_state) { … }
void EyeDropper::AbortCallback(AbortSignal* signal) { … }
void EyeDropper::EyeDropperResponseHandler(
std::unique_ptr<ScopedAbortState> scoped_abort_state,
ScriptPromiseResolver<ColorSelectionResult>* resolver,
bool success,
uint32_t color) { … }
void EyeDropper::EndChooser(
std::unique_ptr<ScopedAbortState> scoped_abort_state) { … }
void EyeDropper::RejectPromiseHelper(DOMExceptionCode exception_code,
const WTF::String& message) { … }
void EyeDropper::Trace(Visitor* visitor) const { … }
}