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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 1381003004: Better distinguish didFinishLoad and didStopLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "public/web/WebFrame.h" 6 #include "public/web/WebFrame.h"
7 7
8 #include "bindings/core/v8/WindowProxyManager.h" 8 #include "bindings/core/v8/WindowProxyManager.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) 275 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement)
276 { 276 {
277 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); 277 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get();
278 278
279 if (!isHTMLFrameElementBase(element)) 279 if (!isHTMLFrameElementBase(element))
280 return nullptr; 280 return nullptr;
281 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); 281 return fromFrame(toHTMLFrameElementBase(element)->contentFrame());
282 } 282 }
283 283
284 bool WebFrame::isLoading() const
285 {
286 if (Frame* frame = toCoreFrame(this))
287 return frame->isLoading();
288 return false;
289 }
290
284 WebFrame* WebFrame::fromFrame(Frame* frame) 291 WebFrame* WebFrame::fromFrame(Frame* frame)
285 { 292 {
286 if (!frame) 293 if (!frame)
287 return 0; 294 return 0;
288 295
289 if (frame->isLocalFrame()) 296 if (frame->isLocalFrame())
290 return WebLocalFrameImpl::fromFrame(toLocalFrame(*frame)); 297 return WebLocalFrameImpl::fromFrame(toLocalFrame(*frame));
291 return WebRemoteFrameImpl::fromFrame(toRemoteFrame(*frame)); 298 return WebRemoteFrameImpl::fromFrame(toRemoteFrame(*frame));
292 } 299 }
293 300
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ 362 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \
356 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } 363 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); }
357 364
358 DEFINE_VISITOR_METHOD(Visitor*) 365 DEFINE_VISITOR_METHOD(Visitor*)
359 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 366 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
360 367
361 #undef DEFINE_VISITOR_METHOD 368 #undef DEFINE_VISITOR_METHOD
362 #endif 369 #endif
363 370
364 } // namespace blink 371 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698