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

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: 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 "ppapi/c/ppp.h"
9 #include "ppapi/nacl_irt/irt_ppapi.h"
10 #include "ppapi/proxy/plugin_main_irt.h"
11
12 namespace nacl {
13 namespace nonsfi {
14 namespace {
15
16 struct PP_StartFunctions g_pp_functions;
17
18 int IrtPpapiStart(const struct PP_StartFunctions* funcs) {
19 g_pp_functions = *funcs;
20 // TODO(hidehiko): Register this thread as main. (g_is_main_thread = 1.)
Mark Seaborn 2014/02/15 03:00:52 g_is_main_thread only changes the behaviour of ope
hidehiko 2014/02/19 13:05:02 Done.
21 return PpapiPluginMain();
22 }
23
24 } // namespace
25
26 const struct nacl_irt_ppapihook kIrtPpapiHook = {
27 IrtPpapiStart,
28 PpapiPluginRegisterThreadCreator,
29 };
30
31 } // namespace nonsfi
32 } // namespace nacl
33
34 int32_t PPP_InitializeModule(PP_Module module_id,
35 PPB_GetInterface get_browser_interface) {
36 return nacl::nonsfi::g_pp_functions.PPP_InitializeModule(
37 module_id, get_browser_interface);
38 }
39
40 void PPP_ShutdownModule(void) {
41 nacl::nonsfi::g_pp_functions.PPP_ShutdownModule();
42 }
43
44 const void *PPP_GetInterface(const char *interface_name) {
45 const void* result =
46 nacl::nonsfi::g_pp_functions.PPP_GetInterface(interface_name);
Mark Seaborn 2014/02/15 03:00:52 Nit: Why not just "return nacl::nonsfi::...;"?
hidehiko 2014/02/19 13:05:02 Oops, I forgot to fix the style... Done. (I printf
47 return result;
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698