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

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

Issue 2366253002: Remove ActiveDOMObject::stop() (Closed)
Patch Set: temp 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const AtomicString& interfaceName() const override; 98 const AtomicString& interfaceName() const override;
99 ExecutionContext* getExecutionContext() const override { 99 ExecutionContext* getExecutionContext() const override {
100 return ActiveDOMObject::getExecutionContext(); 100 return ActiveDOMObject::getExecutionContext();
101 } 101 }
102 MessagePort* toMessagePort() override { return this; } 102 MessagePort* toMessagePort() override { return this; }
103 103
104 // ScriptWrappable implementation. 104 // ScriptWrappable implementation.
105 bool hasPendingActivity() const final; 105 bool hasPendingActivity() const final;
106 106
107 // ActiveDOMObject implementation. 107 // ActiveDOMObject implementation.
108 void stop() override { close(); } 108 void contextDestroyed() override { close(); }
109 109
110 void setOnmessage(EventListener* listener) { 110 void setOnmessage(EventListener* listener) {
111 setAttributeEventListener(EventTypeNames::message, listener); 111 setAttributeEventListener(EventTypeNames::message, listener);
112 start(); 112 start();
113 } 113 }
114 EventListener* onmessage() { 114 EventListener* onmessage() {
115 return getAttributeEventListener(EventTypeNames::message); 115 return getAttributeEventListener(EventTypeNames::message);
116 } 116 }
117 117
118 // A port starts out its life entangled, and remains entangled until it is 118 // A port starts out its life entangled, and remains entangled until it is
(...skipping 25 matching lines...) Expand all
144 144
145 bool m_started; 145 bool m_started;
146 bool m_closed; 146 bool m_closed;
147 147
148 RefPtr<ScriptState> m_scriptStateForConversion; 148 RefPtr<ScriptState> m_scriptStateForConversion;
149 }; 149 };
150 150
151 } // namespace blink 151 } // namespace blink
152 152
153 #endif // MessagePort_h 153 #endif // MessagePort_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698