| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 44 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 45 #include "content/renderer/pepper/url_request_info_util.h" | 45 #include "content/renderer/pepper/url_request_info_util.h" |
| 46 #include "content/renderer/pepper/url_response_info_util.h" | 46 #include "content/renderer/pepper/url_response_info_util.h" |
| 47 #include "content/renderer/render_frame_impl.h" | 47 #include "content/renderer/render_frame_impl.h" |
| 48 #include "content/renderer/render_thread_impl.h" | 48 #include "content/renderer/render_thread_impl.h" |
| 49 #include "content/renderer/render_view_impl.h" | 49 #include "content/renderer/render_view_impl.h" |
| 50 #include "content/renderer/render_widget.h" | 50 #include "content/renderer/render_widget.h" |
| 51 #include "content/renderer/render_widget_fullscreen_pepper.h" | 51 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 52 #include "content/renderer/sad_plugin.h" | 52 #include "content/renderer/sad_plugin.h" |
| 53 #include "media/base/audio_hardware_config.h" | 53 #include "media/base/audio_hardware_config.h" |
| 54 #include "ppapi/c/dev/ppb_find_dev.h" | |
| 55 #include "ppapi/c/dev/ppb_zoom_dev.h" | 54 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 56 #include "ppapi/c/dev/ppp_find_dev.h" | |
| 57 #include "ppapi/c/dev/ppp_selection_dev.h" | 55 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 58 #include "ppapi/c/dev/ppp_text_input_dev.h" | 56 #include "ppapi/c/dev/ppp_text_input_dev.h" |
| 59 #include "ppapi/c/dev/ppp_zoom_dev.h" | 57 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 60 #include "ppapi/c/pp_rect.h" | 58 #include "ppapi/c/pp_rect.h" |
| 61 #include "ppapi/c/ppb_audio_config.h" | 59 #include "ppapi/c/ppb_audio_config.h" |
| 62 #include "ppapi/c/ppb_core.h" | 60 #include "ppapi/c/ppb_core.h" |
| 63 #include "ppapi/c/ppb_gamepad.h" | 61 #include "ppapi/c/ppb_gamepad.h" |
| 64 #include "ppapi/c/ppp_input_event.h" | 62 #include "ppapi/c/ppp_input_event.h" |
| 65 #include "ppapi/c/ppp_instance.h" | 63 #include "ppapi/c/ppp_instance.h" |
| 66 #include "ppapi/c/ppp_messaging.h" | 64 #include "ppapi/c/ppp_messaging.h" |
| 67 #include "ppapi/c/ppp_mouse_lock.h" | 65 #include "ppapi/c/ppp_mouse_lock.h" |
| 66 #include "ppapi/c/private/ppb_find_private.h" |
| 67 #include "ppapi/c/private/ppp_find_private.h" |
| 68 #include "ppapi/c/private/ppp_instance_private.h" | 68 #include "ppapi/c/private/ppp_instance_private.h" |
| 69 #include "ppapi/c/private/ppp_pdf.h" | 69 #include "ppapi/c/private/ppp_pdf.h" |
| 70 #include "ppapi/host/ppapi_host.h" | 70 #include "ppapi/host/ppapi_host.h" |
| 71 #include "ppapi/proxy/ppapi_messages.h" | 71 #include "ppapi/proxy/ppapi_messages.h" |
| 72 #include "ppapi/proxy/uma_private_resource.h" | 72 #include "ppapi/proxy/uma_private_resource.h" |
| 73 #include "ppapi/proxy/url_loader_resource.h" | 73 #include "ppapi/proxy/url_loader_resource.h" |
| 74 #include "ppapi/shared_impl/ppapi_permissions.h" | 74 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 75 #include "ppapi/shared_impl/ppapi_preferences.h" | 75 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 76 #include "ppapi/shared_impl/ppb_gamepad_shared.h" | 76 #include "ppapi/shared_impl/ppb_gamepad_shared.h" |
| 77 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 77 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 return; | 1385 return; |
| 1386 find_identifier_ = -1; | 1386 find_identifier_ = -1; |
| 1387 plugin_find_interface_->StopFind(pp_instance()); | 1387 plugin_find_interface_->StopFind(pp_instance()); |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 bool PepperPluginInstanceImpl::LoadFindInterface() { | 1390 bool PepperPluginInstanceImpl::LoadFindInterface() { |
| 1391 if (!module_->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) | 1391 if (!module_->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) |
| 1392 return false; | 1392 return false; |
| 1393 if (!plugin_find_interface_) { | 1393 if (!plugin_find_interface_) { |
| 1394 plugin_find_interface_ = | 1394 plugin_find_interface_ = |
| 1395 static_cast<const PPP_Find_Dev*>(module_->GetPluginInterface( | 1395 static_cast<const PPP_Find_Private*>(module_->GetPluginInterface( |
| 1396 PPP_FIND_DEV_INTERFACE)); | 1396 PPP_FIND_PRIVATE_INTERFACE)); |
| 1397 } | 1397 } |
| 1398 | 1398 |
| 1399 return !!plugin_find_interface_; | 1399 return !!plugin_find_interface_; |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 bool PepperPluginInstanceImpl::LoadInputEventInterface() { | 1402 bool PepperPluginInstanceImpl::LoadInputEventInterface() { |
| 1403 if (!checked_for_plugin_input_event_interface_) { | 1403 if (!checked_for_plugin_input_event_interface_) { |
| 1404 checked_for_plugin_input_event_interface_ = true; | 1404 checked_for_plugin_input_event_interface_ = true; |
| 1405 plugin_input_event_interface_ = | 1405 plugin_input_event_interface_ = |
| 1406 static_cast<const PPP_InputEvent*>(module_->GetPluginInterface( | 1406 static_cast<const PPP_InputEvent*>(module_->GetPluginInterface( |
| (...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3157 // Running out-of-process. Initiate an IPC call to notify the plugin | 3157 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3158 // process. | 3158 // process. |
| 3159 ppapi::proxy::HostDispatcher* dispatcher = | 3159 ppapi::proxy::HostDispatcher* dispatcher = |
| 3160 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3160 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3161 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3161 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3162 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3162 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3163 } | 3163 } |
| 3164 } | 3164 } |
| 3165 | 3165 |
| 3166 } // namespace content | 3166 } // namespace content |
| OLD | NEW |