Index: experimental/PdfViewer/inc/SkPdfTokenLooper.h |
diff --git a/experimental/PdfViewer/inc/SkPdfTokenLooper.h b/experimental/PdfViewer/inc/SkPdfTokenLooper.h |
index abbc53f7cc2a2ef51a67836aff87ee19bd4379a7..891147422661c250871305b949cde64fdc3561ca 100644 |
--- a/experimental/PdfViewer/inc/SkPdfTokenLooper.h |
+++ b/experimental/PdfViewer/inc/SkPdfTokenLooper.h |
@@ -8,36 +8,44 @@ |
#ifndef SkPdfTokenLooper_DEFINED |
#define SkPdfTokenLooper_DEFINED |
+#include "SkPdfNativeTokenizer.h" |
+// For SkPdfResult |
+#include "SkPdfUtils.h" |
+ |
class SkCanvas; |
-class SkPdfNativeTokenizer; |
class SkPdfContext; |
-class PdfTokenLooper { |
+class SkPdfTokenLooper { |
protected: |
- PdfTokenLooper* fParent; |
+ SkPdfTokenLooper* fParent; |
SkPdfNativeTokenizer* fTokenizer; |
SkPdfContext* fPdfContext; |
SkCanvas* fCanvas; |
public: |
- PdfTokenLooper(PdfTokenLooper* parent, |
+ SkPdfTokenLooper(SkPdfTokenLooper* parent, |
SkPdfNativeTokenizer* tokenizer, |
SkPdfContext* pdfContext, |
SkCanvas* canvas) |
: fParent(parent), fTokenizer(tokenizer), fPdfContext(pdfContext), fCanvas(canvas) {} |
- virtual ~PdfTokenLooper() {} |
+ virtual ~SkPdfTokenLooper() {} |
virtual SkPdfResult consumeToken(PdfToken& token) = 0; |
virtual void loop() = 0; |
- void setUp(PdfTokenLooper* parent) { |
+ void setUp(SkPdfTokenLooper* parent) { |
fParent = parent; |
fTokenizer = parent->fTokenizer; |
fPdfContext = parent->fPdfContext; |
fCanvas = parent->fCanvas; |
} |
- |
- SkPdfNativeTokenizer* tokenizer() { return fTokenizer; } |
}; |
+ |
+// Calls SkPdfNativeTokenizer::readToken, and also does debugging help. |
+// TODO(edisonn): Pass SkPdfContext and SkCanvas only with the define for instrumentation. |
+// FIXME (scroggo): This calls tokenizer->readToken(). The rest of its functionality should |
+// be moved to a debugging file. |
+bool readToken(SkPdfNativeTokenizer*, PdfToken*); |
+ |
#endif // SkPdfTokenLooper_DEFINED |