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

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

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.cpp ('k') | Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 } 1070 }
1071 FrameVector::iterator end = childrenToDetach.end(); 1071 FrameVector::iterator end = childrenToDetach.end();
1072 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) 1072 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it)
1073 (*it)->loader().detachFromParent(); 1073 (*it)->loader().detachFromParent();
1074 } 1074 }
1075 1075
1076 // Called every time a resource is completely loaded or an error is received. 1076 // Called every time a resource is completely loaded or an error is received.
1077 void FrameLoader::checkLoadComplete() 1077 void FrameLoader::checkLoadComplete()
1078 { 1078 {
1079 ASSERT(client()->hasWebView()); 1079 ASSERT(client()->hasWebView());
1080 if (Page* page = m_frame->page()) 1080 if (Page* page = m_frame->page()) {
1081 page->mainFrame()->loader().checkLoadCompleteForThisFrame(); 1081 if (page->mainFrame()->isLocalFrame())
1082 page->deprecatedLocalMainFrame()->loader().checkLoadCompleteForThisF rame();
1083 }
1082 } 1084 }
1083 1085
1084 String FrameLoader::userAgent(const KURL& url) const 1086 String FrameLoader::userAgent(const KURL& url) const
1085 { 1087 {
1086 String userAgent = client()->userAgent(url); 1088 String userAgent = client()->userAgent(url);
1087 InspectorInstrumentation::applyUserAgentOverride(m_frame, &userAgent); 1089 InspectorInstrumentation::applyUserAgentOverride(m_frame, &userAgent);
1088 return userAgent; 1090 return userAgent;
1089 } 1091 }
1090 1092
1091 void FrameLoader::frameDetached() 1093 void FrameLoader::frameDetached()
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. 1474 // FIXME: We need a way to propagate sandbox flags to out-of-process frames.
1473 Frame* parentFrame = m_frame->tree().parent(); 1475 Frame* parentFrame = m_frame->tree().parent();
1474 if (parentFrame && parentFrame->isLocalFrame()) 1476 if (parentFrame && parentFrame->isLocalFrame())
1475 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); 1477 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags();
1476 if (FrameOwner* frameOwner = m_frame->owner()) 1478 if (FrameOwner* frameOwner = m_frame->owner())
1477 flags |= frameOwner->sandboxFlags(); 1479 flags |= frameOwner->sandboxFlags();
1478 return flags; 1480 return flags;
1479 } 1481 }
1480 1482
1481 } // namespace WebCore 1483 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.cpp ('k') | Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698