| 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 | 1298 |
| 1299 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { | 1299 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { |
| 1300 text_input_type_ = type; | 1300 text_input_type_ = type; |
| 1301 render_frame_->PepperTextInputTypeChanged(this); | 1301 render_frame_->PepperTextInputTypeChanged(this); |
| 1302 } | 1302 } |
| 1303 | 1303 |
| 1304 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { | 1304 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { |
| 1305 message_channel_->PostMessageToJavaScript(message); | 1305 message_channel_->PostMessageToJavaScript(message); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( |
| 1309 PP_Instance instance, |
| 1310 void* user_data, |
| 1311 const PPP_MessageHandler_0_1* handler, |
| 1312 PP_Resource message_loop) { |
| 1313 // Not supported in-process. |
| 1314 NOTIMPLEMENTED(); |
| 1315 return PP_ERROR_FAILED; |
| 1316 } |
| 1317 |
| 1318 void PepperPluginInstanceImpl::UnregisterMessageHandler(PP_Instance instance) { |
| 1319 // Not supported in-process. |
| 1320 NOTIMPLEMENTED(); |
| 1321 } |
| 1322 |
| 1308 base::string16 PepperPluginInstanceImpl::GetSelectedText(bool html) { | 1323 base::string16 PepperPluginInstanceImpl::GetSelectedText(bool html) { |
| 1309 // Keep a reference on the stack. See NOTE above. | 1324 // Keep a reference on the stack. See NOTE above. |
| 1310 scoped_refptr<PepperPluginInstanceImpl> ref(this); | 1325 scoped_refptr<PepperPluginInstanceImpl> ref(this); |
| 1311 if (!LoadSelectionInterface()) | 1326 if (!LoadSelectionInterface()) |
| 1312 return selected_text_; | 1327 return selected_text_; |
| 1313 | 1328 |
| 1314 PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(), | 1329 PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(), |
| 1315 PP_FromBool(html)); | 1330 PP_FromBool(html)); |
| 1316 StringVar* string = StringVar::FromPPVar(rv); | 1331 StringVar* string = StringVar::FromPPVar(rv); |
| 1317 base::string16 selection; | 1332 base::string16 selection; |
| (...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3199 // Running out-of-process. Initiate an IPC call to notify the plugin | 3214 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3200 // process. | 3215 // process. |
| 3201 ppapi::proxy::HostDispatcher* dispatcher = | 3216 ppapi::proxy::HostDispatcher* dispatcher = |
| 3202 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3217 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3203 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3218 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3204 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3219 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3205 } | 3220 } |
| 3206 } | 3221 } |
| 3207 | 3222 |
| 3208 } // namespace content | 3223 } // namespace content |
| OLD | NEW |