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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef SerializedScriptValue_h 31 #ifndef SerializedScriptValue_h
32 #define SerializedScriptValue_h 32 #define SerializedScriptValue_h
33 33
34 #include "bindings/core/v8/ScriptValue.h" 34 #include "bindings/core/v8/ScriptValue.h"
35 #include "bindings/core/v8/Transferables.h" 35 #include "bindings/core/v8/Transferables.h"
36 #include "core/CoreExport.h" 36 #include "core/CoreExport.h"
37 #include "wtf/HashMap.h" 37 #include "wtf/HashMap.h"
38 #include "wtf/ThreadSafeRefCounted.h" 38 #include "wtf/ThreadSafeRefCounted.h"
39 #include "wtf/typed_arrays/ArrayBufferContents.h"
40 #include <memory>
41 #include <v8.h> 39 #include <v8.h>
42 40
41 namespace WTF {
42
43 class ArrayBufferContents;
44
45 }
46
43 namespace blink { 47 namespace blink {
44 48
45 class BlobDataHandle; 49 class BlobDataHandle;
46 class Transferables; 50 class Transferables;
47 class ExceptionState; 51 class ExceptionState;
48 class StaticBitmapImage; 52 class StaticBitmapImage;
49 class WebBlobInfo; 53 class WebBlobInfo;
50 54
51 typedef HashMap<String, RefPtr<BlobDataHandle>> BlobDataHandleMap; 55 typedef HashMap<String, RefPtr<BlobDataHandle>> BlobDataHandleMap;
52 typedef Vector<WebBlobInfo> WebBlobInfoArray; 56 typedef Vector<WebBlobInfo> WebBlobInfoArray;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 String& data() { return m_data; } 124 String& data() { return m_data; }
121 void setData(const String& data) { m_data = data; } 125 void setData(const String& data) { m_data = data; }
122 void transferArrayBuffers(v8::Isolate*, const ArrayBufferArray&, ExceptionSt ate&); 126 void transferArrayBuffers(v8::Isolate*, const ArrayBufferArray&, ExceptionSt ate&);
123 void transferImageBitmaps(v8::Isolate*, const ImageBitmapArray&, ExceptionSt ate&); 127 void transferImageBitmaps(v8::Isolate*, const ImageBitmapArray&, ExceptionSt ate&);
124 void transferOffscreenCanvas(v8::Isolate*, const OffscreenCanvasArray&, Exce ptionState&); 128 void transferOffscreenCanvas(v8::Isolate*, const OffscreenCanvasArray&, Exce ptionState&);
125 ArrayBufferContentsArray* getArrayBufferContentsArray() { return m_arrayBuff erContentsArray.get(); } 129 ArrayBufferContentsArray* getArrayBufferContentsArray() { return m_arrayBuff erContentsArray.get(); }
126 ImageBitmapContentsArray* getImageBitmapContentsArray() { return m_imageBitm apContentsArray.get(); } 130 ImageBitmapContentsArray* getImageBitmapContentsArray() { return m_imageBitm apContentsArray.get(); }
127 131
128 private: 132 private:
129 String m_data; 133 String m_data;
130 std::unique_ptr<ArrayBufferContentsArray> m_arrayBufferContentsArray; 134 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray;
131 std::unique_ptr<ImageBitmapContentsArray> m_imageBitmapContentsArray; 135 OwnPtr<ImageBitmapContentsArray> m_imageBitmapContentsArray;
132 BlobDataHandleMap m_blobDataHandles; 136 BlobDataHandleMap m_blobDataHandles;
133 intptr_t m_externallyAllocatedMemory; 137 intptr_t m_externallyAllocatedMemory;
134 138
135 friend class SerializedScriptValueFactory; 139 friend class SerializedScriptValueFactory;
136 }; 140 };
137 141
138 } // namespace blink 142 } // namespace blink
139 143
140 #endif // SerializedScriptValue_h 144 #endif // SerializedScriptValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698