Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ppapi / api / private / ppb_find_private.idl
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
6 /**
7  * This file defines the <code>PPB_Find_Private</code> interface.
8  */
9
10 [generate_thunk]
11
12 label Chrome {
13   M14 = 0.3
14 };
15
16 /**
17  * This is a private interface for doing browser Find in the PDF plugin.
18  */
19 interface PPB_Find_Private {
20   /**
21    * Sets the instance of this plugin as the mechanism that will be used to
22    * handle find requests in the renderer. This will only succeed if the plugin
23    * is embedded within the content of the top level frame. Note that this will
24    * result in the renderer handing over all responsibility for doing find to
25    * the plugin and content from the rest of the page will not be searched.
26    *
27    *
28    * In the case that the plugin is loaded directly as the top level document,
29    * this function does not need to be called. In that case the plugin is
30    * assumed to handle find requests.
31    *
32    * There can only be one plugin which handles find requests. If a plugin calls
33    * this while an existing plugin is registered, the existing plugin will be
34    * de-registered and will no longer receive any requests.
35    */
36   void SetPluginToHandleFindRequests(
37       [in] PP_Instance instance);
38
39   /**
40    * Updates the number of find results for the current search term.  If
41    * there are no matches 0 should be passed in.  Only when the plugin has
42    * finished searching should it pass in the final count with final_result set
43    * to PP_TRUE.
44    */
45   void NumberOfFindResultsChanged(
46       [in] PP_Instance instance,
47       [in] int32_t total,
48       [in] PP_Bool final_result);
49
50   /**
51    * Updates the index of the currently selected search item.
52    */
53   void SelectedFindResultChanged(
54       [in] PP_Instance instance,
55       [in] int32_t index);
56
57   /**
58    * Updates the tickmarks on the scrollbar for the find request. |tickmarks|
59    * contains |count| PP_Rects indicating the tickmark ranges.
60    */
61   void SetTickmarks(
62       [in] PP_Instance instance,
63       [in, size_as=count] PP_Rect[] tickmarks,
64       [in] uint32_t count);
65 };
66