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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 #ifndef WebDOMMessageEvent_h | 30 #ifndef WebDOMMessageEvent_h |
31 #define WebDOMMessageEvent_h | 31 #define WebDOMMessageEvent_h |
32 | 32 |
33 #include "../platform/WebMessagePortChannel.h" | 33 #include "public/platform/WebMessagePortChannel.h" |
34 #include "WebDOMEvent.h" | 34 #include "public/platform/WebString.h" |
35 #include "WebSerializedScriptValue.h" | 35 #include "public/web/WebDOMEvent.h" |
| 36 #include "public/web/WebDocument.h" |
| 37 #include "public/web/WebSerializedScriptValue.h" |
36 | 38 |
37 #if BLINK_IMPLEMENTATION | 39 #if BLINK_IMPLEMENTATION |
38 #include "core/events/Event.h" | |
39 #include "core/events/MessageEvent.h" | 40 #include "core/events/MessageEvent.h" |
40 #endif | 41 #endif |
41 | 42 |
42 namespace blink { | 43 namespace blink { |
43 | 44 |
44 class WebFrame; | 45 class WebFrame; |
45 class WebString; | |
46 | 46 |
47 // An interface for posting message events to the target frame. The message | 47 // An interface for posting message events to the target frame. The message |
48 // events are used for communication between documents and described here: | 48 // events are used for communication between documents and described here: |
49 // http://www.w3.org/TR/2012/WD-webmessaging-20120313/#terminology | 49 // http://www.w3.org/TR/2012/WD-webmessaging-20120313/#terminology |
50 class WebDOMMessageEvent : public WebDOMEvent { | 50 class WebDOMMessageEvent : public WebDOMEvent { |
51 public: | 51 public: |
| 52 BLINK_EXPORT WebDOMMessageEvent(const WebSerializedScriptValue& messageData,
const WebString& origin = WebString(), const WebFrame* sourceFrame = nullptr, c
onst WebDocument& targetDocument = WebDocument(), const WebMessagePortChannelArr
ay& channels = WebMessagePortChannelArray()); |
52 WebDOMMessageEvent() { } | 53 WebDOMMessageEvent() { } |
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()); | |
54 | 54 |
55 BLINK_EXPORT WebSerializedScriptValue data() const; | 55 BLINK_EXPORT WebSerializedScriptValue data() const; |
56 BLINK_EXPORT WebString origin() const; | 56 BLINK_EXPORT WebString origin() const; |
57 | 57 |
58 BLINK_EXPORT WebMessagePortChannelArray releaseChannels(); | 58 BLINK_EXPORT WebMessagePortChannelArray releaseChannels(); |
59 | 59 |
60 #if BLINK_IMPLEMENTATION | 60 #if BLINK_IMPLEMENTATION |
61 explicit WebDOMMessageEvent(const PassRefPtrWillBeRawPtr<MessageEvent>& e) :
WebDOMEvent(e) { } | 61 explicit WebDOMMessageEvent(const PassRefPtrWillBeRawPtr<MessageEvent>& e) :
WebDOMEvent(e) { } |
62 #endif | 62 #endif |
63 }; | 63 }; |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
66 | 66 |
67 #endif | 67 #endif |
OLD | NEW |