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

Side by Side Diff: Source/core/events/MessageEvent.cpp

Issue 334283004: Rename DOMWindow to LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 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/core/events/MessageEvent.h ('k') | Source/core/events/MouseRelatedEvent.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) 2007 Henry Mason (hmason@mac.com) 2 * Copyright (C) 2007 Henry Mason (hmason@mac.com)
3 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 PassRefPtrWillBeRawPtr<MessageEvent> MessageEvent::create(const AtomicString& ty pe, const MessageEventInit& initializer, ExceptionState& exceptionState) 136 PassRefPtrWillBeRawPtr<MessageEvent> MessageEvent::create(const AtomicString& ty pe, const MessageEventInit& initializer, ExceptionState& exceptionState)
137 { 137 {
138 if (initializer.source.get() && !isValidSource(initializer.source.get())) { 138 if (initializer.source.get() && !isValidSource(initializer.source.get())) {
139 exceptionState.throwTypeError("The optional 'source' property is neither a Window nor MessagePort."); 139 exceptionState.throwTypeError("The optional 'source' property is neither a Window nor MessagePort.");
140 return nullptr; 140 return nullptr;
141 } 141 }
142 return adoptRefWillBeNoop(new MessageEvent(type, initializer)); 142 return adoptRefWillBeNoop(new MessageEvent(type, initializer));
143 } 143 }
144 144
145 void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, const String& origin, const String& lastEventId, DOMWindow* sourc e, PassOwnPtr<MessagePortArray> ports) 145 void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, const String& origin, const String& lastEventId, LocalDOMWindow* source, PassOwnPtr<MessagePortArray> ports)
146 { 146 {
147 if (dispatched()) 147 if (dispatched())
148 return; 148 return;
149 149
150 initEvent(type, canBubble, cancelable); 150 initEvent(type, canBubble, cancelable);
151 151
152 m_dataType = DataTypeScriptValue; 152 m_dataType = DataTypeScriptValue;
153 m_origin = origin; 153 m_origin = origin;
154 m_lastEventId = lastEventId; 154 m_lastEventId = lastEventId;
155 m_source = source; 155 m_source = source;
156 m_ports = ports; 156 m_ports = ports;
157 } 157 }
158 158
159 void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, con st String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray> ports) 159 void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, con st String& lastEventId, LocalDOMWindow* source, PassOwnPtr<MessagePortArray> por ts)
160 { 160 {
161 if (dispatched()) 161 if (dispatched())
162 return; 162 return;
163 163
164 initEvent(type, canBubble, cancelable); 164 initEvent(type, canBubble, cancelable);
165 165
166 m_dataType = DataTypeSerializedScriptValue; 166 m_dataType = DataTypeSerializedScriptValue;
167 m_dataAsSerializedScriptValue = data; 167 m_dataAsSerializedScriptValue = data;
168 m_origin = origin; 168 m_origin = origin;
169 m_lastEventId = lastEventId; 169 m_lastEventId = lastEventId;
(...skipping 15 matching lines...) Expand all
185 } 185 }
186 186
187 void MessageEvent::trace(Visitor* visitor) 187 void MessageEvent::trace(Visitor* visitor)
188 { 188 {
189 visitor->trace(m_dataAsBlob); 189 visitor->trace(m_dataAsBlob);
190 visitor->trace(m_source); 190 visitor->trace(m_source);
191 Event::trace(visitor); 191 Event::trace(visitor);
192 } 192 }
193 193
194 } // namespace WebCore 194 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/MessageEvent.h ('k') | Source/core/events/MouseRelatedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698