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

Unified Diff: experimental/PdfViewer/inc/SkPdfTokenLooper.h

Issue 79933003: Restructuring of PdfViewer code. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Respond to comments. Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/inc/SkPdfContext.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « experimental/PdfViewer/inc/SkPdfContext.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698