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

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

Issue 11140046: Add a content API to connect a Native Client module to an out-of-process PPAPI proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/public/renderer/pepper_nacl_helper.h"
6
7 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
8 #include "ipc/ipc_channel_handle.h"
9 #include "webkit/plugins/ppapi/plugin_module.h"
10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
11
12 namespace content {
13
14 scoped_refptr<webkit::ppapi::PluginModule> CreateNaClPluginModule(
15 webkit::ppapi::PluginInstance* plugin_instance,
16 ppapi::PpapiPermissions permissions,
17 const IPC::ChannelHandle& channel_handle,
18 int nacl_process_id) {
19
20 // Since we're the embedder, we can make assumptions about the delegate on
21 // the instance.
22 PepperPluginDelegateImpl* delegate = static_cast<PepperPluginDelegateImpl*>(
23 plugin_instance->delegate());
24 if (!delegate)
25 return scoped_refptr<webkit::ppapi::PluginModule>();
26 scoped_refptr<webkit::ppapi::PluginModule> plugin_module =
27 delegate->CreateNaClPluginModule(plugin_instance,
28 permissions,
29 channel_handle,
30 nacl_process_id);
31 return plugin_module;
32 }
33
34 } // namespace content
35
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698