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

Unified Diff: pdf/document_loader.h

Issue 317803005: Add function to document_loader to get PDF as pp::FileRef (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « pdf/chunk_stream.h ('k') | pdf/document_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/document_loader.h
diff --git a/pdf/document_loader.h b/pdf/document_loader.h
index c09dba2ddda443b763e27ec3753428c88b1aabb4..152379b5c79c820590f1ebc10e87a9d57b66f49b 100644
--- a/pdf/document_loader.h
+++ b/pdf/document_loader.h
@@ -11,11 +11,16 @@
#include "base/basictypes.h"
#include "pdf/chunk_stream.h"
+#include "pdf/file_writer.h"
#include "ppapi/cpp/url_loader.h"
#include "ppapi/utility/completion_callback_factory.h"
#define kDefaultRequestSize 32768u
+namespace pp {
+class Buffer_Dev;
+}
+
namespace chrome_pdf {
class DocumentLoader {
@@ -57,6 +62,9 @@ class DocumentLoader {
bool IsDocumentComplete() const;
uint32 document_size() const { return document_size_; }
+ void GetCompleteDocument(
+ pp::CompletionCallbackWithOutput<pp::FileRef> callback);
+
// Return number of bytes available.
uint32 GetAvailableData() const;
@@ -117,6 +125,7 @@ class DocumentLoader {
std::string multipart_boundary_;
uint32 requests_count_;
std::list<std::vector<unsigned char> > chunk_buffer_;
+ scoped_ptr<FileWriter> file_writer_;
};
} // namespace chrome_pdf
« no previous file with comments | « pdf/chunk_stream.h ('k') | pdf/document_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698