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