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

Side by Side Diff: chrome_frame/urlmon_upload_data_stream.h

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome_frame/unittest_precompile.cc ('k') | chrome_frame/urlmon_upload_data_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
6 #define CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
7
8 #include <urlmon.h>
9 #include <atlbase.h>
10 #include <atlcom.h>
11
12 #include "base/logging.h"
13 #include "base/ref_counted.h"
14
15 #include "net/base/upload_data.h"
16 #include "net/base/upload_data_stream.h"
17
18 // Provides an IStream interface to the very different UploadDataStream
19 // implementation.
20 class UrlmonUploadDataStream : public CComObjectRoot,
21 public IStream {
22 public:
23 UrlmonUploadDataStream() {}
24
25 BEGIN_COM_MAP(UrlmonUploadDataStream)
26 COM_INTERFACE_ENTRY(ISequentialStream)
27 COM_INTERFACE_ENTRY(IStream)
28 END_COM_MAP()
29
30 void Initialize(net::UploadData* upload_data);
31
32 // Partial implementation of IStream.
33 STDMETHOD(Read)(void* pv, ULONG cb, ULONG* read);
34
35 // E_NOTIMPL the rest and DCHECK if they get called (could also use
36 // IStreamImpl but we'd lose the DCHECKS().
37 STDMETHOD(Write)(const void * buffer, ULONG size, ULONG* size_written) {
38 DCHECK(false) << __FUNCTION__;
39 return E_NOTIMPL;
40 }
41
42 STDMETHOD(CopyTo)(IStream* stream, ULARGE_INTEGER cb, ULARGE_INTEGER* read,
43 ULARGE_INTEGER* written) {
44 DCHECK(false) << __FUNCTION__;
45 return E_NOTIMPL;
46 }
47
48 STDMETHOD(Seek)(LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER* new_pos);
49
50 STDMETHOD(SetSize)(ULARGE_INTEGER new_size) {
51 DCHECK(false) << __FUNCTION__;
52 return E_NOTIMPL;
53 }
54
55 STDMETHOD(Commit)(DWORD flags) {
56 DCHECK(false) << __FUNCTION__;
57 return E_NOTIMPL;
58 }
59
60 STDMETHOD(Revert)() {
61 DCHECK(false) << __FUNCTION__;
62 return E_NOTIMPL;
63 }
64
65 STDMETHOD(LockRegion)(ULARGE_INTEGER offset, ULARGE_INTEGER cb,
66 DWORD type) {
67 DCHECK(false) << __FUNCTION__;
68 return E_NOTIMPL;
69 }
70
71 STDMETHOD(UnlockRegion)(ULARGE_INTEGER offset, ULARGE_INTEGER cb,
72 DWORD type) {
73 DCHECK(false) << __FUNCTION__;
74 return E_NOTIMPL;
75 }
76
77 STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
78
79 STDMETHOD(Clone)(IStream** stream) {
80 DCHECK(false) << __FUNCTION__;
81 return E_NOTIMPL;
82 }
83
84 private:
85 scoped_refptr<net::UploadData> upload_data_;
86 scoped_ptr<net::UploadDataStream> request_body_stream_;
87 };
88
89 #endif // CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
OLDNEW
« no previous file with comments | « chrome_frame/unittest_precompile.cc ('k') | chrome_frame/urlmon_upload_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698