OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 #include "webkit/plugins/ppapi/ppb_find_impl.h" | |
6 | |
7 #include "webkit/plugins/ppapi/plugin_delegate.h" | |
8 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | |
9 | |
10 using ::ppapi::thunk::PPB_Find_FunctionAPI; | |
11 | |
12 namespace webkit { | |
13 namespace ppapi { | |
14 | |
15 PPB_Find_Impl::PPB_Find_Impl(PluginInstance* instance) : instance_(instance) { | |
16 } | |
17 | |
18 PPB_Find_Impl::~PPB_Find_Impl() { | |
19 } | |
20 | |
21 PPB_Find_FunctionAPI* PPB_Find_Impl::AsPPB_Find_FunctionAPI() { | |
22 return this; | |
23 } | |
24 | |
25 void PPB_Find_Impl::NumberOfFindResultsChanged(PP_Instance instance, | |
26 int32_t total, | |
27 PP_Bool final_result) { | |
28 DCHECK_NE(instance_->find_identifier(), -1); | |
29 instance_->delegate()->NumberOfFindResultsChanged( | |
30 instance_->find_identifier(), total, PP_ToBool(final_result)); | |
31 } | |
32 | |
33 void PPB_Find_Impl::SelectedFindResultChanged(PP_Instance instance, | |
34 int32_t index) { | |
35 DCHECK_NE(instance_->find_identifier(), -1); | |
36 instance_->delegate()->SelectedFindResultChanged( | |
37 instance_->find_identifier(), index); | |
38 } | |
39 | |
40 } // namespace ppapi | |
41 } // namespace webkit | |
OLD | NEW |