summaryrefslogtreecommitdiffstats
path: root/ppapi/api/private/ppb_find_private.idl
blob: e6f7cfa72835331f0fb26284c80e78a32d945e7c (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Copyright 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/**
 * This file defines the <code>PPB_Find_Private</code> interface.
 */

[generate_thunk]

label Chrome {
  M14 = 0.3
};

/**
 * This is a private interface for doing browser Find in the PDF plugin.
 */
interface PPB_Find_Private {
  /**
   * Sets the instance of this plugin as the mechanism that will be used to
   * handle find requests in the renderer. This will only succeed if the plugin
   * is embedded within the content of the top level frame. Note that this will
   * result in the renderer handing over all responsibility for doing find to
   * the plugin and content from the rest of the page will not be searched.
   *
   *
   * In the case that the plugin is loaded directly as the top level document,
   * this function does not need to be called. In that case the plugin is
   * assumed to handle find requests.
   *
   * There can only be one plugin which handles find requests. If a plugin calls
   * this while an existing plugin is registered, the existing plugin will be
   * de-registered and will no longer receive any requests.
   */
  void SetPluginToHandleFindRequests(
      [in] PP_Instance instance);

  /**
   * Updates the number of find results for the current search term.  If
   * there are no matches 0 should be passed in.  Only when the plugin has
   * finished searching should it pass in the final count with final_result set
   * to PP_TRUE.
   */
  void NumberOfFindResultsChanged(
      [in] PP_Instance instance,
      [in] int32_t total,
      [in] PP_Bool final_result);

  /**
   * Updates the index of the currently selected search item.
   */
  void SelectedFindResultChanged(
      [in] PP_Instance instance,
      [in] int32_t index);

  /**
   * Updates the tickmarks on the scrollbar for the find request. |tickmarks|
   * contains |count| PP_Rects indicating the tickmark ranges.
   */
  void SetTickmarks(
      [in] PP_Instance instance,
      [in, size_as=count] PP_Rect[] tickmarks,
      [in] uint32_t count);
};