Chromium Code Reviews| Index: content/browser/renderer_host/text_input_manager.h |
| diff --git a/content/browser/renderer_host/text_input_manager.h b/content/browser/renderer_host/text_input_manager.h |
| index 797f2ee3b7e7af91df122257ea53dacd6eae6413..de6c4125a701580c2e978c5abdfb032ac369349a 100644 |
| --- a/content/browser/renderer_host/text_input_manager.h |
| +++ b/content/browser/renderer_host/text_input_manager.h |
| @@ -105,12 +105,14 @@ class CONTENT_EXPORT TextInputManager { |
| void SetSelection(const base::string16& text, |
| size_t offset, |
| - const gfx::Range& range); |
| + const gfx::Range& range, |
| + bool user_initiated); |
| const base::string16& selected_text() const { return selected_text_; } |
| size_t offset() const { return offset_; } |
| const gfx::Range& range() const { return range_; } |
| const base::string16& text() const { return text_; } |
| + bool user_initiated() const { return user_initiated_; } |
| private: |
| // The offset of the text stored in |text| relative to the start of the web |
| @@ -129,6 +131,9 @@ class CONTENT_EXPORT TextInputManager { |
| // Part of the text on the page which includes the highlighted text plus |
| // possibly several characters before and after it. |
| base::string16 text_; |
| + |
| + // True if text selection is triggered by user input |
|
EhsanK
2017/05/04 00:16:31
(nit) dot at the end?
|
| + bool user_initiated_; |
| }; |
| TextInputManager(); |
| @@ -194,7 +199,8 @@ class CONTENT_EXPORT TextInputManager { |
| void SelectionChanged(RenderWidgetHostViewBase* view, |
| const base::string16& text, |
| size_t offset, |
| - const gfx::Range& range); |
| + const gfx::Range& range, |
| + bool user_initiated); |
| // Registers the given |view| for tracking its TextInputState. This is called |
| // by any view which has updates in its TextInputState (whether tab's RWHV or |