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

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

Issue 259423002: Blink Blobs: Allow creation of WebBlob from just UUID. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « Source/web/WebBlob.cpp ('k') | no next file » | 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ~WebBlob() { reset(); } 55 ~WebBlob() { reset(); }
56 56
57 WebBlob() { } 57 WebBlob() { }
58 WebBlob(const WebBlob& b) { assign(b); } 58 WebBlob(const WebBlob& b) { assign(b); }
59 WebBlob& operator=(const WebBlob& b) 59 WebBlob& operator=(const WebBlob& b)
60 { 60 {
61 assign(b); 61 assign(b);
62 return *this; 62 return *this;
63 } 63 }
64 64
65 BLINK_EXPORT static WebBlob createFromUUID(const WebString& uuid, const WebS tring& type, long long size);
65 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size); 66 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size);
66 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); 67 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>);
67 68
68 BLINK_EXPORT void reset(); 69 BLINK_EXPORT void reset();
69 BLINK_EXPORT void assign(const WebBlob&); 70 BLINK_EXPORT void assign(const WebBlob&);
70 BLINK_EXPORT WebString uuid(); 71 BLINK_EXPORT WebString uuid();
71 72
72 bool isNull() const { return m_private.isNull(); } 73 bool isNull() const { return m_private.isNull(); }
73 74
74 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); 75 BLINK_EXPORT v8::Handle<v8::Value> toV8Value();
75 76
76 #if BLINK_IMPLEMENTATION 77 #if BLINK_IMPLEMENTATION
77 explicit WebBlob(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); 78 explicit WebBlob(const PassRefPtrWillBeRawPtr<WebCore::Blob>&);
78 WebBlob& operator=(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); 79 WebBlob& operator=(const PassRefPtrWillBeRawPtr<WebCore::Blob>&);
79 #endif 80 #endif
80 81
81 protected: 82 protected:
82 WebPrivatePtr<WebCore::Blob> m_private; 83 WebPrivatePtr<WebCore::Blob> m_private;
83 }; 84 };
84 85
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif // WebBlob_h 88 #endif // WebBlob_h
OLDNEW
« no previous file with comments | « Source/web/WebBlob.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698