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

Unified Diff: Source/core/dom/DOMArrayBuffer.h

Issue 711763002: bindings: Transition from ArrayBuffer to DOMArrayBuffer, part 2 (2nd round) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes Win x64 build. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/custom/V8FileReaderCustom.cpp ('k') | Source/core/fileapi/FileReader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMArrayBuffer.h
diff --git a/Source/core/dom/DOMArrayBuffer.h b/Source/core/dom/DOMArrayBuffer.h
index 821834fb9b9e76180229f2f46e02810a0e651094..c303d071981a14821495f1771b0ef2cedafbc41c 100644
--- a/Source/core/dom/DOMArrayBuffer.h
+++ b/Source/core/dom/DOMArrayBuffer.h
@@ -37,8 +37,16 @@ public:
WTF::ArrayBuffer* buffer() { return m_buffer.get(); }
const void* data() const { return buffer()->data(); }
- unsigned long byteLength() const { return buffer()->byteLength(); }
void* data() { return buffer()->data(); }
+ unsigned long byteLength() const { return buffer()->byteLength(); }
+ PassRefPtr<DOMArrayBuffer> slice(int begin, int end) const
+ {
+ return create(buffer()->slice(begin, end));
+ }
+ PassRefPtr<DOMArrayBuffer> slice(int begin) const
+ {
+ return create(buffer()->slice(begin));
+ }
bool transfer(WTF::ArrayBufferContents& result) { return buffer()->transfer(result); }
bool isNeutered() { return buffer()->isNeutered(); }
« no previous file with comments | « Source/bindings/core/v8/custom/V8FileReaderCustom.cpp ('k') | Source/core/fileapi/FileReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698