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

Side by Side Diff: third_party/WebKit/Source/core/dom/MessagePort.h

Issue 2414333003: WebMessaging: Send transferable ArrayBuffers by copy-and-neuter semantics (Closed)
Patch Set: fix tests Created 4 years, 2 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 USING_GARBAGE_COLLECTED_MIXIN(MessagePort); 60 USING_GARBAGE_COLLECTED_MIXIN(MessagePort);
61 61
62 public: 62 public:
63 static MessagePort* create(ExecutionContext&); 63 static MessagePort* create(ExecutionContext&);
64 ~MessagePort() override; 64 ~MessagePort() override;
65 65
66 void postMessage(ExecutionContext*, 66 void postMessage(ExecutionContext*,
67 PassRefPtr<SerializedScriptValue> message, 67 PassRefPtr<SerializedScriptValue> message,
68 const MessagePortArray&, 68 const MessagePortArray&,
69 ExceptionState&); 69 ExceptionState&);
70 static bool canTransferArrayBuffer() { return false; }
70 71
71 void start(); 72 void start();
72 void close(); 73 void close();
73 74
74 void entangle(WebMessagePortChannelUniquePtr); 75 void entangle(WebMessagePortChannelUniquePtr);
75 WebMessagePortChannelUniquePtr disentangle(); 76 WebMessagePortChannelUniquePtr disentangle();
76 77
77 // Returns nullptr if the passed-in array is nullptr/empty. 78 // Returns nullptr if the passed-in array is nullptr/empty.
78 static std::unique_ptr<WebMessagePortChannelArray> 79 static std::unique_ptr<WebMessagePortChannelArray>
79 toWebMessagePortChannelArray(std::unique_ptr<MessagePortChannelArray>); 80 toWebMessagePortChannelArray(std::unique_ptr<MessagePortChannelArray>);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 bool m_started; 146 bool m_started;
146 bool m_closed; 147 bool m_closed;
147 148
148 RefPtr<ScriptState> m_scriptStateForConversion; 149 RefPtr<ScriptState> m_scriptStateForConversion;
149 }; 150 };
150 151
151 } // namespace blink 152 } // namespace blink
152 153
153 #endif // MessagePort_h 154 #endif // MessagePort_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698