OLD | NEW |
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 24 matching lines...) Expand all Loading... |
35 #include "public/platform/WebCommon.h" | 35 #include "public/platform/WebCommon.h" |
36 #include "public/platform/WebPrivatePtr.h" | 36 #include "public/platform/WebPrivatePtr.h" |
37 #include "public/platform/WebString.h" | 37 #include "public/platform/WebString.h" |
38 #include "public/platform/WebURL.h" | 38 #include "public/platform/WebURL.h" |
39 | 39 |
40 #if BLINK_IMPLEMENTATION | 40 #if BLINK_IMPLEMENTATION |
41 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
42 #endif | 42 #endif |
43 | 43 |
44 namespace v8 { | 44 namespace v8 { |
| 45 class Isolate; |
| 46 class Object; |
45 class Value; | 47 class Value; |
46 template <class T> class Handle; | 48 template <class T> class Handle; |
47 } | 49 } |
48 | 50 |
49 namespace WebCore { class Blob; } | 51 namespace WebCore { class Blob; } |
50 | 52 |
51 namespace blink { | 53 namespace blink { |
52 | 54 |
53 class WebBlob { | 55 class WebBlob { |
54 public: | 56 public: |
(...skipping 10 matching lines...) Expand all Loading... |
65 BLINK_EXPORT static WebBlob createFromUUID(const WebString& uuid, const WebS
tring& type, long long size); | 67 BLINK_EXPORT static WebBlob createFromUUID(const WebString& uuid, const WebS
tring& type, long long size); |
66 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long
size); | 68 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long
size); |
67 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); | 69 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); |
68 | 70 |
69 BLINK_EXPORT void reset(); | 71 BLINK_EXPORT void reset(); |
70 BLINK_EXPORT void assign(const WebBlob&); | 72 BLINK_EXPORT void assign(const WebBlob&); |
71 BLINK_EXPORT WebString uuid(); | 73 BLINK_EXPORT WebString uuid(); |
72 | 74 |
73 bool isNull() const { return m_private.isNull(); } | 75 bool isNull() const { return m_private.isNull(); } |
74 | 76 |
| 77 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(v8::Handle<v8::Object> creatio
nContext, v8::Isolate*); |
| 78 // FIXME: remove the following toV8Value after fixing chromium code. |
75 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); | 79 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); |
76 | 80 |
77 #if BLINK_IMPLEMENTATION | 81 #if BLINK_IMPLEMENTATION |
78 explicit WebBlob(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); | 82 explicit WebBlob(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); |
79 WebBlob& operator=(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); | 83 WebBlob& operator=(const PassRefPtrWillBeRawPtr<WebCore::Blob>&); |
80 #endif | 84 #endif |
81 | 85 |
82 protected: | 86 protected: |
83 WebPrivatePtr<WebCore::Blob> m_private; | 87 WebPrivatePtr<WebCore::Blob> m_private; |
84 }; | 88 }; |
85 | 89 |
86 } // namespace blink | 90 } // namespace blink |
87 | 91 |
88 #endif // WebBlob_h | 92 #endif // WebBlob_h |
OLD | NEW |