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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 11 matching lines...) Expand all Loading... |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #include "config.h" | 29 #include "config.h" |
30 #include "public/web/WebArrayBufferView.h" | 30 #include "public/web/WebArrayBufferView.h" |
31 | 31 |
32 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" | 32 #include "bindings/core/v8/V8ArrayBufferView.h" |
33 #include "wtf/ArrayBufferView.h" | 33 #include "wtf/ArrayBufferView.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 void WebArrayBufferView::assign(const WebArrayBufferView& other) | 37 void WebArrayBufferView::assign(const WebArrayBufferView& other) |
38 { | 38 { |
39 m_private = other.m_private; | 39 m_private = other.m_private; |
40 } | 40 } |
41 | 41 |
42 void WebArrayBufferView::reset() | 42 void WebArrayBufferView::reset() |
(...skipping 13 matching lines...) Expand all Loading... |
56 | 56 |
57 unsigned WebArrayBufferView::byteLength() const | 57 unsigned WebArrayBufferView::byteLength() const |
58 { | 58 { |
59 return m_private->byteLength(); | 59 return m_private->byteLength(); |
60 } | 60 } |
61 | 61 |
62 WebArrayBufferView* WebArrayBufferView::createFromV8Value(v8::Handle<v8::Value>
value) | 62 WebArrayBufferView* WebArrayBufferView::createFromV8Value(v8::Handle<v8::Value>
value) |
63 { | 63 { |
64 if (!value->IsArrayBufferView()) | 64 if (!value->IsArrayBufferView()) |
65 return 0; | 65 return 0; |
66 ArrayBufferView* view = V8ArrayBufferView::toImpl(value->ToObject()); | 66 DOMArrayBufferView* view = V8ArrayBufferView::toImpl(value->ToObject()); |
67 return new WebArrayBufferView(view); | 67 return new WebArrayBufferView(view->view()); |
68 } | 68 } |
69 | 69 |
70 WebArrayBufferView::WebArrayBufferView(const PassRefPtr<ArrayBufferView>& value) | 70 WebArrayBufferView::WebArrayBufferView(const PassRefPtr<ArrayBufferView>& value) |
71 : m_private(value) | 71 : m_private(value) |
72 { | 72 { |
73 } | 73 } |
74 | 74 |
75 WebArrayBufferView& WebArrayBufferView::operator=(const PassRefPtr<ArrayBufferVi
ew>& value) | 75 WebArrayBufferView& WebArrayBufferView::operator=(const PassRefPtr<ArrayBufferVi
ew>& value) |
76 { | 76 { |
77 m_private = value; | 77 m_private = value; |
78 return *this; | 78 return *this; |
79 } | 79 } |
80 | 80 |
81 WebArrayBufferView::operator PassRefPtr<ArrayBufferView>() const | 81 WebArrayBufferView::operator PassRefPtr<ArrayBufferView>() const |
82 { | 82 { |
83 return m_private.get(); | 83 return m_private.get(); |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |