OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 bool case_sensitive, | 1356 bool case_sensitive, |
1357 int identifier) { | 1357 int identifier) { |
1358 // Keep a reference on the stack. See NOTE above. | 1358 // Keep a reference on the stack. See NOTE above. |
1359 scoped_refptr<PepperPluginInstanceImpl> ref(this); | 1359 scoped_refptr<PepperPluginInstanceImpl> ref(this); |
1360 if (!LoadFindInterface()) | 1360 if (!LoadFindInterface()) |
1361 return false; | 1361 return false; |
1362 find_identifier_ = identifier; | 1362 find_identifier_ = identifier; |
1363 return PP_ToBool( | 1363 return PP_ToBool( |
1364 plugin_find_interface_->StartFind( | 1364 plugin_find_interface_->StartFind( |
1365 pp_instance(), | 1365 pp_instance(), |
1366 base::UTF16ToUTF8(search_text.c_str()).c_str(), | 1366 base::UTF16ToUTF8(search_text).c_str(), |
1367 PP_FromBool(case_sensitive))); | 1367 PP_FromBool(case_sensitive))); |
1368 } | 1368 } |
1369 | 1369 |
1370 void PepperPluginInstanceImpl::SelectFindResult(bool forward) { | 1370 void PepperPluginInstanceImpl::SelectFindResult(bool forward) { |
1371 // Keep a reference on the stack. See NOTE above. | 1371 // Keep a reference on the stack. See NOTE above. |
1372 scoped_refptr<PepperPluginInstanceImpl> ref(this); | 1372 scoped_refptr<PepperPluginInstanceImpl> ref(this); |
1373 if (LoadFindInterface()) | 1373 if (LoadFindInterface()) |
1374 plugin_find_interface_->SelectFindResult(pp_instance(), | 1374 plugin_find_interface_->SelectFindResult(pp_instance(), |
1375 PP_FromBool(forward)); | 1375 PP_FromBool(forward)); |
1376 } | 1376 } |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3140 // Running out-of-process. Initiate an IPC call to notify the plugin | 3140 // Running out-of-process. Initiate an IPC call to notify the plugin |
3141 // process. | 3141 // process. |
3142 ppapi::proxy::HostDispatcher* dispatcher = | 3142 ppapi::proxy::HostDispatcher* dispatcher = |
3143 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3143 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3144 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3144 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3145 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3145 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3146 } | 3146 } |
3147 } | 3147 } |
3148 | 3148 |
3149 } // namespace content | 3149 } // namespace content |
OLD | NEW |