Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / WebDOMMessageEvent.cpp
index ad76f7f..0e76871 100644 (file)
  */
 
 #include "config.h"
-#include "WebDOMMessageEvent.h"
+#include "public/web/WebDOMMessageEvent.h"
 
-#include "WebFrame.h"
-#include "WebFrameImpl.h"
-#include "WebSerializedScriptValue.h"
-#include "bindings/v8/SerializedScriptValue.h"
+#include "bindings/core/v8/SerializedScriptValue.h"
 #include "core/dom/Document.h"
-#include "core/events/MessageEvent.h"
 #include "core/dom/MessagePort.h"
-#include "core/frame/DOMWindow.h"
+#include "core/events/MessageEvent.h"
+#include "core/frame/LocalDOMWindow.h"
 #include "public/platform/WebString.h"
-
-using namespace WebCore;
+#include "public/web/WebFrame.h"
+#include "public/web/WebSerializedScriptValue.h"
+#include "web/WebLocalFrameImpl.h"
 
 namespace blink {
 
@@ -49,10 +47,10 @@ void WebDOMMessageEvent::initMessageEvent(const WebString& type, bool canBubble,
 {
     ASSERT(m_private.get());
     ASSERT(isMessageEvent());
-    DOMWindow* window = 0;
+    LocalDOMWindow* window = 0;
     if (sourceFrame)
-        window = toWebFrameImpl(sourceFrame)->frame()->domWindow();
-    OwnPtr<MessagePortArray> ports;
+        window = toWebLocalFrameImpl(sourceFrame)->frame()->domWindow();
+    OwnPtrWillBeRawPtr<MessagePortArray> ports = nullptr;
     if (sourceFrame)
         ports = MessagePort::toMessagePortArray(window->document(), webChannels);
     unwrap<MessageEvent>()->initMessageEvent(type, canBubble, cancelable, messageData, origin, lastEventId, window, ports.release());