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

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

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool started() const { return m_started; } 86 bool started() const { return m_started; }
87 87
88 const AtomicString& interfaceName() const override; 88 const AtomicString& interfaceName() const override;
89 ExecutionContext* executionContext() const override { return ActiveDOMObject ::executionContext(); } 89 ExecutionContext* executionContext() const override { return ActiveDOMObject ::executionContext(); }
90 MessagePort* toMessagePort() override { return this; } 90 MessagePort* toMessagePort() override { return this; }
91 91
92 // ActiveDOMObject implementation. 92 // ActiveDOMObject implementation.
93 bool hasPendingActivity() const override; 93 bool hasPendingActivity() const override;
94 void stop() override { close(); } 94 void stop() override { close(); }
95 95
96 void setOnmessage(PassRefPtr<EventListener> listener) 96 void setOnmessage(PassRefPtrWillBeRawPtr<EventListener> listener)
97 { 97 {
98 setAttributeEventListener(EventTypeNames::message, listener); 98 setAttributeEventListener(EventTypeNames::message, listener);
99 start(); 99 start();
100 } 100 }
101 EventListener* onmessage() { return getAttributeEventListener(EventTypeNames ::message); } 101 EventListener* onmessage() { return getAttributeEventListener(EventTypeNames ::message); }
102 102
103 // A port starts out its life entangled, and remains entangled until it is c losed or is cloned. 103 // A port starts out its life entangled, and remains entangled until it is c losed or is cloned.
104 bool isEntangled() const { return !m_closed && !isNeutered(); } 104 bool isEntangled() const { return !m_closed && !isNeutered(); }
105 105
106 // A port gets neutered when it is transferred to a new owner via postMessag e(). 106 // A port gets neutered when it is transferred to a new owner via postMessag e().
(...skipping 18 matching lines...) Expand all
125 bool m_closed; 125 bool m_closed;
126 126
127 WeakPtrFactory<MessagePort> m_weakFactory; 127 WeakPtrFactory<MessagePort> m_weakFactory;
128 128
129 RefPtr<ScriptState> m_scriptStateForConversion; 129 RefPtr<ScriptState> m_scriptStateForConversion;
130 }; 130 };
131 131
132 } // namespace blink 132 } // namespace blink
133 133
134 #endif // MessagePort_h 134 #endif // MessagePort_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698