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

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

Issue 23163007: pdfviewer: make pdfviewer compile on mac Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_
3 3
4 #include "SkTDArray.h" 4 #include "SkTDArray.h"
5 #include "SkTDict.h" 5 #include "SkTDict.h"
6 #include <math.h> 6 #include <math.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 class SkPdfMapper;
10 class SkPdfDictionary; 9 class SkPdfDictionary;
11 class SkPdfImageDictionary; 10 class SkPdfImageDictionary;
12 11
13 // White Spaces 12 // White Spaces
14 #define kNUL_PdfWhiteSpace '\x00' 13 #define kNUL_PdfWhiteSpace '\x00'
15 #define kHT_PdfWhiteSpace '\x09' 14 #define kHT_PdfWhiteSpace '\x09'
16 #define kLF_PdfWhiteSpace '\x0A' 15 #define kLF_PdfWhiteSpace '\x0A'
17 #define kFF_PdfWhiteSpace '\x0C' 16 #define kFF_PdfWhiteSpace '\x0C'
18 #define kCR_PdfWhiteSpace '\x0D' 17 #define kCR_PdfWhiteSpace '\x0D'
19 #define kSP_PdfWhiteSpace '\x20' 18 #define kSP_PdfWhiteSpace '\x20'
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 const char* fKeyword; 120 const char* fKeyword;
122 size_t fKeywordLength; 121 size_t fKeywordLength;
123 SkPdfNativeObject* fObject; 122 SkPdfNativeObject* fObject;
124 SkPdfTokenType fType; 123 SkPdfTokenType fType;
125 124
126 PdfToken() : fKeyword(NULL), fKeywordLength(0), fObject(NULL) {} 125 PdfToken() : fKeyword(NULL), fKeywordLength(0), fObject(NULL) {}
127 }; 126 };
128 127
129 class SkPdfNativeTokenizer { 128 class SkPdfNativeTokenizer {
130 public: 129 public:
131 SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream, const SkPdfMapper* ma pper, SkPdfAllocator* allocator, SkPdfNativeDoc* doc); 130 SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream, SkPdfAllocator* alloc ator, SkPdfNativeDoc* doc);
132 SkPdfNativeTokenizer(const unsigned char* buffer, int len, const SkPdfMapper * mapper, SkPdfAllocator* allocator, SkPdfNativeDoc* doc); 131 SkPdfNativeTokenizer(const unsigned char* buffer, int len, SkPdfAllocator* a llocator, SkPdfNativeDoc* doc);
133 132
134 virtual ~SkPdfNativeTokenizer(); 133 virtual ~SkPdfNativeTokenizer();
135 134
136 bool readToken(PdfToken* token); 135 bool readToken(PdfToken* token);
137 bool readTokenCore(PdfToken* token); 136 bool readTokenCore(PdfToken* token);
138 void PutBack(PdfToken token); 137 void PutBack(PdfToken token);
139 SkPdfImageDictionary* readInlineImage(); 138 SkPdfImageDictionary* readInlineImage();
140 139
141 private: 140 private:
142 SkPdfNativeDoc* fDoc; 141 SkPdfNativeDoc* fDoc;
143 const SkPdfMapper* fMapper;
144 SkPdfAllocator* fAllocator; 142 SkPdfAllocator* fAllocator;
145 143
146 const unsigned char* fUncompressedStreamStart; 144 const unsigned char* fUncompressedStreamStart;
147 const unsigned char* fUncompressedStream; 145 const unsigned char* fUncompressedStream;
148 const unsigned char* fUncompressedStreamEnd; 146 const unsigned char* fUncompressedStreamEnd;
149 147
150 bool fEmpty; 148 bool fEmpty;
151 bool fHasPutBack; 149 bool fHasPutBack;
152 PdfToken fPutBack; 150 PdfToken fPutBack;
153 }; 151 };
154 152
155 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ 153 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698