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

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 24286007: Add hasCommittedRealDocument API to WebFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 void WebFrameImpl::stopLoading() 976 void WebFrameImpl::stopLoading()
977 { 977 {
978 if (!frame()) 978 if (!frame())
979 return; 979 return;
980 // FIXME: Figure out what we should really do here. It seems like a bug 980 // FIXME: Figure out what we should really do here. It seems like a bug
981 // that FrameLoader::stopLoading doesn't call stopAllLoaders. 981 // that FrameLoader::stopLoading doesn't call stopAllLoaders.
982 frame()->loader()->stopAllLoaders(); 982 frame()->loader()->stopAllLoaders();
983 } 983 }
984 984
985 bool WebFrameImpl::hasCommittedRealDocument() const
986 {
987 if (!frame())
988 return false;
989 return frame()->loader()->stateMachine()->committedFirstRealDocumentLoad();
990 }
991
985 WebDataSource* WebFrameImpl::provisionalDataSource() const 992 WebDataSource* WebFrameImpl::provisionalDataSource() const
986 { 993 {
987 ASSERT(frame()); 994 ASSERT(frame());
988 995
989 // We regard the policy document loader as still provisional. 996 // We regard the policy document loader as still provisional.
990 DocumentLoader* documentLoader = frame()->loader()->provisionalDocumentLoade r(); 997 DocumentLoader* documentLoader = frame()->loader()->provisionalDocumentLoade r();
991 if (!documentLoader) 998 if (!documentLoader)
992 documentLoader = frame()->loader()->policyDocumentLoader(); 999 documentLoader = frame()->loader()->policyDocumentLoader();
993 1000
994 return DataSourceForDocLoader(documentLoader); 1001 return DataSourceForDocLoader(documentLoader);
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 2483
2477 // There is a possibility that the frame being detached was the only 2484 // There is a possibility that the frame being detached was the only
2478 // pending one. We need to make sure final replies can be sent. 2485 // pending one. We need to make sure final replies can be sent.
2479 flushCurrentScopingEffort(m_findRequestIdentifier); 2486 flushCurrentScopingEffort(m_findRequestIdentifier);
2480 2487
2481 cancelPendingScopingEffort(); 2488 cancelPendingScopingEffort();
2482 } 2489 }
2483 } 2490 }
2484 2491
2485 } // namespace WebKit 2492 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | public/web/WebFrame.h » ('j') | public/web/WebFrame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698