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

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

Issue 2691333002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Created 3 years, 10 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 27 matching lines...) Expand all
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
40 #include "wtf/Vector.h" 40 #include "wtf/Vector.h"
41 #include <memory> 41 #include <memory>
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class ExceptionState; 45 class ExceptionState;
46 class ExecutionContext; 46 class ExecutionContext;
47 class MessagePort; 47 class MessagePort;
48 class ScriptState;
48 class SerializedScriptValue; 49 class SerializedScriptValue;
49 50
50 // Not to be confused with WebMessagePortChannelArray; this one uses Vector and 51 // Not to be confused with WebMessagePortChannelArray; this one uses Vector and
51 // std::unique_ptr instead of WebVector and raw pointers. 52 // std::unique_ptr instead of WebVector and raw pointers.
52 typedef Vector<WebMessagePortChannelUniquePtr, 1> MessagePortChannelArray; 53 typedef Vector<WebMessagePortChannelUniquePtr, 1> MessagePortChannelArray;
53 54
54 class CORE_EXPORT MessagePort : public EventTargetWithInlineData, 55 class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
55 public ActiveScriptWrappable<MessagePort>, 56 public ActiveScriptWrappable<MessagePort>,
56 public ContextLifecycleObserver, 57 public ContextLifecycleObserver,
57 public WebMessagePortChannelClient { 58 public WebMessagePortChannelClient {
58 DEFINE_WRAPPERTYPEINFO(); 59 DEFINE_WRAPPERTYPEINFO();
59 USING_GARBAGE_COLLECTED_MIXIN(MessagePort); 60 USING_GARBAGE_COLLECTED_MIXIN(MessagePort);
60 61
61 public: 62 public:
62 static MessagePort* create(ExecutionContext&); 63 static MessagePort* create(ExecutionContext&);
63 ~MessagePort() override; 64 ~MessagePort() override;
64 65
65 void postMessage(ExecutionContext*, 66 void postMessage(ScriptState*,
66 PassRefPtr<SerializedScriptValue> message, 67 PassRefPtr<SerializedScriptValue> message,
67 const MessagePortArray&, 68 const MessagePortArray&,
68 ExceptionState&); 69 ExceptionState&);
69 static bool canTransferArrayBuffersAndImageBitmaps() { return false; } 70 static bool canTransferArrayBuffersAndImageBitmaps() { 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();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 143
143 WebMessagePortChannelUniquePtr m_entangledChannel; 144 WebMessagePortChannelUniquePtr m_entangledChannel;
144 145
145 bool m_started; 146 bool m_started;
146 bool m_closed; 147 bool m_closed;
147 }; 148 };
148 149
149 } // namespace blink 150 } // namespace blink
150 151
151 #endif // MessagePort_h 152 #endif // MessagePort_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698