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 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 } | 1379 } |
1380 | 1380 |
1381 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { | 1381 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { |
1382 if (message_channel_) | 1382 if (message_channel_) |
1383 message_channel_->PostMessageToJavaScript(message); | 1383 message_channel_->PostMessageToJavaScript(message); |
1384 } | 1384 } |
1385 | 1385 |
1386 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( | 1386 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( |
1387 PP_Instance instance, | 1387 PP_Instance instance, |
1388 void* user_data, | 1388 void* user_data, |
1389 const PPP_MessageHandler_0_1* handler, | 1389 const PPP_MessageHandler_0_2* handler, |
1390 PP_Resource message_loop) { | 1390 PP_Resource message_loop) { |
1391 // Not supported in-process. | 1391 // Not supported in-process. |
1392 NOTIMPLEMENTED(); | 1392 NOTIMPLEMENTED(); |
| 1393 return PP_ERROR_FAILED; |
| 1394 } |
| 1395 |
| 1396 int32_t PepperPluginInstanceImpl::RegisterMessageHandler_1_1_Deprecated( |
| 1397 PP_Instance instance, |
| 1398 void* user_data, |
| 1399 const PPP_MessageHandler_0_1_Deprecated* handler, |
| 1400 PP_Resource message_loop) { |
| 1401 // Not supported in-process. |
| 1402 NOTIMPLEMENTED(); |
1393 return PP_ERROR_FAILED; | 1403 return PP_ERROR_FAILED; |
1394 } | 1404 } |
1395 | 1405 |
1396 void PepperPluginInstanceImpl::UnregisterMessageHandler(PP_Instance instance) { | 1406 void PepperPluginInstanceImpl::UnregisterMessageHandler(PP_Instance instance) { |
1397 // Not supported in-process. | 1407 // Not supported in-process. |
1398 NOTIMPLEMENTED(); | 1408 NOTIMPLEMENTED(); |
1399 } | 1409 } |
1400 | 1410 |
1401 base::string16 PepperPluginInstanceImpl::GetSelectedText(bool html) { | 1411 base::string16 PepperPluginInstanceImpl::GetSelectedText(bool html) { |
1402 // Keep a reference on the stack. See NOTE above. | 1412 // Keep a reference on the stack. See NOTE above. |
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3367 // Running out-of-process. Initiate an IPC call to notify the plugin | 3377 // Running out-of-process. Initiate an IPC call to notify the plugin |
3368 // process. | 3378 // process. |
3369 ppapi::proxy::HostDispatcher* dispatcher = | 3379 ppapi::proxy::HostDispatcher* dispatcher = |
3370 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3380 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3371 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3381 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3372 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3382 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3373 } | 3383 } |
3374 } | 3384 } |
3375 | 3385 |
3376 } // namespace content | 3386 } // namespace content |
OLD | NEW |