1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30

content / public / android / java / src / org / chromium / content_public / browser / SmartClipProvider.java [blame]

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.content_public.browser;

import android.os.Handler;

import org.chromium.build.annotations.UsedByReflection;

/**
 * An interface to provide smart clip data when requested.
 *
 * NOTE: Some platforms may call these functions to extract smart clip data.
 * Please make sure implementation of them is somewhere in the view
 * hierarchy.
 */
@UsedByReflection("ExternalOemSupport")
public interface SmartClipProvider {
    /**
     * Initiate extraction of text, HTML, and other information for clipping puposes (smart clip)
     * from the rectangle area defined by starting positions (x and y), and width and height.
     */
    @UsedByReflection("ExternalOemSupport")
    void extractSmartClipData(int x, int y, int width, int height);

    /** Register a handler to handle smart clip data once extraction is done. */
    @UsedByReflection("ExternalOemSupport")
    void setSmartClipResultHandler(final Handler resultHandler);
}