Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 7978009: Split ppapi::PluginList from PepperPluginRegistry so that DRT could load pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/pepper_plugin_registry.cc ('k') | content/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_plugin_delegate_impl.h" 5 #include "content/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util_proxy.h" 14 #include "base/file_util_proxy.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/string_split.h" 17 #include "base/string_split.h"
18 #include "base/sync_socket.h" 18 #include "base/sync_socket.h"
19 #include "base/task.h" 19 #include "base/task.h"
20 #include "base/time.h" 20 #include "base/time.h"
21 #include "content/common/child_process.h" 21 #include "content/common/child_process.h"
22 #include "content/common/child_thread.h" 22 #include "content/common/child_thread.h"
23 #include "content/common/content_switches.h" 23 #include "content/common/content_switches.h"
24 #include "content/common/file_system/file_system_dispatcher.h" 24 #include "content/common/file_system/file_system_dispatcher.h"
25 #include "content/common/file_system_messages.h" 25 #include "content/common/file_system_messages.h"
26 #include "content/common/media/audio_messages.h" 26 #include "content/common/media/audio_messages.h"
27 #include "content/common/pepper_file_messages.h" 27 #include "content/common/pepper_file_messages.h"
28 #include "content/common/pepper_messages.h"
28 #include "content/common/pepper_plugin_registry.h" 29 #include "content/common/pepper_plugin_registry.h"
29 #include "content/common/pepper_messages.h"
30 #include "content/common/quota_dispatcher.h" 30 #include "content/common/quota_dispatcher.h"
31 #include "content/common/view_messages.h" 31 #include "content/common/view_messages.h"
32 #include "content/renderer/content_renderer_client.h" 32 #include "content/renderer/content_renderer_client.h"
33 #include "content/renderer/gpu/command_buffer_proxy.h" 33 #include "content/renderer/gpu/command_buffer_proxy.h"
34 #include "content/renderer/gpu/gpu_channel_host.h" 34 #include "content/renderer/gpu/gpu_channel_host.h"
35 #include "content/renderer/gpu/renderer_gl_context.h" 35 #include "content/renderer/gpu/renderer_gl_context.h"
36 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" 36 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h"
37 #include "content/renderer/media/audio_message_filter.h" 37 #include "content/renderer/media/audio_message_filter.h"
38 #include "content/renderer/media/video_capture_impl_manager.h" 38 #include "content/renderer/media/video_capture_impl_manager.h"
39 #include "content/renderer/p2p/p2p_transport_impl.h" 39 #include "content/renderer/p2p/p2p_transport_impl.h"
(...skipping 18 matching lines...) Expand all
58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
60 #include "ui/gfx/size.h" 60 #include "ui/gfx/size.h"
61 #include "ui/gfx/surface/transport_dib.h" 61 #include "ui/gfx/surface/transport_dib.h"
62 #include "webkit/fileapi/file_system_callback_dispatcher.h" 62 #include "webkit/fileapi/file_system_callback_dispatcher.h"
63 #include "webkit/glue/context_menu.h" 63 #include "webkit/glue/context_menu.h"
64 #include "webkit/plugins/npapi/webplugin.h" 64 #include "webkit/plugins/npapi/webplugin.h"
65 #include "webkit/plugins/ppapi/file_path.h" 65 #include "webkit/plugins/ppapi/file_path.h"
66 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 66 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
67 #include "webkit/plugins/ppapi/plugin_module.h" 67 #include "webkit/plugins/ppapi/plugin_module.h"
68 #include "webkit/plugins/ppapi/ppapi_plugin_info.h"
68 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 69 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
69 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 70 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
70 #include "webkit/plugins/ppapi/ppb_flash_impl.h" 71 #include "webkit/plugins/ppapi/ppb_flash_impl.h"
71 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" 72 #include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h"
72 #include "webkit/plugins/ppapi/resource_helper.h" 73 #include "webkit/plugins/ppapi/resource_helper.h"
73 #include "webkit/plugins/webplugininfo.h" 74 #include "webkit/plugins/webplugininfo.h"
74 75
75 using WebKit::WebView; 76 using WebKit::WebView;
76 77
77 namespace { 78 namespace {
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // See if a module has already been loaded for this plugin. 679 // See if a module has already been loaded for this plugin.
679 FilePath path(webplugin_info.path); 680 FilePath path(webplugin_info.path);
680 scoped_refptr<webkit::ppapi::PluginModule> module = 681 scoped_refptr<webkit::ppapi::PluginModule> module =
681 PepperPluginRegistry::GetInstance()->GetLiveModule(path); 682 PepperPluginRegistry::GetInstance()->GetLiveModule(path);
682 if (module) 683 if (module)
683 return module; 684 return module;
684 685
685 // In-process plugins will have always been created up-front to avoid the 686 // In-process plugins will have always been created up-front to avoid the
686 // sandbox restrictions. So getting here implies it doesn't exist or should 687 // sandbox restrictions. So getting here implies it doesn't exist or should
687 // be out of process. 688 // be out of process.
688 const PepperPluginInfo* info = 689 const webkit::ppapi::PluginInfo* info =
689 PepperPluginRegistry::GetInstance()->GetInfoForPlugin(webplugin_info); 690 PepperPluginRegistry::GetInstance()->GetInfoForPlugin(
691 webplugin_info.path);
690 if (!info) { 692 if (!info) {
691 *pepper_plugin_was_registered = false; 693 *pepper_plugin_was_registered = false;
692 return scoped_refptr<webkit::ppapi::PluginModule>(); 694 return scoped_refptr<webkit::ppapi::PluginModule>();
693 } else if (!info->is_out_of_process) { 695 } else if (!info->is_out_of_process) {
694 // In-process plugin not preloaded, it probably couldn't be initialized. 696 // In-process plugin not preloaded, it probably couldn't be initialized.
695 return scoped_refptr<webkit::ppapi::PluginModule>(); 697 return scoped_refptr<webkit::ppapi::PluginModule>();
696 } 698 }
697 699
698 // Out of process: have the browser start the plugin process for us. 700 // Out of process: have the browser start the plugin process for us.
699 base::ProcessHandle plugin_process_handle = base::kNullProcessHandle; 701 base::ProcessHandle plugin_process_handle = base::kNullProcessHandle;
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1494
1493 int PepperPluginDelegateImpl::GetRoutingId() const { 1495 int PepperPluginDelegateImpl::GetRoutingId() const {
1494 return render_view_->routing_id(); 1496 return render_view_->routing_id();
1495 } 1497 }
1496 1498
1497 void PepperPluginDelegateImpl::PublishInitialPolicy( 1499 void PepperPluginDelegateImpl::PublishInitialPolicy(
1498 scoped_refptr<webkit::ppapi::PluginInstance> instance, 1500 scoped_refptr<webkit::ppapi::PluginInstance> instance,
1499 const std::string& policy) { 1501 const std::string& policy) {
1500 instance->HandlePolicyUpdate(policy); 1502 instance->HandlePolicyUpdate(policy);
1501 } 1503 }
OLDNEW
« no previous file with comments | « content/common/pepper_plugin_registry.cc ('k') | content/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698