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

Unified Diff: experimental/PdfViewer/src/SkPdfRenderer.cpp

Issue 79773002: Move PdfTokenLooper into its own file. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/SkPdfTokenLooper.h ('k') | gyp/pdfviewer_lib.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/src/SkPdfRenderer.cpp
diff --git a/experimental/PdfViewer/src/SkPdfRenderer.cpp b/experimental/PdfViewer/src/SkPdfRenderer.cpp
index 1d0821db9710257f45dc8159170d473dc0c7313c..108f936b682edbbb4e86da200a61f328536a6aa2 100644
--- a/experimental/PdfViewer/src/SkPdfRenderer.cpp
+++ b/experimental/PdfViewer/src/SkPdfRenderer.cpp
@@ -23,6 +23,7 @@
#include "SkPdfNativeTokenizer.h"
#include "SkPdfRenderer.h"
#include "SkPdfReporter.h"
+#include "SkPdfTokenLooper.h"
#include "SkPdfUtils.h"
#include "SkStream.h"
#include "SkTypeface.h"
@@ -207,35 +208,6 @@ public:
StringsInit gStringsInit;
// TODO(edisonn): Document PdfTokenLooper and subclasses.
-class PdfTokenLooper {
-protected:
- PdfTokenLooper* fParent;
- SkPdfNativeTokenizer* fTokenizer;
- SkPdfContext* fPdfContext;
- SkCanvas* fCanvas;
-
-public:
- PdfTokenLooper(PdfTokenLooper* parent,
- SkPdfNativeTokenizer* tokenizer,
- SkPdfContext* pdfContext,
- SkCanvas* canvas)
- : fParent(parent), fTokenizer(tokenizer), fPdfContext(pdfContext), fCanvas(canvas) {}
-
- virtual ~PdfTokenLooper() {}
-
- virtual SkPdfResult consumeToken(PdfToken& token) = 0;
- virtual void loop() = 0;
-
- void setUp(PdfTokenLooper* parent) {
- fParent = parent;
- fTokenizer = parent->fTokenizer;
- fPdfContext = parent->fPdfContext;
- fCanvas = parent->fCanvas;
- }
-
- SkPdfNativeTokenizer* tokenizer() { return fTokenizer; }
-};
-
class PdfMainLooper : public PdfTokenLooper {
public:
PdfMainLooper(PdfTokenLooper* parent,
« no previous file with comments | « experimental/PdfViewer/inc/SkPdfTokenLooper.h ('k') | gyp/pdfviewer_lib.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698