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

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

Issue 23591059: Use null Strings for default values of MessageEvent properties (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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) 2007 Henry Mason (hmason@mac.com) 2 * Copyright (C) 2007 Henry Mason (hmason@mac.com)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 RefPtr<EventTarget> source; 46 RefPtr<EventTarget> source;
47 MessagePortArray ports; 47 MessagePortArray ports;
48 }; 48 };
49 49
50 class MessageEvent : public Event { 50 class MessageEvent : public Event {
51 public: 51 public:
52 static PassRefPtr<MessageEvent> create() 52 static PassRefPtr<MessageEvent> create()
53 { 53 {
54 return adoptRef(new MessageEvent); 54 return adoptRef(new MessageEvent);
55 } 55 }
56 static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, c onst String& origin = "", const String& lastEventId = "", PassRefPtr<EventTarget > source = 0) 56 static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, c onst String& origin = String(), const String& lastEventId = String(), PassRefPtr <EventTarget> source = 0)
57 { 57 {
58 return adoptRef(new MessageEvent(origin, lastEventId, source, ports)); 58 return adoptRef(new MessageEvent(origin, lastEventId, source, ports));
59 } 59 }
60 static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, P assRefPtr<SerializedScriptValue> data, const String& origin = "", const String& lastEventId = "", PassRefPtr<EventTarget> source = 0) 60 static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, P assRefPtr<SerializedScriptValue> data, const String& origin = String(), const St ring& lastEventId = String(), PassRefPtr<EventTarget> source = 0)
61 { 61 {
62 return adoptRef(new MessageEvent(data, origin, lastEventId, source, port s)); 62 return adoptRef(new MessageEvent(data, origin, lastEventId, source, port s));
63 } 63 }
64 static PassRefPtr<MessageEvent> create(const String& data, const String& ori gin = "") 64 static PassRefPtr<MessageEvent> create(const String& data, const String& ori gin = String())
65 { 65 {
66 return adoptRef(new MessageEvent(data, origin)); 66 return adoptRef(new MessageEvent(data, origin));
67 } 67 }
68 static PassRefPtr<MessageEvent> create(PassRefPtr<Blob> data, const String& origin = "") 68 static PassRefPtr<MessageEvent> create(PassRefPtr<Blob> data, const String& origin = String())
69 { 69 {
70 return adoptRef(new MessageEvent(data, origin)); 70 return adoptRef(new MessageEvent(data, origin));
71 } 71 }
72 static PassRefPtr<MessageEvent> create(PassRefPtr<ArrayBuffer> data, const S tring& origin = "") 72 static PassRefPtr<MessageEvent> create(PassRefPtr<ArrayBuffer> data, const S tring& origin = String())
73 { 73 {
74 return adoptRef(new MessageEvent(data, origin)); 74 return adoptRef(new MessageEvent(data, origin));
75 } 75 }
76 static PassRefPtr<MessageEvent> create(const AtomicString& type, const Messa geEventInit& initializer) 76 static PassRefPtr<MessageEvent> create(const AtomicString& type, const Messa geEventInit& initializer)
77 { 77 {
78 return adoptRef(new MessageEvent(type, initializer)); 78 return adoptRef(new MessageEvent(type, initializer));
79 } 79 }
80 virtual ~MessageEvent(); 80 virtual ~MessageEvent();
81 81
82 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela ble, const String& origin, const String& lastEventId, DOMWindow* source, PassOwn Ptr<MessagePortArray>); 82 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela ble, const String& origin, const String& lastEventId, DOMWindow* source, PassOwn Ptr<MessagePortArray>);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 RefPtr<ArrayBuffer> m_dataAsArrayBuffer; 125 RefPtr<ArrayBuffer> m_dataAsArrayBuffer;
126 String m_origin; 126 String m_origin;
127 String m_lastEventId; 127 String m_lastEventId;
128 RefPtr<EventTarget> m_source; 128 RefPtr<EventTarget> m_source;
129 OwnPtr<MessagePortArray> m_ports; 129 OwnPtr<MessagePortArray> m_ports;
130 }; 130 };
131 131
132 } // namespace WebCore 132 } // namespace WebCore
133 133
134 #endif // MessageEvent_h 134 #endif // MessageEvent_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/MessageEvent.cpp » ('j') | Source/core/workers/SharedWorkerGlobalScope.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698