| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "ppapi/c/ppb_audio_config.h" | 60 #include "ppapi/c/ppb_audio_config.h" |
| 61 #include "ppapi/c/ppb_core.h" | 61 #include "ppapi/c/ppb_core.h" |
| 62 #include "ppapi/c/ppb_gamepad.h" | 62 #include "ppapi/c/ppb_gamepad.h" |
| 63 #include "ppapi/c/ppp_input_event.h" | 63 #include "ppapi/c/ppp_input_event.h" |
| 64 #include "ppapi/c/ppp_instance.h" | 64 #include "ppapi/c/ppp_instance.h" |
| 65 #include "ppapi/c/ppp_messaging.h" | 65 #include "ppapi/c/ppp_messaging.h" |
| 66 #include "ppapi/c/ppp_mouse_lock.h" | 66 #include "ppapi/c/ppp_mouse_lock.h" |
| 67 #include "ppapi/c/private/ppp_instance_private.h" | 67 #include "ppapi/c/private/ppp_instance_private.h" |
| 68 #include "ppapi/host/ppapi_host.h" | 68 #include "ppapi/host/ppapi_host.h" |
| 69 #include "ppapi/proxy/ppapi_messages.h" | 69 #include "ppapi/proxy/ppapi_messages.h" |
| 70 #include "ppapi/proxy/uma_private_resource.h" |
| 70 #include "ppapi/proxy/url_loader_resource.h" | 71 #include "ppapi/proxy/url_loader_resource.h" |
| 71 #include "ppapi/shared_impl/ppapi_permissions.h" | 72 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 72 #include "ppapi/shared_impl/ppapi_preferences.h" | 73 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 73 #include "ppapi/shared_impl/ppb_gamepad_shared.h" | 74 #include "ppapi/shared_impl/ppb_gamepad_shared.h" |
| 74 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 75 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 75 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 76 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
| 76 #include "ppapi/shared_impl/ppb_view_shared.h" | 77 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 77 #include "ppapi/shared_impl/ppp_instance_combined.h" | 78 #include "ppapi/shared_impl/ppp_instance_combined.h" |
| 78 #include "ppapi/shared_impl/resource.h" | 79 #include "ppapi/shared_impl/resource.h" |
| 79 #include "ppapi/shared_impl/scoped_pp_resource.h" | 80 #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), | 500 plugin_mouse_lock_interface_(NULL), |
| 500 plugin_pdf_interface_(NULL), | 501 plugin_pdf_interface_(NULL), |
| 501 plugin_private_interface_(NULL), | 502 plugin_private_interface_(NULL), |
| 502 plugin_selection_interface_(NULL), | 503 plugin_selection_interface_(NULL), |
| 503 plugin_textinput_interface_(NULL), | 504 plugin_textinput_interface_(NULL), |
| 504 plugin_zoom_interface_(NULL), | 505 plugin_zoom_interface_(NULL), |
| 505 checked_for_plugin_input_event_interface_(false), | 506 checked_for_plugin_input_event_interface_(false), |
| 506 checked_for_plugin_messaging_interface_(false), | 507 checked_for_plugin_messaging_interface_(false), |
| 507 checked_for_plugin_pdf_interface_(false), | 508 checked_for_plugin_pdf_interface_(false), |
| 508 gamepad_impl_(new GamepadImpl()), | 509 gamepad_impl_(new GamepadImpl()), |
| 510 uma_private_impl_(NULL), |
| 509 plugin_print_interface_(NULL), | 511 plugin_print_interface_(NULL), |
| 510 plugin_graphics_3d_interface_(NULL), | 512 plugin_graphics_3d_interface_(NULL), |
| 511 always_on_top_(false), | 513 always_on_top_(false), |
| 512 fullscreen_container_(NULL), | 514 fullscreen_container_(NULL), |
| 513 flash_fullscreen_(false), | 515 flash_fullscreen_(false), |
| 514 desired_fullscreen_state_(false), | 516 desired_fullscreen_state_(false), |
| 515 sad_plugin_(NULL), | 517 sad_plugin_(NULL), |
| 516 input_event_mask_(0), | 518 input_event_mask_(0), |
| 517 filtered_input_event_mask_(0), | 519 filtered_input_event_mask_(0), |
| 518 text_input_type_(kPluginDefaultTextInputType), | 520 text_input_type_(kPluginDefaultTextInputType), |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID: | 2381 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID: |
| 2380 case ppapi::FLASH_SINGLETON_ID: | 2382 case ppapi::FLASH_SINGLETON_ID: |
| 2381 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID: | 2383 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID: |
| 2382 case ppapi::NETWORK_PROXY_SINGLETON_ID: | 2384 case ppapi::NETWORK_PROXY_SINGLETON_ID: |
| 2383 case ppapi::PDF_SINGLETON_ID: | 2385 case ppapi::PDF_SINGLETON_ID: |
| 2384 case ppapi::TRUETYPE_FONT_SINGLETON_ID: | 2386 case ppapi::TRUETYPE_FONT_SINGLETON_ID: |
| 2385 NOTIMPLEMENTED(); | 2387 NOTIMPLEMENTED(); |
| 2386 return NULL; | 2388 return NULL; |
| 2387 case ppapi::GAMEPAD_SINGLETON_ID: | 2389 case ppapi::GAMEPAD_SINGLETON_ID: |
| 2388 return gamepad_impl_.get(); | 2390 return gamepad_impl_.get(); |
| 2391 case ppapi::UMA_SINGLETON_ID: { |
| 2392 if (!uma_private_impl_) { |
| 2393 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
| 2394 if (host_impl->in_process_router()) { |
| 2395 uma_private_impl_ = new ppapi::proxy::UMAPrivateResource( |
| 2396 host_impl->in_process_router()->GetPluginConnection(instance), |
| 2397 instance); |
| 2398 } |
| 2399 } |
| 2400 return uma_private_impl_.get(); |
| 2401 } |
| 2389 } | 2402 } |
| 2390 | 2403 |
| 2391 NOTREACHED(); | 2404 NOTREACHED(); |
| 2392 return NULL; | 2405 return NULL; |
| 2393 } | 2406 } |
| 2394 | 2407 |
| 2395 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance, | 2408 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance, |
| 2396 uint32_t event_classes) { | 2409 uint32_t event_classes) { |
| 2397 input_event_mask_ |= event_classes; | 2410 input_event_mask_ |= event_classes; |
| 2398 filtered_input_event_mask_ &= ~(event_classes); | 2411 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 | 3067 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3055 // process. | 3068 // process. |
| 3056 ppapi::proxy::HostDispatcher* dispatcher = | 3069 ppapi::proxy::HostDispatcher* dispatcher = |
| 3057 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3070 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3058 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3071 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3059 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3072 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3060 } | 3073 } |
| 3061 } | 3074 } |
| 3062 | 3075 |
| 3063 } // namespace content | 3076 } // namespace content |
| OLD | NEW |