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

Side by Side Diff: components/nacl/loader/nonsfi/irt_ppapi.cc

Issue 140573003: Connect PPAPI IPC channels for non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and address review comments. Created 6 years, 10 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 2014 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 "base/logging.h"
6
7 #include "components/nacl/loader/nonsfi/irt_interfaces.h"
8 #include "native_client/src/untrusted/irt/irt_ppapi.h"
Mark Seaborn 2014/02/13 06:18:25 I've moved this to ppapi/nacl_irt/irt_ppapi.h in a
hidehiko 2014/02/13 10:18:05 Oh, I didn't notice it. Done.
9 #include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h"
10
11 namespace nacl {
12 namespace nonsfi {
13 namespace {
14
15 struct PP_StartFunctions g_pp_functions;
16
17 int IrtPpapiStart(const struct PP_StartFunctions* funcs) {
18 g_pp_functions = *funcs;
19 // TODO(hidehiko): Register this thread as main. (g_is_main_thread = 1.)
20 return PpapiPluginMain();
21 }
22
23 } // namespace
24
25 const struct nacl_irt_ppapihook kIrtPpapiHook = {
26 IrtPpapiStart,
27 PpapiPluginRegisterThreadCreator,
28 };
29
30 } // namespace nonsfi
31 } // namespace nacl
32
33 extern "C" {
Mark Seaborn 2014/02/13 06:18:25 Nit: You shouldn't need this 'extern' if you #incl
hidehiko 2014/02/13 10:18:05 Done.
34
35 int32_t PPP_InitializeModule(PP_Module module_id,
36 PPB_GetInterface get_browser_interface) {
37 return nacl::nonsfi::g_pp_functions.PPP_InitializeModule(
38 module_id, get_browser_interface);
39 }
40
41 void PPP_ShutdownModule(void) {
42 nacl::nonsfi::g_pp_functions.PPP_ShutdownModule();
43 }
44
45 const void *PPP_GetInterface(const char *interface_name) {
46 const void* result =
47 nacl::nonsfi::g_pp_functions.PPP_GetInterface(interface_name);
48 return result;
49 }
50
51 } // extern "C"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698