OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 #if BLINK_IMPLEMENTATION | 37 #if BLINK_IMPLEMENTATION |
38 #include "core/events/Event.h" | 38 #include "core/events/Event.h" |
39 #include "core/events/MessageEvent.h" | 39 #include "core/events/MessageEvent.h" |
40 #endif | 40 #endif |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class WebFrame; | 44 class WebFrame; |
45 class WebString; | 45 class WebString; |
46 | 46 |
| 47 // An interface for posting message events to the target frame. The message |
| 48 // events are used for communication between documents and described here: |
| 49 // http://www.w3.org/TR/2012/WD-webmessaging-20120313/#terminology |
47 class WebDOMMessageEvent : public WebDOMEvent { | 50 class WebDOMMessageEvent : public WebDOMEvent { |
48 public: | 51 public: |
49 WebDOMMessageEvent() { } | 52 WebDOMMessageEvent() { } |
50 BLINK_EXPORT void initMessageEvent(const WebString& type, bool canBubble, bo
ol cancelable, const WebSerializedScriptValue& messageData, const WebString& ori
gin, const WebFrame* sourceFrame, const WebDocument& targetDocument, const WebSt
ring& lastEventId, const WebMessagePortChannelArray& channels = WebMessagePortCh
annelArray()); | 53 BLINK_EXPORT void initMessageEvent(const WebString& type, bool canBubble, bo
ol cancelable, const WebSerializedScriptValue& messageData, const WebString& ori
gin, const WebFrame* sourceFrame, const WebDocument& targetDocument, const WebSt
ring& lastEventId, const WebMessagePortChannelArray& channels = WebMessagePortCh
annelArray()); |
51 // DEPRECATED: Use the initMessageEvent method above. This method will be re
moved. | |
52 BLINK_EXPORT void initMessageEvent(const WebString& type, bool canBubble, bo
ol cancelable, const WebSerializedScriptValue& messageData, const WebString& ori
gin, const WebFrame* sourceFrame, const WebString& lastEventId, const WebMessage
PortChannelArray& channels = WebMessagePortChannelArray()); | |
53 | 54 |
54 BLINK_EXPORT WebSerializedScriptValue data() const; | 55 BLINK_EXPORT WebSerializedScriptValue data() const; |
55 BLINK_EXPORT WebString origin() const; | 56 BLINK_EXPORT WebString origin() const; |
56 | 57 |
57 BLINK_EXPORT WebMessagePortChannelArray releaseChannels(); | 58 BLINK_EXPORT WebMessagePortChannelArray releaseChannels(); |
58 | 59 |
59 #if BLINK_IMPLEMENTATION | 60 #if BLINK_IMPLEMENTATION |
60 explicit WebDOMMessageEvent(const PassRefPtrWillBeRawPtr<MessageEvent>& e) :
WebDOMEvent(e) { } | 61 explicit WebDOMMessageEvent(const PassRefPtrWillBeRawPtr<MessageEvent>& e) :
WebDOMEvent(e) { } |
61 #endif | 62 #endif |
62 }; | 63 }; |
63 | 64 |
64 } // namespace blink | 65 } // namespace blink |
65 | 66 |
66 #endif | 67 #endif |
OLD | NEW |