| Index: ppapi/cpp/dev/find_dev.cc
|
| ===================================================================
|
| --- ppapi/cpp/dev/find_dev.cc (revision 65116)
|
| +++ ppapi/cpp/dev/find_dev.cc (working copy)
|
| @@ -5,6 +5,7 @@
|
| #include "ppapi/cpp/dev/find_dev.h"
|
|
|
| #include "ppapi/c/dev/ppb_find_dev.h"
|
| +#include "ppapi/cpp/common.h"
|
| #include "ppapi/cpp/instance.h"
|
| #include "ppapi/cpp/module.h"
|
| #include "ppapi/cpp/module_impl.h"
|
| @@ -15,21 +16,23 @@
|
|
|
| static const char kPPPFindInterface[] = PPP_FIND_DEV_INTERFACE;
|
|
|
| -bool StartFind(PP_Instance instance,
|
| - const char* text,
|
| - bool case_sensitive) {
|
| +PP_Bool StartFind(PP_Instance instance,
|
| + const char* text,
|
| + PP_Bool case_sensitive) {
|
| void* object =
|
| pp::Instance::GetPerInstanceObject(instance, kPPPFindInterface);
|
| if (!object)
|
| - return false;
|
| - return static_cast<Find_Dev*>(object)->StartFind(text, case_sensitive);
|
| + return PP_FALSE;
|
| + bool return_value = static_cast<Find_Dev*>(object)->StartFind(
|
| + text, PPBoolToBool(case_sensitive));
|
| + return BoolToPPBool(return_value);
|
| }
|
|
|
| -void SelectFindResult(PP_Instance instance, bool forward) {
|
| +void SelectFindResult(PP_Instance instance, PP_Bool forward) {
|
| void* object =
|
| pp::Instance::GetPerInstanceObject(instance, kPPPFindInterface);
|
| if (object)
|
| - static_cast<Find_Dev*>(object)->SelectFindResult(forward);
|
| + static_cast<Find_Dev*>(object)->SelectFindResult(PPBoolToBool(forward));
|
| }
|
|
|
| void StopFind(PP_Instance instance) {
|
| @@ -61,7 +64,8 @@
|
| void Find_Dev::NumberOfFindResultsChanged(int32_t total, bool final_result) {
|
| if (ppb_find_f) {
|
| ppb_find_f->NumberOfFindResultsChanged(associated_instance_->pp_instance(),
|
| - total, final_result);
|
| + total,
|
| + BoolToPPBool(final_result));
|
| }
|
| }
|
|
|
|
|