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