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.
6 /* From private/ppb_find_private.idl modified Thu Mar 13 11:56:31 2014. */
8 #ifndef PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h"
16 #define PPB_FIND_PRIVATE_INTERFACE_0_3 "PPB_Find_Private;0.3"
17 #define PPB_FIND_PRIVATE_INTERFACE PPB_FIND_PRIVATE_INTERFACE_0_3
21 * This file defines the <code>PPB_Find_Private</code> interface.
26 * @addtogroup Interfaces
30 * This is a private interface for doing browser Find in the PDF plugin.
32 struct PPB_Find_Private_0_3
{
34 * Sets the instance of this plugin as the mechanism that will be used to
35 * handle find requests in the renderer. This will only succeed if the plugin
36 * is embedded within the content of the top level frame. Note that this will
37 * result in the renderer handing over all responsibility for doing find to
38 * the plugin and content from the rest of the page will not be searched.
41 * In the case that the plugin is loaded directly as the top level document,
42 * this function does not need to be called. In that case the plugin is
43 * assumed to handle find requests.
45 * There can only be one plugin which handles find requests. If a plugin calls
46 * this while an existing plugin is registered, the existing plugin will be
47 * de-registered and will no longer receive any requests.
49 void (*SetPluginToHandleFindRequests
)(PP_Instance instance
);
51 * Updates the number of find results for the current search term. If
52 * there are no matches 0 should be passed in. Only when the plugin has
53 * finished searching should it pass in the final count with final_result set
56 void (*NumberOfFindResultsChanged
)(PP_Instance instance
,
58 PP_Bool final_result
);
60 * Updates the index of the currently selected search item.
62 void (*SelectedFindResultChanged
)(PP_Instance instance
, int32_t index
);
65 typedef struct PPB_Find_Private_0_3 PPB_Find_Private
;
70 #endif /* PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_ */