Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2630693002: Make ScriptController inherit LocalWindowProxyManager
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 void FrameLoader::runScriptsAtDocumentElementAvailable() { 1755 void FrameLoader::runScriptsAtDocumentElementAvailable() {
1756 client()->runScriptsAtDocumentElementAvailable(); 1756 client()->runScriptsAtDocumentElementAvailable();
1757 // The frame might be detached at this point. 1757 // The frame might be detached at this point.
1758 } 1758 }
1759 1759
1760 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { 1760 void FrameLoader::dispatchDidClearDocumentOfWindowObject() {
1761 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) 1761 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
1762 return; 1762 return;
1763 1763
1764 Settings* settings = m_frame->settings(); 1764 Settings* settings = m_frame->settings();
1765 if (settings && settings->getForceMainWorldInitialization()) { 1765 if (settings && settings->getForceMainWorldInitialization())
1766 // Forcibly instantiate WindowProxy. 1766 m_frame->script().initializeMainWorld();
1767 m_frame->script().windowProxy(DOMWrapperWorld::mainWorld());
1768 }
1769 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); 1767 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame);
1770 1768
1771 if (m_dispatchingDidClearWindowObjectInMainWorld) 1769 if (m_dispatchingDidClearWindowObjectInMainWorld)
1772 return; 1770 return;
1773 AutoReset<bool> inDidClearWindowObject( 1771 AutoReset<bool> inDidClearWindowObject(
1774 &m_dispatchingDidClearWindowObjectInMainWorld, true); 1772 &m_dispatchingDidClearWindowObjectInMainWorld, true);
1775 // We just cleared the document, not the entire window object, but for the 1773 // We just cleared the document, not the entire window object, but for the
1776 // embedder that's close enough. 1774 // embedder that's close enough.
1777 client()->dispatchDidClearWindowObjectInMainWorld(); 1775 client()->dispatchDidClearWindowObjectInMainWorld();
1778 } 1776 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 m_documentLoader ? m_documentLoader->url() : String()); 1903 m_documentLoader ? m_documentLoader->url() : String());
1906 return tracedValue; 1904 return tracedValue;
1907 } 1905 }
1908 1906
1909 inline void FrameLoader::takeObjectSnapshot() const { 1907 inline void FrameLoader::takeObjectSnapshot() const {
1910 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1908 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1911 toTracedValue()); 1909 toTracedValue());
1912 } 1910 }
1913 1911
1914 } // namespace blink 1912 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLDocument.cpp ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698