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

Side by Side Diff: public/web/WebBlob.h

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « public/platform/WebHTTPBody.h ('k') | public/web/WebSerializedScriptValueVersion.h » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebBlob_h 31 #ifndef WebBlob_h
32 #define WebBlob_h 32 #define WebBlob_h
33 33
34 #include "../platform/WebBlobData.h"
34 #include "../platform/WebCommon.h" 35 #include "../platform/WebCommon.h"
35 #include "../platform/WebPrivatePtr.h" 36 #include "../platform/WebPrivatePtr.h"
36 #include "../platform/WebString.h" 37 #include "../platform/WebString.h"
37 #include "../platform/WebURL.h" 38 #include "../platform/WebURL.h"
abarth-chromium 2013/10/09 22:07:58 Yeah, sorry. These should be like: #include "pub
38 39
39 namespace v8 { 40 namespace v8 {
40 class Value; 41 class Value;
41 template <class T> class Handle; 42 template <class T> class Handle;
42 } 43 }
43 44
44 namespace WebCore { class Blob; } 45 namespace WebCore { class Blob; }
45 46
46 namespace WebKit { 47 namespace WebKit {
47 48
48 class WebBlob { 49 class WebBlob {
49 public: 50 public:
50 ~WebBlob() { reset(); } 51 ~WebBlob() { reset(); }
51 52
52 WebBlob() { } 53 WebBlob() { }
53 WebBlob(const WebBlob& b) { assign(b); } 54 WebBlob(const WebBlob& b) { assign(b); }
54 WebBlob& operator=(const WebBlob& b) 55 WebBlob& operator=(const WebBlob& b)
55 { 56 {
56 assign(b); 57 assign(b);
57 return *this; 58 return *this;
58 } 59 }
59 60
60 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size); 61 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size);
61 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); 62 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>);
62 63
63 BLINK_EXPORT void reset(); 64 BLINK_EXPORT void reset();
64 BLINK_EXPORT void assign(const WebBlob&); 65 BLINK_EXPORT void assign(const WebBlob&);
65 BLINK_EXPORT WebURL url(); 66 BLINK_EXPORT WebString uuid();
66 67
67 bool isNull() const { return m_private.isNull(); } 68 bool isNull() const { return m_private.isNull(); }
68 69
69 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); 70 BLINK_EXPORT v8::Handle<v8::Value> toV8Value();
70 71
71 #if BLINK_IMPLEMENTATION 72 #if BLINK_IMPLEMENTATION
72 WebBlob(const WTF::PassRefPtr<WebCore::Blob>&); 73 WebBlob(const WTF::PassRefPtr<WebCore::Blob>&);
73 WebBlob& operator=(const WTF::PassRefPtr<WebCore::Blob>&); 74 WebBlob& operator=(const WTF::PassRefPtr<WebCore::Blob>&);
74 operator WTF::PassRefPtr<WebCore::Blob>() const; 75 operator WTF::PassRefPtr<WebCore::Blob>() const;
75 #endif 76 #endif
76 77
77 protected: 78 protected:
78 WebPrivatePtr<WebCore::Blob> m_private; 79 WebPrivatePtr<WebCore::Blob> m_private;
79 }; 80 };
80 81
81 } // namespace WebKit 82 } // namespace WebKit
82 83
83 #endif // WebBlob_h 84 #endif // WebBlob_h
OLDNEW
« no previous file with comments | « public/platform/WebHTTPBody.h ('k') | public/web/WebSerializedScriptValueVersion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698