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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc

Issue 7741036: NaCl PPAPI Proxy: wrap up with crash detection. Clean-up handling code to skip remote shutdown ca... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « no previous file | ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.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 // Copyright (c) 2011 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2011 The Native Client 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 "native_client/src/shared/ppapi_proxy/browser_globals.h" 5 #include "native_client/src/shared/ppapi_proxy/browser_globals.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <map> 10 #include <map>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 NaClSrpcChannel* GetMainSrpcChannel(PP_Instance instance) { 165 NaClSrpcChannel* GetMainSrpcChannel(PP_Instance instance) {
166 return LookupBrowserPppForInstance(instance)->main_channel(); 166 return LookupBrowserPppForInstance(instance)->main_channel();
167 } 167 }
168 168
169 void CleanUpAfterDeadNexe(PP_Instance instance) { 169 void CleanUpAfterDeadNexe(PP_Instance instance) {
170 DebugPrintf("CleanUpAfterDeadNexe\n"); 170 DebugPrintf("CleanUpAfterDeadNexe\n");
171 BrowserPpp* proxy = LookupBrowserPppForInstance(instance); 171 BrowserPpp* proxy = LookupBrowserPppForInstance(instance);
172 if (proxy == NULL) 172 if (proxy == NULL)
173 return; 173 return;
174 proxy->ShutdownModule(); 174 proxy->plugin()->ReportDeadNexe(); // Shuts down and deletes the proxy.
175 proxy->plugin()->ReportDeadNexe(); // Deletes the proxy.
176 } 175 }
177 176
178 void SetPPBGetInterface(PPB_GetInterface get_interface_function, 177 void SetPPBGetInterface(PPB_GetInterface get_interface_function,
179 bool dev_interface) { 178 bool dev_interface) {
180 get_interface = get_interface_function; 179 get_interface = get_interface_function;
181 plugin_requests_dev_interface = dev_interface; 180 plugin_requests_dev_interface = dev_interface;
182 } 181 }
183 182
184 const void* GetBrowserInterface(const char* interface_name) { 183 const void* GetBrowserInterface(const char* interface_name) {
185 // Reject suspiciously long interface strings. 184 // Reject suspiciously long interface strings.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 386
388 // Private interfaces. 387 // Private interfaces.
389 const PPB_PDF* PPBPDFInterface() { 388 const PPB_PDF* PPBPDFInterface() {
390 static const PPB_PDF* ppb = 389 static const PPB_PDF* ppb =
391 static_cast<const PPB_PDF*>( 390 static_cast<const PPB_PDF*>(
392 GetBrowserInterfaceSafe(PPB_PDF_INTERFACE)); 391 GetBrowserInterfaceSafe(PPB_PDF_INTERFACE));
393 return ppb; 392 return ppb;
394 } 393 }
395 394
396 } // namespace ppapi_proxy 395 } // namespace ppapi_proxy
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698