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

Side by Side Diff: samples/pdfium_test.cc

Issue 1234053003: Plumb in an externally created v8::Isolate (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: updates Created 5 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
« no previous file with comments | « public/fpdf_formfill.h ('k') | testing/embedder_test.cpp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <limits.h> 5 #include <limits.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 void Add_Segment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) { 420 void Add_Segment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) {
421 } 421 }
422 422
423 void RenderPdf(const std::string& name, const char* pBuf, size_t len, 423 void RenderPdf(const std::string& name, const char* pBuf, size_t len,
424 const Options& options) { 424 const Options& options) {
425 fprintf(stderr, "Rendering PDF file %s.\n", name.c_str()); 425 fprintf(stderr, "Rendering PDF file %s.\n", name.c_str());
426 426
427 IPDF_JSPLATFORM platform_callbacks; 427 IPDF_JSPLATFORM platform_callbacks;
428 memset(&platform_callbacks, '\0', sizeof(platform_callbacks)); 428 memset(&platform_callbacks, '\0', sizeof(platform_callbacks));
429 platform_callbacks.version = 1; 429 platform_callbacks.version = 2;
430 platform_callbacks.app_alert = ExampleAppAlert; 430 platform_callbacks.app_alert = ExampleAppAlert;
431 platform_callbacks.Doc_gotoPage = ExampleDocGotoPage; 431 platform_callbacks.Doc_gotoPage = ExampleDocGotoPage;
432 432
433 FPDF_FORMFILLINFO form_callbacks; 433 FPDF_FORMFILLINFO form_callbacks;
434 memset(&form_callbacks, '\0', sizeof(form_callbacks)); 434 memset(&form_callbacks, '\0', sizeof(form_callbacks));
435 form_callbacks.version = 1; 435 form_callbacks.version = 1;
436 form_callbacks.m_pJsPlatform = &platform_callbacks; 436 form_callbacks.m_pJsPlatform = &platform_callbacks;
437 437
438 TestLoader loader(pBuf, len); 438 TestLoader loader(pBuf, len);
439 439
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 continue; 620 continue;
621 free(file_contents); 621 free(file_contents);
622 } 622 }
623 623
624 FPDF_DestroyLibrary(); 624 FPDF_DestroyLibrary();
625 v8::V8::ShutdownPlatform(); 625 v8::V8::ShutdownPlatform();
626 delete platform; 626 delete platform;
627 627
628 return 0; 628 return 0;
629 } 629 }
OLDNEW
« no previous file with comments | « public/fpdf_formfill.h ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698