OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_FILEAPI_WEBFILEWRITER_IMPL_H_ |
6 #define CONTENT_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_ | 6 #define CONTENT_COMMON_FILEAPI_WEBFILEWRITER_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "webkit/fileapi/webfilewriter_base.h" | 10 #include "webkit/fileapi/webfilewriter_base.h" |
11 | 11 |
12 // An implementation of WebFileWriter for use in chrome renderers and workers. | 12 // An implementation of WebFileWriter for use in chrome renderers and workers. |
13 class WebFileWriterImpl : public fileapi::WebFileWriterBase, | 13 class WebFileWriterImpl : public fileapi::WebFileWriterBase, |
14 public base::SupportsWeakPtr<WebFileWriterImpl> { | 14 public base::SupportsWeakPtr<WebFileWriterImpl> { |
15 public: | 15 public: |
16 WebFileWriterImpl(const GURL& path, WebKit::WebFileWriterClient* client); | 16 WebFileWriterImpl(const GURL& path, WebKit::WebFileWriterClient* client); |
17 virtual ~WebFileWriterImpl(); | 17 virtual ~WebFileWriterImpl(); |
18 | 18 |
19 protected: | 19 protected: |
20 // WebFileWriterBase overrides | 20 // WebFileWriterBase overrides |
21 virtual void DoTruncate(const GURL& path, int64 offset) OVERRIDE; | 21 virtual void DoTruncate(const GURL& path, int64 offset) OVERRIDE; |
22 virtual void DoWrite(const GURL& path, const GURL& blob_url, | 22 virtual void DoWrite(const GURL& path, const GURL& blob_url, |
23 int64 offset) OVERRIDE; | 23 int64 offset) OVERRIDE; |
24 virtual void DoCancel() OVERRIDE; | 24 virtual void DoCancel() OVERRIDE; |
25 | 25 |
26 private: | 26 private: |
27 class CallbackDispatcher; | 27 class CallbackDispatcher; |
28 int request_id_; | 28 int request_id_; |
29 }; | 29 }; |
30 | 30 |
31 #endif // CONTENT_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_ | 31 #endif // CONTENT_COMMON_FILEAPI_WEBFILEWRITER_IMPL_H_ |
OLD | NEW |