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

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

Issue 6452010: Remove the x-ppapi-nacl-srpc and x-nacl-srpc mime types in favor of the singl... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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
« no previous file with comments | « src/trusted/plugin/nacl_entry_points.cc ('k') | src/trusted/plugin/osx/Info.plist » ('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 /** 8 /**
9 * @file 9 * @file
10 * Defines the basic API for the nacl browser plugin 10 * Defines the basic API for the nacl browser plugin
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #if defined(EXPIRATION_CHECK) 48 #if defined(EXPIRATION_CHECK)
49 " and expires on " 49 " and expires on "
50 EMBED(EXPIRATION_MONTH) "/" 50 EMBED(EXPIRATION_MONTH) "/"
51 EMBED(EXPIRATION_DAY) "/" 51 EMBED(EXPIRATION_DAY) "/"
52 EMBED(EXPIRATION_YEAR) 52 EMBED(EXPIRATION_YEAR)
53 " (mm/dd/yyyy)" 53 " (mm/dd/yyyy)"
54 #endif 54 #endif
55 ""; 55 "";
56 56
57 char* NPP_GetMIMEDescription() { 57 char* NPP_GetMIMEDescription() {
58 return const_cast<char*>("application/x-nacl-srpc:nexe:NativeClient" 58 return const_cast<char*>("application/x-nacl:nexe:NativeClient"
59 " Simple RPC module;"); 59 " Simple RPC module;");
60 } 60 }
61 61
62 // Invoked from NP_Initialize() 62 // Invoked from NP_Initialize()
63 NPError NPP_Initialize() { 63 NPError NPP_Initialize() {
64 PLUGIN_PRINTF(("NPP_Initialize\n")); 64 PLUGIN_PRINTF(("NPP_Initialize\n"));
65 NaClNrdAllModulesInit(); 65 NaClNrdAllModulesInit();
66 return NPERR_NO_ERROR; 66 return NPERR_NO_ERROR;
67 } 67 }
68 68
(...skipping 14 matching lines...) Expand all
83 UNREFERENCED_PARAMETER(saved); 83 UNREFERENCED_PARAMETER(saved);
84 PLUGIN_PRINTF(("NPP_New '%s'\n", plugin_type)); 84 PLUGIN_PRINTF(("NPP_New '%s'\n", plugin_type));
85 85
86 for (int i = 0; i < argc; ++i) { 86 for (int i = 0; i < argc; ++i) {
87 PLUGIN_PRINTF(("args %u: '%s' '%s'\n", i, argn[i], argv[i])); 87 PLUGIN_PRINTF(("args %u: '%s' '%s'\n", i, argn[i], argv[i]));
88 } 88 }
89 89
90 if (npp == NULL) { 90 if (npp == NULL) {
91 return NPERR_INVALID_INSTANCE_ERROR; 91 return NPERR_INVALID_INSTANCE_ERROR;
92 } 92 }
93 if (strcmp(plugin_type, "application/x-nacl-srpc") == 0) { 93 if (strcmp(plugin_type, "application/x-nacl") == 0) {
94 npp->pdata = static_cast<nacl::NPInstance*>( 94 npp->pdata = static_cast<nacl::NPInstance*>(
95 plugin::PluginNpapi::New(npp, argc, argn, argv)); 95 plugin::PluginNpapi::New(npp, argc, argn, argv));
96 if (npp->pdata == NULL) { 96 if (npp->pdata == NULL) {
97 return NPERR_OUT_OF_MEMORY_ERROR; 97 return NPERR_OUT_OF_MEMORY_ERROR;
98 } 98 }
99 } 99 }
100 if (npp->pdata == NULL) { 100 if (npp->pdata == NULL) {
101 return NPERR_OUT_OF_MEMORY_ERROR; 101 return NPERR_OUT_OF_MEMORY_ERROR;
102 } 102 }
103 #ifndef NACL_STANDALONE 103 #ifndef NACL_STANDALONE
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void* notify_data) { 235 void* notify_data) {
236 PLUGIN_PRINTF(("NPP_URLNotify(%s)\n", url)); 236 PLUGIN_PRINTF(("NPP_URLNotify(%s)\n", url));
237 if (npp == NULL) { 237 if (npp == NULL) {
238 return; 238 return;
239 } 239 }
240 nacl::NPInstance* module = static_cast<nacl::NPInstance*>(npp->pdata); 240 nacl::NPInstance* module = static_cast<nacl::NPInstance*>(npp->pdata);
241 if (module != NULL) { 241 if (module != NULL) {
242 module->URLNotify(url, reason, notify_data); 242 module->URLNotify(url, reason, notify_data);
243 } 243 }
244 } 244 }
OLDNEW
« no previous file with comments | « src/trusted/plugin/nacl_entry_points.cc ('k') | src/trusted/plugin/osx/Info.plist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698