[unseasoned-pdf] Implement WebPlugin find methods for PdfViewWebPlugin
Implement StartFind, SelectFindResult and StopFind in PdfViewWebPlugin. Bug: 1199999 Change-Id: If614ae4294c00b0447b9c9e3803fe14bb421ad14 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2916643 Commit-Queue: Ankit Kumar 🌪️ <ankk@microsoft.com> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Auto-Submit: Ankit Kumar 🌪️ <ankk@microsoft.com> Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Cr-Commit-Position: refs/heads/master@{#886818}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
e40759ea08
commit
f7efaedb6f
@ -363,6 +363,23 @@ bool PdfViewWebPlugin::ExecuteEditCommand(const blink::WebString& name,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PdfViewWebPlugin::StartFind(const blink::WebString& search_text,
|
||||
bool case_sensitive,
|
||||
int /*identifier*/) {
|
||||
engine()->StartFind(search_text.Utf8(), case_sensitive);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PdfViewWebPlugin::SelectFindResult(bool forward, int /*identifier*/) {
|
||||
engine()->SelectFindResult(forward);
|
||||
}
|
||||
|
||||
void PdfViewWebPlugin::StopFind() {
|
||||
engine()->StopFind();
|
||||
// TODO(crbug.com/1199999): Clear tickmarks on scroller when find is
|
||||
// dismissed.
|
||||
}
|
||||
|
||||
blink::WebTextInputType PdfViewWebPlugin::GetPluginTextInputType() {
|
||||
return text_input_type_;
|
||||
}
|
||||
|
@ -111,6 +111,11 @@ class PdfViewWebPlugin final : public PdfViewPluginBase,
|
||||
bool CanRedo() const override;
|
||||
bool ExecuteEditCommand(const blink::WebString& name,
|
||||
const blink::WebString& value) override;
|
||||
bool StartFind(const blink::WebString& search_text,
|
||||
bool case_sensitive,
|
||||
int /*identifier*/) override;
|
||||
void SelectFindResult(bool forward, int /*identifier*/) override;
|
||||
void StopFind() override;
|
||||
blink::WebTextInputType GetPluginTextInputType() override;
|
||||
|
||||
// PdfViewPluginBase:
|
||||
|
Reference in New Issue
Block a user