blob: e6f7cfa72835331f0fb26284c80e78a32d945e7c [file] [log] [blame]
/* 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);
};