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

Unified Diff: experimental/PdfViewer/SkPdfParser.h

Issue 18435007: pdf viewer: refactor and fix a bug (SkPdfobject should not reset on destruct) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.cpp ('k') | experimental/PdfViewer/SkPdfParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfParser.h
===================================================================
--- experimental/PdfViewer/SkPdfParser.h (revision 9970)
+++ experimental/PdfViewer/SkPdfParser.h (working copy)
@@ -1,88 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkPdfParser_DEFINED
-#define SkPdfParser_DEFINED
-
-#include "SkPdfBasics.h"
-#include "SkPdfNativeTokenizer.h"
-
-extern "C" PdfContext* gPdfContext;
-extern "C" SkBitmap* gDumpBitmap;
-extern "C" SkCanvas* gDumpCanvas;
-
-// TODO(edisonn): Document PdfTokenLooper and subclasses.
-class PdfTokenLooper {
-protected:
- PdfTokenLooper* fParent;
- SkPdfNativeTokenizer* fTokenizer;
- PdfContext* fPdfContext;
- SkCanvas* fCanvas;
-
-public:
- PdfTokenLooper(PdfTokenLooper* parent,
- SkPdfNativeTokenizer* tokenizer,
- PdfContext* pdfContext,
- SkCanvas* canvas)
- : fParent(parent), fTokenizer(tokenizer), fPdfContext(pdfContext), fCanvas(canvas) {}
-
- virtual ~PdfTokenLooper() {}
-
- virtual PdfResult consumeToken(PdfToken& token) = 0;
- virtual void loop() = 0;
-
- void setUp(PdfTokenLooper* parent) {
- fParent = parent;
- fTokenizer = parent->fTokenizer;
- fPdfContext = parent->fPdfContext;
- fCanvas = parent->fCanvas;
- }
-};
-
-class PdfMainLooper : public PdfTokenLooper {
-public:
- PdfMainLooper(PdfTokenLooper* parent,
- SkPdfNativeTokenizer* tokenizer,
- PdfContext* pdfContext,
- SkCanvas* canvas)
- : PdfTokenLooper(parent, tokenizer, pdfContext, canvas) {}
-
- virtual PdfResult consumeToken(PdfToken& token);
- virtual void loop();
-};
-
-class PdfInlineImageLooper : public PdfTokenLooper {
-public:
- PdfInlineImageLooper()
- : PdfTokenLooper(NULL, NULL, NULL, NULL) {}
-
- virtual PdfResult consumeToken(PdfToken& token);
- virtual void loop();
- PdfResult done();
-};
-
-class PdfCompatibilitySectionLooper : public PdfTokenLooper {
-public:
- PdfCompatibilitySectionLooper()
- : PdfTokenLooper(NULL, NULL, NULL, NULL) {}
-
- virtual PdfResult consumeToken(PdfToken& token);
- virtual void loop();
-};
-
-// TODO(edisonn): move in another file
-class SkPdfViewer : public SkRefCnt {
-public:
-
- bool load(const SkString inputFileName, SkPicture* out);
- bool write(void*) const { return false; }
-};
-
-void reportPdfRenderStats();
-
-#endif // SkPdfParser_DEFINED
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.cpp ('k') | experimental/PdfViewer/SkPdfParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698