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

Side by Side Diff: Source/web/AsyncFileWriterChromium.h

Issue 18411005: Use the async version of WebFileSystem::createFileWriter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/AsyncFileSystemChromium.cpp ('k') | Source/web/AsyncFileWriterChromium.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 class WebFileWriter; 40 class WebFileWriter;
41 } 41 }
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 class Blob; 45 class Blob;
46 class AsyncFileWriterClient; 46 class AsyncFileWriterClient;
47 47
48 class AsyncFileWriterChromium : public AsyncFileWriter, public WebKit::WebFileWr iterClient { 48 class AsyncFileWriterChromium : public AsyncFileWriter, public WebKit::WebFileWr iterClient {
49 public: 49 public:
50 AsyncFileWriterChromium(AsyncFileWriterClient* client); 50 static PassOwnPtr<AsyncFileWriterChromium> create(AsyncFileWriterClient*);
51 ~AsyncFileWriterChromium(); 51 virtual ~AsyncFileWriterChromium();
52 52
53 void setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer); 53 void setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer);
54 54
55 // FileWriter 55 // FileWriter
56 virtual void write(long long position, Blob* data); 56 virtual void write(long long position, Blob* data);
57 virtual void truncate(long long length); 57 virtual void truncate(long long length);
58 virtual void abort(); 58 virtual void abort();
59 59
60 // WebFileWriterClient 60 // WebFileWriterClient
61 virtual void didWrite(long long bytes, bool complete); 61 virtual void didWrite(long long bytes, bool complete);
62 virtual void didTruncate(); 62 virtual void didTruncate();
63 virtual void didFail(WebKit::WebFileError); 63 virtual void didFail(WebKit::WebFileError);
64 64
65 private: 65 private:
66 explicit AsyncFileWriterChromium(AsyncFileWriterClient*);
67
66 OwnPtr<WebKit::WebFileWriter> m_writer; 68 OwnPtr<WebKit::WebFileWriter> m_writer;
67 AsyncFileWriterClient* m_client; 69 AsyncFileWriterClient* m_client;
68 }; 70 };
69 71
70 } // namespace 72 } // namespace
71 73
72 #endif // AsyncFileWriterChromium_h 74 #endif // AsyncFileWriterChromium_h
OLDNEW
« no previous file with comments | « Source/web/AsyncFileSystemChromium.cpp ('k') | Source/web/AsyncFileWriterChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698