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

Side by Side Diff: src/trusted/plugin/ppapi/plugin_ppapi.cc

Issue 6218004: Resource64->32, NaCl side. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First Created 9 years, 11 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
1 /* 1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved. 2 * Copyright 2010 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 #include "native_client/src/trusted/plugin/ppapi/plugin_ppapi.h" 7 #include "native_client/src/trusted/plugin/ppapi/plugin_ppapi.h"
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const ssize_t kNaclManifestMaxFileBytesNoNull = 44 const ssize_t kNaclManifestMaxFileBytesNoNull =
45 kNaclManifestMaxFileBytesPlusNull - 1; 45 kNaclManifestMaxFileBytesPlusNull - 1;
46 // The "nexes" attr of the <embed> tag, and the key used to find the dicitonary 46 // The "nexes" attr of the <embed> tag, and the key used to find the dicitonary
47 // of nexe URLs in the manifest file. 47 // of nexe URLs in the manifest file.
48 const char* const kNexesAttribute = "nexes"; 48 const char* const kNexesAttribute = "nexes";
49 } // namespace 49 } // namespace
50 50
51 namespace plugin { 51 namespace plugin {
52 52
53 PluginPpapi* PluginPpapi::New(PP_Instance pp_instance) { 53 PluginPpapi* PluginPpapi::New(PP_Instance pp_instance) {
54 PLUGIN_PRINTF(("PluginPpapi::New (pp_instance=%"NACL_PRId64")\n", 54 PLUGIN_PRINTF(("PluginPpapi::New (pp_instance=%"NACL_PRId32")\n",
55 pp_instance)); 55 pp_instance));
56 #if NACL_WINDOWS && !defined(NACL_STANDALONE) 56 #if NACL_WINDOWS && !defined(NACL_STANDALONE)
57 if (!NaClHandlePassBrowserCtor()) { 57 if (!NaClHandlePassBrowserCtor()) {
58 return NULL; 58 return NULL;
59 } 59 }
60 #endif 60 #endif
61 PluginPpapi* plugin = new(std::nothrow) PluginPpapi(pp_instance); 61 PluginPpapi* plugin = new(std::nothrow) PluginPpapi(pp_instance);
62 if (plugin == NULL) { 62 if (plugin == NULL) {
63 return NULL; 63 return NULL;
64 } 64 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 PLUGIN_PRINTF(("PluginPpapi::Init (return %d)\n", status)); 127 PLUGIN_PRINTF(("PluginPpapi::Init (return %d)\n", status));
128 return status; 128 return status;
129 } 129 }
130 130
131 131
132 PluginPpapi::PluginPpapi(PP_Instance pp_instance) 132 PluginPpapi::PluginPpapi(PP_Instance pp_instance)
133 : pp::Instance(pp_instance), 133 : pp::Instance(pp_instance),
134 ppapi_proxy_(NULL), 134 ppapi_proxy_(NULL),
135 replayDidChangeView(false) { 135 replayDidChangeView(false) {
136 PLUGIN_PRINTF(("PluginPpapi::PluginPpapi (this=%p, pp_instance=%" 136 PLUGIN_PRINTF(("PluginPpapi::PluginPpapi (this=%p, pp_instance=%"
137 NACL_PRId64")\n", static_cast<void*>(this), pp_instance)); 137 NACL_PRId32")\n", static_cast<void*>(this), pp_instance));
138 NaClSrpcModuleInit(); 138 NaClSrpcModuleInit();
139 url_downloader_.Initialize(this); 139 url_downloader_.Initialize(this);
140 callback_factory_.Initialize(this); 140 callback_factory_.Initialize(this);
141 } 141 }
142 142
143 143
144 PluginPpapi::~PluginPpapi() { 144 PluginPpapi::~PluginPpapi() {
145 PLUGIN_PRINTF(("PluginPpapi::~PluginPpapi (this=%p, scriptable_handle=%p)\n", 145 PLUGIN_PRINTF(("PluginPpapi::~PluginPpapi (this=%p, scriptable_handle=%p)\n",
146 static_cast<void*>(this), 146 static_cast<void*>(this),
147 static_cast<void*>(scriptable_handle()))); 147 static_cast<void*>(scriptable_handle())));
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 return false; 464 return false;
465 } 465 }
466 pp::Var nexe_url = nexes_dict.GetProperty(sandbox_isa); 466 pp::Var nexe_url = nexes_dict.GetProperty(sandbox_isa);
467 if (!nexe_url.is_string()) { 467 if (!nexe_url.is_string()) {
468 return false; 468 return false;
469 } 469 }
470 *result = nexe_url.AsString(); 470 *result = nexe_url.AsString();
471 return true; 471 return true;
472 } 472 }
473 } // namespace plugin 473 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698