OLD | NEW |
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 "chrome/renderer/pepper/ppb_nacl_private_impl.h" | 5 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h" |
6 | 6 |
7 #ifndef DISABLE_NACL | 7 #ifndef DISABLE_NACL |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/rand_util_c.h" | 12 #include "base/rand_util.h" |
13 #include "chrome/common/render_messages.h" | 13 #include "chrome/common/render_messages.h" |
14 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
15 #include "content/public/renderer/render_thread.h" | 15 #include "content/public/renderer/render_thread.h" |
16 #include "ipc/ipc_sync_message_filter.h" | 16 #include "ipc/ipc_sync_message_filter.h" |
17 #include "ppapi/c/private/ppb_nacl_private.h" | 17 #include "ppapi/c/private/ppb_nacl_private.h" |
18 #include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h" | 18 #include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h" |
19 | 19 |
20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
21 #include "content/public/common/sandbox_init.h" | 21 #include "content/public/common/sandbox_init.h" |
22 #endif | 22 #endif |
(...skipping 24 matching lines...) Expand all Loading... |
47 | 47 |
48 return PP_TRUE; | 48 return PP_TRUE; |
49 } | 49 } |
50 | 50 |
51 PP_Bool StartPpapiProxy(PP_Instance instance) { | 51 PP_Bool StartPpapiProxy(PP_Instance instance) { |
52 return PP_FALSE; | 52 return PP_FALSE; |
53 } | 53 } |
54 | 54 |
55 int UrandomFD(void) { | 55 int UrandomFD(void) { |
56 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
57 return GetUrandomFD(); | 57 return base::GetUrandomFD(); |
58 #else | 58 #else |
59 return 0; | 59 return -1; |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 bool Are3DInterfacesDisabled() { | 63 bool Are3DInterfacesDisabled() { |
64 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisable3DAPIs); | 64 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisable3DAPIs); |
65 } | 65 } |
66 | 66 |
67 void EnableBackgroundSelLdrLaunch() { | 67 void EnableBackgroundSelLdrLaunch() { |
68 g_background_thread_sender.Get() = | 68 g_background_thread_sender.Get() = |
69 content::RenderThread::Get()->GetSyncMessageFilter(); | 69 content::RenderThread::Get()->GetSyncMessageFilter(); |
(...skipping 22 matching lines...) Expand all Loading... |
92 &BrokerDuplicateHandle, | 92 &BrokerDuplicateHandle, |
93 }; | 93 }; |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { | 97 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { |
98 return &nacl_interface; | 98 return &nacl_interface; |
99 } | 99 } |
100 | 100 |
101 #endif // DISABLE_NACL | 101 #endif // DISABLE_NACL |
OLD | NEW |