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

Side by Side Diff: src/trusted/plugin/npapi/browser_impl_npapi.cc

Issue 2981011: Move plugin/srpc contents to the more appropriately named plugin/common.... (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « src/trusted/plugin/npapi/browser_impl_npapi.h ('k') | src/trusted/plugin/npapi/closure.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved. 2 * Copyright 2008 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 7
8 // Portable interface for browser interaction - NPAPI implementation 8 // Portable interface for browser interaction - NPAPI implementation
9 9
10 #include "native_client/src/trusted/plugin/npapi/browser_impl_npapi.h" 10 #include "native_client/src/trusted/plugin/npapi/browser_impl_npapi.h"
11 11
12 #include <setjmp.h> 12 #include <setjmp.h>
13 #include <stdio.h> 13 #include <stdio.h>
14 #include <string.h> 14 #include <string.h>
15 15
16 #include <map> 16 #include <map>
17 17
18 #include "native_client/src/include/checked_cast.h" 18 #include "native_client/src/include/checked_cast.h"
19 #include "native_client/src/include/nacl_elf.h" 19 #include "native_client/src/include/nacl_elf.h"
20 #include "native_client/src/include/nacl_string.h" 20 #include "native_client/src/include/nacl_string.h"
21 #include "native_client/src/include/portability_io.h" 21 #include "native_client/src/include/portability_io.h"
22 #include "native_client/src/shared/npruntime/nacl_npapi.h" 22 #include "native_client/src/shared/npruntime/nacl_npapi.h"
23 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" 23 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h"
24 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h" 24 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h"
25 #include "native_client/src/trusted/plugin/srpc/utility.h" 25 #include "native_client/src/trusted/plugin/utility.h"
26 26
27 using nacl::assert_cast; 27 using nacl::assert_cast;
28 28
29 namespace { 29 namespace {
30 30
31 // Create an NPString from a C string. 31 // Create an NPString from a C string.
32 bool CopyToNPString(const nacl::string& string, NPString* npstr) { 32 bool CopyToNPString(const nacl::string& string, NPString* npstr) {
33 // We have to create a copy of the string using NPN_MemAlloc, because the 33 // We have to create a copy of the string using NPN_MemAlloc, because the
34 // browser sometimes will free the string using NPN_MemFree. Strdup and 34 // browser sometimes will free the string using NPN_MemFree. Strdup and
35 // friends use malloc, which would mix the memory allocators. 35 // friends use malloc, which would mix the memory allocators.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 NPP InstanceIdentifierToNPP(InstanceIdentifier id) { 195 NPP InstanceIdentifierToNPP(InstanceIdentifier id) {
196 return reinterpret_cast<NPP>(assert_cast<intptr_t>(id)); 196 return reinterpret_cast<NPP>(assert_cast<intptr_t>(id));
197 } 197 }
198 198
199 InstanceIdentifier NPPToInstanceIdentifier(NPP npp) { 199 InstanceIdentifier NPPToInstanceIdentifier(NPP npp) {
200 return assert_cast<InstanceIdentifier>(reinterpret_cast<intptr_t>(npp)); 200 return assert_cast<InstanceIdentifier>(reinterpret_cast<intptr_t>(npp));
201 } 201 }
202 202
203 } // namespace plugin 203 } // namespace plugin
OLDNEW
« no previous file with comments | « src/trusted/plugin/npapi/browser_impl_npapi.h ('k') | src/trusted/plugin/npapi/closure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698