diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/views/controls/textfield/textfield.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/views/controls/textfield/textfield.h')
-rw-r--r-- | chromium/ui/views/controls/textfield/textfield.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chromium/ui/views/controls/textfield/textfield.h b/chromium/ui/views/controls/textfield/textfield.h index 825c45513cf..775ce4f9683 100644 --- a/chromium/ui/views/controls/textfield/textfield.h +++ b/chromium/ui/views/controls/textfield/textfield.h @@ -377,12 +377,20 @@ class VIEWS_EXPORT Textfield : public View, ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; + // Set whether the text should be used to improve typing suggestions. + void SetShouldDoLearning(bool value) { should_do_learning_ = value; } + #if defined(OS_WIN) || defined(OS_CHROMEOS) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override; #endif +#if defined(OS_CHROMEOS) + bool SetAutocorrectRange(const base::string16& autocorrect_text, + const gfx::Range& range) override; +#endif + #if defined(OS_WIN) void GetActiveTextInputControlLayoutBounds( base::Optional<gfx::Rect>* control_bounds, @@ -651,6 +659,9 @@ class VIEWS_EXPORT Textfield : public View, // True if this textfield should use a focus ring to indicate focus. bool use_focus_ring_ = true; + // Whether the text should be used to improve typing suggestions. + base::Optional<bool> should_do_learning_; + // Context menu related members. std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_; std::unique_ptr<ViewsTextServicesContextMenu> text_services_context_menu_; @@ -669,7 +680,7 @@ class VIEWS_EXPORT Textfield : public View, ui::TextInputClient::FOCUS_REASON_NONE; // The focus ring for this TextField. - std::unique_ptr<FocusRing> focus_ring_; + FocusRing* focus_ring_ = nullptr; // The password char reveal index, for testing only. int password_char_reveal_index_ = -1; |