OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
9 * rights reserved. | 9 * rights reserved. |
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 visitor->trace(m_editor); | 354 visitor->trace(m_editor); |
355 visitor->trace(m_spellChecker); | 355 visitor->trace(m_spellChecker); |
356 visitor->trace(m_selection); | 356 visitor->trace(m_selection); |
357 visitor->trace(m_eventHandler); | 357 visitor->trace(m_eventHandler); |
358 visitor->trace(m_console); | 358 visitor->trace(m_console); |
359 visitor->trace(m_inputMethodController); | 359 visitor->trace(m_inputMethodController); |
360 Frame::trace(visitor); | 360 Frame::trace(visitor); |
361 Supplementable<LocalFrame>::trace(visitor); | 361 Supplementable<LocalFrame>::trace(visitor); |
362 } | 362 } |
363 | 363 |
364 WindowProxy* LocalFrame::windowProxy(DOMWrapperWorld& world) { | |
365 return m_script->windowProxy(world); | |
366 } | |
367 | |
368 void LocalFrame::navigate(Document& originDocument, | 364 void LocalFrame::navigate(Document& originDocument, |
369 const KURL& url, | 365 const KURL& url, |
370 bool replaceCurrentItem, | 366 bool replaceCurrentItem, |
371 UserGestureStatus userGestureStatus) { | 367 UserGestureStatus userGestureStatus) { |
372 m_navigationScheduler->scheduleLocationChange(&originDocument, url, | 368 m_navigationScheduler->scheduleLocationChange(&originDocument, url, |
373 replaceCurrentItem); | 369 replaceCurrentItem); |
374 } | 370 } |
375 | 371 |
376 void LocalFrame::navigate(const FrameLoadRequest& request) { | 372 void LocalFrame::navigate(const FrameLoadRequest& request) { |
377 m_loader.load(request); | 373 m_loader.load(request); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 document()->url().getString() + "'. " + reason + "\n"; | 482 document()->url().getString() + "'. " + reason + "\n"; |
487 | 483 |
488 domWindow()->printErrorMessage(message); | 484 domWindow()->printErrorMessage(message); |
489 } | 485 } |
490 | 486 |
491 void LocalFrame::printNavigationWarning(const String& message) { | 487 void LocalFrame::printNavigationWarning(const String& message) { |
492 m_console->addMessage( | 488 m_console->addMessage( |
493 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); | 489 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
494 } | 490 } |
495 | 491 |
496 WindowProxyManagerBase* LocalFrame::getWindowProxyManager() const { | |
497 return m_script->getWindowProxyManager(); | |
498 } | |
499 | |
500 bool LocalFrame::shouldClose() { | 492 bool LocalFrame::shouldClose() { |
501 // TODO(dcheng): This should be fixed to dispatch beforeunload events to | 493 // TODO(dcheng): This should be fixed to dispatch beforeunload events to |
502 // both local and remote frames. | 494 // both local and remote frames. |
503 return m_loader.shouldClose(); | 495 return m_loader.shouldClose(); |
504 } | 496 } |
505 | 497 |
506 void LocalFrame::detachChildren() { | 498 void LocalFrame::detachChildren() { |
507 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); | 499 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); |
508 | 500 |
509 if (Document* document = this->document()) | 501 if (Document* document = this->document()) |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 | 840 |
849 bool LocalFrame::shouldThrottleRendering() const { | 841 bool LocalFrame::shouldThrottleRendering() const { |
850 return view() && view()->shouldThrottleRendering(); | 842 return view() && view()->shouldThrottleRendering(); |
851 } | 843 } |
852 | 844 |
853 inline LocalFrame::LocalFrame(LocalFrameClient* client, | 845 inline LocalFrame::LocalFrame(LocalFrameClient* client, |
854 FrameHost* host, | 846 FrameHost* host, |
855 FrameOwner* owner, | 847 FrameOwner* owner, |
856 InterfaceProvider* interfaceProvider, | 848 InterfaceProvider* interfaceProvider, |
857 InterfaceRegistry* interfaceRegistry) | 849 InterfaceRegistry* interfaceRegistry) |
858 : Frame(client, host, owner), | 850 : Frame(client, host, owner, LocalWindowProxyManager::create(*this)), |
859 m_frameScheduler(page()->chromeClient().createFrameScheduler( | 851 m_frameScheduler(page()->chromeClient().createFrameScheduler( |
860 client->frameBlameContext())), | 852 client->frameBlameContext())), |
861 m_loader(this), | 853 m_loader(this), |
862 m_navigationScheduler(NavigationScheduler::create(this)), | 854 m_navigationScheduler(NavigationScheduler::create(this)), |
863 m_script(ScriptController::create(this)), | 855 m_script(ScriptController::create( |
| 856 *this, |
| 857 *static_cast<LocalWindowProxyManager*>(getWindowProxyManager()))), |
864 m_editor(Editor::create(*this)), | 858 m_editor(Editor::create(*this)), |
865 m_spellChecker(SpellChecker::create(*this)), | 859 m_spellChecker(SpellChecker::create(*this)), |
866 m_selection(FrameSelection::create(*this)), | 860 m_selection(FrameSelection::create(*this)), |
867 m_eventHandler(new EventHandler(*this)), | 861 m_eventHandler(new EventHandler(*this)), |
868 m_console(FrameConsole::create(*this)), | 862 m_console(FrameConsole::create(*this)), |
869 m_inputMethodController(InputMethodController::create(*this)), | 863 m_inputMethodController(InputMethodController::create(*this)), |
870 m_navigationDisableCount(0), | 864 m_navigationDisableCount(0), |
871 m_pageZoomFactor(parentPageZoomFactor(this)), | 865 m_pageZoomFactor(parentPageZoomFactor(this)), |
872 m_textZoomFactor(parentTextZoomFactor(this)), | 866 m_textZoomFactor(parentTextZoomFactor(this)), |
873 m_inViewSourceMode(false), | 867 m_inViewSourceMode(false), |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 912 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
919 m_frame->client()->frameBlameContext()->Enter(); | 913 m_frame->client()->frameBlameContext()->Enter(); |
920 } | 914 } |
921 | 915 |
922 ScopedFrameBlamer::~ScopedFrameBlamer() { | 916 ScopedFrameBlamer::~ScopedFrameBlamer() { |
923 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
924 m_frame->client()->frameBlameContext()->Leave(); | 918 m_frame->client()->frameBlameContext()->Leave(); |
925 } | 919 } |
926 | 920 |
927 } // namespace blink | 921 } // namespace blink |
OLD | NEW |