1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.chrome.browser.omnibox;
6 
7 /**
8  * Provider of editing text state from the UrlBar/Omnibox.
9  */
10 public interface UrlBarEditingTextStateProvider {
11     /** Return the starting selection index for the text. */
getSelectionStart()12     public int getSelectionStart();
13 
14     /** Return the ending selection index for the text. */
getSelectionEnd()15     public int getSelectionEnd();
16 
17     /** Return whether the view can accept autocomplete. */
shouldAutocomplete()18     public boolean shouldAutocomplete();
19 
20     /** Return whether the last edit was the result of a paste operation. */
wasLastEditPaste()21     public boolean wasLastEditPaste();
22 
23     /** Return the full text with any inline autocomplete. */
getTextWithAutocomplete()24     public String getTextWithAutocomplete();
25 
26     /** Return the text excluding any inline autocomplete. */
getTextWithoutAutocomplete()27     public String getTextWithoutAutocomplete();
28 }
29