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

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

Issue 23319002: Set MessageEvent.source to the newly created port for shared workers' connect events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test and assertions Created 7 years, 4 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Returns 0 if the passed array is 0/empty. 68 // Returns 0 if the passed array is 0/empty.
69 static PassOwnPtr<MessagePortArray> entanglePorts(ScriptExecutionContext&, P assOwnPtr<MessagePortChannelArray>); 69 static PassOwnPtr<MessagePortArray> entanglePorts(ScriptExecutionContext&, P assOwnPtr<MessagePortChannelArray>);
70 70
71 void messageAvailable(); 71 void messageAvailable();
72 bool started() const { return m_started; } 72 bool started() const { return m_started; }
73 73
74 void contextDestroyed(); 74 void contextDestroyed();
75 75
76 virtual const AtomicString& interfaceName() const OVERRIDE; 76 virtual const AtomicString& interfaceName() const OVERRIDE;
77 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; 77 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
78 MessagePort* toMessagePort() OVERRIDE { return this; }
78 79
79 void dispatchMessages(); 80 void dispatchMessages();
80 81
81 using RefCounted<MessagePort>::ref; 82 using RefCounted<MessagePort>::ref;
82 using RefCounted<MessagePort>::deref; 83 using RefCounted<MessagePort>::deref;
83 84
84 bool hasPendingActivity(); 85 bool hasPendingActivity();
85 86
86 void setOnmessage(PassRefPtr<EventListener> listener, DOMWrapperWorld* world ) 87 void setOnmessage(PassRefPtr<EventListener> listener, DOMWrapperWorld* world )
87 { 88 {
(...skipping 26 matching lines...) Expand all
114 bool m_started; 115 bool m_started;
115 bool m_closed; 116 bool m_closed;
116 117
117 ScriptExecutionContext* m_scriptExecutionContext; 118 ScriptExecutionContext* m_scriptExecutionContext;
118 EventTargetData m_eventTargetData; 119 EventTargetData m_eventTargetData;
119 }; 120 };
120 121
121 } // namespace WebCore 122 } // namespace WebCore
122 123
123 #endif // MessagePort_h 124 #endif // MessagePort_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698