From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/ui/views/controls/textfield/textfield.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'chromium/ui/views/controls/textfield/textfield.h') 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_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* 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 should_do_learning_; + // Context menu related members. std::unique_ptr context_menu_contents_; std::unique_ptr 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 focus_ring_; + FocusRing* focus_ring_ = nullptr; // The password char reveal index, for testing only. int password_char_reveal_index_ = -1; -- cgit v1.2.1