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

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

Issue 185643009: Implement ServiceWorker::postMessage() [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Factor out leaky loops Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual ~MessagePort(); 67 virtual ~MessagePort();
68 68
69 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&); 69 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&);
70 70
71 void start(); 71 void start();
72 void close(); 72 void close();
73 73
74 void entangle(PassOwnPtr<blink::WebMessagePortChannel>); 74 void entangle(PassOwnPtr<blink::WebMessagePortChannel>);
75 PassOwnPtr<blink::WebMessagePortChannel> disentangle(); 75 PassOwnPtr<blink::WebMessagePortChannel> disentangle();
76 76
77 static PassOwnPtr<blink::WebMessagePortChannelArray> toWebMessagePortChannel Array(MessagePortChannelArray*);
adamk 2014/03/19 21:16:53 Seems like the argument here could be a PassOwnPtr
jsbell 2014/03/19 21:26:21 Ah yes. Done!
78 static PassOwnPtr<MessagePortArray> toMessagePortArray(ExecutionContext*, co nst blink::WebMessagePortChannelArray&);
79
77 // Returns 0 if there is an exception, or if the passed-in array is 0/empty. 80 // Returns 0 if there is an exception, or if the passed-in array is 0/empty.
78 static PassOwnPtr<MessagePortChannelArray> disentanglePorts(const MessagePor tArray*, ExceptionState&); 81 static PassOwnPtr<MessagePortChannelArray> disentanglePorts(const MessagePor tArray*, ExceptionState&);
79 82
80 // Returns 0 if the passed array is 0/empty. 83 // Returns 0 if the passed array is 0/empty.
81 static PassOwnPtr<MessagePortArray> entanglePorts(ExecutionContext&, PassOwn Ptr<MessagePortChannelArray>); 84 static PassOwnPtr<MessagePortArray> entanglePorts(ExecutionContext&, PassOwn Ptr<MessagePortChannelArray>);
82 85
83 bool started() const { return m_started; } 86 bool started() const { return m_started; }
84 87
85 virtual const AtomicString& interfaceName() const OVERRIDE; 88 virtual const AtomicString& interfaceName() const OVERRIDE;
86 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 89 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
(...skipping 27 matching lines...) Expand all
114 117
115 bool m_started; 118 bool m_started;
116 bool m_closed; 119 bool m_closed;
117 120
118 WeakPtrFactory<MessagePort> m_weakFactory; 121 WeakPtrFactory<MessagePort> m_weakFactory;
119 }; 122 };
120 123
121 } // namespace WebCore 124 } // namespace WebCore
122 125
123 #endif // MessagePort_h 126 #endif // MessagePort_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698