OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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.contextualsearch; |
| 6 |
| 7 import org.chromium.chrome.browser.contextualsearch.ContextualSearchSelectionCon
troller.SelectionType; |
| 8 |
| 9 /** |
| 10 * Defines the interface between a {@link ContextualSearchSelectionController} a
nd the code that |
| 11 * handles callbacks. |
| 12 */ |
| 13 interface ContextualSearchSelectionHandler { |
| 14 /** |
| 15 * Handle a scroll event on the base page. |
| 16 */ |
| 17 public void handleScroll(); |
| 18 |
| 19 /** |
| 20 * Handle a valid tap gesture on the base page. |
| 21 */ |
| 22 public void handleValidTap(); |
| 23 |
| 24 /** |
| 25 * Handle an invalid tap gesture on the base page. |
| 26 */ |
| 27 public void handleInvalidTap(); |
| 28 |
| 29 /** |
| 30 * Handle a new selection of the given type, created at the given x,y positi
on. |
| 31 */ |
| 32 public void handleSelection(String selection, SelectionType type, float x, f
loat y); |
| 33 |
| 34 /** |
| 35 * Handle a modification to the selection, done at the given x,y position. |
| 36 * @param selection The new selection. |
| 37 * @param x The x position of the adjustment. |
| 38 * @param y The y position of the adjustment. |
| 39 */ |
| 40 public void handleSelectionModification(String selection, float x, float y); |
| 41 |
| 42 /** |
| 43 * Called when the selection is cleared. |
| 44 */ |
| 45 public void onClearSelection(); |
| 46 } |
OLD | NEW |