OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "JSHTMLCollection.h" | 41 #include "JSHTMLCollection.h" |
42 #include "JSHistory.h" | 42 #include "JSHistory.h" |
43 #include "JSImageConstructor.h" | 43 #include "JSImageConstructor.h" |
44 #include "JSLocation.h" | 44 #include "JSLocation.h" |
45 #include "JSMessageChannelConstructor.h" | 45 #include "JSMessageChannelConstructor.h" |
46 #include "JSMessagePort.h" | 46 #include "JSMessagePort.h" |
47 #include "JSOptionConstructor.h" | 47 #include "JSOptionConstructor.h" |
48 #include "JSSharedWorkerConstructor.h" | 48 #include "JSSharedWorkerConstructor.h" |
49 #include "JSWebKitCSSMatrixConstructor.h" | 49 #include "JSWebKitCSSMatrixConstructor.h" |
50 #include "JSWebKitPointConstructor.h" | 50 #include "JSWebKitPointConstructor.h" |
| 51 #include "JSWebSocketConstructor.h" |
51 #include "JSWorkerConstructor.h" | 52 #include "JSWorkerConstructor.h" |
52 #include "JSXMLHttpRequestConstructor.h" | 53 #include "JSXMLHttpRequestConstructor.h" |
53 #include "JSXSLTProcessorConstructor.h" | 54 #include "JSXSLTProcessorConstructor.h" |
54 #include "Location.h" | 55 #include "Location.h" |
55 #include "MediaPlayer.h" | 56 #include "MediaPlayer.h" |
56 #include "MessagePort.h" | 57 #include "MessagePort.h" |
57 #include "Page.h" | 58 #include "Page.h" |
58 #include "PlatformScreen.h" | 59 #include "PlatformScreen.h" |
59 #include "RegisteredEventListener.h" | 60 #include "RegisteredEventListener.h" |
60 #include "ScheduledAction.h" | 61 #include "ScheduledAction.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 } | 480 } |
480 #endif | 481 #endif |
481 | 482 |
482 #if ENABLE(SHARED_WORKERS) | 483 #if ENABLE(SHARED_WORKERS) |
483 JSValue JSDOMWindow::sharedWorker(ExecState* exec) const | 484 JSValue JSDOMWindow::sharedWorker(ExecState* exec) const |
484 { | 485 { |
485 return getDOMConstructor<JSSharedWorkerConstructor>(exec, this); | 486 return getDOMConstructor<JSSharedWorkerConstructor>(exec, this); |
486 } | 487 } |
487 #endif | 488 #endif |
488 | 489 |
| 490 #if ENABLE(WEB_SOCKETS) |
| 491 JSValue JSDOMWindow::webSocket(ExecState* exec) const |
| 492 { |
| 493 return getDOMConstructor<JSWebSocketConstructor>(exec, this); |
| 494 } |
| 495 #endif |
| 496 |
489 // Custom functions | 497 // Custom functions |
490 | 498 |
491 // Helper for window.open() and window.showModalDialog() | 499 // Helper for window.open() and window.showModalDialog() |
492 static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
rame, | 500 static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
rame, |
493 Frame* openerFrame, const String& url, const String&
frameName, | 501 Frame* openerFrame, const String& url, const String&
frameName, |
494 const WindowFeatures& windowFeatures, JSValue dialogA
rgs) | 502 const WindowFeatures& windowFeatures, JSValue dialogA
rgs) |
495 { | 503 { |
496 ASSERT(lexicalFrame); | 504 ASSERT(lexicalFrame); |
497 ASSERT(dynamicFrame); | 505 ASSERT(dynamicFrame); |
498 | 506 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 return 0; | 820 return 0; |
813 JSObject* object = asObject(value); | 821 JSObject* object = asObject(value); |
814 if (object->inherits(&JSDOMWindow::s_info)) | 822 if (object->inherits(&JSDOMWindow::s_info)) |
815 return static_cast<JSDOMWindow*>(object)->impl(); | 823 return static_cast<JSDOMWindow*>(object)->impl(); |
816 if (object->inherits(&JSDOMWindowShell::s_info)) | 824 if (object->inherits(&JSDOMWindowShell::s_info)) |
817 return static_cast<JSDOMWindowShell*>(object)->impl(); | 825 return static_cast<JSDOMWindowShell*>(object)->impl(); |
818 return 0; | 826 return 0; |
819 } | 827 } |
820 | 828 |
821 } // namespace WebCore | 829 } // namespace WebCore |
OLD | NEW |