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

Side by Side Diff: content/renderer/pepper/plugin_module.cc

Issue 2038423004: Use ChannelMojo for Browser-GPU and Renderer-GPU IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-utility-channel-mojo
Patch Set: fix pepper Created 4 years, 5 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
« no previous file with comments | « content/renderer/pepper/pepper_broker.cc ('k') | content/renderer/render_thread_impl.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) 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/plugin_module.h" 5 #include "content/renderer/pepper/plugin_module.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 // In-process plugin not preloaded, it probably couldn't be initialized. 793 // In-process plugin not preloaded, it probably couldn't be initialized.
794 return scoped_refptr<PluginModule>(); 794 return scoped_refptr<PluginModule>();
795 } 795 }
796 796
797 // Out of process: have the browser start the plugin process for us. 797 // Out of process: have the browser start the plugin process for us.
798 IPC::ChannelHandle channel_handle; 798 IPC::ChannelHandle channel_handle;
799 base::ProcessId peer_pid = 0; 799 base::ProcessId peer_pid = 0;
800 int plugin_child_id = 0; 800 int plugin_child_id = 0;
801 render_frame->Send(new FrameHostMsg_OpenChannelToPepperPlugin( 801 render_frame->Send(new FrameHostMsg_OpenChannelToPepperPlugin(
802 path, &channel_handle, &peer_pid, &plugin_child_id)); 802 path, &channel_handle, &peer_pid, &plugin_child_id));
803 if (channel_handle.name.empty()) { 803 if (!channel_handle.mojo_handle.is_valid()) {
804 // Couldn't be initialized. 804 // Couldn't be initialized.
805 return scoped_refptr<PluginModule>(); 805 return scoped_refptr<PluginModule>();
806 } 806 }
807 807
808 ppapi::PpapiPermissions permissions(info->permissions); 808 ppapi::PpapiPermissions permissions(info->permissions);
809 809
810 // AddLiveModule must be called before any early returns since the 810 // AddLiveModule must be called before any early returns since the
811 // module's destructor will remove itself. 811 // module's destructor will remove itself.
812 module = new PluginModule(info->name, info->version, path, permissions); 812 module = new PluginModule(info->name, info->version, path, permissions);
813 PepperPluginRegistry::GetInstance()->AddLiveModule(path, module.get()); 813 PepperPluginRegistry::GetInstance()->AddLiveModule(path, module.get());
814 814
815 if (!module->CreateOutOfProcessModule(render_frame, 815 if (!module->CreateOutOfProcessModule(render_frame,
816 path, 816 path,
817 permissions, 817 permissions,
818 channel_handle, 818 channel_handle,
819 peer_pid, 819 peer_pid,
820 plugin_child_id, 820 plugin_child_id,
821 false)) // is_external = false 821 false)) // is_external = false
822 return scoped_refptr<PluginModule>(); 822 return scoped_refptr<PluginModule>();
823 823
824 return module; 824 return module;
825 } 825 }
826 826
827 } // namespace content 827 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_broker.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698