blob: 718139d966286f45e20ceebaa41d5eadd992e36f (
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
34
35
|
// Copyright 2013 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_CHILD_FILEAPI_WEBFILEWRITER_IMPL_H_
#define CONTENT_CHILD_FILEAPI_WEBFILEWRITER_IMPL_H_
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "webkit/renderer/fileapi/webfilewriter_base.h"
namespace content {
// 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) OVERRIDE;
virtual void DoWrite(const GURL& path, const GURL& blob_url,
int64 offset) OVERRIDE;
virtual void DoCancel() OVERRIDE;
private:
class CallbackDispatcher;
int request_id_;
};
} // namespace content
#endif // CONTENT_CHILD_FILEAPI_WEBFILEWRITER_IMPL_H_
|