SmartClipProvider.java revision 116680a4aac90f2aa7413d9095a592090648e557
1// Copyright 2014 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 5package org.chromium.content.browser; 6 7import android.os.Handler; 8 9/** 10 * An interface to provide smart clip data when requested. 11 * 12 * NOTE: Some platforms may call these functions to extract smart clip data. 13 * Please make sure implementation of them is somewhere in the view 14 * hierarchy. 15 */ 16public interface SmartClipProvider { 17 /** 18 * Initiate extraction of text, HTML, and other information for clipping puposes (smart clip) 19 * from the rectangle area defined by starting positions (x and y), and width and height. 20 */ 21 void extractSmartClipData(int x, int y, int width, int height); 22 23 /** 24 * Register a handler to handle smart clip data once extraction is done. 25 */ 26 void setSmartClipResultHandler(final Handler resultHandler); 27} 28