| Index: content/browser/renderer_host/text_input_manager.cc
|
| diff --git a/content/browser/renderer_host/text_input_manager.cc b/content/browser/renderer_host/text_input_manager.cc
|
| index c327c98b174fa88b337c5adedf857de8f45b549a..7caada8c9f6ae186b849b0ed0d414d299fa56114 100644
|
| --- a/content/browser/renderer_host/text_input_manager.cc
|
| +++ b/content/browser/renderer_host/text_input_manager.cc
|
| @@ -236,9 +236,10 @@ void TextInputManager::ImeCompositionRangeChanged(
|
| void TextInputManager::SelectionChanged(RenderWidgetHostViewBase* view,
|
| const base::string16& text,
|
| size_t offset,
|
| - const gfx::Range& range) {
|
| + const gfx::Range& range,
|
| + bool user_initiated) {
|
| DCHECK(IsRegistered(view));
|
| - text_selection_map_[view].SetSelection(text, offset, range);
|
| + text_selection_map_[view].SetSelection(text, offset, range, user_initiated);
|
| for (auto& observer : observer_list_)
|
| observer.OnTextSelectionChanged(this, view);
|
| }
|
| @@ -318,8 +319,7 @@ TextInputManager::CompositionRangeInfo::CompositionRangeInfo(
|
|
|
| TextInputManager::CompositionRangeInfo::~CompositionRangeInfo() {}
|
|
|
| -TextInputManager::TextSelection::TextSelection()
|
| - : offset_(0), range_(gfx::Range::InvalidRange()) {}
|
| +TextInputManager::TextSelection::TextSelection() {}
|
|
|
| TextInputManager::TextSelection::TextSelection(const TextSelection& other) =
|
| default;
|
| @@ -328,11 +328,13 @@ TextInputManager::TextSelection::~TextSelection() {}
|
|
|
| void TextInputManager::TextSelection::SetSelection(const base::string16& text,
|
| size_t offset,
|
| - const gfx::Range& range) {
|
| + const gfx::Range& range,
|
| + bool user_initiated) {
|
| text_ = text;
|
| range_.set_start(range.start());
|
| range_.set_end(range.end());
|
| offset_ = offset;
|
| + user_initiated_ = user_initiated;
|
|
|
| // Update the selected text.
|
| selected_text_.clear();
|
|
|