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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h

Issue 79933003: Restructuring of PdfViewer code. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Respond to comments. Created 7 years 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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPdfNativeDoc_DEFINED 8 #ifndef SkPdfNativeDoc_DEFINED
9 #define SkPdfNativeDoc_DEFINED 9 #define SkPdfNativeDoc_DEFINED
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // returns the number of pages in the pdf 76 // returns the number of pages in the pdf
77 int pages() const; 77 int pages() const;
78 78
79 // returns the page resources 79 // returns the page resources
80 SkPdfResourceDictionary* pageResources(int page); 80 SkPdfResourceDictionary* pageResources(int page);
81 81
82 // returns the page's mediabox i points - the page physical boundaries. 82 // returns the page's mediabox i points - the page physical boundaries.
83 SkRect MediaBox(int page); 83 SkRect MediaBox(int page);
84 84
85 // Returns a tokenizer of a page. The passed allocator will be used to alloc ate objects that
86 // are parsed. It should be destroyed after the tokenizer.
87 SkPdfNativeTokenizer* tokenizerOfPage(int n, SkPdfAllocator* allocator);
88
89 // Returns a tokenizer of a pdf stream. The passed allocator will be used to allocate objects 85 // Returns a tokenizer of a pdf stream. The passed allocator will be used to allocate objects
90 // that are parsed. It should be destroyed after the tokenizer. 86 // that are parsed. It should be destroyed after the tokenizer.
91 SkPdfNativeTokenizer* tokenizerOfStream(SkPdfNativeObject* stream, SkPdfAllo cator* allocator); 87 SkPdfNativeTokenizer* tokenizerOfStream(SkPdfNativeObject* stream, SkPdfAllo cator* allocator);
92 88
93 // Returns a tokenizer of a memory buffer. The passed allocator will be used to allocate objects
94 // that are parsed. It should be destroyed after the tokenizer.
95 SkPdfNativeTokenizer* tokenizerOfBuffer(const unsigned char* buffer, size_t len,
96 SkPdfAllocator* allocator);
97
98
99 //returns objects that are references and can be queried. 89 //returns objects that are references and can be queried.
100 size_t objects() const; 90 size_t objects() const;
101 91
102 // returns an object. 92 // returns an object.
103 // TODO(edisonn): pdf updates are not supported yet. 93 // TODO(edisonn): pdf updates are not supported yet.
104 // add generation parameter to support page updates. 94 // add generation parameter to support page updates.
105 SkPdfNativeObject* object(int id /*, int generation*/ ); 95 SkPdfNativeObject* object(int id /*, int generation*/ );
106 96
107 // returns the object that holds all the page informnation 97 // returns the object that holds all the page informnation
108 // TODO(edisonn): pdf updates are not supported yet. 98 // TODO(edisonn): pdf updates are not supported yet.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 const unsigned char* fFileContent; 154 const unsigned char* fFileContent;
165 size_t fContentLength; 155 size_t fContentLength;
166 SkPdfNativeObject* fRootCatalogRef; 156 SkPdfNativeObject* fRootCatalogRef;
167 SkPdfCatalogDictionary* fRootCatalog; 157 SkPdfCatalogDictionary* fRootCatalog;
168 158
169 mutable SkTDArray<PublicObjectEntry> fObjects; 159 mutable SkTDArray<PublicObjectEntry> fObjects;
170 SkTDArray<SkPdfPageObjectDictionary*> fPages; 160 SkTDArray<SkPdfPageObjectDictionary*> fPages;
171 }; 161 };
172 162
173 #endif // SkPdfNativeDoc_DEFINED 163 #endif // SkPdfNativeDoc_DEFINED
OLDNEW
« no previous file with comments | « experimental/PdfViewer/inc/SkPdfTokenLooper.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698