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 25 matching lines...) Expand all Loading... |
36 #include "content/renderer/pepper/message_channel.h" | 36 #include "content/renderer/pepper/message_channel.h" |
37 #include "content/renderer/pepper/npapi_glue.h" | 37 #include "content/renderer/pepper/npapi_glue.h" |
38 #include "content/renderer/pepper/pepper_browser_connection.h" | 38 #include "content/renderer/pepper/pepper_browser_connection.h" |
39 #include "content/renderer/pepper/pepper_compositor_host.h" | 39 #include "content/renderer/pepper/pepper_compositor_host.h" |
40 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" | 40 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" |
41 #include "content/renderer/pepper/pepper_graphics_2d_host.h" | 41 #include "content/renderer/pepper/pepper_graphics_2d_host.h" |
42 #include "content/renderer/pepper/pepper_in_process_router.h" | 42 #include "content/renderer/pepper/pepper_in_process_router.h" |
43 #include "content/renderer/pepper/pepper_url_loader_host.h" | 43 #include "content/renderer/pepper/pepper_url_loader_host.h" |
44 #include "content/renderer/pepper/plugin_module.h" | 44 #include "content/renderer/pepper/plugin_module.h" |
45 #include "content/renderer/pepper/plugin_object.h" | 45 #include "content/renderer/pepper/plugin_object.h" |
| 46 #include "content/renderer/pepper/ppapi_preferences_builder.h" |
46 #include "content/renderer/pepper/ppb_buffer_impl.h" | 47 #include "content/renderer/pepper/ppb_buffer_impl.h" |
47 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" | 48 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
48 #include "content/renderer/pepper/ppb_image_data_impl.h" | 49 #include "content/renderer/pepper/ppb_image_data_impl.h" |
49 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 50 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
50 #include "content/renderer/pepper/url_request_info_util.h" | 51 #include "content/renderer/pepper/url_request_info_util.h" |
51 #include "content/renderer/pepper/url_response_info_util.h" | 52 #include "content/renderer/pepper/url_response_info_util.h" |
52 #include "content/renderer/render_frame_impl.h" | 53 #include "content/renderer/render_frame_impl.h" |
53 #include "content/renderer/render_thread_impl.h" | 54 #include "content/renderer/render_thread_impl.h" |
54 #include "content/renderer/render_view_impl.h" | 55 #include "content/renderer/render_view_impl.h" |
55 #include "content/renderer/render_widget.h" | 56 #include "content/renderer/render_widget.h" |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 bool full_frame) { | 838 bool full_frame) { |
838 if (!render_frame_) | 839 if (!render_frame_) |
839 return false; | 840 return false; |
840 message_channel_.reset(new MessageChannel(this)); | 841 message_channel_.reset(new MessageChannel(this)); |
841 | 842 |
842 full_frame_ = full_frame; | 843 full_frame_ = full_frame; |
843 | 844 |
844 UpdateTouchEventRequest(); | 845 UpdateTouchEventRequest(); |
845 container_->setWantsWheelEvents(IsAcceptingWheelEvents()); | 846 container_->setWantsWheelEvents(IsAcceptingWheelEvents()); |
846 | 847 |
847 SetGPUHistogram( | 848 SetGPUHistogram(ppapi::Preferences(PpapiPreferencesBuilder::Build( |
848 ppapi::Preferences(render_frame_->render_view()->webkit_preferences()), | 849 render_frame_->render_view()->webkit_preferences())), |
849 arg_names, | 850 arg_names, |
850 arg_values); | 851 arg_values); |
851 | 852 |
852 argn_ = arg_names; | 853 argn_ = arg_names; |
853 argv_ = arg_values; | 854 argv_ = arg_values; |
854 scoped_ptr<const char * []> argn_array(StringVectorToArgArray(argn_)); | 855 scoped_ptr<const char * []> argn_array(StringVectorToArgArray(argn_)); |
855 scoped_ptr<const char * []> argv_array(StringVectorToArgArray(argv_)); | 856 scoped_ptr<const char * []> argv_array(StringVectorToArgArray(argv_)); |
856 bool success = PP_ToBool(instance_interface_->DidCreate( | 857 bool success = PP_ToBool(instance_interface_->DidCreate( |
857 pp_instance(), argn_.size(), argn_array.get(), argv_array.get())); | 858 pp_instance(), argn_.size(), argn_array.get(), argv_array.get())); |
858 // If this is a plugin that hosts external plugins, we should delay messages | 859 // If this is a plugin that hosts external plugins, we should delay messages |
859 // so that the child plugin that's created later will receive all the | 860 // so that the child plugin that's created later will receive all the |
860 // messages. (E.g., NaCl trusted plugin starting a child NaCl app.) | 861 // messages. (E.g., NaCl trusted plugin starting a child NaCl app.) |
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3306 // Running out-of-process. Initiate an IPC call to notify the plugin | 3307 // Running out-of-process. Initiate an IPC call to notify the plugin |
3307 // process. | 3308 // process. |
3308 ppapi::proxy::HostDispatcher* dispatcher = | 3309 ppapi::proxy::HostDispatcher* dispatcher = |
3309 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3310 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3310 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3311 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3311 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3312 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3312 } | 3313 } |
3313 } | 3314 } |
3314 | 3315 |
3315 } // namespace content | 3316 } // namespace content |
OLD | NEW |