[PDF Ink Signatures] Store a full ui::Cursor in PdfViewWebPlugin
Take a step towards implementing custom cursors by storing a full cursor object, instead of just a cursor type in PdfViewWebPlugin. Bug: 342602620 Change-Id: I992f625128677cb284151aadbb885bb1f035cb33 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5758190 Reviewed-by: Andy Phan <andyphan@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1340601}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
a3e8054654
commit
f9024522d2
@ -604,7 +604,7 @@ blink::WebInputEventResult PdfViewWebPlugin::HandleInputEvent(
|
||||
? blink::WebInputEventResult::kHandledApplication
|
||||
: blink::WebInputEventResult::kNotHandled;
|
||||
|
||||
*cursor = cursor_type_;
|
||||
*cursor = cursor_;
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -916,7 +916,7 @@ void PdfViewWebPlugin::NavigateToDestination(int page,
|
||||
}
|
||||
|
||||
void PdfViewWebPlugin::UpdateCursor(ui::mojom::CursorType new_cursor_type) {
|
||||
cursor_type_ = new_cursor_type;
|
||||
cursor_ = new_cursor_type;
|
||||
}
|
||||
|
||||
void PdfViewWebPlugin::UpdateTickMarks(
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "third_party/blink/public/web/web_print_params.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/base/cursor/cursor.h"
|
||||
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
@ -668,7 +669,7 @@ class PdfViewWebPlugin final : public PDFiumEngineClient,
|
||||
base::OnceCallback<void(const std::string&)> password_callback_;
|
||||
|
||||
// The current cursor type.
|
||||
ui::mojom::CursorType cursor_type_ = ui::mojom::CursorType::kPointer;
|
||||
ui::Cursor cursor_ = ui::mojom::CursorType::kPointer;
|
||||
|
||||
blink::WebTextInputType text_input_type_ =
|
||||
blink::WebTextInputType::kWebTextInputTypeNone;
|
||||
|
Reference in New Issue
Block a user