1 // Copyright (c) 2012 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.
5 package org.chromium.content.browser.input;
7 import android.view.ViewTreeObserver;
10 * A CursorController instance can be used to control a cursor in the text.
12 interface CursorController extends ViewTreeObserver.OnTouchModeChangeListener {
15 * Hide the cursor controller from screen.
20 * @return true if the CursorController is currently visible
25 * Called when the handle is about to start updating its position.
28 void beforeStartUpdatingPosition(HandleView handle);
31 * Update the controller's position.
33 void updatePosition(HandleView handle, int x, int y);
36 * Called when the view is detached from window. Perform house keeping task, such as
37 * stopping Runnable thread that would otherwise keep a reference on the context, thus
38 * preventing the activity to be recycled.