| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateHandler.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateHandler.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9901c927a7c54252fc53587d481be4c04f942b8c
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateHandler.java
|
| @@ -0,0 +1,54 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.chrome.browser.contextualsearch;
|
| +
|
| +import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
|
| +
|
| +/**
|
| + * An interface for driving operations in the Contextual Search Manager's internal state by the
|
| + * {@link ContextualSearchInternalStateController} class.
|
| + */
|
| +public interface ContextualSearchInternalStateHandler {
|
| + /**
|
| + * Hides the Contextual Search user interface.
|
| + */
|
| + void hideContextualSearchUi(StateChangeReason reason);
|
| +
|
| + /**
|
| + * Shows the Contextual Search user interface for a Tap.
|
| + */
|
| + void showContextualSearchTapUi();
|
| +
|
| + /**
|
| + * Shows the Contextual Search user interface for a Long-press.
|
| + */
|
| + void showContextualSearchLongpressUi();
|
| +
|
| + /**
|
| + * Gathers text surrounding the current selection, which may have been created by either a Tap
|
| + * or a Long-press gesture.
|
| + */
|
| + void gatherSurroundingText();
|
| +
|
| + /**
|
| + * Starts the process of deciding if we'll suppress the current gesture or not.
|
| + */
|
| + void decideSuppression();
|
| +
|
| + /**
|
| + * Starts the process of selecting a word around the current caret.
|
| + */
|
| + void startShowingTapUi();
|
| +
|
| + /**
|
| + * Waits to see if a Tap gesture will be made when a previous Tap was recognized.
|
| + */
|
| + void waitForPossibleTapNearPrevious();
|
| +
|
| + /**
|
| + * Starts a Resolve request to our server for the best Search Term.
|
| + */
|
| + void resolveSearchTerm();
|
| +}
|
|
|