[PDF] Add pages accessor to SkPDFDocument.

Also add SK_API to SkPDFPage::getFontResources.

Review URL: http://codereview.appspot.com/4561050

git-svn-id: http://skia.googlecode.com/svn/trunk@1453 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/pdf/SkPDFDocument.h b/include/pdf/SkPDFDocument.h
index 0bc9a3c..0a76ea2 100644
--- a/include/pdf/SkPDFDocument.h
+++ b/include/pdf/SkPDFDocument.h
@@ -49,6 +49,10 @@
      */
     SK_API bool appendPage(const SkRefPtr<SkPDFDevice>& pdfDevice);
 
+    /** Get the list of pages in this document.
+     */
+    SK_API const SkTDArray<SkPDFPage*>& getPages();
+
 private:
     SkPDFCatalog fCatalog;
     int64_t fXRefFileOffset;
diff --git a/include/pdf/SkPDFPage.h b/include/pdf/SkPDFPage.h
index d677a29..0e30028 100644
--- a/include/pdf/SkPDFPage.h
+++ b/include/pdf/SkPDFPage.h
@@ -88,7 +88,7 @@
 
     /** Get the fonts used on this page.
      */
-    const SkTDArray<SkPDFFont*>& getFontResources() const;
+    SK_API const SkTDArray<SkPDFFont*>& getFontResources() const;
 
 private:
     // Multiple pages may reference the content.
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 79ce9f3..95370b4 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -154,6 +154,10 @@
     return true;
 }
 
+const SkTDArray<SkPDFPage*>& SkPDFDocument::getPages() {
+    return fPages;
+}
+
 void SkPDFDocument::emitHeader(SkWStream* stream) {
     stream->writeText("%PDF-1.4\n%");
     // The PDF spec recommends including a comment with four bytes, all