| 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 23 matching lines...) Expand all Loading... |
| 34 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" | 34 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" |
| 35 #include "content/renderer/pepper/pepper_graphics_2d_host.h" | 35 #include "content/renderer/pepper/pepper_graphics_2d_host.h" |
| 36 #include "content/renderer/pepper/pepper_in_process_router.h" | 36 #include "content/renderer/pepper/pepper_in_process_router.h" |
| 37 #include "content/renderer/pepper/pepper_platform_context_3d.h" | 37 #include "content/renderer/pepper/pepper_platform_context_3d.h" |
| 38 #include "content/renderer/pepper/pepper_url_loader_host.h" | 38 #include "content/renderer/pepper/pepper_url_loader_host.h" |
| 39 #include "content/renderer/pepper/plugin_module.h" | 39 #include "content/renderer/pepper/plugin_module.h" |
| 40 #include "content/renderer/pepper/plugin_object.h" | 40 #include "content/renderer/pepper/plugin_object.h" |
| 41 #include "content/renderer/pepper/ppb_buffer_impl.h" | 41 #include "content/renderer/pepper/ppb_buffer_impl.h" |
| 42 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" | 42 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
| 43 #include "content/renderer/pepper/ppb_image_data_impl.h" | 43 #include "content/renderer/pepper/ppb_image_data_impl.h" |
| 44 #include "content/renderer/pepper/ppb_uma_private_impl.h" |
| 44 #include "content/renderer/pepper/ppp_pdf.h" | 45 #include "content/renderer/pepper/ppp_pdf.h" |
| 45 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 46 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 46 #include "content/renderer/pepper/url_request_info_util.h" | 47 #include "content/renderer/pepper/url_request_info_util.h" |
| 47 #include "content/renderer/pepper/url_response_info_util.h" | 48 #include "content/renderer/pepper/url_response_info_util.h" |
| 48 #include "content/renderer/render_thread_impl.h" | 49 #include "content/renderer/render_thread_impl.h" |
| 49 #include "content/renderer/render_view_impl.h" | 50 #include "content/renderer/render_view_impl.h" |
| 50 #include "content/renderer/render_widget_fullscreen_pepper.h" | 51 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 51 #include "content/renderer/sad_plugin.h" | 52 #include "content/renderer/sad_plugin.h" |
| 52 #include "media/base/audio_hardware_config.h" | 53 #include "media/base/audio_hardware_config.h" |
| 53 #include "ppapi/c/dev/ppb_find_dev.h" | 54 #include "ppapi/c/dev/ppb_find_dev.h" |
| 54 #include "ppapi/c/dev/ppb_zoom_dev.h" | 55 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 55 #include "ppapi/c/dev/ppp_find_dev.h" | 56 #include "ppapi/c/dev/ppp_find_dev.h" |
| 56 #include "ppapi/c/dev/ppp_selection_dev.h" | 57 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 57 #include "ppapi/c/dev/ppp_text_input_dev.h" | 58 #include "ppapi/c/dev/ppp_text_input_dev.h" |
| 58 #include "ppapi/c/dev/ppp_zoom_dev.h" | 59 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 59 #include "ppapi/c/pp_rect.h" | 60 #include "ppapi/c/pp_rect.h" |
| 60 #include "ppapi/c/ppb_audio_config.h" | 61 #include "ppapi/c/ppb_audio_config.h" |
| 61 #include "ppapi/c/ppb_core.h" | 62 #include "ppapi/c/ppb_core.h" |
| 62 #include "ppapi/c/ppb_gamepad.h" | 63 #include "ppapi/c/ppb_gamepad.h" |
| 63 #include "ppapi/c/ppp_input_event.h" | 64 #include "ppapi/c/ppp_input_event.h" |
| 64 #include "ppapi/c/ppp_instance.h" | 65 #include "ppapi/c/ppp_instance.h" |
| 65 #include "ppapi/c/ppp_messaging.h" | 66 #include "ppapi/c/ppp_messaging.h" |
| 66 #include "ppapi/c/ppp_mouse_lock.h" | 67 #include "ppapi/c/ppp_mouse_lock.h" |
| 67 #include "ppapi/c/private/ppp_instance_private.h" | 68 #include "ppapi/c/private/ppp_instance_private.h" |
| 68 #include "ppapi/host/ppapi_host.h" | 69 #include "ppapi/host/ppapi_host.h" |
| 69 #include "ppapi/proxy/ppapi_messages.h" | 70 #include "ppapi/proxy/ppapi_messages.h" |
| 71 #include "ppapi/proxy/uma_private_resource.h" |
| 70 #include "ppapi/proxy/url_loader_resource.h" | 72 #include "ppapi/proxy/url_loader_resource.h" |
| 71 #include "ppapi/shared_impl/ppapi_permissions.h" | 73 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 72 #include "ppapi/shared_impl/ppapi_preferences.h" | 74 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 73 #include "ppapi/shared_impl/ppb_gamepad_shared.h" | 75 #include "ppapi/shared_impl/ppb_gamepad_shared.h" |
| 74 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 76 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 75 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 77 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
| 76 #include "ppapi/shared_impl/ppb_view_shared.h" | 78 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 77 #include "ppapi/shared_impl/ppp_instance_combined.h" | 79 #include "ppapi/shared_impl/ppp_instance_combined.h" |
| 78 #include "ppapi/shared_impl/resource.h" | 80 #include "ppapi/shared_impl/resource.h" |
| 79 #include "ppapi/shared_impl/scoped_pp_resource.h" | 81 #include "ppapi/shared_impl/scoped_pp_resource.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 plugin_mouse_lock_interface_(NULL), | 501 plugin_mouse_lock_interface_(NULL), |
| 500 plugin_pdf_interface_(NULL), | 502 plugin_pdf_interface_(NULL), |
| 501 plugin_private_interface_(NULL), | 503 plugin_private_interface_(NULL), |
| 502 plugin_selection_interface_(NULL), | 504 plugin_selection_interface_(NULL), |
| 503 plugin_textinput_interface_(NULL), | 505 plugin_textinput_interface_(NULL), |
| 504 plugin_zoom_interface_(NULL), | 506 plugin_zoom_interface_(NULL), |
| 505 checked_for_plugin_input_event_interface_(false), | 507 checked_for_plugin_input_event_interface_(false), |
| 506 checked_for_plugin_messaging_interface_(false), | 508 checked_for_plugin_messaging_interface_(false), |
| 507 checked_for_plugin_pdf_interface_(false), | 509 checked_for_plugin_pdf_interface_(false), |
| 508 gamepad_impl_(new GamepadImpl()), | 510 gamepad_impl_(new GamepadImpl()), |
| 511 uma_private_impl_(NULL), |
| 509 plugin_print_interface_(NULL), | 512 plugin_print_interface_(NULL), |
| 510 plugin_graphics_3d_interface_(NULL), | 513 plugin_graphics_3d_interface_(NULL), |
| 511 always_on_top_(false), | 514 always_on_top_(false), |
| 512 fullscreen_container_(NULL), | 515 fullscreen_container_(NULL), |
| 513 flash_fullscreen_(false), | 516 flash_fullscreen_(false), |
| 514 desired_fullscreen_state_(false), | 517 desired_fullscreen_state_(false), |
| 515 sad_plugin_(NULL), | 518 sad_plugin_(NULL), |
| 516 input_event_mask_(0), | 519 input_event_mask_(0), |
| 517 filtered_input_event_mask_(0), | 520 filtered_input_event_mask_(0), |
| 518 text_input_type_(kPluginDefaultTextInputType), | 521 text_input_type_(kPluginDefaultTextInputType), |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID: | 2382 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID: |
| 2380 case ppapi::FLASH_SINGLETON_ID: | 2383 case ppapi::FLASH_SINGLETON_ID: |
| 2381 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID: | 2384 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID: |
| 2382 case ppapi::NETWORK_PROXY_SINGLETON_ID: | 2385 case ppapi::NETWORK_PROXY_SINGLETON_ID: |
| 2383 case ppapi::PDF_SINGLETON_ID: | 2386 case ppapi::PDF_SINGLETON_ID: |
| 2384 case ppapi::TRUETYPE_FONT_SINGLETON_ID: | 2387 case ppapi::TRUETYPE_FONT_SINGLETON_ID: |
| 2385 NOTIMPLEMENTED(); | 2388 NOTIMPLEMENTED(); |
| 2386 return NULL; | 2389 return NULL; |
| 2387 case ppapi::GAMEPAD_SINGLETON_ID: | 2390 case ppapi::GAMEPAD_SINGLETON_ID: |
| 2388 return gamepad_impl_.get(); | 2391 return gamepad_impl_.get(); |
| 2392 case ppapi::UMA_SINGLETON_ID: { |
| 2393 if (!uma_private_impl_) { |
| 2394 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
| 2395 if (host_impl->in_process_router()) { |
| 2396 uma_private_impl_ = new ppapi::proxy::UMAPrivateResource( |
| 2397 host_impl->in_process_router()->GetPluginConnection(instance), |
| 2398 instance); |
| 2399 } |
| 2400 } |
| 2401 return uma_private_impl_.get(); |
| 2402 } |
| 2389 } | 2403 } |
| 2390 | 2404 |
| 2391 NOTREACHED(); | 2405 NOTREACHED(); |
| 2392 return NULL; | 2406 return NULL; |
| 2393 } | 2407 } |
| 2394 | 2408 |
| 2395 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance, | 2409 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance, |
| 2396 uint32_t event_classes) { | 2410 uint32_t event_classes) { |
| 2397 input_event_mask_ |= event_classes; | 2411 input_event_mask_ |= event_classes; |
| 2398 filtered_input_event_mask_ &= ~(event_classes); | 2412 filtered_input_event_mask_ &= ~(event_classes); |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3054 // Running out-of-process. Initiate an IPC call to notify the plugin | 3068 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3055 // process. | 3069 // process. |
| 3056 ppapi::proxy::HostDispatcher* dispatcher = | 3070 ppapi::proxy::HostDispatcher* dispatcher = |
| 3057 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3071 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3058 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3072 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3059 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3073 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3060 } | 3074 } |
| 3061 } | 3075 } |
| 3062 | 3076 |
| 3063 } // namespace content | 3077 } // namespace content |
| OLD | NEW |