| 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 21 matching lines...) Expand all Loading... |
| 32 #include "../platform/WebCommon.h" | 32 #include "../platform/WebCommon.h" |
| 33 #include "../platform/WebPrivatePtr.h" | 33 #include "../platform/WebPrivatePtr.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 class Value; | 36 class Value; |
| 37 template <class T> class Handle; | 37 template <class T> class Handle; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace WTF { class ArrayBufferView; } | 40 namespace WTF { class ArrayBufferView; } |
| 41 | 41 |
| 42 namespace WebKit { | 42 namespace blink { |
| 43 | 43 |
| 44 // Provides access to an ArrayBufferView. | 44 // Provides access to an ArrayBufferView. |
| 45 class WebArrayBufferView { | 45 class WebArrayBufferView { |
| 46 public: | 46 public: |
| 47 ~WebArrayBufferView() { reset(); } | 47 ~WebArrayBufferView() { reset(); } |
| 48 WebArrayBufferView() { } | 48 WebArrayBufferView() { } |
| 49 WebArrayBufferView(const WebArrayBufferView& v) { assign(v); } | 49 WebArrayBufferView(const WebArrayBufferView& v) { assign(v); } |
| 50 | 50 |
| 51 BLINK_EXPORT void* baseAddress() const; | 51 BLINK_EXPORT void* baseAddress() const; |
| 52 BLINK_EXPORT unsigned byteOffset() const; | 52 BLINK_EXPORT unsigned byteOffset() const; |
| 53 BLINK_EXPORT unsigned byteLength() const; | 53 BLINK_EXPORT unsigned byteLength() const; |
| 54 | 54 |
| 55 BLINK_EXPORT void assign(const WebArrayBufferView&); | 55 BLINK_EXPORT void assign(const WebArrayBufferView&); |
| 56 BLINK_EXPORT void reset(); | 56 BLINK_EXPORT void reset(); |
| 57 | 57 |
| 58 BLINK_EXPORT static WebArrayBufferView* createFromV8Value(v8::Handle<v8::Val
ue>); | 58 BLINK_EXPORT static WebArrayBufferView* createFromV8Value(v8::Handle<v8::Val
ue>); |
| 59 | 59 |
| 60 #if BLINK_IMPLEMENTATION | 60 #if BLINK_IMPLEMENTATION |
| 61 WebArrayBufferView(const WTF::PassRefPtr<WTF::ArrayBufferView>&); | 61 WebArrayBufferView(const WTF::PassRefPtr<WTF::ArrayBufferView>&); |
| 62 WebArrayBufferView& operator=(const WTF::PassRefPtr<WTF::ArrayBufferView>&); | 62 WebArrayBufferView& operator=(const WTF::PassRefPtr<WTF::ArrayBufferView>&); |
| 63 operator WTF::PassRefPtr<WTF::ArrayBufferView>() const; | 63 operator WTF::PassRefPtr<WTF::ArrayBufferView>() const; |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 WebPrivatePtr<WTF::ArrayBufferView> m_private; | 67 WebPrivatePtr<WTF::ArrayBufferView> m_private; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace WebKit | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif | 72 #endif |
| OLD | NEW |